Only cursors drawn from scripts must be copied in _cursorSprites, not the ones loaded from executable.
This simplifies a lot of globals from the Draw object, that were needed only in the cursor-from-exec case.
Note: other GOB games are not impacted even if shared code from draw_v2.cpp, inter_v1.cpp is modified (_cursorHotspotsX and _doCursorPalettes are non-null only in Adibou 2).
No fade transitions in the original game, and it leads to glitches (e.g. sometimes a scene is shown to soon, with a wrong palette, due to unexpected retrace in fade() call).
- resizeCursors should be able to shrink cursor sizes (sometimes Adibou2 uses 50*50 cursors, and then goes back to 32*32)
- cursor palettes (_draw->_cursorPalettes) should not be used when initializing cursoes with o1_initCursor
(As already done for Fascination)
Adibou scripts sometimes call functions with a storeMouse() in a row before checking the result, expecting a mouse down from the first processing to be still stored in variables.
E.g.
sub_5257 {
o1_animatePalette();
o1_keyFunc(1);
o1_keyFunc(2);
if (var32_16==1) {
Draw::_vgaSmallPalette was supposed to be a 16-color VGA
palette / EGA palette, but we've been using the first 16
entries of Draw::_vgaPalette for that for ages now.
The only parts where we didn't were codepaths never
actually taken in the gob games, so for the sake of
clarity (and fixing Coverity issues), this commit removes
those as well.
Fixes Coverity issues 1192648 and 1192649.
This makes the bees level playable, removing the "lock-up".
Collision detection between Little Red and the bees and butterflies
doesn't work yet though, so they're just flying through her.
Nevertheless, the game seems to be completable now.
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.
This generalises the workaround added for bug #3018918 i.e. UOTODDV issue, to cover the
ICVGCGT case and hopefully all future cases, by executing the variable correction during
the reload after Game Over and using the variable read by the script triggering the movement lock, rather than the movement lock variable (59) itself as this may not be set until a later script.
svn-id: r54061