From 2f1c5a47db72b4cd541f0ffb52dfd2eeb8325c15 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 12 Aug 2007 11:17:48 +0000 Subject: Added code fragment that can change the resource Id to change depending on whether inside/outside svn-id: r28551 --- engines/lure/disk.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'engines/lure/disk.cpp') diff --git a/engines/lure/disk.cpp b/engines/lure/disk.cpp index 8f0714c42e..838bc7df37 100644 --- a/engines/lure/disk.cpp +++ b/engines/lure/disk.cpp @@ -31,6 +31,7 @@ #include "lure/disk.h" #include "lure/luredefs.h" +#include "lure/res.h" namespace Lure { @@ -125,6 +126,14 @@ void Disk::openFile(uint8 fileNum) { } uint32 Disk::getEntrySize(uint16 id) { + // Special room area check + uint16 tempId = id & 0x3fff; + if ((tempId == 0x120) || (tempId == 0x311) || (tempId == 8) || (tempId == 0x410)) { + ValueTableData &fieldList = Resources::getReference().fieldList(); + if (fieldList.getField(AREA_FLAG) != 0) + id ^= 0x8000; + } + // Get the index of the resource, if necessary opening the correct file uint8 index = indexOf(id); @@ -137,6 +146,14 @@ uint32 Disk::getEntrySize(uint16 id) { MemoryBlock *Disk::getEntry(uint16 id) { + // Special room area check + uint16 tempId = id & 0x3fff; + if ((tempId == 0x120) || (tempId == 0x311) || (tempId == 8) || (tempId == 0x410)) { + ValueTableData &fieldList = Resources::getReference().fieldList(); + if (fieldList.getField(AREA_FLAG) != 0) + id ^= 0x8000; + } + // Get the index of the resource, if necessary opening the correct file uint8 index = indexOf(id); -- cgit v1.2.3