diff options
| author | Max Horn | 2003-05-19 00:17:34 +0000 |
|---|---|---|
| committer | Max Horn | 2003-05-19 00:17:34 +0000 |
| commit | 33d1f15f97a53371aa2d2ecfca694d9ca600780b (patch) | |
| tree | 23a945a75c9a6a90875e2e5e5ecf178307a666b5 /scumm/boxes.cpp | |
| parent | 9cbc6904a0c6a6fc750ab600b7adeb2143abf110 (diff) | |
| download | scummvm-rg350-33d1f15f97a53371aa2d2ecfca694d9ca600780b.tar.gz scummvm-rg350-33d1f15f97a53371aa2d2ecfca694d9ca600780b.tar.bz2 scummvm-rg350-33d1f15f97a53371aa2d2ecfca694d9ca600780b.zip | |
V2 walkbox matrix fixes
svn-id: r7657
Diffstat (limited to 'scumm/boxes.cpp')
| -rw-r--r-- | scumm/boxes.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scumm/boxes.cpp b/scumm/boxes.cpp index ec0d3ea3cd..ae7d0c2839 100644 --- a/scumm/boxes.cpp +++ b/scumm/boxes.cpp @@ -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) |
