aboutsummaryrefslogtreecommitdiff
path: root/boxes.cpp
diff options
context:
space:
mode:
authorJames Brown2002-02-12 18:20:37 +0000
committerJames Brown2002-02-12 18:20:37 +0000
commitf620d138f6081488514f888706157eaeac3e19e5 (patch)
tree340e4b75e7d335c33bb6b8efabe2bab2256b87b9 /boxes.cpp
parent18dce61c9396bd56bdfa4a803da2af9b2c153b01 (diff)
downloadscummvm-rg350-f620d138f6081488514f888706157eaeac3e19e5.tar.gz
scummvm-rg350-f620d138f6081488514f888706157eaeac3e19e5.tar.bz2
scummvm-rg350-f620d138f6081488514f888706157eaeac3e19e5.zip
First part of Yazoo and mines work on making older scumm games work.
Not enough here to actually work yet, just the base groundwork needed. svn-id: r3567
Diffstat (limited to 'boxes.cpp')
-rw-r--r--boxes.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/boxes.cpp b/boxes.cpp
index 2a8c9bf150..72a4c6c9b0 100644
--- a/boxes.cpp
+++ b/boxes.cpp
@@ -43,7 +43,13 @@ byte Scumm::getNumBoxes() {
}
Box *Scumm::getBoxBaseAddr(int box) {
- byte *ptr = getResourceAddress(rtMatrix, 2);
+ byte *ptr;
+
+ if(_features & GF_SMALL_HEADER)
+ ptr = getResourceAddress(rtMatrix, 1);
+ else
+ ptr = getResourceAddress(rtMatrix, 2);
+
checkRange(ptr[0]-1, 0, box, "Illegal box %d");
return (Box*)(ptr + box*SIZEOF_BOX + 2);
}