The AGS engine does not supports this and has a check when
saving that errors out when trying to save during a non-blocking
event (see can_run_delayed_command() call at the start of
save_game()). There is no such check when loading, but it
causes a crash. This can easily be reproduced in QfGII.
The original AGS engine, after removing a savegames, renames
the savegames with the highest slot to fill the gap. The code
does not work in ScummVM however, and furthermore it might
not be a good idea to do it. So in ScummVM we no longer try
to do it. A comment has been added to indicate why it doesn't
work and how it can be fixed, as well as to explain why it
might not be a good idea to do it in ScummVM.
The code was using ::remove() to remove files, and this does
not handle the "/saves/" prefix. Now it uses File::DeleteFile,
whose implementation was already fixed in the previous commit.
Also it only allows removing files from the savegame directory.
Since this is also the only directory where we allow creating
files, this is consistent and safer.
This fixes in particular the File_Exists check for savegames.
It was always returning false, which resulted in savegames
being overwritten in Quest for Glory II (bug #12390).
This is a rareish corner case where the PID changes to a new GravityProcess
before the old GravityProcess terminates. In this case we don't "own" the PID
any more and shouldn't reset it.
The map label's position is now properly calculated instead of being hardcoded. Added the (closed) label that shows up when hovering a disabled location on the map.
Changed the Button class so it doesn't require subclassing. Added a visible button to the Help screen. Also moved several classes' constructors to fix compilation errors.
Changed the UI::Scrollbar class so it doesn't require subclassing and added functionality for horizontal scrollbars. Fixed the textbox and inventory box scrollbars so their lowest point is consistent with the original engine's.
Added declarations for all action record types unique to The Vampire Diaries. Made all unimplemented action record types output a debug message when encountered.