aboutsummaryrefslogtreecommitdiff
path: root/engines/dm/dungeonman.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/dm/dungeonman.cpp')
-rw-r--r--engines/dm/dungeonman.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/dm/dungeonman.cpp b/engines/dm/dungeonman.cpp
index 5746ee03c2..417f3e31e7 100644
--- a/engines/dm/dungeonman.cpp
+++ b/engines/dm/dungeonman.cpp
@@ -477,7 +477,14 @@ DungeonMan::~DungeonMan() {
void DungeonMan::decompressDungeonFile() {
Common::File f;
- f.open("Dungeon.dat");
+ if (_vm->isDemo())
+ f.open("DemoDun.dat");
+ else
+ f.open("Dungeon.dat");
+
+ if (!f.isOpen())
+ error("Unable to open Dungeon.dat file");
+
if (f.readUint16BE() == 0x8104) { // if dungeon is compressed
_rawDunFileDataSize = f.readUint32BE();
delete[] _rawDunFileData;