Commit Graph
93 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
Hubert Maier 0820688495 AGS: Correct spelling mistake
accomodate -> accommodate
2022-10-27 15:56:07 +02:00
Hubert Maier ed023bf09a AGS: Correct spelling mistake
accomodate -> accommodate
2022-10-27 15:56:07 +02:00
Thierry Crozat 19514bc2ad AGS: Common: properly restore font metrics when setting an old font renderer
From upstream f07e8e20ddf715511012aa20861b9e8cecf7aa4f
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 b13b408972 AGS: renamed IAGSFontRenderer2 to IAGSFontRendererInternal
From upstream 6fc7c295728bf4d6815596f12a8587c80dbe4a5e
2022-10-10 00:16:16 +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 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 a477deb74c AGS: Fixed rendering scaled up WFN fonts
From upstream adc9121f30c028a071783ffb6645bb72aee482ea
2022-06-18 18:23:38 +01:00
Paul Gilbert f93e757aff AGS: Fix global constructor/destructor warnings 2022-05-29 15:44:45 -07:00
Paul Gilbert 316d213372 AGS: Fixed WFN clip causing misplaced letters + small tidyup
From upstream fdff20fd724a377dc06baf04187e52949d21d923
2022-05-10 21:17:59 -07:00
D G Turner dbaa9439da AGS: Remove Various Unused Variables Causing Compiler Warnings 2022-05-07 20:41:45 +01: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 68e5184afa AGS: Replaced some (v)sprintfs with sNprintf counterparts
From upstream a34bd392249f87a152dc470d90c67a7d193a28d8
2022-04-27 20:51:30 -07:00
Paul Gilbert 7b0bfee7cc AGS: Renamed and moved INIread/write functions for proper org&style
From upstream 18398a7d695e81575218380e1bba28010c239fdc
2022-04-27 20:25:31 -07:00
Paul Gilbert f2399dc15c AGS: Fixing various "unused variable/arg" warnings
From upstream 4b3c27c1a2b39d6c6b089adee111c6889d19ad0e
2022-04-25 19:17:26 -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 1dd1946aff AGS: Attempt to clarify meaning of the Font's import size
From upstream 71adfaa57e83b36315fc36feddaa72dd46dd11c5
2022-04-12 22:27:53 -07:00
Paul Gilbert 2d63a71b22 AGS: Fixed formatting of soff_t values
From upstream 80a01b51d66f8ca3c17670527ffc1c661ff47c81
2022-04-10 19:39:09 -07:00
Paul Gilbert 7f0169dd54 AGS: Apply bitmap clipping in WFN renderer
From upstream a2f3738f892641bfcd7e7ca930808c52f0757e23
2022-04-10 19:39:06 -07:00
Paul Gilbert e379c04198 AGS: Remove deprecated method 2022-03-29 22:16:06 -07:00
Paul Gilbert 5027f54a02 AGS: Added util methods for measuring preloaded TTF fonts
From upstream 89ae16e236073b6e3a06274e336ce853d906eed7
2022-03-27 19:14:53 -07:00
Paul Gilbert 0acbe50dd3 AGS: Added a flag for AGS mode that selects a font by a nominal size
From upstream 48644d35bd912bcb06aebbae2e2a1c9dc24e48d0
2022-03-27 19:14:53 -07:00
Paul Gilbert 7799fab6ba AGS: Fixed comments for FontRenderParams
From upstream d0218d799c4367eafc9294972ceb97a069954caa
2022-03-27 19:14:53 -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 5b10b7437c AGS: Added "ascender fixup" flag to the font init mode
SHA-1: 1273e64c1b82ffbcbbc90261952b6192bef9c966
2022-03-27 13:37:14 -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 f34cf7ce67 AGS: Apply TTF ascender hack only by the engine's request
From upstream 14679a430bf29acb6e511bb3799a5f99d9929463
2022-03-27 13:37:13 -07:00
Paul Gilbert 7132742e04 AGS: Reintroduce upstream's full alfont implementation 2022-03-27 13:37:12 -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 d378ce6d89 AGS: Use formal font height to set default linespacing, for now
From upstream aedbd80b6985981e5310c0928ad651143452ddcc
2022-03-23 20:40:34 -07:00
Paul Gilbert c0c76de84a AGS: An ugly workaround for legacy label linespacing
From upstream 9847f5b34abd7f3e5d3d1ca496ef2a991087e81e
2022-03-23 20:22:26 -07:00
Paul Gilbert 0211fa25e6 AGS: Moved linespacing precalc to post_init_font()
From upstream f848107265d2662819636790d24c13292fe2ec82
2022-03-23 20:17:33 -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 3e6c42ab8d AGS: get_font_height() returns compatible height
From upstream 61f726f71b7aee4d7e2ec09d5252061488b9aa81
2022-03-22 22:30:14 -07:00
Paul Gilbert ba47a913bf AGS: Add missing code from 43425f738dc6beb7d0758e256a840c5f37a4d38a 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 977925d105 AGS: Some fixes of namespace Common to be Shared 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 b61a661907 AGS: Removed redundant asset_size param from AssetManager::OpenAsset
From upstream 9d8456d4202be698b0a3117679745a8200c1ab9b
2022-03-20 22:11:54 -07:00
D G Turner b548bcfa28 AGS: Fix Undefined Macro Compiler Warnings
These are emitted by GCC when -Wundef is passed.

The AGS_PLATFORM_DEFINES_PSP_VARS may have previously caused those variables
to be present since undefined macros are assumed to be 0, thus the test would
have passed.
2022-03-16 09:13:02 +00:00
Paul Gilbert 448bb2d77e AGS: Moved "LucasFan" font hack to game_init, enable for all systems
From upstream 5d84ea958f9d2ba5582e69f211dbcb006ed4e187
2022-03-14 21:46:58 -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
D G Turner 6d7663b1b1 AGS: Fix Redundant Declaration Warnings
These are emitted by GCC when -Wredundant-decls is passed.
2022-03-09 15:28:19 +00: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 d865acf606 AGS: introduced font outline style and thickness parameters
From upstream 43425f738dc6beb7d0758e256a840c5f37a4d38a
2021-09-20 17:20:59 -07:00
Paul Gilbert 9d9080ffda AGS: Also return real TTF height in TTFFontRenderer::GetTextHeight()
From upstream 5115943fce180fe3e0bd9fe3678faa2d01b6d474
2021-09-20 17:20:58 -07:00