equal
deleted
inserted
replaced
74 static inline uint32 GetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available) |
74 static inline uint32 GetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available) |
75 { |
75 { |
76 /* Return common variables */ |
76 /* Return common variables */ |
77 switch (variable) { |
77 switch (variable) { |
78 case 0x00: return _date; |
78 case 0x00: return _date; |
79 case 0x01: return _cur_year; |
79 case 0x01: return clamp(_cur_year, BASE_YEAR, MAX_YEAR) - BASE_YEAR; |
80 case 0x02: return _cur_month; |
80 case 0x02: return _cur_month; |
81 case 0x03: return _opt.landscape; |
81 case 0x03: return _opt.landscape; |
82 case 0x09: return _date_fract; |
82 case 0x09: return _date_fract; |
83 case 0x0A: return _tick_counter; |
83 case 0x0A: return _tick_counter; |
84 case 0x0C: return object->callback; |
84 case 0x0C: return object->callback; |