This ensures that if any unhandled/invalid instructions are present,
they are skipped, rather than locking up engine execution.
This is a secondary fix for bug #3614697 - "Spanish version
uncompletable at end of 2nd part" and any other future bugs of this
type.
This add support for the unhandled "mof" instruction present in the
Spanish version. This effectively skips it as a NOP/invalid, which
prevents it locking up the game at the end of the 2nd part.
Instead of a fixed 1/2 or 1/4 scaling we do a two step scaling now:
1) Scale image to width < 160*2 && height < [100,120]*2 with 1/4 or 1/2
nearest-neighbor.
2) Use a bilinear scaler to scale aspect preserving to 160x[100,120]
This fixes bug #3614568 "GRAPHICS: Odd thumbnail sizes crash".
This fixes future issues like bug #3614654:
"ALL: ScummVM 1.5.0 can't read newer saved games".
There are a few behavior changes introduced with this commit:
- checkThumbnailHeader will now also report the presence of
unsupported/broken (but skippable) headers.
- skipThumbnail will also try to skip the data for broken/unsupported
thumbnail data.
- loadThumbnail will skip over broken/unsupported thumbnail data but still
return 0 in this case.
These now restore the original release build logic to ensure that we
don't have issues with releases. Missing something here as _debug_build
doesn't seem to work as I expected...
A few tests for the Huffman decoder.
The encoding is the example from Wikipedia.
This could be improved by someone more knowledgeable by
generating one at runtime or using multiple encodings
which would each contain one edge case.
After this change, release builds will still have serial debug disabled,
but debug builds will now not provide this unless --enable-debug is
passed explicitly. This could have been another option or environment
variable, but other embedded ports do similar things with _debug_build
and this looks like the cleanest way to deal with this.
We now do the jumpToTick() for hold events after waiting for the delta
of the current event, like we do for the signal set events. This keeps
the fixes for the hold timings in QFG3, while not breaking LSL6.
Many thanks to wjp for pinpointing the actual cause of the issue.