Peter Nelson
48539992e8
Codechange: Use std::unordered_map for storing TrueTypeFontCache's GlyphEntry.
2024-05-30 20:16:28 +01:00
Peter Nelson
7b717fcccb
Codechange: Replace AllocatorProc with SpriteAllocator class.
...
This allows for state to be passed to or maintained by the allocator.
2024-05-30 20:16:28 +01:00
Peter Nelson
de16655f76
Change: [UI] Remove substitution of missing glyph with '?' glyph. ( #12736 )
...
When a glyph does not exist, we substitute it with the '?' glyph instead, but layouters are not aware of this substitution.
2024-05-30 18:33:58 +01:00
Peter Nelson
980dcaac6e
Cleanup: Remove GetFontTable from FontCache. ( #12677 )
...
This interface is no longer used, so does not need to be implemented.
Removes manual memory management with malloc/free.
2024-05-14 21:13:26 +01:00
ladysadie
727392e0b3
Codechange: Remove per font AA settings. ( #12413 )
...
OpenTTD will use the global AA font setting for all fonts from now on.
2024-04-15 21:44:33 +02:00
Peter Nelson
b85ecf9ac2
Codechange: Replace pointer to Sprite array with reference to SpriteCollection. ( #11580 )
...
Add `SpriteLoader::SpriteCollection` type which is an array of `SpriteLoad::Sprite`.
This removes the ambiguity of what `SpriteLoader::Sprite *` is pointing to,
and cleans up mismatches using both dereference -> and array access [] for the
same object.
2023-12-20 20:38:21 +00:00
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Peter Nelson
c38df2d589
Codechange: Use std::map instead of custom SmallMap.
2023-05-18 12:18:30 +01:00
PeterN
e97bf271dc
Codechange: Make SpriteType, CargoSortType, SourceType and ScriptType enum classes. ( #10663 )
...
This avoids a (soft) namespace conflict between the four ST_* enums.
2023-04-16 20:00:55 +01:00
Peter Nelson
2cdd8b7429
Change: Separate fontcache implementations.
2022-09-25 18:34:24 +01:00