aboutsummaryrefslogtreecommitdiff
path: root/engines/lure
diff options
context:
space:
mode:
authorPaul Gilbert2007-08-12 11:17:48 +0000
committerPaul Gilbert2007-08-12 11:17:48 +0000
commit2f1c5a47db72b4cd541f0ffb52dfd2eeb8325c15 (patch)
tree40757343ab52fdc8c289580f207ee6859cc99346 /engines/lure
parent9a9d0cb0a5fbbce0f59d0b7587067f9e08cd98e2 (diff)
downloadscummvm-rg350-2f1c5a47db72b4cd541f0ffb52dfd2eeb8325c15.tar.gz
scummvm-rg350-2f1c5a47db72b4cd541f0ffb52dfd2eeb8325c15.tar.bz2
scummvm-rg350-2f1c5a47db72b4cd541f0ffb52dfd2eeb8325c15.zip
Added code fragment that can change the resource Id to change depending on whether inside/outside
svn-id: r28551
Diffstat (limited to 'engines/lure')
-rw-r--r--engines/lure/disk.cpp17
1 files changed, 17 insertions, 0 deletions
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);