Opened 22 years ago

Closed 22 years ago

Last modified 6 years ago

#8161 closed patch

Fix for MI1 intro crash (experimental)

Reported by: eriktorbjorn Owned by: SF/ender
Priority: normal Component: Engine: SCUMM
Version: Keywords:
Cc: Game: Monkey Island 1

Description

I don't quite understand the implications of this patch, and my track record hasn't been too good lately when it comes to implementing my proposed changes, so please check this carefully before applying.

The MI1 intro crashes, if you press escape at the right moment. I'm not exactly sure what the right moment is, but sometime after the LucasFilm logo, but not too long after.

What seems to happen is that ScummVM tries to find the address of a resource for room 0, which in turn is because it thinks it has found an object in that room. This didn't use to happen because when looking for an object we would search through _numObjectsInRoom objects, and that variable gets set to 0 for room 0. But nowadays it always searches through _numLocalObjects objects.

What this patch does is simply to move the code to clear out old room objects out of loadRoomObjects() / loadRoomObjectsSmall() and into a function of its own, and make sure it's called for the case where room is 0 as well. The new code doesn't behave exactly like the old since the function is called before initRoomSubBlocks() instead of after, but I hope that doesn't break anything.

Ticket imported from: #671031. Ticket imported from: patches/266.

Attachments (1)

clear-objects.diff (3.0 KB ) - added by eriktorbjorn 22 years ago.
Patch against a January 19 CVS snapshot

Download all attachments as: .zip

Change History (5)

by eriktorbjorn, 22 years ago

Attachment: clear-objects.diff added

Patch against a January 19 CVS snapshot

comment:1 by SF/ender, 22 years ago

Thar she commits

comment:2 by SF/ender, 22 years ago

Owner: set to SF/ender
Status: newclosed

comment:3 by fingolfin, 22 years ago

So if this fixes the problem, shouldn't regression.xml be updated?

comment:4 by digitall, 6 years ago

Component: Engine: SCUMM
Game: Monkey Island 1
Note: See TracTickets for help on using tickets.