Generates a new seed for random numbers at the exact point when a new game starts to initialize
Additionally, this command will use a custom seed, if any (set from ScummVM Global Options), for the new game.
And, this avoids the issue of intermediate calculations of random numbers, during setup() initializations
(via initScript.SCRIPT_Initialize_Game()) or in KIA menu, eg. when adjusting speech volume, before starting a new game,
which would result in the new game starting with a different seed than the one set from ScummVM Global Options.
This fixes a (potential) crash when launching ScummVM with boot params and then starting a NEW GAME from KIA menu
Example of cmd line that would lead to crash in the above scenario: scummvm -d0 -b 4021004 bladerunner-win
Allow keeping the designers cut mode if the player sets it in KIA before starting a New Game
This is different from the original behavior, but the code for RC01 (a dialogue cue from the intro is intended to be skipped in designers cut mode) shows that is the intended behavior. Also, setting McCoy's mood in KIA before starting a New Game, maintains the setting, so this change is also consistent with that behavior.
The intent was to create a Common::Array with a maximum capacity of 20.
Instead, _activeCustomEvents was a C array of 20 Common::Arrays.
The -> operator accesses the first element of a C array, so the first
Common::Array was always used.
Support for repeated input for symbols and extended ASCII keys
Also keypad return works now just like the Enter key, and SHIFT+key when spammed results in the correct key being repeated.
Added space, backspace and latin letters and numbers (for save game screen)
Space can also be spammed with a visible result in-game (ie. not only in KIA save screen)
Also slightly update the cases for canSaveGameStateCurrently()
The game has its own autosave mechanism (at the start of each new Act). Also currently the label for the ScummVM autosave can be in the wrong language (since it is in the ScummVM's GUI language, but not necessarily in the game's own GUI language) and in KIA it could appear illegible as "?????? ??????" for non Latin languages.
The autosave refactoring that was done in
7adad5aaf5 used g_engine for identifying the
autosave slot. This worked for in-game save/load, but doesn't fit when
called from the launcher.
Fix by passing MetaEngine to SaveStateDescriptor ctor and using it for this
query.
Amends 7adad5aaf5.
Also restore dual skip funtionality for Esc and Return keys down (video and spoken non-queued dialogue)
Previous behavior restored as a quality of life feature, that is quite practical on eg. Android port (easy access to "Esc", not so easy to "Return"). The issues that led to reverting previous to the original behavior (only Esc key for video, only Return key for dialogue) should be resolved now by the intermediate commits.
Also only use Esc key to skip video cutscenes
This is replicating the original's behavior and at least for the dialogue skipping, it fixes a few glitches (KIA screen blinking if skipping the last dialogue line with Esc key, and Zuben throwing the soup leading to a dead end, if user presses Esc fast during that sequence).