aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/parallaction/disk.h1
-rw-r--r--engines/parallaction/disk_br.cpp24
2 files changed, 24 insertions, 1 deletions
diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h
index 7c3856bf4e..693c3f7fa2 100644
--- a/engines/parallaction/disk.h
+++ b/engines/parallaction/disk.h
@@ -200,6 +200,7 @@ class DosDisk_br : public Disk {
protected:
Parallaction *_vm;
+ char _partPath[PATH_LEN];
protected:
void errorFileNotFound(const char *s);
diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp
index a889e9c298..f9ba2c2295 100644
--- a/engines/parallaction/disk_br.cpp
+++ b/engines/parallaction/disk_br.cpp
@@ -36,7 +36,11 @@ void DosDisk_br::errorFileNotFound(const char *s) {
Common::String DosDisk_br::selectArchive(const Common::String& name) {
debugC(5, kDebugDisk, "DosDisk_br::selectArchive");
- return "";
+
+ Common::String oldPath(_partPath);
+ strcpy(_partPath, name.c_str());
+
+ return oldPath;
}
void DosDisk_br::setLanguage(uint16 language) {
@@ -175,6 +179,24 @@ BackgroundInfo* DosDisk_br::loadScenery(const char *name, const char *mask, cons
Table* DosDisk_br::loadTable(const char* name) {
debugC(5, kDebugDisk, "DosDisk_br::loadTable");
+
+ char path[PATH_LEN];
+ sprintf(path, "%s/%s.tab", _partPath, name);
+
+ Common::File stream;
+ if (!stream.open(path))
+ errorFileNotFound(path);
+
+ Table *t = new Table(100);
+
+ fillBuffers(stream);
+ while (scumm_stricmp(_tokens[0], "ENDTABLE")) {
+ t->addData(_tokens[0]);
+ fillBuffers(stream);
+ }
+
+ stream.close();
+
return 0;
}