Commit Graph
72 Commits
Author SHA1 Message Date
Walter Agazzi c46b2feaca AGS: Engine: removed redundant quit_shutdown_scripts()
Scripts are shut down in unload_game().
It did not do what the function name implied anyway...
From upstream 67c0bdc9e854c558282d290ef5952ac211cc4133
2024-04-02 23:18:14 +02:00
PushmePullyu 13b7608492 AGS: Replace local static "last_cutscene_script_pos" with field
Fixes #15015
 "AGS games lead to a reproducable crash on exiting ScummVM"
2024-03-18 12:39:59 +01:00
Walter Agazzi 5039b5f3a6 AGS: Engine: small refactor, rem duplicate list of restricted game options
From upstream c4efd74fd28b31ee786e85a0ecc4a7c1fcb0685a
2023-08-13 10:58:26 +02:00
Walter Agazzi a6edbb5701 AGS: Engine: fixed few game warnings, may fill up the log in some games
Partially from upstream 8b2c97672d179f0ea33890c66bb2baa7131dd3a4
2023-08-13 10:58:26 +02:00
Walter Agazzi a31aac3bf2 AGS: Engine: fixed GUI controls not updated on set OPT_RIGHTLEFTWRITE
From upstream 3360f4a2f279d135d1107dd4fcda2031eed95fae
2023-08-13 10:58:26 +02:00
Walter Agazzi cd6a6ddc8c AGS; Engine: tidied SetGameOption()
* handle readonly options;
* don't do anything if new value equals old value;
* replace if/else sequence with a switch;
From upstream 2476bc3e517c13ef1abde83fca2e55571bcfff4a
2023-08-13 10:58:26 +02:00
Thierry Crozat 4dcde68f4a AGS: Remove unnecessary include of std/math.h 2023-06-06 08:59:58 +01:00
Walter Agazzi 91d7299405 AGS: Engine: (again) fixed buttons not updated visually on interface enable
Complements / reimplements f310a08
From upstream b0e2fe40c1d73674a7b868a87152be6029df6cac
2023-03-12 20:58:28 +00:00
Walter Agazzi 0fbdbdfcdd AGS: Engine: fixed WaitInput() incorrect handling of a type arg
From upstream ca6620951ec013e3627d962701c3cc25c1ac8adb
2023-03-12 20:58:28 +00:00
Walter Agazzi c366ce5eef AGS: Removed update_polled_stuff_if_runtime() from data loading functions
Leave it with a new name as `update_polled_stuff()` only in functions
related to the game update.
From upstream 95dc139f51e704da19792e5480e69bbfe7ec27aa
2023-03-12 20:58:28 +00:00
Thierry Crozat 61e3a92963 AGS: fixed few more warnings related to typecasts
From upstream 7946be9e75a0edda6fc9d955ea771f60f9b8e968
2022-10-09 18:49:17 +01:00
Thierry Crozat f52c6a25ab AGS: Fixed forgot to save SetMultitasking in usetup.multitasking
Complements 3a4d94bf0

From upstream dd76b001a64105d1d7ad5b4878bbd646e19c6391
2022-06-24 20:54:47 +01:00
Thierry Crozat 3a4d94bf0b AGS: Updated Multitasking setting
* 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
2022-06-23 23:57:27 +01:00
Thierry Crozat 305fdb853a AGS: Abort current scripts on close window event
This helps kill "hanging" scripts if user closed the window while
there's no real engine update.

From upstream a758fd6de2dccd0c948fc7f9e5b65200df902a65
2022-06-23 23:57:26 +01:00
Thierry Crozat 5089b28645 AGS: Added more logging for multitasking mode, switching in/out
From upstream d3925672f5b96fab3308b606eb6f38dc279636d7
2022-06-21 23:28:01 +01:00
Thierry Crozat 8d36266724 AGS: Replaced strcpy with snprintf in old string API impls
From upstream 44d99badb2708fb99b1f7b9bc024082d570706c7
2022-06-19 20:50:24 +01:00
Thierry Crozat ed8526f30a AGS: Updated Script API version for recent changes in wait skip values
This is to allow to distinguish implementations in case there were games
using older variants (although it's not clear if any had yet).

From upstream 11315b3487d22ce4830d60fad36ae7124aa45e55
2022-06-18 18:11:57 +01:00
Thierry Crozat babf223ab7 AGS: Add WaitInput to Script API
- modify skip result to use a flag + data bitwise combination
- also include WaitInput in Script API header
- the input flags can only be 8-bit, since wait_skipped_by and
  key_skip_wait are char, and key_skip_wait is serialized in
  gamestate.

From upstream 9e3d58a83dda00bff9073adb31b2b97adcf8d020
2022-06-18 01:08:58 +01:00
Paul Gilbert d3f9f299dd * Engine: moved unsupported scStartRecording, get rid of a h/cpp pair
From upstream 8e8e498776fec5392cbc6d6b4d36c83cce7cf4d0
2022-04-23 22:19:18 -07:00
Paul Gilbert f9921b0112 AGS: Fixed negative number save slots are accepted as valid
From upstream 1accb3e3b1ce4e68b950880ad9c0b3880cf1449e
2022-04-22 21:13:38 -07:00
Paul Gilbert 229676c239 AGS: Skip WaitMouse/Key* when skipping cutscene
From upstream 587214734100d43348bfe6433e8c88b5df5c4915
2022-04-22 20:26:39 -07:00
Paul Gilbert fabab1285d AGS: Made Hotspot.Name and Object.Name settable
From upstream 6a7271c4df1765dc86f88d7676337b63fcef17aa
2022-04-10 19:39:08 -07:00
Paul Gilbert 3425f8faf2 AGS: Moved couple of gui-related global vars into GuiOptions struct
From upstream 973d238a2c20368d8932ade22d2965d121cb7793
2022-04-10 19:39:06 -07:00
Paul Gilbert f4935dbf39 AGS: Force readjust TTF fonts if the OPT_ANTIALIASFONTS changes
From upstream 115119eeb009fc7f2c5820b47bb866acad6498ec
2022-03-27 13:37:13 -07:00
Paul Gilbert ee119e9611 AGS: Safer impl of Set/GetGlobalString
From upstream dfdba6c4648267ea19136420ae8019de984869a4
2022-03-27 13:37:10 -07:00
Paul Gilbert c6ddeae2df AGS: Expand error messages for Get/SetGlobalInt/String functions
From upstream c5cee80341ce1b66de865f624717f0922df8b3a7
2022-03-27 13:37:10 -07:00
Paul Gilbert a3dda03cf1 AGS: Store Views in std::vector
From upstream 095db88ae0f1acceb298f793a2e1b81dbe06fcff
2022-03-18 21:29:56 -07:00
Paul Gilbert 659be0a4e6 AGS: Fixed few warnings
From upstream b416d55eb74745db0da5a3cb2654e063cd057ded
2022-03-17 21:49:23 -07:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paul Gilbert 65f992979e AGS: Implemented Game.BlockingWaitSkipped
From upstream ce6bd0173f668932a0a5cab41119d2a476f7e73c
2021-07-27 22:03:38 -07:00
Paul Gilbert 529362a2d7 AGS: implemented SkipWait()
From upstream 3b3aed5b4e33d1791d8eac922c9d530e5796d984
2021-07-27 22:03:37 -07:00
Paul Gilbert 0b4b055d6f AGS: Wait functions may have infinite timeout with <0 time arg
From upstream 53c8b50559f6e8241ba7dbedbe1a8ff860522590
2021-07-27 22:03:37 -07:00
Paul Gilbert b4997729cd AGS: Wait functions return the actual reason they were skipped
From upstream 5a9a32348659f421115a951155405d431f8f3234
2021-07-27 22:03:36 -07:00
Paul Gilbert 9f78c2f22c AGS: Added WaitMouse() to complement existing Wait funcs
From upstream b623980549cc7355c5ca3db9adf4ef29463d65d6
2021-07-27 22:03:36 -07:00
Paul Gilbert 41b1126aed AGS: Split SpriteCache, picking out read/write into SpriteFile class
From upstream 565eaaf90e63ad444798cd949b1e4c60dfb4a0f8
2021-07-07 22:07:09 -07:00
Thierry Crozat 30764bbc41 AGS: Fix regression when trying to delete files
This for examples fixes deleting savegames from the ingame save
dialog in QfG2 AGDI.

The issue is that the file name we get from get_save_game_path(int)
in DeleteSaveSlot(int) contains the "/saves/" prefix, so we
cannot directly pass it to the ScummVM savefile manager.
2021-06-21 21:41:58 +01:00
D G Turner efc9e04ce0 AGS: Fix Various GCC Compiler Warnings 2021-06-15 11:07:23 +01:00
Paul Gilbert eb1e337edd AGS: Removed String's "const char*" conversion operator
From upstream 7c426674e7e53bffe9120f8ffc059b77fa03a606
2021-06-13 21:08:59 -07:00
Paul Gilbert d57474ce59 AGS: Provided more function variants accepting const String&
From upstream 44402962003db439e54d79e0c562fba1cf59e455
2021-06-13 21:08:58 -07:00
Paul Gilbert c111ef5f45 AGS: Changing ::remove to File::DeleteFile 2021-06-13 21:08:56 -07:00
Paul Gilbert 701396361c AGS: Import of fresh codebase 2021-06-13 21:08:44 -07:00
Thierry Crozat bb85f7aad9 AGS: Do not attempt to rename savegames after deleting one
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.
2021-04-16 01:14:46 +01:00
Thierry Crozat 5fde2a493c AGS: Fix deleting files
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.
2021-04-16 01:14:46 +01:00
Paul Gilbert 0a305db7ec AGS: Move guimain.cpp globals to Globals 2021-03-12 21:39:16 -08:00
Paul Gilbert 2f094655f1 AGS: Move script_runtime.cpp globals to Globals 2021-03-12 20:59:14 -08:00
Paul Gilbert d88d97d69d AGS: Move draw.cpp globals to Globals 2021-03-12 20:38:46 -08:00
Paul Gilbert 94212de9c8 AGS: Move game.cpp globals to Globals 2021-03-12 19:51:21 -08:00
Paul Gilbert 3a0a70bc43 AGS: Move more game.cpp globals to Globals 2021-03-10 21:01:11 -08:00
Paul Gilbert 2d82d32577 AGS: Move draw.cpp globals to Globals 2021-03-09 21:14:02 -08:00
Paul Gilbert 37b563ef35 AGS: Move game globals to Globals 2021-03-07 19:23:24 -08:00