OpenTTD Source 20260711-master-g3fb3006dff
currency_func.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_FUNC_H
11#define CURRENCY_FUNC_H
12
13#include "currency_type.h"
14#include "settings_type.h"
15
17
26
35
37void ResetCurrencies(bool preserve_custom = true);
38Currency GetNewgrfCurrencyIdConverted(uint8_t grfcurr_id);
39
40#endif /* CURRENCY_FUNC_H */
EnumIndexArray< CurrencySpec, Currency, Currency::End > _currency_specs
Array of currencies used by the system.
Definition currency.cpp:80
Currencies GetMaskOfAllowedCurrencies()
get a mask of the allowed currencies depending on the year
Definition currency.cpp:128
Currency GetNewgrfCurrencyIdConverted(uint8_t grfcurr_id)
Will return the ottd's index correspondence to the ttdpatch's id.
Definition currency.cpp:118
CurrencySpec & GetCustomCurrency()
Get the custom currency.
const CurrencySpec & GetCurrency()
Get the currently selected currency.
void ResetCurrencies(bool preserve_custom=true)
Will fill _currency_specs array with default values from _origin_currency_specs Called only from newg...
Definition currency.cpp:162
Types related to currencies.
Currency
This enum gives the currencies a unique id which must be maintained for savegame compatibility and in...
@ Custom
Custom currency.
EnumBitSet< Currency, uint64_t, Currency::End > Currencies
Bitmask of Currency.
EnumClassIndexContainer< std::array< T, to_underlying(N)>, Index > EnumIndexArray
A typedef for EnumClassIndexContainer using std::array as the backing container type.
Types related to global configuration settings.
GameSettings & GetGameSettings()
Get the settings-object applicable for the current situation: the newgame settings when we're in the ...
Specification of a currency.
LocaleSettings locale
settings related to used currency/unit system in the current game
Currency currency
Currency we currently use.