More zak goodness!

svn-id: r3581
This commit is contained in:
James Brown 2002-02-14 18:20:22 +00:00
parent 5876581001
commit 6cb652c26c

View file

@ -45,9 +45,12 @@ byte Scumm::getNumBoxes() {
Box *Scumm::getBoxBaseAddr(int box) {
byte *ptr = getResourceAddress(rtMatrix, 2);
checkRange(ptr[0]-1, 0, box, "Illegal box %d");
if(_features & GF_SMALL_HEADER)
return (Box*)(ptr + box*SIZEOF_BOX + 1);
else
if(_features & GF_SMALL_HEADER) {
if (_gameId == GID_ZAK256)
return (Box*)(ptr + box*(SIZEOF_BOX-2) + 1);
else
return (Box*)(ptr + box*SIZEOF_BOX + 1);
} else
return (Box*)(ptr + box*SIZEOF_BOX + 2);
}