[Scummvm-devel] Global menu save/load dialogs

Max Horn max at quendi.de
Tue Nov 11 14:32:13 CET 2008


Am 11.11.2008 um 13:48 schrieb Johannes Schickel:

> On Tuesday 11 November 2008 11:17:00 Max Horn wrote:
>> Could you please elaborate? What needs interrupting? The animation
>> code is not run while the GUI is up. Do you mean you need to pause
>> timers?

Hi Johannes,

Thanks for the explanations. If I understand correctly, you have the  
same problems SCUMM (and, I'd guess, most other engines we support)  
have. In SCUMM, we solve this by delaying loading and saving. I.e.  
when asked to save/load, we don't actually save/load, but rather set  
an internal flag that a save or load should be performed. Then, in the  
main run loop, we check that flag in a safe spot. In fact *all*  
loading is done in exactly this manner, ensuring uniform handling.

Of course, this might lead to unexpected behavior if the next time the  
"safe" spot in the main loop is hit is after a major event, say only  
after the completion of a cutscene or after a room transition. So one  
has to take care to disable loading and/or saving completely in the  
GMM during these times, so the user can't trigger these at all.

Would something like that work for you?


Bye,
Max




More information about the Scummvm-devel mailing list