1839780513 made a mistake by
confusing the IO-attributes with the non-IO_-attributes,
as there is a difference in the order of the flags between
these two sets.
Fixes bug: https://bugs.scummvm.org/ticket/13810
When the navigator head speaks, the v5 release forgot to adjust the
`Color(6)` parameter for the v5 palette changes, meaning that the text
wasn't displayed with the intended brown color, as in all other versions
(this was fixed in the v5 SegaCD release, though).
Previously the methods would pass by reference, then convert to a
pointer on success and take ownership. This isn't ideal, as a
reference suggests no transferral of ownership, and doesn't suggest
it needs to be a heap resource allocated by new.
* GROOVIE: Fix#2 possible crash with incorrect seeks to endpos in roq.cpp
Fix bug - https://bugs.scummvm.org/ticket/13809
* Optimization
* Next optimization & maintan appropriate debug log
* GROOVIE: Check end of stream before seek to avoid crash in roq.cpp
* GROOVIE: resolve %ld conflict
Co-authored-by: Die4Ever <30947252+Die4Ever@users.noreply.github.com>
When an error happens during go, for example with a nonexisting movie
the lingo callstack isn't cleaned up properly.
Now the callstack is cleaned up via `popContext(aborting=true)`.
This improves on commit:
DIRECTOR: fix memleak when lingo context is frozen
27b314cb25
The Lingo tests were failing because of memory leaks.
- `move` overwrote an existing cast without deleting it
- `puppetTransition` was set but not removed on class destruction
- the *.lingo test files were opened but never removed
Cleanup the lingo callstack when closing.
When a movie calls `go frameId` a big pause button is hit
and everything is put into order to not go to the frame +1
but to the requested frameId. That big pause button is called
`_freezeContext`.
However when quitting in the middle of a frozen context
there are lingo frames left on the callstack.
This can be reliably reproduced with a plethora of D2 and D3 movies
with the debugflags fewframesonly,fast.
When using this option with Simon 1, Simon wouldn't be cleared from the
bottom of the screen, if pressing Esc when Simon starts walking through
the screen right after the "Simon the Sorcerer" title is printed, at the
very beginning of the game.
Triggering the clearSurfaces() code even when _neverFade is enabled
solves this problem.
Fixes a mistake of mine in commit 802caa4c39.
References to FOND resource streams are stored in an array.
Font streams were registered by their family name in a hashmap.
When a second font with the same name was encoutered it would replace
the pointer to the previous font.
The only use case for the hashmap was to register the stream to be able
to later close them.
The exeStream should only be deleted in `loadExeV3`
One `loadExeV?` is not like the others. They all load RIFX files
except for the V3 variant. They all error on an error during the opening of
the stream, except voor the V3 variant.
The segfault was introduced in 12bb1a495f by fixing a memory leak
for the `exeStream`.