Codechange: Move calendar date functions inside TimerGameCalendar (#10753)
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
#include "../subsidy_base.h"
|
||||
#include "../debug.h"
|
||||
#include "../depot_base.h"
|
||||
#include "../date_func.h"
|
||||
#include "../timer/timer_game_calendar.h"
|
||||
#include "../timer/timer_game_calendar.h"
|
||||
#include "../vehicle_func.h"
|
||||
#include "../effectvehicle_base.h"
|
||||
@@ -400,7 +400,7 @@ static bool FixTTOEngines()
|
||||
for (uint i = 0; i < lengthof(_orig_aircraft_vehicle_info); i++, j++) new (GetTempDataEngine(j)) Engine(VEH_AIRCRAFT, i);
|
||||
}
|
||||
|
||||
TimerGameCalendar::Date aging_date = std::min(TimerGameCalendar::date + DAYS_TILL_ORIGINAL_BASE_YEAR, ConvertYMDToDate(2050, 0, 1));
|
||||
TimerGameCalendar::Date aging_date = std::min(TimerGameCalendar::date + DAYS_TILL_ORIGINAL_BASE_YEAR, TimerGameCalendar::ConvertYMDToDate(2050, 0, 1));
|
||||
|
||||
for (EngineID i = 0; i < 256; i++) {
|
||||
int oi = ttd_to_tto[i];
|
||||
@@ -847,8 +847,8 @@ static bool LoadOldIndustry(LoadgameState *ls, int num)
|
||||
if (i->type > 0x06) i->type++; // Printing Works were added
|
||||
if (i->type == 0x0A) i->type = 0x12; // Iron Ore Mine has different ID
|
||||
|
||||
YearMonthDay ymd;
|
||||
ConvertDateToYMD(TimerGameCalendar::date, &ymd);
|
||||
TimerGameCalendar::YearMonthDay ymd;
|
||||
TimerGameCalendar::ConvertDateToYMD(TimerGameCalendar::date, &ymd);
|
||||
i->last_prod_year = ymd.year;
|
||||
|
||||
i->random_colour = RemapTTOColour(i->random_colour);
|
||||
|
Reference in New Issue
Block a user