Commit Graph
84 Commits
Author SHA1 Message Date
Rubidiumandrubidium42 32f9e4df6c Codechange: make Currency scoped 2026-06-21 17:14:53 +02:00
Rubidiumandrubidium42 8b49441b6b Codechange: make currency setting field use Currency enumeration 2026-06-21 16:06:17 +02:00
Rubidiumandrubidium42 487971bffb Codechange: use Currency for GetNewgrfCurrencyIdConverted 2026-06-21 16:06:17 +02:00
Rubidiumandrubidium42 437d93b6fc Codechange: replace symbol_pos magic numbers with scoped enum and EnumBitSet 2026-06-20 23:17:00 +02:00
Rubidiumandrubidium42 5756bcc721 Codechange: use EnumBitSet for mask of currencies 2026-06-20 17:37:12 +02:00
Rubidiumandrubidium42 bf67ba9a3b Codechange: rename Currencies to Currency 2026-06-20 17:37:12 +02:00
Rubidiumandrubidium42 3b8b089dd4 Codechange: split currency.h to _type.h and _func.h 2026-06-18 19:32:16 +02:00
Peter NelsonandPeter Nelson c3b0d71973 Codechange: use EnumRange over many enum loops 2026-06-13 21:54:42 +01:00
Rubidiumandrubidium42 03c24810b1 Codechange: use scoped enums for timer enumerations, rename one enum 2026-01-29 12:42:27 +01:00
Cyprian KlimaszewskiandGitHub 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Mizuki NguyenandGitHub 45929c1672 Add: Currency: Vietnamese Dong (#14474) 2025-08-05 20:16:12 +01:00
froschandfrosch 0d5b3ebd7f Codechange: Declare all IntervalTimers const, which can be const. 2025-05-06 18:29:41 +02:00
Peter NelsonandGitHub 6e10584b91 Codechange: Use EncodedStrings for News messages. (#13654) 2025-02-23 20:24:02 +00:00
Peter NelsonandPeter Nelson ca75a8ce19 Codechange: Use enum class for NewsType. 2025-02-07 19:36:52 +00:00
Peter NelsonandGitHub eaa765d615 Codechange: Disentangle news window style from news flags. (#13482)
This avoids NewsFlags being used as both bitmask and bitstuffed data.
2025-02-07 13:10:39 +00:00
BinraptorandGitHub 1cba62faaf Add: Ukrainian Hryvnia currency (#12877) 2025-01-31 19:37:58 +00:00
Rubidiumandrubidium42 921980d5e2 Codechange: use explicit Year constructor call in data tables 2025-01-01 00:38:35 +01:00
Peter NelsonandGitHub 8d312b305b Codechange: Replace currency macros with functions. (#12396) 2024-03-29 14:49:48 +00:00
Patric StoutandGitHub a3cfd23cf9 Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
jcteotonioandGitHub 63b9284a7e Add: Portuguese Escudo currency (#12108) 2024-03-08 14:25:01 +01:00
Rubidiumandrubidium42 4c117dd2d8 Revert #11993: new number format system does not and cannot work for CJK languages
There are too many intricacies that I am unaware of that are popping up after
asking whether things are right or not.
I do not want to keep playing whack-a-mole, so just revert the whole thing.

This reverts:
15be383b93
360fe8b0b6
1aa9a5c0ab
59f56941e5
7e2eefb91f
b741b2ba6f
609d0071d5
9f8fd80112
a253205b93
819c6c756e
2024-02-22 20:40:12 +01:00
Rubidiumandrubidium42 15be383b93 Fix a253205: remove (now) unused currency separator 2024-02-18 16:56:52 +01:00
Patric StoutandGitHub 6860a86d45 Codechange: remove all u8 prefix in favour of compile-time option (#11807) 2024-01-16 21:33:53 +00:00
Kaspars PutniņšandGitHub cfc14a57e1 Add: Latvian Lats currency (#11691) 2024-01-07 16:03:38 -05:00
Rubidiumandrubidium42 eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Peter NelsonandPeterN 9dd9b8ec74 Fix #11054: Prevent translation of currency codes.
Most languages stick with the 3-letter latin currency codes in the name
string, however some translations are... clever... and use the currency
symbol instead. Whilst this may look nice, it can cause issues with fonts
as some scripts have a specific limited set of fonts which do not include
these symbols.

Instead, hard code the currency code list and add it when drawing the
currency name.
2023-06-23 16:47:32 +01:00
Tyler Trahan 930f0a16d8 Codechange: Define Date/Year/Month/Day within TimerGameCalendar class 2023-04-26 07:14:03 -04:00
Patric StoutandGitHub 7aa2b9ab0a Codechange: move all date-related variables inside the timer (#10706) 2023-04-24 15:56:01 +00:00
Patric StoutandPatric Stout 3ebc7ad16e Codechange: migrate all game-time-related timers to the new framework 2023-04-15 13:58:55 +02:00
Limyx826andCharles Pigott 47e899cf75 Add: Malaysia Ringgit as Currency
Cause why not

*Update the formating
2021-03-01 21:56:26 +00:00
Tegas AzizandGitHub 1f6fb8c290 Add: Indonesia Rupiah as in-game currency (#8616)
The exchange rate is actually more like 19,000, but OpenTTD
doesn't handle such high exchange rates kindly.
2021-02-19 10:27:41 +01:00
Patric StoutandGitHub 68f9925cd4 Codechange: use \u to indicate unicode chars in strings (#8379)
With \x, we sometimes had to do the "" trick, as the length is not
predefined. With C++11 bringing \u to the specs, which has a preset
length, we no longer need the "" trick.

We set the strings to u8, to ensure all compilers use UTF-8 encoding
for the \u characters.

This was triggered by newer CLangs, which start to warn if you
use "" in the middle of a string, wondering if that was your
intention. It is a good question. And this is our answer :)
2020-12-14 20:25:01 +01:00
48d2eb703c Add: INR currency (#8136)
Co-authored-by: ilayarja97 <ilayarja97@gmail.com>
2020-05-11 14:31:03 +01:00
S. D. CloudtandCharles Pigott 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
iigmirandNiels Martin Hansen 5b09323a58 Add: Currency: NTD, CNY, HKD 2019-06-09 11:13:30 +02:00
Nikolas NybyandCharles Pigott 0f9d1019e6 Add: Mexican Peso currency
OpenTTD doesn't have any pesos, so I've added Mexican pesos,
at its current exchange rate: 1GBP = 24.39MXN, rounded to 24.
2019-01-12 16:57:23 +00:00
ScumbagDogandPatric Stout 16cf577b61 Feature: Added New Russian Ruble as currency (#6678) 2018-08-04 08:58:50 +02:00
planetmaker 1b5696b50f (svn r26989) -Change [FS#6135]: Introduction of Euro in Lithuania is 2015 (devastator) 2014-10-10 23:07:59 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
frosch e3947c8019 (svn r26262) -Fix (r25075, r25076): Custom currency was reset on game start. 2014-01-15 21:52:22 +00:00
planetmaker 303ebbb6e4 (svn r25076) -Add [FS#5212]: Georgian Lari and Iranian Rial as currencies 2013-03-09 16:31:56 +00:00
planetmaker fae3cbae9f (svn r25075) -Codechange: Allow for more than 32 currencies 2013-03-09 16:24:43 +00:00
planetmaker c22bbf5293 (svn r25072) -Codechange: Don't require the custom currency to be the last defined one 2013-03-09 16:16:17 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
frosch a8c88f43b6 (svn r24284) -Codechange: Remove NewsSubtypes and directly use NewsTypes and NewsFlag instead. 2012-05-26 14:16:03 +00:00
michi_cc 6d5f864e25 (svn r24148) -Add [FS#4907]: South Korean and South African currencies. (PaulC) 2012-04-17 21:39:09 +00:00
michi_cc 181de38ae3 (svn r24133) -Add [FS#4984]: Lithuanian currency. (devastator) 2012-04-17 19:43:47 +00:00
smatz 92d6c10b06 (svn r23196) -Fix: GCC 4.7 compilation 2011-11-12 10:21:00 +00:00
rubidium c3427b0e56 (svn r23056) -Change: use the currency -> euro conversion rate for currencies that have been replaced with the euro, so when the switch happens the conversion rate at that point is roughly that of the real world conversion rate 2011-10-25 17:07:29 +00:00
rubidium 8a58b8680c (svn r22813) -Fix [FS#4575]: make naming of currencies more consistent 2011-08-22 17:35:06 +00:00