Adds GSStoryPage::IsValidStoryPageButtonColour, GSStoryPage::IsValidStoryPageButtonFlags and GSStoryPage::IsValidStoryPageButtonCursor to the API.
Add missing enforced preconditions to validate parameters passed to MakePushButtonReference, MakeTileButtonReference and MakeVehicleButtonReference.
Fixes a crash that happens if an invalid StoryPageElementType is passed to ScriptStoryPage::NewElement.
Adds an enforced precondition that tests the validity of StoryPageElementType.
Adds GSStoryPage::IsValidStoryPageElementType to the API.
This function calls icu::BreakIterator::createLineInstance() but does not clean up after it.
Instead use a static instance that is cloned (for thread-safety) and deleted as necessary.
(cherry picked from commit 6d276698b6)
This function calls icu::BreakIterator::createLineInstance() but does not clean up after it.
Instead use a static instance that is cloned (for thread-safety) and deleted as necessary.
SetStringParameters() was called during widget tree init in the constructor.
Calls within a constructor cannot call the derived classes methods. This would result in invalid data being passed to the string system, which could then crash.
(cherry picked from commit fef0bfcfd3)
There was an issue with the start_date parameter for AIs. It did not let Random AIs to have their configure button clickable once the game has started, and this was due to the start_date not being pushed into the config.
But now that start_date is no longer in use since #10653, this workaround can be safely removed.
(cherry picked from commit 6588680ccc)
Many places use local_company to detect whether world generation is
done, and blindly assume all vital windows exists when local_company
is set.
(cherry picked from commit f35e257adc)
This removes manual memory management with calloc/free calls, and prevents potentially large arrays being allocated for each group.
(cherry picked from commit 8797cc7ef2)
SetStringParameters() was called during widget tree init in the constructor.
Calls within a constructor cannot call the derived classes methods. This would result in invalid data being passed to the string system, which could then crash.
When ligatures happen the precise individual character position is not known, so instead return the previous position (which is that of the ligature.)
(cherry picked from commit d6ccfdbbd9)