We now only test for events in testKeypressed() without updating the
game cycle at all (NAGI doesn't update the game cycle either). This
fixes the slowdowns in some animations where have.key() is issued,
like Manannan's lightnings in the intro of KQ3 and the bullets in the
intro of PQ1
Reading an array without using the resulting value has no effect.
In any case, this code still looks like it may be broken, so somebody
who knows more about AGI should perhaps investigate this closer.
Both games use an additional parameter for show.mouse and hide.mouse.
Ignoring these confused the script parser, which started parsing junk.
Fixes bugs #3577754 and #3426946.
Formerly the GMM, AGI and SCI duplicated the logic for USE_SAVEGAME_TIMESTAMP.
Now I added a method to SaveLoadChooser instead, which takes care of this. This
might not be the best placement of such a functionality, thus I added a TODO
which talks about moving it to a better place.
This reduces the code duplication in all client code, which formerly duplicated
the querying of the plugin, game id etc. and now simply calls the newly added
method runModalWithCurrentTarget() on a SaveLoadChooser object.
We already pass the title and process button name to the constructor of
SaveLoadChooser and then do not offer any way of changing it, thus changing
the edit mode of the chooser is kind of pointless and was never actually used.
Instead we pass the mode on SaveLoadChooser construction now.
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'
This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
On some systems, passing signed chars to macros like isspace() etc. lead
to a runtime error. Hence, mark these macros as forbidden by default,
and introduce otherwise equivalent alternatives for them.
Specifically:
* Don't enable the 'next' button in predictive mode when we don't have a
full match. Doing this didn't make sense since you'd iterate over a
seemingly arbitrary set of completions instead of all possible ones.
* Do only a single binary search.
* Fix the width of the mode button for mouse press detections.
Note that there are still issues with this input mode. If the binary
search hits a prefix match before finding the full match, it won't
recognize the full match. (Example: typing "buy" will show "buz"
because it's aiming for "buzzard" without realizing "buy" exists.)
Goto Considered Harmful...
The following commits should improve the ScummVM code structure by reducing the number of gotos used in various engine code.
They should implement identical functionality, but without using goto and without the result being less readable/maintainable than the version with goto.