OpenTTD Source 20260621-master-g720d10536d
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
16extern std::array<CurrencySpec, CURRENCY_END> _currency_specs;
17
26
35
37void ResetCurrencies(bool preserve_custom = true);
38uint8_t GetNewgrfCurrencyIdConverted(uint8_t grfcurr_id);
39
40#endif /* CURRENCY_FUNC_H */
std::array< CurrencySpec, 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
uint8_t GetNewgrfCurrencyIdConverted(uint8_t grfcurr_id)
Will return the ottd's index correspondence to the ttdpatch's id.
Definition currency.cpp:119
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 newgr...
Definition currency.cpp:162
Types related to currencies.
EnumBitSet< Currency, uint64_t, CURRENCY_END > Currencies
Bitmask of Currency.
@ CURRENCY_CUSTOM
Custom currency.
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
uint8_t currency
currency we currently use