MM C64: walkbox fixed
|Reported by:||SF/tobigun||Owned by:||Kirben|
This patch fixes some issues with the walkboxes in MM for C64. Previously an actor could only walk from one box to its neighbor but not via several boxes to a non neighbored box. This patch uses the already present Kleene's algorithm for this task.
Now all rooms can be entered. One glitch is still noticable in the room with the painting and wax fruits. If you click on the wax fruits, the actor does not walk directly to the fruits but makes a long way round the painting. The reason for this probably is that in ScummVM the wax fruits are located in walkbox 3 instead of box 2 as it should be. There is a direct path from box 4 (at the door) to box 2 but not to box 3 so the shortest path algo is not able to find a better way.
Hopefully I didn't break something: ScummEngine::createBoxMatrix() used a fixed 64x64 matrix. As it was easier to integrate MM C64 with a variable matrix size and it wasn't obvious to me why a fixed size matrix was used, I replaced the sizes with the variable num (getNumBoxes()). At least indizes are always in the range 0 .. num-1. Indy4 which uses createBoxMatrix() worked correctly afterwards.
Ticket imported from: #2846425. Ticket imported from: patches/1179.