Opened 15 years ago

Closed 15 years ago

Last modified 6 years ago

#9074 closed patch

MM C64: walkbox fixed

Reported by: SF/tobigun Owned by: Kirben
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Maniac Mansion

Description

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.

Attachments (1)

mm64-walkbox.patch (6.5 KB ) - added by SF/tobigun 15 years ago.
MM C64 walkbox fix

Download all attachments as: .zip

Change History (5)

by SF/tobigun, 15 years ago

Attachment: mm64-walkbox.patch added

MM C64 walkbox fix

comment:1 by Kirben, 15 years ago

Owner: set to Kirben

comment:2 by Kirben, 15 years ago

Status: newclosed

comment:3 by Kirben, 15 years ago

Thanks, I added the patch to ScummVM SVN, with minor changes to keep the fixed matrix size in other games.

comment:4 by digitall, 6 years ago

Component: Engine: SCUMM
Game: Maniac Mansion
Note: See TracTickets for help on using tickets.