- uint16 _slowD; ///< factor of slowing game down , 1 is normal speed
- uint64 _dateS;
- uint16 _dayn; ///< factor of slowing game down , 1 is normal speed
- Date _date; ///< Current date in days (day counter)
- unsigned char _yearn ; ///< regular game year
- unsigned char _monthn; ///< regular game month
- unsigned char _monthh; ///< regular game month
- unsigned char _dayh; ///< counter for game month
- unsigned char _daym ; ///< days in month
- DateFract _date_fract; ///< Fractional part of the day.
- uint16 _tick_counter; ///< Ever incrementing (and sometimes wrapping) tick counter for setting off various events
- /**
- * Set the date.
- * @param date New date
- * @param fract The number of ticks that have passed on this date.
- */
- void SetDate(Date date, DateFract fract)
- {
- assert(fract < DAY_TICKS);
- YearMonthDay ymd;
- _date = date;
- _date_fract = fract;
- ConvertDateToYMD(date, &ymd);
- _cur_year = ymd.year;
- _cur_month = ymd.month;
- _dayh = ymd.day; /// does this gives the day of month we are in???
- }
- void SetSlowTime()
- {
- _leap4 = _cur_year % 4;
- _leap100 = _cur_year % 100;
- _leap400 = _cur_year % 400;
- _yearn = 0;
- _monthn = 0;
- _dayn = 0;
- _monthh=_cur_month;
- _dateS = _date*100;
- }