The script relies on "var_off_212" (current frame) becoming "-1" when the video ends, but its update was disabled for sound-only videos, by a hack for "Bamboo" game to deal with multiple live videos.
We disable this hack (i.e. re-enable var_off_212 update) when there is only one "live" video.
waitSoundEnd call finishSound(), an then updateLive(), which will load new frames while being in "finished" state.
The !props.noBlock check on call site was not enough, as sometimes the close order on a live video does not have "live" flags.
This workaround solves audio/video sync issues that used to appear frequently in many animations, e.g. when Adibou kicks the ball in the garden.
Those animations easily get out of sync when the timing is done by hotspots::evaluate, which sometimes does not call animate() as often as needed for good sync (mouse events processing, in particular, can delay the call).
The original game seems to use also some kind of frame skipping to address this problem.
This is a workaround for how Lost in Time behaves in combination
with changes I made to the DataIO code for running Urban Runner
on low-memory devices.
Urban Runner's intro are far to big to have them copied into
memory for these devices, so I made the DataIO code return a
SafeSeekableSubReadStream into the opened archive stream instead.
Unfortunately, Lost in Time might not close a video file when it
closes the data file which it was originally in, especially when
loading a saved game. Since the video player needs to be able to
gaplessly continue a video and there does not, by itself, close
the video if not requested by the scripts, this leads to reading
out of an already closed stream in certain cases.
So, to worka round this issues, the video player tries to reopen
each currently opened video after a data archive was closed, to
make sure that that video is still available. If not, the video
is closed.
Needed for Bambou. The narrator voice and the "Do you want to quit?"
voices are live videos that should continue while the live video
buttons are playing.
svn-id: r55443
Fixes some inventory list uglyness in live videos.
It still flickers when mousing over it though, and keeps popping
when mousing over the register during the hotel scene
svn-id: r55429
To be able ESC videos, you need to switch on ESC in the settings
in the right part of the menu, because the scripts needs to
trigger the drawing of the last frame of the ESC'd video.
Otherwise, the graphics e.g. stops mid-frame during a turn.
svn-id: r55407
Many thanks to SylvainTV. :)
Urban Runner might actually be completeable now.
One caveat: Hotspots at that hotel sequence are a bit glitchy...
svn-id: r55333