V2 walkbox matrix fixes
svn-id: r7657
This commit is contained in:
parent
9cbc6904a0
commit
33d1f15f97
2 changed files with 14 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue