When the setting is changed in game (for example in the Options
dialog in Kathy Rain) that change used to be saved in the ScummVM
config file, but this got lost during one of the synchronisation
with upstream code. This commit adds that code back.
Because some things were previously updated during the
render, we also need to explicitly run these whenever we do
not update whole game, but need to keep cursor updated:
* Dialog options;
* blocking Display command
* built-in gui dialogs
From upstream e236f3ee05bb7e1e748fb050c99ba1afa564ec65
This is necessary for the touch-to-mouse emulation to work
properly (and perhaps true touch controls in the future).
The order of updates is a bit wrong historically, where cursor
position and gui control focus is updated later than the
handling of button events. This means, for example, that if the
cursor was positioned over button in game frame 1, then the
mouse click will only trigger button press not later than the frame 2.
Changes:
* moved "cursor over gui" poll from draw_gui_and_overlays()
to update_cursor_over_gui(), call it in the main game update fn.
* moved update_mouse_cursor() call from
construct_game_screen_overlay() to the game update fn
(renamed to update_cursor_view().
* picked out "cursor over location" trigger out of the "render"
function into update_cursor_over_location(), call it explicitly in
the main game update fn.
Effect on user script callbacks:
* the cursor position (and gui focus) will now be updated prior
to `late_repeatedly_execute_always()` callback. Other callbacks
will not be affected, as their relative order won't change
compared with these updates.
From upstream 23493a681d4f66ae0b1088cddb82241b0bc80dbb
Apparently, this field was used to store light level of the
walkable area in pre-2.55 engines, prior to introduction of the
Regions.
In current engine, when loading games that old, this value is
copied into Regions for backwards compatibility.
While in newer games it actually stores "player character
view" override.
Renamed update_shadow_areas() into update_player_view(),
and tidied the code for clarity.
From upstream 71e7dc880b4496dd6937cec00a56f0de66137482
The graphic mode config has now separate options for
window size, game scaling and filter, but command line is
lagging behind, so all the scaling is still set in `--gfxfilter`.
This is a hotfix for the time being, we shall think this over in
the future, maybe introduce more args.
Partially from upstream a28160b24a2f27b59cbb12a1de358cc9ec9c19ef and
f19043d902ff9a7e7d6478f51093ef3c807dd258
Screen limits are hardcoded in ScummVM's implementation, so this function
does not really validate anything
Partially from upstream cbe729f93c9b204db41ddd1b28c455d4a98ff703
ags64 (and also ags32) are the name of the engine executable on Linux.
These names seems to be exclusivelly used for that OS.
Fix a bug in Zniw Adventure (GOG, Linux) due to translation path being
different between Linux and Windows.
This may be a temporary solution, but it's necessary, because otherwise
engine will fail later, with a seemingly unrelated error, which will
be harder to diagnose.
From upstream 902568c4eba9dba4eb762882890c6e8a308683aa
Leave it with a new name as `update_polled_stuff()` only in functions
related to the game update.
From upstream 95dc139f51e704da19792e5480e69bbfe7ec27aa
From upstream 6a238e9cb4acda222898dd4b597cf20581b401f6
This replaces a slightly different fix we had in ScummVM. But this new
code works better and fixes bug #12949
This is mostly a cosmetic fix, as graphic mode was created successfully anyway.
But the engine was incorrectly reporting no suitable modes available.
From upstream 4399d6448c579c648fe7e0c157a6d5f1adc74a6c
* Changed from -1 - based constants to 0 - based constants;
* These were purely internal values, therefore no API would be harmed;
* Removed necessity of converting from internal mouse button code to script and back all the time;
* On a side note, this fixes a bug where WaitMouse etc were returning incorrect values on mouse skip, because we forgot to convert from internal to script code.
From upstream 471098d239b076c494beb2d554572ccb69372667
There's one call in unload_game_file(), which should be called after
all objects that may have been provided by plugins are disposed
(fonts, managed objects).
From upstream 462cabe7353fc75f3cf70222a97028066f12f030
This code is not used in ScummVM, but since it was still there in
comments it's probably better to keep it in sync with upstream.
The code was updated in upstream 0d1034df1a0e6593e7e61bbdb75d2996b8721b14
(tidy Direct3D renderer code, remove redundant parts, etc)
and 2f04e3b81db598eb7950668ce9d88a145f796f2c
(fixed Ali3DException's message string misuse)
From upstream e924778ce3f88a4c821a4eecfea8edc353a6807b
In ScummVM they were already bools, but where still assigned values
of 0 and 1 instead of false and true in some places.
* Added `[misc] multitasking=[0,1]` to config, acting as a *starting*
setting, which may be changed by runtime call to `SetMultitaskingMode`;
* Ensure multitasking mode is overridden by connected external debugger
(always on, if possible);
* Let multitasking mode work in "fullscreen desktop" gfx mode (still
disabled in exclusive fullscreen);
* Now correctly reset multitasking mode if gfx mode changes.
From upstream 9f091926e393f75c90c951f9597710bf17395332
This helps kill "hanging" scripts if user closed the window while
there's no real engine update.
From upstream a758fd6de2dccd0c948fc7f9e5b65200df902a65