aboutsummaryrefslogtreecommitdiff
path: root/engines/macventure
diff options
context:
space:
mode:
authorBorja Lorente2016-07-28 12:50:37 +0200
committerBorja Lorente2016-08-14 19:00:36 +0200
commit5781b738be5b7821982ee966743696c83492dbd3 (patch)
treeb435a63f09799aa2a88a61ea6fc70b4b89278265 /engines/macventure
parentf58435a2bcf41153b5a0c0e61548dd350e24cad9 (diff)
downloadscummvm-rg350-5781b738be5b7821982ee966743696c83492dbd3.tar.gz
scummvm-rg350-5781b738be5b7821982ee966743696c83492dbd3.tar.bz2
scummvm-rg350-5781b738be5b7821982ee966743696c83492dbd3.zip
MACVENTURE: Deja Vu playable
Diffstat (limited to 'engines/macventure')
-rw-r--r--engines/macventure/container.h4
-rw-r--r--engines/macventure/detection_tables.h2
-rw-r--r--engines/macventure/macventure.cpp15
-rw-r--r--engines/macventure/macventure.h3
-rw-r--r--engines/macventure/stringtable.h12
5 files changed, 28 insertions, 8 deletions
diff --git a/engines/macventure/container.h b/engines/macventure/container.h
index a909122874..21fdc6c529 100644
--- a/engines/macventure/container.h
+++ b/engines/macventure/container.h
@@ -45,8 +45,8 @@ public:
Container(Common::String filename) {
_filename = filename;
- FSNode node = FSDirectory(".");
- debug(node.getDisplayName().c_str());
+ //FSNode node = FSDirectory(".");
+ //debug(node.getDisplayName().c_str());
if (!_file.open(_filename))
error("Could not open %s", _filename.c_str());
diff --git a/engines/macventure/detection_tables.h b/engines/macventure/detection_tables.h
index ebcf35f8b6..0b55d03dd5 100644
--- a/engines/macventure/detection_tables.h
+++ b/engines/macventure/detection_tables.h
@@ -28,7 +28,7 @@ namespace MacVenture {
static const ADGameDescription gameDescriptions[] = {
BASEGAME("shadowgate", "Zojoi Rerelease", "Shadowgate.bin", "ebbfbcbf93938bd2900cb0c0213b19ad", 68974), // Zojoi Rerelease
- BASEGAME("deja_vu", "Zojoi Rerelease", "Déjà Vu.bin", "5e9f5a8e3c8eb29ed02b34ae5937354f", 69034), // Zojoi Rerelease
+ BASEGAME("deja_vu", "Zojoi Rerelease", "Deja Vu.bin", "5e9f5a8e3c8eb29ed02b34ae5937354f", 69034), // Zojoi Rerelease
AD_TABLE_END_MARKER
};
} // End of namespace MacVenture
diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp
index 871b10428e..9cba0502ce 100644
--- a/engines/macventure/macventure.cpp
+++ b/engines/macventure/macventure.cpp
@@ -33,6 +33,16 @@
namespace MacVenture {
+// HACK, see below
+void toASCII(Common::String &str) {
+ debug("toASCII: %s", str.c_str());
+ Common::String::iterator it = str.begin();
+ for (; it != str.end(); it++) {
+ if (*it == '\216') { str.replace(it, it + 1, "e"); }
+ if (*it == '\210') { str.replace(it, it + 1, "a"); }
+ }
+}
+
enum {
kMaxMenuTitleLength = 30
};
@@ -438,7 +448,10 @@ Common::String MacVentureEngine::getStartGameFileName() {
char *fileName = new char[length + 1];
res->read(fileName, length);
fileName[length] = '\0';
- return Common::String(fileName, length);
+ Common::String result = Common::String(fileName, length);
+ // HACK, see definition of toASCII
+ toASCII(result);
+ return result;
}
const GlobalSettings& MacVentureEngine::getGlobalSettings() const {
diff --git a/engines/macventure/macventure.h b/engines/macventure/macventure.h
index b228a34713..6baaa31ac1 100644
--- a/engines/macventure/macventure.h
+++ b/engines/macventure/macventure.h
@@ -54,6 +54,9 @@ class ScriptEngine;
typedef uint32 ObjID;
+// HACK, until I find a way to translate correctly
+extern void toASCII(Common::String &str);
+
enum {
kScreenWidth = 512,
kScreenHeight = 342
diff --git a/engines/macventure/stringtable.h b/engines/macventure/stringtable.h
index ffb9d375ab..ff9eddc040 100644
--- a/engines/macventure/stringtable.h
+++ b/engines/macventure/stringtable.h
@@ -29,6 +29,8 @@
namespace MacVenture {
+extern void toASCII(Common::String &str);
+
enum StringTableID {
kErrorStringTableID = 0x80,
kFilenamesStringTableID = 0x81,
@@ -39,11 +41,11 @@ enum StringTableID {
class StringTable {
public:
- StringTable(MacVentureEngine *engine, Common::MacResManager *resMan, StringTableID id) {
+ StringTable(MacVentureEngine *engine, Common::MacResManager *resMan, StringTableID id) {
_engine = engine;
_resourceManager = resMan;
_id = id;
-
+
if (!loadStrings())
error("Could not load string table %x", id);
}
@@ -80,8 +82,11 @@ private:
char* str = new char[strLength + 1];
res->read(str, strLength);
str[strLength] = '\0';
+ // HACK until a proper special char implementation is found, this will have to do.
+ Common::String result = Common::String(str);
+ toASCII(result);
debug(11, "Loaded string %s", str);
- _strings.push_back(Common::String(str));
+ _strings.push_back(Common::String(result));
delete[] str;
}
@@ -101,4 +106,3 @@ private:
} // End of namespace MacVenture
#endif
-