Commit Graph
231 Commits
Author SHA1 Message Date
Thierry Crozat aa6c07f03e AGS: Plugin API: few adjustments to recently added methods
From upstream ddf9aee9c360a60edcc2f3107fbac41f8efbe93c
2022-12-15 22:40:17 +01:00
Thierry Crozat c8eae1fa27 AGS: SpriteFont: corrected Clifftop's VariableWidth font height values
Got their meaning wrong on the first time.

From upstream d94f20742284ea75abbde86905159c490a7b4d46
2022-12-15 22:40:17 +01:00
Thierry Crozat d9a52bac54 AGS: SpriteFont: compatibility fix for engine interface < 26
From upstream 29741334fc18c9cf5f55e5032087f72031a25954
2022-12-15 22:40:17 +01:00
Eugene Sandulenko 8f8d522913 COMMON: Move achievements.* to engines/ 2022-12-02 00:12:22 +01:00
Le Philousophe 7f90669bdd AGS: Don't use unsafe strcat and strcpy 2022-10-23 22:46:19 +02:00
Thierry Crozat f380f418de AGS: implement IAGSFontRenderer2 and use NotifyFontUpdated for AGSSpriteFont
From upstream 63304da8ad002549930c3b894b56f4babec25902
2022-10-10 23:42:34 +01:00
Thierry Crozat 98f4b82f36 AGS: added IAGSFontRenderer2 and NotifyFontUpdated
From upstream e42b1371a8258ddd47c79af04a6f78fab2a136f4
2022-10-10 23:42:34 +01:00
Thierry Crozat 69eeb18d36 AGS: Added GetGameInfo to plugin interface
From upstream 97d02b47babb0cdd0e82e8815f3f5dbf8e7b2e1b
2022-10-10 23:42:34 +01:00
Thierry Crozat 58212aeebd AGS: added render callback AGSE_POSTROOMDRAW
This render stage overlays the room with objects and characters, but
stays within room transform, therefore will work with non-standard
viewport positions and multiple cameras.
The next closest stage is AGSE_PREGUIDRAW, which is rendered outside
room viewport. The new one fills the missing stage, lacking after the
viewport/camera update in 3.5.0.

From upstream 4ff7e14400ab81693fb64195d9ada70e979647ac
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 23f15cfb2d AGS: Fix detection for The Excavation of Hob's Barrow
This game needs to use the Clifftop Games variant of the AGSSpriteFont
plugin. Also it uses an alternate name for the plugin. That name
was already supported when loading builtin plugins, but not for the
Clifftop Games variant.

This commit also adds detection for the Mac version from Steam.
2022-10-03 18:44:22 +01:00
Thierry Crozat 88c56f912d AGS: Fix access to uninitialized memory in base SpriteFont plugin
When using the base SpriteFont plugin and not the ClifftopGames variant,
the renderers pointer were not initialized in the constructor, which
could lead to them not being instantiated, and then causing a crash.
2022-10-03 18:44:22 +01:00
Thierry Crozat c6c502ffe1 AGS: Partially revert "Make IAGSFontRenderer destructor virtual"
After discussing with upstream ags developers, it was indicated that
making the destructor virtual changes the vtable and could cause
issues with plugins used by old games. This is unlikely to be an
issue with ScummVM since we do not use the original plugin DLL, but
to be consistent with upstream code I am reverting the change here.

And furthermore there was no need to make the IAGSFontRenderer
destructor virtual, as long as we do make the destructor of the base
renderers in the AGSSpriteFont plugin virtual (so that the Clifftop
Games versions of the renderers are properly destroyed).
2022-07-22 11:24:05 +01:00
Thierry Crozat 817ddb19c9 AGS: Tidied Library class
From upstream 58a6f421e3b97f6e2db49b88a6434686c62f5142
2022-06-25 23:33:30 +01:00
Thierry Crozat 7bd21cac8d AGS: Improve font deletion on ags_sprite_font_plugin 2022-06-25 23:33:30 +01:00
Thierry Crozat 26d135d298 AGS: Make IAGSFontRenderer destructor virtual
This fixes issues with the font renderers deletion in the ags_sprite_font
plugin since we do deletion using pointers that may not be of the final
class.
2022-06-25 23:33:30 +01:00
Thierry Crozat a336b97f4e AGS: Fixed few more warnings
From upstream 343dda7e508e5c3b6b50ad13756020e200d513ef
2022-06-21 23:28:01 +01:00
Thierry Crozat 2c7d51ce16 AGS: Replaced EnginePlugin's filename from char array to String
From upstream 252d9d198ac665546bd7ed3f3b8afa018bd62b9f
2022-06-19 20:50:24 +01:00
D G Turner f567b0f96a AGS: Fix GCC Compiler Warnings 2022-06-18 14:10:00 +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 2e726fa214 AGS: Removed deprecated globals 2022-05-30 15:23:20 -07:00
Paul Gilbert 97c12e8435 AGS: Merged Character and ObjectCache structs, and hid in draw.cpp
From upstream 753d47d975b10666702c47a22cbc4e68847787f1
2022-05-05 22:41:09 -07:00
Paul Gilbert 6482e38803 AGS: CharacterExtras and MoveLists are stored in std::vector
From upstream 0c81cfefb788c0dcfdb2cad914f939f28110edca
2022-05-05 22:41:08 -07: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 17bac5b1ef AGS: Removed redundant function domouse(int what)
From upstream 3dfda41382bdd10e3b2b78f797fade8b5dcc1efa
2022-04-23 18:15:02 -07:00
Paul Gilbert 62574f8eda AGS: Use outlined width/height when arranging text on GUI
From upstream 8fd4b1b55dc08949e70d295afb4be91d1a26da5c
2022-04-22 20:54:00 -07:00
Paul Gilbert 5060848b48 AGS: Support requesting particular audio driver
From upstream 076e675a3d031cd0a9d162f914e6d94c93a10d71
2022-04-21 21:20:58 -07:00
D G Turner ad7450d5ce AGS: Fix GCC Compiler Warnings 2022-04-19 11:42:26 +01:00
Paul Gilbert b2d8bcad75 AGS: Refactor RunTextScript* functions for the purpose of clarity
From upstream 17af6ca2cb1fba310900f5189da788fa52ef7dab
2022-04-18 19:10:39 -07:00
Paul Gilbert 2e24e08d5b AGS: Brought few "run script" functions to similar arg list
From upstream 78163a07400353013dd939ca86f5513f3196394a
2022-04-18 19:10:39 -07:00
Paul Gilbert 27ad60df72 AGS: Unify video flags in VideoPlayer, convert in script functions
From upstream e5c8293a8c8350c38a8df338f56e3806fdc4f119
Plus changes to local video player implementation to reflect changes
2022-04-12 22:27:56 -07:00
Paul Gilbert 84a54f5e8e AGS: Remade OPT_FONTLOADLOGIC into individual font's flags
From upstream 54c5303c5e0ed98609397d9e5df4114f128fb4a2
2022-03-27 13:37:14 -07:00
Paul Gilbert ca4c91031b AGS: Configurable font init mode, for backward compatibility
From upstream 9a11a1d4334aef99b8b516a13d5a5bcc0284fde7
2022-03-23 20:09:46 -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 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 16b89bd8ea AGS: tidy SOUNDCLIP's fields (volume, panning) and methods
From upstream 66514167d3463f8191b10ec13898df136e8e33ee
2022-03-19 21:25:08 -07:00
Paul Gilbert a4bf82bd35 AGS: Removed "volume" param out of load clip factory functions
From upstream 903c4d7d69bf0400447b099cbd0b2818f3c1f7c7
2022-03-19 21:25:08 -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 a3dda03cf1 AGS: Store Views in std::vector
From upstream 095db88ae0f1acceb298f793a2e1b81dbe06fcff
2022-03-18 21:29:56 -07:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh a386075217 AGS: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Paul Gilbert e1cb9afb4e AGS: AGSParallax plugin fix, workaround for Stargate Adventures 2021-09-21 21:09:51 -07:00
Paul Gilbert b7c9f5259f AGS: Hack to fix rain display in IA KQ3
The ags_snowrain plugin seems to have logic in it to transparently
translate 320x200 based coordinates when the game is run in
640x400 mode. Since the current plugin code is a recreation rather
than a reimplementation, I wasn't sure where to do the fixes,
so for now simply put a hack in the set baseline script, which was
all that was needed for KQ3
2021-09-11 14:39:18 -07:00
Paul Gilbert aae048203f AGS: Remove commented out debug code from plugins 2021-09-11 14:39:18 -07:00
Paul Gilbert 83f4b713bc AGS: Fix turning off flashlight in Maniac Mansion Deluxe 2021-09-09 21:47:59 -07:00
Paul Gilbert 5f3004b94e AGS: Fix loading standalone AGS Maniac Mansion Deluxe saves
It seems the older version of AGSFlashlight didn't persist
it's fields in the savegame like the latest version does.
I decided against trying to explicitly figure out which
version of AGSFlashlight different games used, and instead
simply have fallback handling if the savegame doesn't
have the data.

The only minor disadvantage is that this means that whilst
savegames are portable from standalone AGS to ScummVM for
the game, it won't in the other direction. But I don't
think that's too major an issue, since it's only for the
few games that do use the old AGSFlashlight
2021-09-09 20:14:27 -07:00
antoniou79 d474ee3003 AGS: Change a few char variables to int8
In order to specify that they should be treated as signed

Some ports may treat an (unspecified) "char" as unsigned by default. Android does this for its ARM architectures and while we did fix this by enforcing -fsigned-char to its compiler, the issue may come up for other ports. Also it should be better to clarify in the engine when a variable is not actually storing string characters.

I've spotted and changed the most "safe" cases I could find for this. As far as I can tell, out of these, only the Outline field and fontoutline array could potentially be assigned valid negative values which would cause bugs for ports treating chars as unsigned.
2021-09-09 19:27:49 -07:00
Matthew Duggan 129b517cca AGS: Fix build when DEBUG is defined 2021-09-04 22:03:20 +09:00
Thierry Crozat 7f886d51e1 AGS: Add warning about playing overlapping sounds in ags_wave
This is currently not implemented, and is not trivial to implement
with the current way we implemented the plugin.

Playing overlapping sound is for example used when moving the cursor
over the buttons in the options or quit dialogs in Strangeland.
2021-08-21 19:17:44 +01:00