Store state ticks directly in savegame instead of the offset

Initialise the state ticks value to a constant for new games,
instead of using an implicit offset of 0
This commit is contained in:
Jonathan G Rennison
2024-02-07 20:05:11 +00:00
parent 0ea57528c9
commit d39236d50c
10 changed files with 42 additions and 43 deletions

View File

@@ -200,6 +200,9 @@ static const Year MAX_YEAR = 5000000;
/** The number of days till the last day */
static constexpr Date MAX_DATE = DateAtStartOfYear(MAX_YEAR + 1) - 1;
/** An initial value for StateTicks when starting a new game */
static constexpr StateTicks INITIAL_STATE_TICKS_VALUE = 1 << 24;
/**
* Data structure to convert between Date and triplet (year, month, and day).
* @see ConvertDateToYMD(), ConvertYMDToDate()