From baca040df07df8d02e342ae1fbc2357b2e116062 Mon Sep 17 00:00:00 2001 From: tron Date: Sat, 6 Aug 2005 14:59:54 +0000 Subject: (svn r2815) Store the currency information in one central place instead of scattering it in several unrelated files --- economy.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'economy.c') diff --git a/economy.c b/economy.c index 70201fbdc..8bbc13c49 100644 --- a/economy.c +++ b/economy.c @@ -2,6 +2,7 @@ #include "stdafx.h" #include "openttd.h" +#include "currency.h" #include "functions.h" #include "strings.h" // XXX InjectDParam() #include "table/strings.h" @@ -41,22 +42,6 @@ const ScoreInfo _score_info[] = { int _score_part[MAX_PLAYERS][NUM_SCORE]; - -// get a mask of the allowed currencies depending on the year -uint GetMaskOfAllowedCurrencies(void) -{ - int i; - uint mask = 0; - for (i = 0; i != lengthof(_currency_specs); i++) { - uint16 to_euro = _currency_specs[i].to_euro; - if (i == 23) mask |= (1 << 23); // always allow custom currency - if (to_euro != CF_NOEURO && to_euro != CF_ISEURO && _cur_year >= (to_euro-MAX_YEAR_BEGIN_REAL)) continue; - if (_cur_year < (2000-MAX_YEAR_BEGIN_REAL) && (to_euro == CF_ISEURO)) continue; - mask |= (1 << i); - } - return mask; -} - void CheckSwitchToEuro(void) { if (_currency_specs[_opt.currency].to_euro != CF_NOEURO && -- cgit v1.2.3-54-g00ecf