diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -294,7 +294,7 @@ TownScopeResolver *StationResolverObject } break; - case 0xFA: return Clamp(TimerGameCalendar::date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 65535); // Build date, clamped to a 16 bit value + case 0xFA: return ClampTo(TimerGameCalendar::date - DAYS_TILL_ORIGINAL_BASE_YEAR); // Build date, clamped to a 16 bit value } *available = false; @@ -384,7 +384,7 @@ TownScopeResolver *StationResolverObject case 0x84: return this->st->string_id; case 0x86: return 0; case 0xF0: return this->st->facilities; - case 0xFA: return Clamp(this->st->build_date - DAYS_TILL_ORIGINAL_BASE_YEAR, 0, 65535); + case 0xFA: return ClampTo(this->st->build_date - DAYS_TILL_ORIGINAL_BASE_YEAR); } return this->st->GetNewGRFVariable(this->ro, variable, parameter, available);