Split date types into calendar and economy dates

See: 735abfe1
This commit is contained in:
Jonathan G Rennison
2024-02-13 21:34:09 +00:00
parent fad5ee56e7
commit 7ce06e22b8
141 changed files with 1325 additions and 1082 deletions

View File

@@ -562,7 +562,7 @@ byte GetSnowLineUncached()
{
if (_snow_line == nullptr) return _settings_game.game_creation.snow_line_height;
return _snow_line->table[_cur_date_ymd.month][_cur_date_ymd.day];
return _snow_line->table[CalTime::CurMonth()][CalTime::CurDay()];
}
void UpdateCachedSnowLine()
@@ -754,7 +754,7 @@ void RunTileLoop(bool apply_day_length)
/* We update every tile every 256 ticks, so divide the map size by 2^8 = 256 */
uint count;
if (apply_day_length && DayLengthFactor() > 1) {
count = _tile_loop_counts[_tick_skip_counter];
count = _tile_loop_counts[TickSkipCounter()];
if (count == 0) return;
} else {
count = 1 << (MapLogX() + MapLogY() - 8);