aboutsummaryrefslogtreecommitdiff
path: root/engines/tucker
diff options
context:
space:
mode:
authorGregory Montoir2008-12-12 21:42:38 +0000
committerGregory Montoir2008-12-12 21:42:38 +0000
commit12bf681ee86fe57c6adb188817d382bb76142f08 (patch)
treec3868f719fe82df4f42057aab08b8db67391544a /engines/tucker
parentdcca0c9f66cdec863aec0e40e0714bc7845fd8c3 (diff)
downloadscummvm-rg350-12bf681ee86fe57c6adb188817d382bb76142f08.tar.gz
scummvm-rg350-12bf681ee86fe57c6adb188817d382bb76142f08.tar.bz2
scummvm-rg350-12bf681ee86fe57c6adb188817d382bb76142f08.zip
fixed german version detection, added datafiles remapping as listed in bug tracker item #2422555
svn-id: r35319
Diffstat (limited to 'engines/tucker')
-rw-r--r--engines/tucker/detection.cpp2
-rw-r--r--engines/tucker/resource.cpp34
-rw-r--r--engines/tucker/tucker.cpp9
3 files changed, 29 insertions, 16 deletions
diff --git a/engines/tucker/detection.cpp b/engines/tucker/detection.cpp
index f80c9b5dfa..e6337ac913 100644
--- a/engines/tucker/detection.cpp
+++ b/engines/tucker/detection.cpp
@@ -67,7 +67,7 @@ static const Common::ADGameDescription tuckerGameDescriptions[] = {
"tucker",
"",
AD_ENTRY1s("infobrgr.txt", "4df9eb65722418d1a1723508115b146c", 552),
- Common::GR_GRE,
+ Common::DE_DEU,
Common::kPlatformPC,
Common::ADGF_NO_FLAGS
},
diff --git a/engines/tucker/resource.cpp b/engines/tucker/resource.cpp
index f816ee3d2c..38141d452a 100644
--- a/engines/tucker/resource.cpp
+++ b/engines/tucker/resource.cpp
@@ -162,6 +162,25 @@ public:
};
uint8 *TuckerEngine::loadFile(uint8 *p) {
+ if (_gameVer.lang == Common::DE_DEU) {
+ if (strcmp(_fileToLoad, "bgtext.c") == 0) {
+ strcpy(_fileToLoad, "bgtextgr.c");
+ } else if (strcmp(_fileToLoad, "charname.c") == 0) {
+ strcpy(_fileToLoad, "charnmgr.c");
+ } else if (strcmp(_fileToLoad, "data5.c") == 0) {
+ strcpy(_fileToLoad, "data5gr.c");
+ } else if (strcmp(_fileToLoad, "infobar.txt") == 0) {
+ strcpy(_fileToLoad, "infobrgr.txt");
+ } else if (strcmp(_fileToLoad, "charsize.dta") == 0) {
+ strcpy(_fileToLoad, "charszgr.dta");
+ } else if (strncmp(_fileToLoad, "objtxt", 6) == 0) {
+ const int num = _fileToLoad[6];
+ snprintf(_fileToLoad, sizeof(_fileToLoad), "objtx%dgr.c", num);
+ } else if (strncmp(_fileToLoad, "pt", 2) == 0) {
+ const int num = _fileToLoad[2];
+ snprintf(_fileToLoad, sizeof(_fileToLoad), "pt%dtxtgr.c", num);
+ }
+ }
_fileLoadSize = 0;
bool decode = false;
if (_useEnc) {
@@ -270,7 +289,7 @@ void TuckerEngine::loadCharset() {
loadImage(_loadTempBuf, 0);
switch (_gameVer.lang) {
case Common::FR_FRA:
- case Common::GR_GRE:
+ case Common::DE_DEU:
Graphics::setCharset(kCharsetTypeFrGr);
break;
default:
@@ -507,12 +526,13 @@ void TuckerEngine::loadData() {
}
const int x = t.getNextInteger();
const int y = t.getNextInteger();
- _dataTable[_dataCount].sourceOffset = y * 320 + x;
- _dataTable[_dataCount].xSize = t.getNextInteger();
- _dataTable[_dataCount].ySize = t.getNextInteger();
- _dataTable[_dataCount].xDest = t.getNextInteger();
- _dataTable[_dataCount].yDest = t.getNextInteger();
- _dataTable[_dataCount].index = count;
+ Data *d = &_dataTable[_dataCount];
+ d->sourceOffset = y * 320 + x;
+ d->xSize = t.getNextInteger();
+ d->ySize = t.getNextInteger();
+ d->xDest = t.getNextInteger();
+ d->yDest = t.getNextInteger();
+ d->index = count;
}
if (flag < 2) {
++objNum;
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp
index 5c65d83d1a..b12af103ba 100644
--- a/engines/tucker/tucker.cpp
+++ b/engines/tucker/tucker.cpp
@@ -335,14 +335,7 @@ void TuckerEngine::mainLoop() {
loadCharSizeDta();
loadCharset();
loadPanel();
- switch (_gameVer.lang) {
- case Common::GR_GRE:
- strcpy(_fileToLoad, "infobrgr.txt");
- break;
- default:
- strcpy(_fileToLoad, "infobar.txt");
- break;
- }
+ strcpy(_fileToLoad, "infobar.txt");
loadFile(_infoBarBuf);
strcpy(_fileToLoad, "data5.c");
_data5Buf = loadFile();