Commit Graph
85 Commits
Author SHA1 Message Date
Walter Agazzi 092ef64fc6 AGS: Engine: fixed speech stuck in "post state" under some conditions
This fixes repeated post-state on/off switching, and as a consequence - endless loop
 in cause of a "..." sentence, that  is run until messagetime reaches -1 on its own,
  which did not happen because of repeated post-state.

NOTE: looks like an original bug introduced along with the DisplayPostTimeMs property.

From upstream 37360990b22a79380f2a5b34e686a2d2fbcf7de1
2024-03-28 12:00:55 +01:00
Walter Agazzi 71e453930a AGS: Fix partial outlines for some letters in Kathy Rain
Clifftop's Spritefont plugin returns a off-by one size for font2 that
causes a broken outline for some characters. Fixing the value on
the plugin side breaks line spacing, this adds a workaround to the
autooutliner to avoid the issue.
2024-02-11 23:22:14 +01:00
Walter Agazzi 95b0b2fc4d AGS: Engine: when drawing TextWindow clip border pieces, fix over corners
This fixes vertical or horizontal borders to be drawn under rightmost and bottom
corners, which may have transparent parts.
From upstream a77393abc2353a7d8309b7edf1f0ff582c34778c
2024-01-17 03:12:27 +01:00
Walter Agazzi ff0298be68 AGS: Engine: ignore mod and special keys when skipping speech and wait
Partially from upstream 8079c87ca11fa6b60ed2dd2ce345cda6c384c00b
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 f9de999bbe AGS: Engine: Update cursor and dependent "logic" in special game states
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
2023-04-29 13:11:41 +02:00
Walter Agazzi b554ab3bad AGS: Engine: fixed non-blocking speech disabling interface
Apparently, this is an ancient bug, but it became noticeable
now after some changes to the GUI update logic fixes and
optimizations.

From upstream e069c3f51c08c163df023157e99e14bbcefd317a
2023-04-29 13:11:41 +02: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
Walter Agazzi 51e541cfb6 AGS: Remove unneeded La Croix Pan workaround
The help text now behaves like the original game
2023-01-20 14:14:56 +00:00
Walter Agazzi 862759135e AGS: Engine: split out create_textual_image() out of _display_main()
This simply makes generation of the textual image a separate function that may be used elsewhere, besides creating a new message overlay.
From upstream a49550d32e9ea210e2d9b6711157251359d3c4c0
2023-01-20 14:14:56 +00:00
Thierry Crozat 3286cf18ec AGS: Engine: in display_main exceed all the keypress buffer
From upstream d2100b01ee4a85219b481dcd7593f0e0d419523e
2022-12-17 22:10:55 +01:00
Thierry Crozat e2497cff42 AGS: include KeyMods flags in the WaitSkipResult
From upstream 65bfbb9bde733457b8ab958bb3cd273f7fadcb25
2022-10-10 00:16:16 +01:00
Thierry Crozat 5987bc5e6e AGS: rewrote eAGSMouseButton enum to sync with the script API
* 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
2022-10-10 00:16:16 +01:00
Thierry Crozat 52bf81b33e AGS: Fix regression with GUI Text Antialiasing option not working 2022-06-06 22:42:36 +01:00
Paul Gilbert 7282304951 AGS: Script API: implemented room overlays
From upstream 65a7cd7e7566d3a1111be10b70dcb51b1853cd88
2022-05-06 20:16:42 -07:00
Paul Gilbert cf091f2d3e AGS: Replaced couple of variables in ScreenOverlay with flags
From upstream 38a4e8c262f0ec796225494fc939b283680caf57
2022-05-06 20:16:41 -07:00
Paul Gilbert ec38c1c61c AGS: Refactor core overlay creation funcs to return ScreenOverlay*
From upstream f89b2e8e59da107fcbb7a75bf7e1aa293a45fb2b
2022-05-05 22:41:10 -07:00
Paul Gilbert b1649597d7 AGS: Replaced Math/std Min/Max with ScummVM macros
Inspired by 6dee5ee6f271c600e30879d892295ea6069e8cc9
2022-05-05 22:41:10 -07:00
Paul Gilbert da1178d905 AGS: Implemented proper HasAlphaChannel for all gui controls
From upstream 83306ee321e127368a41068f32bd4899ae00223e
2022-05-05 22:41:06 -07:00
Paul Gilbert 6ee31a530e AGS: Removed unnecessary ags_domouse() calls
From upstream de28de1dd44d991a479ae0adb5fdb4996fe33656
2022-04-29 22:20:39 -07:00
Paul Gilbert a1a0323d28 AGS: Removed few redundant function args
From upstream 4c80a7fb3afdfd8d7b82f16b7aeac5418565f608
2022-04-24 16:00:03 -07:00
Paul Gilbert 17bac5b1ef AGS: Removed redundant function domouse(int what)
From upstream 3dfda41382bdd10e3b2b78f797fade8b5dcc1efa
2022-04-23 18:15:02 -07:00
Paul Gilbert 5cc7daedfe AGS: Use outline fonts too when getting outlined text width / height
From upstream 1f3960014a313fc7b47dd26274ffd87b96bbbb87
2022-04-22 20:34:19 -07:00
Paul Gilbert 8e310c5d98 AGS: Split GameState::want_speech into two variables for easier handling
From upstream 2f6e7362f742c59020fc6a70fdf67c5a87ff2e69
2022-03-27 19:14:55 -07:00
Paul Gilbert 86f3f8933b AGS: Use real font height for speech & dialog option bitmap sizes
From upstream 22af623cadce89ac27777cf2178649a71fc2a345
2022-03-23 20:50:27 -07:00
Paul Gilbert 3e6c42ab8d AGS: get_font_height() returns compatible height
From upstream 61f726f71b7aee4d7e2ec09d5252061488b9aa81
2022-03-22 22:30:14 -07:00
Paul Gilbert d42b639142 AGS: Always precalculate and save font linespacing (as outlined)
From upstream 8ba3a77e38a6dc8ace6d6393042730d73292a1a7
2022-03-22 22:30:14 -07:00
Paul Gilbert e9c153ad4a AGS: Removed unused function getfontlinegap()
From upstream fa357693ba7e465a3b17b5e3bb785d7d2f9a7325
2022-03-22 22:30:14 -07:00
Paul Gilbert df29806aec AGS: Replaced the remaining wgettextheight() with get_font_height()
From upstream d9c4a0306a6718cb03ccd6e84c1e63d093d9a64a
2022-03-22 22:30:13 -07:00
Paul Gilbert dc3ce9f70a AGS: Renamed few font functions for consistent naming style
From upstream 9c355da410b734edc79212009a5e1be0b502c3b0
2022-03-22 22:30:13 -07:00
Paul Gilbert c25b08448d AGS: Removed AudioChannelsLock as it's no longer needed
From upstream 43f9320f66bb881920e6f812d1c642e793b134b6
2022-03-18 21:29:56 -07:00
Paul Gilbert 6bf83c7f39 AGS: Removed Overlays' arbitrary limit
From upstream 735dcfb14069b38aace4cef9468d44b63349d1bd
2022-03-15 22:28:36 -07:00
Paul Gilbert fd0e16ffc3 AGS: implemented stencil cache per Font for automatic outlining
From upstream e32c4bf46b5f74b904ac491bb6017ceb8f8e2bbf
2022-03-14 21:04:08 -07:00
Paul Gilbert 641ade11fa AGS: Fixed crash in auto outline in case of empty text argument
From upstream e3665a3c073e574d3e4fade869b3c0c3e88508e5
2022-03-14 21:04:08 -07:00
Paul Gilbert 399a89825f AGS: New auto outline supports AA TTFs in 32- and 16-bit games
From upstream cae84d689019313cad49b6dca7e916866b90e49e
2022-03-14 21:04:07 -07:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paul Gilbert b63427641d AGS: Moved font's linespacing hack into the game_init
From upstream f8ad7b96b46c33156ee1d6c7c4b64b5029c7b93b
2021-09-21 18:45:18 -07:00
Paul Gilbert a72e87df63 AGS: Fixed crash in auto outline in case of empty text argument
From upstream e3665a3c073e574d3e4fade869b3c0c3e88508e5
2021-09-21 18:45:18 -07:00
Paul Gilbert 8b90ea85df AGS: Implemented auto outlining with custom thickness and style
From upstream f2736d21677d2db4b0559c1ded31e284b8a8f64f
2021-09-20 17:20:59 -07:00
Paul Gilbert d865acf606 AGS: introduced font outline style and thickness parameters
From upstream 43425f738dc6beb7d0758e256a840c5f37a4d38a
2021-09-20 17:20:59 -07:00
Paul Gilbert d8335ed435 AGS: Partially revert previous commit: had engine logic moved to fonts
From upstream a4bafa3597a98a0df1cb5f5e921b2e6651c28a89
2021-09-20 17:20:58 -07:00
Paul Gilbert 96ad02b3b9 AGS: Use real font height in game calculations, compat linespacing
From upstream  3a9b8f199e09b9919a201c1d2fa486a79761b339
2021-09-20 17:20:58 -07:00
Paul Gilbert 50c59252c7 AGS: Added Bitmap::ResetClip() for simpler unsetting of clipping
From upstream a0ad337a24ec2c25822949494c717529c57e56c3
2021-08-20 21:49:39 -07:00
Paul Gilbert 2b99448a97 AGS: Fix workaround for Guard Duty 100,000 wide surface 2021-08-01 19:46:45 -07:00
Paul Gilbert 65f992979e AGS: Implemented Game.BlockingWaitSkipped
From upstream ce6bd0173f668932a0a5cab41119d2a476f7e73c
2021-07-27 22:03:38 -07:00
Paul Gilbert 9612b5cb35 AGS: distinct overlay types of speech and messagebox
From upstream d7c091890d2cde07776cca4ebbed7352d379612d
2021-07-27 22:03:37 -07:00
Paul Gilbert 73cd6b9215 AGS: Structure for passing events UTF8 text around along with the keycode
From upstream 9d65a68c61d0503e05e2cbe80447af0d619161e4

Note that ScummVM doesn't have a TEXT_INPUT event, so this change and following
ones will be mostly to keep in sync with the standalone codebase even if they're
not directly used
2021-07-10 14:33:36 -07:00
Paul Gilbert 454cc0fff9 AGS: Properly move Lines global into Globals 2021-07-08 20:37:51 -07:00
Paul Gilbert 526a898454 AGS: Fix for Guard Duty creating a too large surface 2021-07-04 18:24:25 -07:00
Paul Gilbert 0672ca0f2b AGS: Fix rendering purple text that matches the transparent color 2021-07-03 11:49:23 -07:00