aboutsummaryrefslogtreecommitdiff
path: root/engines/lab
diff options
context:
space:
mode:
authorFilippos Karapetis2015-12-03 15:05:12 +0200
committerWillem Jan Palenstijn2015-12-23 21:33:49 +0100
commit359eda3b9728548b654e16b01df39b1c54b81fdd (patch)
tree57eb0d9d6b5b1aefc670a72c3efb62fdf813efbc /engines/lab
parent914bd262955c9da140d89dc6cf3fa03940a13c62 (diff)
downloadscummvm-rg350-359eda3b9728548b654e16b01df39b1c54b81fdd.tar.gz
scummvm-rg350-359eda3b9728548b654e16b01df39b1c54b81fdd.tar.bz2
scummvm-rg350-359eda3b9728548b654e16b01df39b1c54b81fdd.zip
LAB: openDataFile can also be used without checking for a file header
Diffstat (limited to 'engines/lab')
-rw-r--r--engines/lab/resource.cpp2
-rw-r--r--engines/lab/resource.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/lab/resource.cpp b/engines/lab/resource.cpp
index b1507fedf3..415839d986 100644
--- a/engines/lab/resource.cpp
+++ b/engines/lab/resource.cpp
@@ -172,7 +172,7 @@ Common::File *Resource::openDataFile(const char *fileName, uint32 fileHeader) {
if (!dataFile->isOpen())
error("openDataFile couldn't open %s (%s)", translateFileName(fileName), fileName);
- if (dataFile->readUint32BE() != fileHeader) {
+ if (fileHeader > 0 && dataFile->readUint32BE() != fileHeader) {
dataFile->close();
return nullptr;
}
diff --git a/engines/lab/resource.h b/engines/lab/resource.h
index b9bdbbba8d..35165693a0 100644
--- a/engines/lab/resource.h
+++ b/engines/lab/resource.h
@@ -98,7 +98,7 @@ public:
Resource(LabEngine *vm);
~Resource() {}
- Common::File *openDataFile(const char * fileName, uint32 fileHeader);
+ Common::File *openDataFile(const char * fileName, uint32 fileHeader = 0);
bool readRoomData(const char *fileName);
bool readInventory(const char *fileName);
bool readViews(uint16 roomNum);