Multiple casts can have the same name. The last encountered cast with
that name was save in a hashtable.
Director seems to use the cast that was encountered last.
This solves the problem by not writing existing cast names.
It happened in the game Louis Catorze. The name mainMenu was associated
with a TextCast but also a ScriptCast. The chunkexpression 'line 5 of
mainMenu' is not valid for a ScriptCast.
In Director only the first line of a label is seen as the frame label.
The other lines are treated as comments.
The label comment is now shown with debugging ouput.
Installers don't need to be in detection in addition to the games
themselves. This one was causing detection collisions with other
engines even after adding a second file.
With GLAD it's not needed anymore to link against OpenGL libraries.
As configure knows better whether a platform supports GLAD, detection is
moved here.
To allow platforms where OpenGL should be linked at build time, the
tests are kept. Android uses them for now.
The OpenGL for Games was completely decoupled from the OpenGL for 2D
engines. This not the case anymore.
The pos() method of BufferedWriteStream should return the stream position
but actually returns the buffer position. That completely breaks saving
the game in AGS engine on the platforms using BufferedWriteStream wrapper
for savefile handling, such as Nintendo Switch. AGS engine's save file
writing functions use GetPosition() with later Seek() on stream,
so an invalid return value from GetPosition() results in invalid save files
that cannot be loaded and are skipped by the engine.
From the in-game Save panel.
Saving empty string is still allowed from the ScummVM GMM and it's translated to current date time.
There's a minor glitch there with the '/' character being shown as the wrong glyph in BaSS save/restore panel.
Also note, we keep the behavior of the original, so a string of blanks is still allowed as a save name.
LB2 floppy is one of the few full version games that was shipped
without a selector vocabulary. Add the necessary selectors for it,
so that saving via the GMM is correctly enabled
Made behavior similar to original game
Also the original game on attempting to overwrite a saved game with empty game, shows the confirmation dialogue if the player clicks on the save icon, but then returns back to the normal save screen even if the user clicks on the OK button or presses the Enter key.