currency.h
Go to the documentation of this file.00001
00002
00005 #ifndef CURRENCY_H
00006 #define CURRENCY_H
00007
00008 #include "date_type.h"
00009 #include "strings_type.h"
00010
00011 enum {
00012 CF_NOEURO = 0,
00013 CF_ISEURO = 1,
00014 NUM_CURRENCY = 28,
00015 CUSTOM_CURRENCY_ID = NUM_CURRENCY - 1
00016 };
00017
00018 struct CurrencySpec {
00019 uint16 rate;
00020 char separator;
00021 Year to_euro;
00022 char prefix[16];
00023 char suffix[16];
00033 byte symbol_pos;
00034 StringID name;
00035 };
00036
00037
00038 extern CurrencySpec _currency_specs[NUM_CURRENCY];
00039
00040
00041 #define _custom_currency (_currency_specs[CUSTOM_CURRENCY_ID])
00042 #define _currency ((const CurrencySpec*)&_currency_specs[_opt_ptr->currency])
00043
00044 uint GetMaskOfAllowedCurrencies();
00045 void CheckSwitchToEuro();
00046 void ResetCurrencies(bool preserve_custom = true);
00047 StringID* BuildCurrencyDropdown();
00048 byte GetNewgrfCurrencyIdConverted(byte grfcurr_id);
00049
00050 #endif