Replace day length scaled tick macros with global variables.

This is to avoid needing to expensively re-calculate them all the time.
Instead update them by incrementing.
This commit is contained in:
Jonathan G Rennison
2016-09-10 00:32:00 +01:00
parent d733955d33
commit 375b069f82
16 changed files with 54 additions and 27 deletions

View File

@@ -20,10 +20,13 @@ extern Date _date;
extern DateFract _date_fract;
extern uint16 _tick_counter;
extern uint8 _tick_skip_counter;
extern uint32 _scaled_tick_counter;
extern DateTicksScaled _scaled_date_ticks;
void SetDate(Date date, DateFract fract);
void ConvertDateToYMD(Date date, YearMonthDay *ymd);
Date ConvertYMDToDate(Year year, Month month, Day day);
void SetScaledTickVariables();
#define YMD_TO_DATE(ymd) (ConvertYMDToDate(ymd.year, ymd.month, ymd.day))