Rubidium
e3a5f9b040
Codechange: replace SetDataTip(AWV_ with SetArrowWidgetTypeTip(AWV_
2025-01-02 23:28:43 +01:00
Rubidium
d8d03212b8
Codechange: replace SetDataTip(SPR_ with SetSpriteTip(STR_
2025-01-02 23:28:43 +01:00
Rubidium
4bf36e3fa6
Codechange: replace SetDataTip(STR_ with SetStringTip(STR_
2025-01-02 23:28:43 +01:00
Rubidium
7d8bbd4669
Codechange: add specific variants of SetDataTip
2025-01-02 23:28:43 +01:00
Peter Nelson
810e442203
Codechange: Split GoodsEntry cargo and flows data to unique_ptr. ( #13058 )
...
This allows cargo packets and cargo flow data to be empty if not in use, which is the case for the majority of station goods entries, and data is allocated when needed.
This reduces the initial size of a Station from 9192 bytes to 2024 bytes (on 64 bit platforms), although an allocation of 120 bytes is made for each active cargo type at a station.
Based on similar changes in JGRPP.
2025-01-02 20:48:23 +00:00
Peter Nelson
810dc23215
Codechange: Replace viewport StringID specialisation with flags. ( #13237 )
...
When drawing viewport strings, the StringID is used to determine how to draw the sign. Instead, allow the behaviour to be set by the caller with flags. This means that some of the viewport-specific strings are no longer necessary.
ViewportAddString() now returns a pointer to a string as it may not actually add the string, in which case preparing the string parameters in advance is a waste of time.
2025-01-02 20:47:12 +00:00
Rubidium
fd7a883cbd
Codechange: make the StringIndex (within a StringTab) a strong type
2025-01-02 21:19:00 +01:00
Peter Nelson
2d372fa516
Codechange: NewGRF strings are not StringIDs.
...
Add GRFStringID type and use it when dealing with GRF-local string IDs.
2025-01-02 20:03:40 +00:00
Rubidium
a59cd8b2c0
Codefix: narrowing warnings with MSVC when base type is smaller than int
2025-01-02 20:03:40 +00:00
Rubidium
fedfacf472
Codechange: always do StringID + offset, instead of offset + StringID
2025-01-02 17:09:31 +01:00
Peter Nelson
4edde7d6de
Change: [NewGRF] Use deferred string mapping for bridge and currency names. ( #13230 )
...
This means that the strings can now be defined after the properties using them, as is the case with all other features.
2025-01-02 09:35:15 +00:00
Rubidium
666f7bfe23
Doc: mention that frozen production can yield varying production per period
2025-01-02 06:01:37 +01:00
translators
8eb6e7116d
Update: Translations from eints
...
spanish (mexican): 1 change by absay
chinese (simplified): 11 changes by WenSimEHRP
2025-01-02 04:42:37 +00:00
Peter Nelson
0464e6bd13
Codefix: Remove obsolete industry string mapping. ( #13229 )
...
These strings are already correctly mapped by the deferred AddStringForMapping() system.
2025-01-01 22:37:43 +00:00
Peter Nelson
d7235dc765
Codefix: Script's last_error is not a StringID. ( #13227 )
2025-01-01 21:35:41 +00:00
Peter Nelson
8dfab2a607
Fix #13225 : Cargo payment graph key toggled wrong data sets. ( #13226 )
...
Cargo payment graph should now be filtered only by CargoID instead of sorted position.
2025-01-01 20:34:55 +00:00
Rubidium
c0df898ac5
Codechange: do not implicitly convert during assignment to StrongType
2025-01-01 21:32:51 +01:00
Peter Nelson
448d6ede4a
Codechange: Use STR_NULL (or {}) instead of literal 0. ( #13222 )
2025-01-01 20:17:20 +00:00
Peter Nelson
e9e603b4fd
Codefix: Company name is a StringID. ( #13224 )
...
StringID was passed to Company's constructor as a uint16_t.
2025-01-01 20:16:59 +00:00
Peter Nelson
31fd71e1ac
Codefix: Use this->tile for member variable of Tile. ( #13221 )
2025-01-01 16:41:13 +00:00
Rubidium
a22e357911
Codechange: make strongtype constructor explicit
2025-01-01 17:40:00 +01:00
Peter Nelson
98e980c478
Codechange: WWT_TEXT, WWT_LABEL and WWT_EMPTY don't use colour. ( #13218 )
...
Set colour for these widget types to INVALID_COLOUR to avoid giving the impression that the colour has a purpose.
A runtime exception is added to catch this the existing widget unit test.
2025-01-01 15:38:19 +00:00
Peter Nelson
b1cac3c1a9
Codechange: Use _TOOLTIP suffix for another tooltip StringID. ( #13219 )
2025-01-01 15:38:02 +00:00
Rubidium
3956ed086a
Codechange: use Date/Year constructor explicitly
2025-01-01 16:25:32 +01:00
Rubidium
f55ba40b13
Codechange: use TileIndex constructor explicitly
2025-01-01 16:25:23 +01:00
Rubidium
fd5f6caed4
Codechange: use explicit TileIndex constructor for tile 0
2025-01-01 08:26:54 +01:00
Rubidium
562ec74812
Codechange: use explicit TileIndex constructor for converting from window number
2025-01-01 08:26:54 +01:00
translators
91f8f8b7e1
Update: Translations from eints
...
spanish (mexican): 280 changes by absay
polish: 3 changes by pAter-exe
2025-01-01 04:43:09 +00:00
Peter Nelson
74087e6a2e
Codechange: Use _TOOLTIP suffix for other tooltip StringIDs.
2025-01-01 02:28:08 +00:00
Peter Nelson
1ba0598a2c
Codechange: Use _TOOLTIP suffix for scenario editor toolbar tooltip StringIDs.
2025-01-01 02:28:08 +00:00
Peter Nelson
ad26b1e8b1
Codechange: Use _TOOLTIP suffix for custom face tooltip StringIDs.
2025-01-01 02:28:08 +00:00
Peter Nelson
dba02edfa3
Codechange: Use _TOOLTIP suffix for depot tooltip StringIDs.
2025-01-01 02:28:08 +00:00
Peter Nelson
806831af46
Codechange: Use _TOOLTIP suffix for genworld tooltip StringIDs.
2025-01-01 02:28:08 +00:00
Peter Nelson
0e1002bca6
Codechange: Use _TOOLTIP instead of _TT suffix for tooltip StringIDs.
2025-01-01 02:28:08 +00:00
Peter Nelson
6b931667c9
Codechange: Use _TOOLTIP suffix fot replace vehicle tooltip StringIDs.
2025-01-01 02:28:08 +00:00
Peter Nelson
ab1f2683bc
Codechange: Simplify initialisation of default CargoLabels. ( #13214 )
2025-01-01 00:23:28 +00:00
Rubidium
921980d5e2
Codechange: use explicit Year constructor call in data tables
2025-01-01 00:38:35 +01:00
Rubidium
5a4f802c2f
Codechange: use RandomTile over Random() when looking for (part of) a random tile
2025-01-01 00:15:22 +01:00
Rubidium
9b3f4dff4c
Codechange: swap `int + year` to `year + int`
...
This way the operator+ without implicit constructor call is used
2025-01-01 00:10:35 +01:00
Rubidium
58ba8c122b
Codechange: use constructor instead of assignment for date/year constants
2025-01-01 00:10:35 +01:00
translators
41f7d54b4f
Update: Translations from eints
...
czech: 75 changes by adamek0202
polish: 9 changes by pAter-exe
2024-12-31 04:42:20 +00:00
translators
3a05978cc4
Update: Translations from eints
...
chinese (simplified): 1 change by WenSimEHRP
luxembourgish: 5 changes by phreeze83
polish: 45 changes by pAter-exe
2024-12-30 04:43:05 +00:00
translators
f077dd7ce2
Update: Translations from eints
...
polish: 1 change by pAter-exe
2024-12-29 04:41:41 +00:00
Loïc Guilloux
d840152cb7
Codefix: [Script] incorrect end of class detection for doxygen ( #13204 )
2024-12-28 18:15:09 +00:00
translators
be33f29984
Update: Translations from eints
...
chinese (simplified): 2 changes by WenSimEHRP
luxembourgish: 10 changes by phreeze83
polish: 26 changes by pAter-exe
2024-12-28 04:41:43 +00:00
Peter Nelson
dd87bf9333
Fix: Rail station tile flags were not set early enough. ( #13203 )
...
Rail station tile flags now use bits that were (long ago) used to store railtype.
During Afterload, there are some calls that need the state of station tile flags to be correct which were executed before the station tile flags were set.
2024-12-27 14:27:55 +00:00
translators
e76cc89255
Update: Translations from eints
...
spanish: 124 changes by MontyMontana
2024-12-27 04:42:38 +00:00
Peter Nelson
1faf60ae13
Fix #13199 : -f command line parameter does not need a value. ( #13200 )
2024-12-27 00:16:34 +00:00
translators
c5ec55b4ed
Update: Translations from eints
...
luxembourgish: 2 changes by phreeze83
turkish: 33 changes by BeratSJ
2024-12-26 04:42:27 +00:00
SamuXarick
ee860a5c8e
Doc: Update some yapf inline comments
2024-12-24 20:43:46 +01:00
translators
f74b0cf984
Update: Translations from eints
...
chinese (simplified): 2 changes by WenSimEHRP
2024-12-24 04:44:12 +00:00
Peter Nelson
b35284d3dd
Fix 6a07f28103: Clearing animated tiles may lead to invalid state. ( #13192 )
2024-12-23 22:35:43 +01:00
Peter Nelson
1cf3a2a726
Codechange: No need to call DeleteAnimatedTile and DoClearSquare. ( #13191 )
...
DoClearSquare calls DeleteAnimatedTile itself so this is effectively a duplicate call.
2024-12-23 19:08:03 +00:00
Peter Nelson
c72542431a
Change: Increase house type limit from 512 to 4096. ( #12288 )
...
This moves HouseType from m4+m3[6] to m8 making it 'easier' to access.
2024-12-22 18:14:06 +00:00
SamuXarick
8e948af3bc
Codefix: Ensure assertions are properly encapsulated within WITH_ASSERT directive
2024-12-22 14:02:13 +01:00
SamuXarick
de908e08b2
Codefix: Remove duplicated include
2024-12-22 14:01:40 +01:00
Rubidium
54d58a08f3
Codechange: use (better) named constants for the bridge sprite table
2024-12-22 13:59:18 +01:00
Peter Nelson
2176d49a39
Revert: "Codechange: remove parameter which value can always be deduced" ( #13183 )
...
This reverts commit dfb74e25f7
.
2024-12-21 19:49:02 +00:00
Peter Nelson
2c740cf7e7
Change: Hide buttons in Found Town window that can't be used. ( #13182 )
...
When allowed to found towns in game, some buttons are disabled as they are only available in the scenario editor.
Instead of disabling these buttons, completely hide them when in game.
2024-12-21 18:31:21 +00:00
Peter Nelson
59680867c3
Codechange: Use structured bindings when iterating font_mapping.
2024-12-20 19:05:08 +00:00
Peter Nelson
c78e309b16
Codefix: Use snake_case instead of camelCase in layouters.
2024-12-20 19:05:08 +00:00
Rubidium
d623aa0dfb
Fix: no need to guard free()
2024-12-20 19:08:10 +01:00
Loïc Guilloux
fefa18fb03
Fix c91d4104f8: \u200B is not allowed in translations ( #13179 )
2024-12-20 17:07:55 +00:00
Yakov Lipkovich
be02b54744
Doc: fix typo in script_vehicle.hpp ( #13177 )
2024-12-20 08:42:57 -05:00
translators
c91d4104f8
Update: Translations from eints
...
danish: 25 changes by bscargo
2024-12-20 04:44:17 +00:00
translators
07fb13cd29
Update: Translations from eints
...
chinese (simplified): 154 changes by WenSimEHRP
2024-12-19 04:44:42 +00:00
Peter Nelson
c4424aa894
Codechange: Use correct char type in RemapNewGRFStringControlCode. ( #13173 )
2024-12-18 12:58:23 +00:00
Jonathan G Rennison
e3e3cb13c6
Change: Include new cargo classes in dump cargo types console command
2024-12-18 07:50:33 +01:00
translators
e78cd7d6e9
Update: Translations from eints
...
swedish: 1 change by joeax910
chinese (simplified): 13 changes by tinygrox
polish: 2 changes by pAter-exe
2024-12-18 04:44:43 +00:00
translators
07fb7d20db
Update: Translations from eints
...
russian: 1 change by Ln-Wolf
polish: 13 changes by pAter-exe
2024-12-17 04:46:40 +00:00
translators
6ba6ae5e6f
Update: Translations from eints
...
vietnamese: 9 changes by KhoiCanDev
chinese (simplified): 18 changes by tinygrox
2024-12-16 04:45:51 +00:00
translators
8bf2ab62d9
Update: Translations from eints
...
norwegian (bokmal): 1 change by eriksorngard
chinese (simplified): 9 changes by tinygrox
2024-12-15 04:43:59 +00:00
Eri the Switch
69ee8a8480
Add: Implement 2D map scrolling under SDL2 ( #13167 )
...
Use a base multiplier to keep the existing option range (1-15).
SDL2 >= 2.18 allows for considerably smoother scrolling, but
basic support for earlier versions is included.
2024-12-14 15:43:31 +00:00
Eri the Switch
32dfb37b9d
Change: Use floats for tracking 2D scrolling
...
This ensures the smoothest experience possible when dragging map
around with 2D scrolling.
2024-12-14 15:43:31 +00:00
translators
25cf382971
Update: Translations from eints
...
english (us): 12 changes by 2TallTyler
dutch: 1 change by Afoklala
polish: 10 changes by pAter-exe
2024-12-14 04:44:40 +00:00
Valeri
5d8e98207d
Codechange: Use lowercase name for winnls.h ( #13170 )
...
Fixes cross-compilation under MXE.
2024-12-13 19:55:53 +01:00
translators
15059bc253
Update: Translations from eints
...
swedish: 8 changes by joeax910
2024-12-13 04:45:31 +00:00
Peter Nelson
eacec144b0
Fix 56510b5d7b: CargoArray does need to be initialised... ( #13168 )
2024-12-12 19:33:55 +00:00
Peter Nelson
e30c5e6b9e
Codechange: Return pair from instead of optional out parameter. ( #13166 )
...
GetVehicleDefaultCapacity() has a pointer as an optional out parameter, but it is always used.
Return a std::pair instead.
2024-12-12 08:57:30 +00:00
Peter Nelson
56510b5d7b
Codechange: Use CargoArray for linkgraph refresher. ( #13165 )
...
`uint capacities[NUM_CARGO]` looks a lot like CargoArray.
2024-12-11 19:24:58 +00:00
translators
677bd52c65
Update: Translations from eints
...
polish: 67 changes by pAter-exe
2024-12-11 04:45:53 +00:00
SamuXarick
1e259b7f47
Codefix: Missing this-> in Kdtree ( #13095 )
2024-12-10 17:30:55 +00:00
Peter Nelson
aa461fca68
Codechange: A transparent FrameRect doesn't care about colours. ( #13162 )
2024-12-10 05:00:46 +00:00
translators
ad7738cff8
Update: Translations from eints
...
catalan: 12 changes by J0anJosep
latvian: 9 changes by lexuslatvia
2024-12-10 04:45:45 +00:00
Peter Nelson
f8e9ee6fec
Codefix: Scenario climate selection buttons shouldn't include size of (unset) integer. ( #13161 )
2024-12-09 23:42:14 +00:00
translators
95d22bac89
Update: Translations from eints
...
chinese (traditional): 10 changes by KogentaSan
galician: 9 changes by pvillaverde
korean: 9 changes by telk5093
russian: 10 changes by Ln-Wolf
polish: 1 change by pAter-exe
2024-12-09 04:46:17 +00:00
Peter Nelson
1e77fd0b61
Codechange: Remove unnecessary 'return_cmd_error` macro. ( #13160 )
...
This macro is a leftover from when errors used to be packed into a single int32_t.
`return CommandCost` is clearer, and doesn't need a macro.
2024-12-08 18:02:30 +00:00
Peter Nelson
5575c0ba5a
Codechange: Deduplicate text effect strings.
...
Small viewport signs are drawn with FS_SMALL, so there is no need to duplicate text effect strings for both normal and small versions.
This also avoids an extra string format when text effect positions are updated.
2024-12-08 10:23:52 +00:00
translators
d0d5a18120
Update: Translations from eints
...
english (au): 1 change by krysclarke
norwegian (bokmal): 8 changes by eriksorngard
chinese (simplified): 1 change by WenSimEHRP
greek: 1 change by gh658804
russian: 52 changes by Ln-Wolf
finnish: 1 change by hpiirai
french: 1 change by glx22
portuguese: 1 change by azulcosta
portuguese (brazilian): 1 change by pasantoro
2024-12-08 04:44:40 +00:00
Peter Nelson
7af16bff11
Codechange: Use vector for GRFFile parameters instead of array. ( #13157 )
...
This simplifies assigning default parameters and removes the param_end member.
2024-12-07 22:08:59 +00:00
Peter Nelson
3d73c95080
Fix: Potential out-of-bounds reads due to uninitialised string parameters. ( #13153 )
...
If string parameters are not set correctly, FormatString can read out of bounds and crash the game.
This does not fix the root cause, just a nasty symptom.
2024-12-07 15:48:49 +00:00
Peter Nelson
f5d78f9eba
Change: [NewGRF] Install translation tables into overridden NewGRF. ( #12879 )
...
When a NewGRF overrides another, any translation table that the overriding NewGRF installs will also be installed in the target file.
This allows the overridden NewGRF to make use of a cargo or rail/road type translation table without directly modifying the original file.
2024-12-07 11:26:53 +00:00
translators
04621d1be3
Update: Translations from eints
...
chinese (simplified): 8 changes by WenSimEHRP
dutch: 8 changes by Afoklala
portuguese: 8 changes by azulcosta
polish: 3 changes by pAter-exe
2024-12-07 04:45:11 +00:00
Peter Nelson
560ee2442d
Add: Support sound effects in Ogg Opus format.
2024-12-06 18:41:35 +00:00
Peter Nelson
8b00661b22
Change: Add sound memory usage to framerate window.
2024-12-06 18:41:35 +00:00
Peter Nelson
ce5279a8dc
Codechange: Implement SoundLoader interface and cache loaded sounds in memory.
...
Sounds are loaded into memory on first use, using the SoundLoader interface to support format conversion. Sounds are retained in memory to avoid reloading every time a sound is played.
This deduplicates WAV header parsing between NewGRF and baseset sounds, and will allow different audio formats to be supported.
2024-12-06 18:41:35 +00:00
Peter Nelson
7e8bcf44f7
Codechange: ProviderManager class to support self-registration of providers.
...
This is based loosely on TimerManager.
2024-12-06 18:41:35 +00:00
Peter Nelson
bccf5343f4
Codechange: Use a type alias for mixer channel masking.
2024-12-06 18:41:35 +00:00
Peter Nelson
cba329d9e2
Add: Translatable list separator. ( #13149 )
...
Some languages should use a separator other than ", " to separate list items, so it is now a translatable string.
2024-12-06 12:32:36 +00:00
rubidium42
ef76f0e758
Codechange: use default virtual destructors over empty destructors
2024-12-06 22:30:19 +10:00