diff options
author | dominik <dominik@openttd.org> | 2004-12-22 19:48:27 +0000 |
---|---|---|
committer | dominik <dominik@openttd.org> | 2004-12-22 19:48:27 +0000 |
commit | e297eada070bbbf1cb1a6b204326775f5a7a1a90 (patch) | |
tree | a034559700a2823ea4b06304119119f0d10a14c3 | |
parent | 51cbbd0438ba770fa02a13ea089d2af318e63231 (diff) | |
download | openttd-e297eada070bbbf1cb1a6b204326775f5a7a1a90.tar.xz |
(svn r1233) Fixed several currency issues. Now currencies should work correctly again.
-rw-r--r-- | economy.c | 6 | ||||
-rw-r--r-- | lang/english.txt | 2 | ||||
-rw-r--r-- | table/currency.h | 22 | ||||
-rw-r--r-- | ttd.c | 4 |
4 files changed, 18 insertions, 16 deletions
@@ -19,11 +19,11 @@ #include "network_data.h" // get a mask of the allowed currencies depending on the year -uint GetMaskOfAllowedCurrencies() +uint GetMaskOfAllowedCurrencies(void) { int i; uint mask = 0; - for(i=0; i!=lengthof(_currency_specs); i++) { + 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-1920)) continue; @@ -33,7 +33,7 @@ uint GetMaskOfAllowedCurrencies() return mask; } -void CheckSwitchToEuro() +void CheckSwitchToEuro(void) { if (_currency_specs[_opt.currency].to_euro != CF_NOEURO && _currency_specs[_opt.currency].to_euro != CF_ISEURO && diff --git a/lang/english.txt b/lang/english.txt index 34821e09d..d61c8935d 100644 --- a/lang/english.txt +++ b/lang/english.txt @@ -2733,7 +2733,7 @@ STR_NEWGRF_FILENAME :{BLACK}Filename: STR_NEWGRF_GRF_ID :{BLACK}GRF ID: STR_CURRENCY_WINDOW :{WHITE}Custom currency -STR_CURRENCY_EXCHANGE_RATE :{LTBLUE}Exchange rate: {ORANGE}{CURRENCY} = {COMMA16} {POUNDSIGN} +STR_CURRENCY_EXCHANGE_RATE :{LTBLUE}Exchange rate: {ORANGE}{CURRENCY} = {POUNDSIGN} {COMMA16} STR_CURRENCY_SEPARATOR :{LTBLUE}Separator: STR_CURRENCY_PREFIX :{LTBLUE}Prefix: STR_CURRENCY_POSTFIX :{LTBLUE}Postfix: diff --git a/table/currency.h b/table/currency.h index 3136e7675..19e9a2ece 100644 --- a/table/currency.h +++ b/table/currency.h @@ -7,24 +7,26 @@ CurrencySpec _currency_specs[] = { { 2, ',', CF_NOEURO, "$", "" }, // us dollars { 2, ',', CF_ISEURO, "¤", "" }, // Euro { 200, ',', CF_NOEURO, "\xA5", "" }, // yen + +{ 19, ',', 2002, "", " S." }, // austrian schilling { 57, ',', 2002, "BEF ", "" }, // belgian franc { 2, ',', CF_NOEURO,"CHF ", "" }, // swiss franc -{ 480, ',', 2002, "", "Dr." }, // greek drachma +{ 50, ',', CF_NOEURO, "", " Kc" }, // czech koruna // TODO: Should use the "c" with an upside down "^" { 4, '.', 2002, "DM ", "" }, // deutsche mark +{ 10, '.', CF_NOEURO, "", " kr" }, // danish krone +{ 200, '.', 2002, "Pts ", "" }, // spanish pesetas +{ 8, ',', 2002, "", " MK" }, // finnish markka { 10, '.', 2002, "FF ", "" }, // french francs +{ 480, ',', 2002, "", "Dr." }, // greek drachma { 376, ',', 2002, "", " Ft" }, // forint -{ 50, ',', CF_NOEURO, "", " Kc" }, // czech koruna // TODO: Should use the "c" with an upside down "^" -{ 13, '.', CF_NOEURO, "", " Kr" }, // swedish krona { 130, '.', CF_NOEURO, "", " Kr" }, // icelandic krona -{ 11, '.', CF_NOEURO, "", " Kr" }, // norwegian krone -{ 10, '.', CF_NOEURO, "", " kr" }, // danish krone { 2730,',', 2002, "", " L." }, // italian lira -{ 6, '.', CF_NOEURO, ""," Lei" }, // romanian Lei -{ 8, ',', 2002, "", " MK" }, // finnish markka { 3, ',', 2002, "NLG ", "" }, // dutch gulden -{ 5, ' ', CF_NOEURO, "", " p" }, // russian rouble -{ 200, '.', 2002, "Pts ", "" }, // spanish pesetas -{ 19, ',', 2002, "", " S." }, // austrian schilling +{ 11, '.', CF_NOEURO, "", " Kr" }, // norwegian krone { 6, ' ', CF_NOEURO, "", " zl" }, // polish zloty +{ 6, '.', CF_NOEURO, ""," Lei" }, // romanian Lei +{ 5, ' ', CF_NOEURO, "", " p" }, // russian rouble +{ 13, '.', CF_NOEURO, "", " Kr" }, // swedish krona { 1, ' ', CF_NOEURO, "", "" }, // custom currency }; + @@ -1185,7 +1185,7 @@ void UpdateExclusiveRights() */ } -byte covert_currency[] = { +byte convert_currency[] = { 0, 1, 12, 8, 3, 10, 14, 19, 4, 5, 9, 11, 13, 6, 17, @@ -1195,7 +1195,7 @@ byte covert_currency[] = { // since savegame version 4.2 the currencies are arranged differently void UpdateCurrencies() { - _opt.currency = covert_currency[_opt.currency]; + _opt.currency = convert_currency[_opt.currency]; } extern void UpdateOldAircraft(); |