mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 05:32:45 +00:00
V2 walkbox matrix fixes
svn-id: r7657
This commit is contained in:
parent
9cbc6904a0
commit
33d1f15f97
@ -566,12 +566,22 @@ int Scumm::getPathToDestBox(byte from, byte to) {
|
||||
byte *boxm;
|
||||
byte i;
|
||||
int dest = -1;
|
||||
|
||||
const int numOfBoxes = getNumBoxes();
|
||||
|
||||
if (from == to)
|
||||
return to;
|
||||
|
||||
assert(from < numOfBoxes);
|
||||
assert(to < numOfBoxes);
|
||||
|
||||
boxm = getBoxMatrixBaseAddr();
|
||||
|
||||
if (_features & GF_AFTER_V2) {
|
||||
i = boxm[from];
|
||||
boxm += numOfBoxes;
|
||||
return boxm[to];
|
||||
}
|
||||
|
||||
i = 0;
|
||||
while (i != from) {
|
||||
while (*boxm != 0xFF)
|
||||
|
@ -1358,9 +1358,9 @@ void Scumm::initRoomSubBlocks() {
|
||||
createResource(rtMatrix, 2, size);
|
||||
memcpy(getResourceAddress(rtMatrix, 2), ptr, size);
|
||||
ptr += size;
|
||||
if (_features & GF_AFTER_V2)
|
||||
size = (READ_LE_UINT16(roomptr + 0x0A) - *(roomptr + 0x15)) - size;
|
||||
else if (_features & GF_OLD_BUNDLE)
|
||||
if (_features & GF_AFTER_V2) {
|
||||
size = numOfBoxes * (numOfBoxes + 1);
|
||||
} else if (_features & GF_OLD_BUNDLE)
|
||||
// FIXME. This is an evil HACK!!!
|
||||
size = (READ_LE_UINT16(roomptr + 0x0A) - READ_LE_UINT16(roomptr + 0x15)) - size;
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user