Some parts of the code used the fixed-size type uint32_t,
which is defined in stdint.h / cstdint - without including said
header file. With GCC13, the inter-header dependencies seem
to have changed and the file is no longer included transitively,
requiring an explicit include.
* Fix for invisible batteries (code by melex750)
* Updated vcpkg
* A workaround for sprintf define
* Added mpg123 to dependencies due to newer version of SndFile
* Removed CONFIG
* Another fix for dependencies
* Made additional dependencies optional
The last segment of the path is shortened to avoid going too close
and risk bumping into the object that it was meant to approach.
The same position could also be found by finding the roots of a second
order polynomial analytically but this solution is simple and sufficient.
This is a bit redundant because the current usage of goto
does not trigger it. It can be triggered by:
* increasing goalRadius
* decreasing NUMQUEUEBUCKETS
* decreasing BM_DIM_STEP
* increasing edge costs
* Remove hardcoded default font name.
This means the `fonts/fonts.ini` file is now mandatory
and must contain definition of all 9 font types.
Old mods relying on an incomplete `fonts.ini` file might break.
A separate PR creating the required `fonts/fonts.ini` file
should be merged before this pull request.
* Simplify `CFontLoader`.
* Return `std::optional` instead of returning a default.
* Remove the now unnecessary `std::map`s.
* Remove the now unnecessary `GetFontType` method.
* Improve Gfx::FontType.
* Provide `ToString` function for the enum, which is now
used for logs and by `CFontLoader`.
* Provide `ToBoldFontType` and `ToItalicFontType` functions.
* Replace hex literals with binary literals for readability.
* Move font caching related code to a new private class `FontsCache`.
* Add neccessary changes because of changes made in `CFontLoader`.
* Add minor code improvements like renames and formatting.
* Split the code into smaller functions for readability.
* Simplify the `CText` class.
* Apply the rule of 5 to the `CachedFont` structure.