SIMON2: Lockup workaround
|Reported by:||eriktorbjorn||Owned by:||SF/ender|
|Cc:||Game:||Simon the Sorcerer 2|
I've been trying to play simon2win, but it would always lock up on the city overhead view.I think I've found a workaround for that now.
First, here's how to trigger the lockup:
Go to the city overhead view. (Since this can be reached from the very beginning of the game I'm not including a saved game.) Move the mouse cursor over a recognized building, e.g. the Town Square. The name of the building will be displayed. Before this text is removed, move the mouse cursor to over another recognized building.
The game no longer responds to any mouse events. In effect, it has locked up.
The problem appears to be that although timer_proc1() is getting called (i.e. ScummVM itself has not hung), _lock_word is 0x0040 so it never gets past the first lock test which means, among other things, that handle_mouse_moved() is never called.
As far as I can see, there's only one place where this can happen, and that is in start_vga_code(). However, if has_vga_struct_with_id() returns true, the function will return without clearing the lock.
The patch switches places between setting the lock and calling has_vga_struct_with_id(). I can't promise this won't break anything else, but it looks promising to me. (Anyway it's much easier to test for bugs if the game is playable in the first place. :-)
Ticket imported from: #591172. Ticket imported from: patches/106.