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.
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
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).
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.
From upstream b628fb4d1b3ca6a85e2b2424a468f4cec94ae9c6
Also includes new implementation of std::vector class to
properly allow for arrays of smart pointers
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.
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.
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.
From upstream 47001a398a1bc4ad022645ad21e1c891a3757167
Note: Since we don't implement alfont in full, the
referenced methods are stubbed in our alfont.cpp