If nv or nn (number of verbs or number of nouns) is equal to or larger than the number
of words + 2, this loop will try to write out of bounds and assert. This happens for
example in the C64 version of The Golden Baton.
To fix this, it is really enough to change the >= operator to >, but I took the opportunity
to simplify the code a bit as well.
In Pentgram RenderSurface was intended to be an interface with the possiblity of alternate implementations to the software-render derived classes. Removing this will allow for further removal of now-redundant code.
From upstream 6a238e9cb4acda222898dd4b597cf20581b401f6
This replaces a slightly different fix we had in ScummVM. But this new
code works better and fixes bug #12949
There have been this stupid oversight all along since the introduction
of the class: while it reported Length and EOS correctly, it still
allowed to read past the end.
This can cause issues if the user code relies, for example, on Read()
or ReadByte() return value.
For upstream code, in practice this fixes MP3 streaming, where the length
of data is not always possible to precalculate. In ScummVM we used a
different code for MP3, but this may fix other cases as well.
From upstream 6f02bedc65b902ce41858b7e92970662020a11cf
This argument works similarily to Viewport.ScreenToRoomPoint():
if it's set to true then the function returns null if there's no
viewport under the cursor; if it's set to false it converts
coordinates through the primary viewport in such case.
From upstream 5014c502aa487d3cbdf01e99d57306f2131d4c54
Some custom engines supported Label.TextAlignment before 3.5.0 got this
added officially, except they used old alignment constants.
From upstream 46fc9bac4fa6082561a1937861b3e567ccea2cd4
The code is present but not used in ScummVM. Keeping it synchronized
with upstream might help in the future.
From upstream fcf4b76914a25daaf5a7b711b7ed287e5eaae9f6
This is mostly a cosmetic fix, as graphic mode was created successfully anyway.
But the engine was incorrectly reporting no suitable modes available.
From upstream 4399d6448c579c648fe7e0c157a6d5f1adc74a6c
The keycolor is detected on frame load, but will be 0xFF by default as that value is not known to be used in Ultima or Crusader for any shape. This saves around 3mb in Ultima and 10mb on Crusader of memory that was previously used for the mask arrays. Additionally, with this change the shape frames are easier to use with other graphics methods such as cursors.
Speed throttling was disabled on LONGBOW maps because they were treated
as speed tests by the heuristic in GfxAnimate::throttleSpeed. This bug
was masked by fast-cast throttling being applied everywhere, but that
was changed in e09010f7d8
Now the map rooms trigger throttling so that they don't run too fast.
But the game scripts also attempt to throttle the animations based on
speed test results, causing them to run too slow, so that's patched out.
Fixes bug #13966