From 69ab14e1334d12df6c7cb41867f78d142a90c087 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 21 Jun 2004 10:06:52 +0000 Subject: [PATCH] More HE v7.0+ resource fixes. Make puttdemo.win runnable again. svn-id: r13994 --- scumm/resource.cpp | 9 +++++++-- scumm/scumm.cpp | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scumm/resource.cpp b/scumm/resource.cpp index a233c045ca5..6fef4928933 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -622,7 +622,7 @@ int ScummEngine::loadResource(int type, int idx) { if (roomNr == 0) roomNr = _roomResource; - if (type == rtRoom) { + if (type == rtRoom && _heversion < 70) { if (_version == 8) fileOffs = 8; else @@ -653,6 +653,11 @@ int ScummEngine::loadResource(int type, int idx) { if ((type == rtSound) && !(_features & GF_AMIGA) && !(_features & GF_FMTOWNS)) { return readSoundResourceSmallHeader(type, idx); } + } else if (_heversion >= 70) { + tag = _fileHandle.readUint32LE(); + size = _fileHandle.readUint32BE() + 8; + + _fileHandle.seek(-8, SEEK_CUR); } else { if (type == rtSound) { return readSoundResource(type, idx); @@ -1712,7 +1717,7 @@ int ScummEngine::readSoundResourceSmallHeader(int type, int idx) { } int ScummEngine::getResourceRoomNr(int type, int idx) { - if (type == rtRoom) + if (type == rtRoom && _heversion < 70) return idx; return res.roomno[type][idx]; } diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index 4d3fa6610c4..ad08405d3ba 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -2990,7 +2990,7 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) { // There are both Windows and DOS versions of early HE titles // specify correct version here - if (game.features & GF_HUMONGOUS && game.heversion == 60) + if (game.features & GF_HUMONGOUS && (game.heversion == 60 || game.id == GID_PUTTDEMO)) game.heversion = 70; break; case Common::kPlatformFMTowns: