aboutsummaryrefslogtreecommitdiff
path: root/boxes.cpp
diff options
context:
space:
mode:
authorJames Brown2002-02-12 21:28:07 +0000
committerJames Brown2002-02-12 21:28:07 +0000
commit7ee034af88f02b8fc721269d8359ba51fdfd8e38 (patch)
treec0952dd0fb21ed2cfae5eec0ddfd04936ecc489d /boxes.cpp
parentf620d138f6081488514f888706157eaeac3e19e5 (diff)
downloadscummvm-rg350-7ee034af88f02b8fc721269d8359ba51fdfd8e38.tar.gz
scummvm-rg350-7ee034af88f02b8fc721269d8359ba51fdfd8e38.tar.bz2
scummvm-rg350-7ee034af88f02b8fc721269d8359ba51fdfd8e38.zip
Further LFL additions. Zak256 plays bits of its intro, and LoomCD partially runs (may need
to hit escape a few times, after selecting your difficulty). Still very incomplete and in progress. svn-id: r3568
Diffstat (limited to 'boxes.cpp')
-rw-r--r--boxes.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/boxes.cpp b/boxes.cpp
index 72a4c6c9b0..9135ee8498 100644
--- a/boxes.cpp
+++ b/boxes.cpp
@@ -43,15 +43,12 @@ byte Scumm::getNumBoxes() {
}
Box *Scumm::getBoxBaseAddr(int box) {
- byte *ptr;
-
- if(_features & GF_SMALL_HEADER)
- ptr = getResourceAddress(rtMatrix, 1);
- else
- ptr = getResourceAddress(rtMatrix, 2);
-
+ byte *ptr = getResourceAddress(rtMatrix, 2);
checkRange(ptr[0]-1, 0, box, "Illegal box %d");
- return (Box*)(ptr + box*SIZEOF_BOX + 2);
+ if(_features & GF_SMALL_HEADER)
+ return (Box*)(ptr + box*SIZEOF_BOX + 1);
+ else
+ return (Box*)(ptr + box*SIZEOF_BOX + 2);
}
bool Scumm::checkXYInBoxBounds(int b, int x, int y) {