OpenTTD Source 20260621-master-g720d10536d
currency_type.h
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
9
10#ifndef CURRENCY_TYPE_H
11#define CURRENCY_TYPE_H
12
14#include "strings_type.h"
15
18static constexpr TimerGameCalendar::Year MIN_EURO_YEAR{2000};
19
74
77
79enum class CurrencySymbolPosition : uint8_t {
82};
83
86
98
99#endif /* CURRENCY_TYPE_H */
Enum-as-bit-set wrapper.
StrongType::Typedef< int32_t, struct YearTag< struct Calendar >, StrongType::Compare, StrongType::Integer > Year
EnumBitSet< CurrencySymbolPosition, uint8_t > CurrencySymbolPositions
Bitmask of CurrencySymbolPosition.
EnumBitSet< Currency, uint64_t, CURRENCY_END > Currencies
Bitmask of Currency.
static constexpr TimerGameCalendar::Year MIN_EURO_YEAR
The earliest year custom currencies may switch to the Euro.
Currency
This enum gives the currencies a unique id which must be maintained for savegame compatibility and in...
@ CURRENCY_IDR
Indonesian Rupiah.
@ CURRENCY_GBP
British Pound.
@ CURRENCY_VND
Vietnamese Dong.
@ CURRENCY_BRL
Brazilian Real.
@ CURRENCY_CNY
Chinese Renminbi.
@ CURRENCY_LVL
Latvian Lats.
@ CURRENCY_UAH
Ukrainian Hryvnia.
@ CURRENCY_ESP
Spanish Peseta.
@ CURRENCY_FRF
French Franc.
@ CURRENCY_SEK
Swedish Krona.
@ CURRENCY_GRD
Greek Drachma.
@ CURRENCY_RUB
New Russian Ruble.
@ CURRENCY_NOK
Norwegian Krone.
@ CURRENCY_INR
Indian Rupee.
@ CURRENCY_JPY
Japanese Yen.
@ CURRENCY_DKK
Danish Krona.
@ CURRENCY_GEL
Georgian Lari.
@ CURRENCY_ATS
Austrian Schilling.
@ CURRENCY_SIT
Slovenian Tolar.
@ CURRENCY_USD
US Dollar.
@ CURRENCY_END
always the last item
@ CURRENCY_NTD
New Taiwan Dollar.
@ CURRENCY_EEK
Estonian Krooni.
@ CURRENCY_YTL
Turkish Lira.
@ CURRENCY_MXN
Mexican Peso.
@ CURRENCY_ISK
Icelandic Krona.
@ CURRENCY_EUR
Euro.
@ CURRENCY_FIM
Finish Markka.
@ CURRENCY_DEM
Deutsche Mark.
@ CURRENCY_ZAR
South African Rand.
@ CURRENCY_RON
Romanian Leu.
@ CURRENCY_BEF
Belgian Franc.
@ CURRENCY_ITL
Italian Lira.
@ CURRENCY_CZK
Czech Koruna.
@ CURRENCY_PLN
Polish Zloty.
@ CURRENCY_RUR
Russian Rouble.
@ CURRENCY_CHF
Swiss Franc.
@ CURRENCY_SKK
Slovak Kornuna.
@ CURRENCY_LTL
Lithuanian Litas.
@ CURRENCY_CUSTOM
Custom currency.
@ CURRENCY_MYR
Malaysian Ringgit.
@ CURRENCY_NLG
Dutch Gulden.
@ CURRENCY_HKD
Hong Kong Dollar.
@ CURRENCY_KRW
South Korean Won.
@ CURRENCY_HUF
Hungarian Forint.
@ CURRENCY_PTE
Portuguese Escudo.
@ CURRENCY_IRR
Iranian Rial.
CurrencySymbolPosition
The currency symbol positions that we can show.
@ Suffix
Show the suffix value.
@ Prefix
Show the prefix value.
static constexpr TimerGameCalendar::Year CF_ISEURO
Currency is the Euro.
static constexpr TimerGameCalendar::Year CF_NOEURO
Currency never switches to the Euro (as far as known).
Types related to strings.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Specification of a currency.
std::string separator
The thousands separator for this currency.
CurrencySymbolPositions symbol_pos
Which currency symbols should we show?
std::string prefix
Prefix to apply when formatting money in this currency.
TimerGameCalendar::Year to_euro
Year of switching to the Euro. May also be CF_NOEURO or CF_ISEURO.
std::string suffix
Suffix to apply when formatting money in this currency.
std::string code
3 letter untranslated code to identify the currency.
uint16_t rate
The conversion rate compared to the base currency.
StringID name
Translated name of this currency.
Definition of the game-calendar-timer.