summaryrefslogtreecommitdiff
path: root/economy.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-08-06 14:59:54 +0000
committertron <tron@openttd.org>2005-08-06 14:59:54 +0000
commitbaca040df07df8d02e342ae1fbc2357b2e116062 (patch)
treeabe83980b6dfec97b5a7f8cb50bc2959e2656c88 /economy.c
parent4f15ada6cdd2b322f8f2b7a0ad41be7c2cda1192 (diff)
downloadopenttd-baca040df07df8d02e342ae1fbc2357b2e116062.tar.xz
(svn r2815) Store the currency information in one central place instead of scattering it in several unrelated files
Diffstat (limited to 'economy.c')
-rw-r--r--economy.c17
1 files changed, 1 insertions, 16 deletions
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 &&