Commit Graph
224 Commits
Author SHA1 Message Date
grisenti 92606bb7b8 AGS: improve find for AGS3::std::set 2022-12-21 13:45:25 +01:00
grisenti 7e6c494733 AGS: add erase method for elements to AGS3::std::set 2022-12-21 13:45:25 +01:00
grisenti 088c83fcf9 AGS: replace use of equality checks in AGS3::std::set 2022-12-21 13:45:25 +01:00
Eugene Sandulenko d0ab65a318 AGS: sprintf -> snprintf 2022-12-16 11:14:41 +01:00
Thierry Crozat e36abe967e COMMON: Move std::initializer_list to scummsys.h 2022-09-04 23:20:17 +01:00
Thierry Crozat e960e831b0 AGS: Remove unused variables for Allegro PACKFILE
This takes part of upstream d0405ac9e93f16bac9d849757df78bd10c82b556
that removes password and encryption support from PACKFILE in Allegro4.
We actually didn't have that code in ScummVM, but we still had some
(unused) related variables in the header file.
2022-06-20 23:52:25 +01:00
Thierry Crozat d953e95a68 AGS: Add sanity check in putpixel to avoid overflow
The alfont code seems to have some inconsistency between the real from
height and the maximum height used when drawing in alfont_textout_ex.
This can cause trying to write out of bounds, and then random crashes.

This fixes bug #13601
2022-06-20 23:52:25 +01:00
Thierry Crozat 9144ec7131 AGS: Add sanity check on iterators in implementation of std::list::splice
In particular the SpriteCache class can call this function with both
iterators pointing to the same item (when trying to move an item to
the start of thr MRU list, and it is already the first item).
2022-06-18 22:20:40 +01:00
Thierry Crozat 65124a3745 AGS: Fix implementation of std::list::insert
Instead of returning an iterator to the inserted item, it was
returning an iterator to the next item. This was for example causing
bugs in the SpriteCache.
2022-06-18 22:20:40 +01:00
Thierry Crozat 73ff6317fd AGS: Add some more std replacements needed for recent AGS code 2022-06-18 01:03:30 +01:00
Paweł Kołodziejski b3ee5b54f6 AGS: Fixed compiler warning: "expression result unused" 2022-05-30 07:48:32 +02:00
Paul Gilbert 706766f4b5 AGS: Guimain tidy-up
From upstream fd656469bc71385ffd9da50ad0315641cd5f6d22
2022-05-10 21:18:00 -07:00
Paul Gilbert c28d948fbe AGS: Hopeful compilation fix 2022-05-05 23:39:24 -07:00
Paul Gilbert 8e132f7b3f AGS: cc_error returns stack from all script threads
From upstream 9e76800d668d8d0af7d47d815e6d1b781c7601f6
2022-05-05 22:41:07 -07:00
Paul Gilbert 480be2134b AGS: Added script instance thread stack, replacing current_instance
From upstream f3443cb7a4ae5858e5d2d28131aaf6cf138bc0ec
2022-05-05 22:41:06 -07:00
Paul Gilbert 830c1b096b AGS: introduced ObjTexture struct which combines bmp and ddb
From upstream b628fb4d1b3ca6a85e2b2424a468f4cec94ae9c6
Also includes new implementation of std::vector class to
properly allow for arrays of smart pointers
2022-05-05 22:41:05 -07:00
Paul Gilbert 6ef504bba2 AGS: Store gui draw order in a std::vector
From upstream fcc873ef0c26439faf67100f4d70d540434ca9f5
2022-05-01 17:23:22 -07:00
Paul Gilbert 8be58d3de2 AGS: Store game events in std::vector, remove event cap
From upstream a2f9a5ba94377686762b2828df4fccbe661d2b03
2022-04-18 19:10:29 -07:00
Paul Gilbert 0e0063bb6b AGS: String.AppendChar, ReplaceChar, Chars[] support unicode
From upstream 072ed5716639e2b65a16037dd81e2a332a78611b
2022-04-13 21:55:19 -07:00
D G Turner 08759141c1 AGS: Fix Remaining Cast Qualification Warnings in Unicode Font Code
This was due to an issue with C++ which has issues with "const char **"
as a _partially_ constant pointer type and requires this modifying to
"char const* const*" to be fully const which can also be written
as "const char* const*" which fixes the API without requiring excessive
casts and removes the various GCC Compiler Warnings emitted when
-Wcast-qual is passed.
2022-04-04 13:29:30 +01:00
D G Turner 6b2eb7bd42 AGS: Reduce Cast Away Qualifier GCC Compiler Warnings 2022-03-30 12:21:09 +01:00
Paul Gilbert 3989d2652b AGS: Compilation fix 2022-03-28 22:45:52 -07:00
Paul Gilbert accd508b9c GRAPHICS: Create set of wrapper functions for accessing FreeType directly 2022-03-28 20:29:36 -07:00
D G Turner 96fe37a92b AGS: Fix Set But Unused Variable GCC Compiler Warnings 2022-03-28 14:34:25 +01:00
Le Philousophe 28e1ed453d AGS: Add missing shim when FreeType isn't available 2022-03-28 12:51:27 +02:00
Torbjörn Andersson 4322770650 AGS: Hopefully fix build
We have to include scummsys.h before checking if USE_FREETYPE2 is
defined, and we need wchar.h for the wcslen() function. But I don't know
for certain if everything - or even anything - works correctly now.
2022-03-28 11:48:53 +02:00
Paul Gilbert bb01ccb213 AGS: Fixed AssetManager::RemoveLibrary()
From upstream b1355178a86a277ac12440eb6c0ec996c153137d
2022-03-27 19:14:54 -07:00
Paul Gilbert a8fc0f8ec9 AGS: Fixed a use of !(ALFONT_FLG_SELECT_NOMINAL_SZ)
From upstream a0d6a8f6dc7145ad4343110b8e0aefc3fabafbe2
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 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 91bce9b2e9 AGS: Implement xor_mode/solid_mode 2022-03-27 13:37:13 -07:00
Paul Gilbert 8e1a3d08db AGS: Add USE_FREETYPE2 guard to alfont 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 15704239b8 AGS: Properly implement alfont_get_name 2022-03-14 22:12:40 -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
D G Turner 064684fd16 AGS: Fix GCC Duplicate Branch Warning in Allegro Fixed Point Code 2022-03-02 10:01:09 +00:00
D G Turner 649ad6f9a6 AGS: Remove Duplicate Definition from Allegro System Header
This was causing GCC warnings when -Wduplicated-branches was defined.
2022-03-02 09:57:27 +00: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
Orgad Shaneh ee57380de7 ENGINES: JANITORIAL: Remove 'virtual' when override is specified 2021-11-14 14:32:04 +02:00
Paul Gilbert 6df48524c1 AGS: More properly fix paletted fading 2021-09-28 20:59:46 -07:00
Paul Gilbert ec75ae627a AGS: Implemented fade_interpolate 2021-09-25 09:54:22 -07:00
Thierry Crozat 07ce31ecae AGS: Try to load font with WinFont as a fallback when TTFFont fails
This fixes bug #12948 AGS: Segfault when picking up at police report.
For that bug the font is properly loaded by FreeType, but it is a
non-scalable Windows font whose size does not match the requested
size. The original AGS handles TTF font sizes differently to how we
do it in TTFFont (and also has some hacks on top of that), and it
was easier here to use WinFont that try to tweak TTFont to work
with this case.
2021-09-24 23:43:33 +01:00
Paul Gilbert 8058862f7d AGS: Precalculate and save font's height on load
From upstream 47001a398a1bc4ad022645ad21e1c891a3757167

Note: Since we don't implement alfont in full, the
referenced methods are stubbed in our alfont.cpp
2021-09-20 17:20:58 -07:00
Paul Gilbert 88fdb16d39 AGS: Fix pathfinding in A Golden Wake 2021-09-06 21:39:54 -07:00
Paul Gilbert 122acc39b5 AGS: Fix font outlines not drawing correctly 2021-08-25 21:31:40 -07:00
Paul Gilbert 49a5fd6ebe AGS: Fix broken calendar puzzle in Lamplight City 2021-08-14 19:46:15 -07:00
Paul Gilbert 71de3facb2 AGS: Better fix for Gemini Rue German accents 2021-08-07 16:49:37 -07:00
Paul Gilbert 2232f3f3ff AGS: Fix rendering accented characters in Gemini Rue German 2021-08-07 16:21:25 -07:00