OpenTTD Source 20260711-master-g3fb3006dff
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
75
78
80enum class CurrencySymbolPosition : uint8_t {
83};
84
87
99
100#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.
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...
@ HKD
Hong Kong Dollar.
@ SIT
Slovenian Tolar.
@ LTL
Lithuanian Litas.
@ JPY
Japanese Yen.
@ RUR
Russian Rouble.
@ BRL
Brazilian Real.
@ NLG
Dutch Gulden.
@ CHF
Swiss Franc.
@ USD
US Dollar.
@ DEM
Deutsche Mark.
@ GBP
British Pound.
@ ESP
Spanish Peseta.
@ ISK
Icelandic Krona.
@ PLN
Polish Zloty.
@ ITL
Italian Lira.
@ UAH
Ukrainian Hryvnia.
@ INR
Indian Rupee.
@ DKK
Danish Krona.
@ ATS
Austrian Schilling.
@ IDR
Indonesian Rupiah.
@ RUB
New Russian Ruble.
@ GEL
Georgian Lari.
@ GRD
Greek Drachma.
@ PTE
Portuguese Escudo.
@ End
Always the last item.
@ CNY
Chinese Renminbi.
@ Custom
Custom currency.
@ FIM
Finish Markka.
@ SKK
Slovak Kornuna.
@ YTL
Turkish Lira.
@ NOK
Norwegian Krone.
@ EUR
Euro.
@ BEF
Belgian Franc.
@ MYR
Malaysian Ringgit.
@ SEK
Swedish Krona.
@ HUF
Hungarian Forint.
@ NTD
New Taiwan Dollar.
@ KRW
South Korean Won.
@ FRF
French Franc.
@ EEK
Estonian Krooni.
@ RON
Romanian Leu.
@ LVL
Latvian Lats.
@ IRR
Iranian Rial.
@ VND
Vietnamese Dong.
@ CZK
Czech Koruna.
@ MXN
Mexican Peso.
@ ZAR
South African Rand.
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).
EnumBitSet< Currency, uint64_t, Currency::End > Currencies
Bitmask of Currency.
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.