aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/adl/hires2.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/adl/hires2.cpp b/engines/adl/hires2.cpp
index 39f2199e6a..d4f1c09499 100644
--- a/engines/adl/hires2.cpp
+++ b/engines/adl/hires2.cpp
@@ -214,6 +214,7 @@ void HiRes2Engine::loadRoom(byte roomNr) {
uint16 descOffset = stream->readUint16LE();
uint16 commandOffset = stream->readUint16LE();
+ _roomData.pictures.clear();
// There's no picture count. The original engine always checks at most
// five pictures. We use the description offset to bound our search.
uint16 picCount = (descOffset - 4) / 5;
@@ -226,8 +227,11 @@ void HiRes2Engine::loadRoom(byte roomNr) {
_roomData.description = readStringAt(*stream, descOffset, 0xff);
- stream->seek(commandOffset);
- readCommands(*stream, _roomData.commands);
+ _roomData.commands.clear();
+ if (commandOffset != 0) {
+ stream->seek(commandOffset);
+ readCommands(*stream, _roomData.commands);
+ }
}
void HiRes2Engine::showRoom() {