summaryrefslogtreecommitdiff
path: root/currency.h
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2006-08-25 00:41:10 +0000
committerbelugas <belugas@openttd.org>2006-08-25 00:41:10 +0000
commitc9b32982fcd6b43217fe1299f4b5475414e78635 (patch)
treecaad83c6db9639e15830a8ab332ae70450b40930 /currency.h
parent0189b8994d00adf3b09e0ccb594a06b84569972d (diff)
downloadopenttd-c9b32982fcd6b43217fe1299f4b5475414e78635.tar.xz
(svn r6108) -NewGRF Feature: Implement currencies replacment via grf file.
All properties can now be modified i.e: Introduction date for euro conversion Currency name, decimal separator, currency symbol (before or after amount) and the rate compared to the base currency, the british pound
Diffstat (limited to 'currency.h')
-rw-r--r--currency.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/currency.h b/currency.h
index ea5d5436c..be4273df5 100644
--- a/currency.h
+++ b/currency.h
@@ -6,6 +6,8 @@
enum {
CF_NOEURO = 0,
CF_ISEURO = 1,
+ NUM_CURRENCY = 25,
+ CUSTOM_CURRENCY_ID = NUM_CURRENCY + 1,
};
typedef struct {
@@ -14,17 +16,24 @@ typedef struct {
Year to_euro;
char prefix[16];
char suffix[16];
+ /**
+ * Position of the currency symbol on the amount string.
+ * 0 = placed before, 1 = placed after
+ */
+ byte symbol_pos;
+ StringID name;
} CurrencySpec;
-extern CurrencySpec _currency_specs[];
-extern const StringID _currency_string_list[];
+
+extern CurrencySpec _currency_specs[NUM_CURRENCY];
// XXX small hack, but makes the rest of the code a bit nicer to read
-#define CUSTOM_CURRENCY_ID 24
#define _custom_currency (_currency_specs[CUSTOM_CURRENCY_ID])
#define _currency ((const CurrencySpec*)&_currency_specs[_opt_ptr->currency])
uint GetMaskOfAllowedCurrencies(void);
void CheckSwitchToEuro(void);
+void ResetCurrencies(void);
+StringID* BuildCurrencyDropdown(void);
#endif /* CURRENCY_H */