Vector patterns weren't drawn accurately if the pattern's box touched
the right edge of the screen. This was due to clipping behavior that
differed from the original:
- The pattern's box was re-positioned one pixel too far to the right.
- The pattern's box was clipped to the screen and then drawn.
Patterns require evaluating all pixels (consuming pattern and texture
data) even if a pixel has to be skipped for being out of bounds.
Fixes a subtle inaccuracy in picture 2 of SQ3.
Unrelated to 4c369d5adf
Thanks again to @eientei95 for spotting this!
Fixes incorrect values that trace back to SCI Decoder in 1992.
These caused subtle inaccuracies when drawing EGA vector pictures
with certain texture patterns. In SQ3 there are two of these
surrounding the escape pod in picture 2 in the first room.
Thanks to @eientei95 for spotting the picture discrepancy!
After checking a number of different recordings, I've decided that in
order to cover most sensible ones (I'm not going to cater to some
ridiculously slow guitar version!), I really need a range of about 1:40
- 2:50. Apparently the Ozawa version is one of the faster ones.
This is larger than I had hoped for, but you should still have pretty
good control over it at sensible screen resolutions.
Multiple improvements:
- use needsUpdate to display with the right framerate
- use system surface to draw the frames on, makes
g_system->updateScreen()
- switch to the palette used in the video
- break when quitting scummvm
- cleanup after the video
Move the VideoTrack to FixedRateVideoTrack. It handles frame duration
internally and removes the need to use nextFrameStartTime accounting.
Add getPalette function.
This has been thoroughly tested with all SCUMM 7-8 games:
- FT (full and demo) and DIG (demo) now exhibit the expected behaviour from the interpreters: when finishing or skipping a video, audio does not continue to play for a period of time (which is, until all the channel streams are emptied out);
- DIG (full) is unaffected, it uses other audio routines (DiMUSE);
- COMI (full and demo) is unaffected, it has its own separate IACT channel handle which is already being closed correctly.
This happened after calling scaleGfx if the original surface was
already at the correct size. In such a case scaleGfx returns the
original surface, so it should not be freed.
Without this check an user could have saved at the very beginning of the game (where no speech file was already loaded), reloaded the same savegame, and consequently crash ScummVM (which was, in turn, trying to open a speech file with an empty filename). Thanks criezy for finding this.