The change in https://github.com/OpenTTD/OpenTTD/pull/10655, released as part
of OpenTTD 14, changed how auto saving works from every X amount of game time,
to every X amount of real time. This is an improvement for normal play, but
there are cases where saving every X amount of game time is useful. For example
when developing and comparing AIs, or using OpenTTD to conduct experiments such
as via https://github.com/michalc/OpenTTDLab which extracts data from savegame
files.
This change addresses this by adding the GSController::TriggerSave function to
the GameScript API that allows game scripts to trigger a save, and with a
specific file name. Because game script have access to the in-game date through
GSDate.GetCurrentDate, and can sleep arbitrary amounts of ticks, it means they
can approximate the pre OpenTTD 14 behaviour of saving every X amount of game
time.
It also means that via game scripts, games can be saved immediately after game
start, which wasn't possible with the previous autosave behaviour.
The name of the function is not Save to avoid conflict and confusion between
the existing Save function that game scripts can implement to add custom data
to savegame files.
Fallback font searcher looked for the substituted ? glyph, which was removed by #12736.
Instead of comparing against a sprite, test against the font returning a missing glyph.
This should also improve performance of fallback font searching, as previously glyphs were actually rendered while searching.
english (au): 1 change by krysclarke
chinese (simplified): 1 change by WenSimEHRP
russian: 1 change by Ln-Wolf
slovak: 20 changes by Kukoluk
latvian: 1 change by lexuslatvia
portuguese: 1 change by azulcosta
portuguese (brazilian): 1 change by pasantoro
Initial colour is now always TC_INVALID, which is substituted with the desired colour when drawing the layout line.
This allows strings which differ only by initial colour to use the same layout cache entry, increasing the efficacy of the cache.
swedish: 9 changes by joeax910
english (us): 2 changes by 2TallTyler
luxembourgish: 4 changes by phreeze83
catalan: 2 changes by J0anJosep
latvian: 27 changes by lexuslatvia
* Fix: Allow changing size of default OpenTTD font.
Size configuration for default font was ignored as a different code path to load the font was followed.
Resolved by removing this additional path and conditionally selecting the default font.
This allows waypoints to be split into categories just like stations, instead of all being lumped together.
Station class labels with the first byte set to 0xFF will be treated in the same way as the 'WAYP' class.
english (au): 2 changes by krysclarke
chinese (simplified): 7 changes by WenSimEHRP
korean: 4 changes by telk5093
russian: 2 changes by Ln-Wolf
finnish: 2 changes by hpiirai
portuguese (brazilian): 2 changes by pasantoro
Temporary buffer for rendering glyphs was not freed after use. Instead let CGBitmapContextCreate() handle the buffer.
> data may be a pointer to pixels. If you pass NULL, the context will create its own buffer and free that buffer itself later. If you pass your own buffer, the context will not free it; it remains your buffer that you must free after you release the context, hopefully for the last time.