Rubidium
c6fc280ff1
Codechange: use std::vector over CallocT/free
2025-01-26 17:59:56 +01:00
Rubidium
043d1ac111
Codechange: use std::vector/std::unique_ptr over new/malloc
2025-01-26 17:59:56 +01:00
Rubidium
8016cfc0ef
Codechange: use std::unique_ptr over malloc
2025-01-26 17:59:56 +01:00
Rubidium
f8566c3ff1
Codechange: use std::unique_ptr over calloc
2025-01-26 17:59:56 +01:00
Peter Nelson
b7a82819de
Codechange: Remove ZeroedMemoryAllocator from WindowDesc.
...
All members which are not intended to be changed are now const to ensure they are set
2025-01-26 16:42:05 +00:00
Peter Nelson
95df7ea483
Change: Use separate WindowDescs instead of changing static data.
...
When opening vehicle lists a static WindowDesc is modified to change the class depending on the vehicle type.
Theses makes for inconsistencies and preferred window state, and prevents WindowDesc members being made const.
2025-01-26 16:42:05 +00:00
Peter Nelson
6c9b3f17b7
Fix 4c8f1b0f81: First entry of station cargo filter list was broken. ( #13382 )
...
Additional indent parameter was missing.
2025-01-26 10:09:18 +00:00
translators
492a5284ea
Update: Translations from eints
...
latvian: 8 changes by lexuslatvia
2025-01-26 04:41:56 +00:00
Peter Nelson
1e14fd6a0d
Codechange: Use enum class for PaletteAnimation.
2025-01-25 21:42:21 +00:00
Peter Nelson
161b02efda
Codechange: Use enum class for BlitterMode.
2025-01-25 21:42:21 +00:00
Michael Ostapenko
c4494faf10
Fix #12968 , d20df82: Added back ability to create unremovable houses
2025-01-25 14:40:51 +01:00
Rubidium
5b4c5632ba
Codechange: add unit test against enum over optimisation
2025-01-25 10:49:13 +01:00
translators
5839ee3be3
Update: Translations from eints
...
galician: 8 changes by pvillaverde
2025-01-25 04:42:46 +00:00
Rubidium
f7aaf8ea24
Codechange: use StrEmpty instead of number of bytes in string to check for empty
2025-01-23 10:11:22 +01:00
Rubidium
c5dac6e619
Codechange: use correct type for variable to prevent casts later on
2025-01-23 07:05:02 +01:00
Peter Nelson
f6ab2b69c6
Codechange: Define GRFConfigList alias and pass by reference. ( #13358 )
...
This adds the distinction between a single GRFConfig and a GRFConfig list, and simplifies how GRFConfig lists are passed to various functions.
2025-01-22 22:30:32 +00:00
Rubidium
b1ab1b9f06
Change: [Script] rename BridgeID to BridgeType in the script API
2025-01-22 22:23:38 +01:00
Peter Nelson
183779c4a2
Codefix: Incorrect NWidgetPart type for NWID_LAYER. ( #13357 )
...
Due to function overloads and default parameters, the wrong `NWidget()` function was called, resulting resulting in the wrong `NWidgetPart` being created.
2025-01-22 20:43:54 +00:00
Rubidium
a40d6cd193
Cleanup: remove unused IsValidCargoType
2025-01-22 18:58:34 +01:00
Loïc Guilloux
b91685e4b6
Fix ef826a048a: [MinGW] "_WIN32_WINNT_WIN7" is not defined ( #13354 )
2025-01-22 18:44:54 +01:00
Peter Nelson
3a50b24a8d
Codechange: Replace macros in TGP. ( #13346 )
...
Remove use of Amplitude as a percentage.
2025-01-22 07:27:41 +00:00
Peter Nelson
73daacde3a
Cleanup: Remove two unused PaletteType values. ( #13341 )
2025-01-21 18:20:38 +00:00
SamuXarick
05b9b8765c
Codefix 60d0d7b: Incorrect variable in TGP noise calculation ( #13350 )
2025-01-21 16:41:38 +00:00
Loïc Guilloux
ef826a048a
Codechange: [WIN32] Use language isocode for fallback font detection ( #13310 )
2025-01-21 15:57:09 +01:00
Peter Nelson
90e8dd9f10
Fix 7b091000b0: Missing 32bpp-to-8bpp sprites due to ZOOM_LVL_NORMAL changes. ( #13349 )
...
ZOOM_LVL_NORMAL was change from 4x zoomed in to 1x zoom, loop should be using ZOOM_LVL_BEGIN.
2025-01-21 08:58:51 +00:00
translators
b5b4531b7a
Update: Translations from eints
...
english (us): 5 changes by 2TallTyler
2025-01-21 04:42:57 +00:00
Rubidium
c74e385145
Codechange: use StoryPageID instead of uint16_t
2025-01-21 01:57:05 +01:00
Peter Nelson
7b091000b0
Feature: Support converting 32bpp-only sprites to indexed 8bpp.
...
This uses nearest colour lookup to convert 32bpp-only sprites to indexed 8bpp on the fly. This provides a reasonable usable sprite instead of being incompatible.
2025-01-21 00:45:31 +00:00
Peter Nelson
c5d3ac7a71
Codechange: Move colour brightness methods to palette code.
...
This allows reuse outside of blitters.
2025-01-21 00:45:31 +00:00
Peter Nelson
83e9ee00f0
Change: Let sprite loader know what sprites are available in both 8bpp and 32bpp depths.
2025-01-21 00:45:31 +00:00
SamuXarick
60d0d7b8b2
Codechange: Lowercase variable names and use _ separator
2025-01-20 21:41:03 +01:00
SamuXarick
62002c6eae
Doc: Standardize map size notation and multiply operator
2025-01-20 21:40:49 +01:00
SamuXarick
9bf882b3f7
Doc: Change MapSize to Map::Size
2025-01-20 21:40:49 +01:00
translators
7da21379f0
Update: Translations from eints
...
swedish: 4 changes by joeax910
2025-01-20 04:42:31 +00:00
SamuXarick
9a3b656a62
Codechange: Capitalise static consts ( #13342 )
2025-01-19 23:58:21 +00:00
Iris-Persephone
a589793e27
Fix #12987 : Historical houses now always spawn completed ( #13332 )
...
Co-authored-by: Anonymous <anonymous@openttd.org>
2025-01-19 23:58:05 +00:00
Peter Nelson
40efc6be00
Codechange: Use member initialisation for GRFConfig instead of ZeroedMemoryAllocator. ( #13343 )
2025-01-19 23:31:15 +00:00
Rubidium
51529b83b1
Codechange: replace custom deque with actual deque when loading network games
2025-01-19 23:01:55 +01:00
Rubidium
4b2051a1c1
Codechange: use Textbuf::GetText() to access the buffer / hide Textbuf::buf
2025-01-19 23:01:35 +01:00
Rubidium
55fa14cb06
Codechange: use Textbuf::DeleteAll instead of a duplicate implementation
2025-01-19 23:01:35 +01:00
Rubidium
ff0b2e1064
Codechange: use std::vector instead of ReallocT-ed memory
2025-01-19 22:49:06 +01:00
Peter Nelson
5f0e4cd646
Codechange: Make RoadStopType an enum class. ( #13340 )
2025-01-19 21:43:17 +00:00
Peter Nelson
65665ccb78
Fix bb8a0c7641: Strip control codes before sorting NewGRF names. ( #13034 )
...
Now that SkipGarbage doesn't skip all multi-byte utf-8 characters, string control codes are not skipped either. This gave unintended sorting when NewGRF names start with colour codes.
Use StrMakeValid() before comparing. This has to make a copy of the string for each sort step, so there is likely a performance penalty.
2025-01-19 21:39:44 +00:00
SamuXarick
40a29a71fb
Cleanup: Remove pointless DiagDirection array ( #13338 )
2025-01-19 21:38:32 +00:00
Peter Nelson
4397aa3909
Codechange: Make StationType an enum class. ( #13339 )
2025-01-19 20:53:08 +00:00
SamuXarick
b0ec3d6959
Cleanup: Missing TileDiffXY conversion in GenerateTerrain
2025-01-19 19:14:44 +01:00
Rubidium
b71a5158cf
Codechange: use INVALID_VEHICLE where that's more appropriate than e.g. vehicle 0
2025-01-19 17:10:21 +01:00
Rubidium
ff8c748bf5
Codefix: VEH_INVALID is not INVALID_VEHICLE
2025-01-19 17:10:21 +01:00
Peter Nelson
d22fd78b1c
Codefix: Sprite offsets and counts are not SpriteIDs. ( #13336 )
2025-01-19 15:58:13 +00:00
Rubidium
0aa9faf187
Codechange: use INVALID_TOWN instead of 0 to denote 'not applicable'
2025-01-19 16:54:42 +01:00
translators
00367aa391
Update: Translations from eints
...
catalan: 5 changes by J0anJosep
portuguese: 5 changes by jcteotonio
2025-01-19 04:41:07 +00:00
translators
642874923d
Update: Translations from eints
...
chinese (traditional): 38 changes by KogentaSan
dutch: 5 changes by Afoklala
2025-01-18 04:40:32 +00:00
Peter Nelson
6c88169d7b
Codechange: Use std::variant instead of type and union to evaluate Action 14. ( #13328 )
...
AllowedSubtags are now passed by span, so no terminator is required, and are now static constexpr.
2025-01-17 20:53:19 +00:00
Peter Nelson
2f0b52d5b3
Codechange: Use sorted vector for NewGRF parameter value names. ( #13326 )
...
This replaces use of a std::map per GRF-parameter.
2025-01-17 19:33:11 +00:00
SamuXarick
610026ef17
Fix: Missing water region invalidation after flooding a half tile with rail in the highest corner
...
Invalidate water region when any flood occurs.
Convert a few magic numbers to their names.
2025-01-17 18:13:51 +01:00
translators
097937ecdf
Update: Translations from eints
...
english (au): 5 changes by krysclarke
norwegian (bokmal): 8 changes by eriksorngard
chinese (simplified): 5 changes by WenSimEHRP
korean: 5 changes by telk5093
greek: 5 changes by gh658804
russian: 5 changes by Ln-Wolf
finnish: 5 changes by hpiirai
portuguese (brazilian): 5 changes by pasantoro
polish: 5 changes by pAter-exe
2025-01-17 04:44:41 +00:00
translators
5fea35ba07
Update: Translations from eints
...
korean: 1 change by telk5093
portuguese: 1 change by azulcosta
2025-01-16 04:41:51 +00:00
Rubidium
8f7468483a
Codechange: use std::unique_ptr over manual memory management
2025-01-15 21:52:21 +01:00
Peter Nelson
8942ac1e3e
Fix 4c8f1b0f8: Remove unnecessary icon from settings drop down list. ( #13322 )
2025-01-15 14:12:27 +00:00
SamuXarick
4018179d7b
Cleanup: Remove unused includes and function ( #13321 )
2025-01-15 14:50:14 +01:00
translators
71efd6497a
Update: Translations from eints
...
danish: 68 changes by Lerura-DK
2025-01-15 04:41:43 +00:00
Peter Nelson
4c8f1b0f81
Add: Ability to toggle visibility of station signs by facility. ( #13207 )
2025-01-14 21:23:35 +00:00
Peter Nelson
74bd064d10
Codechange: Pass first and last ID range instead of first and count. ( #13319 )
...
This allows range checks and loops to be slightly simplified.
2025-01-14 21:22:52 +00:00
Peter Nelson
3edf19a2c5
Add: Sandbox settings to Sandbox Options window. ( #13268 )
2025-01-14 21:22:19 +00:00
Rubidium
e2b0ea1509
Codechange: use std::unique_ptr over MallocT/free for dedicated video memory
2025-01-14 21:43:37 +01:00
Peter Nelson
84e049e23c
Codechange: Use ranges to get select server list position. ( #13316 )
...
Replaces a raw loop that uses array indexes.
2025-01-14 19:16:46 +00:00
Peter Nelson
95f8fc983b
Codechange: Make GroupFlags an enum class. ( #13312 )
...
GF_END is 'reserved' in some Windows APIs. Instead of working around it, make GroupFlags an enum class.
2025-01-14 11:33:26 +00:00
Rubidium
29129e12fd
Add: [Script] Event for when a company's president name changes
2025-01-14 11:35:35 +01:00
Björn Wärmedal
9ab936f76b
Add: [Script] ScriptEventCompanyRename ( #12878 )
2025-01-14 09:24:28 +00:00
Rubidium
3a7cfafe51
Codechange: use std::unique_ptr over CallocT for tiles
2025-01-13 23:13:53 +01:00
Rubidium
3541ba4d0c
Codechange: use unique_ptr over CallocT and avoid copying table
2025-01-13 23:13:28 +01:00
Peter Nelson
41c9f2d82c
Codefix: Pass cargo as CargoID. ( #13311 )
2025-01-13 19:23:26 +00:00
Loïc Guilloux
4670a62342
Fix: [Win32] Font detection didn't work for locales not supporting code pages ( #13306 )
2025-01-12 17:23:41 +01:00
Peter Nelson
11529d865b
Codefix: [NewGRF] Don't read an extended byte into uint8_t. ( #13302 )
2025-01-11 15:53:24 +00:00
translators
8b664a42b0
Update: Translations from eints
...
dutch: 3 changes by Afoklala
2025-01-11 04:41:49 +00:00
SamuXarick
d74255a3ec
Codechange: Optimize FlowsDown ( #13262 )
2025-01-10 11:18:54 -05:00
translators
4f33819fc2
Update: Translations from eints
...
english (us): 3 changes by 2TallTyler
2025-01-10 04:42:20 +00:00
Loïc Guilloux
46f181c8a6
Fix #13299 : Merge IT_INVALID and INVALID_INDUSTRYTYPE ( #13300 )
...
* Fix #13299 : Merge IT_INVALID and INVALID_INDUSTRYTYPE
* Codefix: Use NUM_INDUSTRYTILES where it's intended
2025-01-10 01:17:11 +01:00
Peter Nelson
c0edbe0d37
Change: Remove support for SDL1.2. ( #13298 )
...
Our SDL2 driver is now 5 years old.
2025-01-09 20:43:52 +00:00
Peter Nelson
4db0af99a7
Codechange: Use separate function for planting an individual tree. ( #13296 )
...
This allows early return and removes use of assignment inside if-conditions.
2025-01-08 20:36:38 +00:00
Peter Nelson
f404f3154e
Fix #13293 : Incorrect GRFStringID used for industry cargo suffix text. ( #13294 )
...
Industry cargo suffix string should be mapped to 0xD000-0xD400 when the callback result is between 0x800-0xC00,
2025-01-08 19:37:38 +00:00
Peter Nelson
ce4012b7c7
Codechange: Use enum class for Borders values. ( #13290 )
...
This makes water border settings type-safe, and avoids mixing bit numbers with masks.
2025-01-08 17:55:53 +00:00
Valeri
d79ae73c14
Add: 2D map scrolling on win32 ( #13172 )
2025-01-08 11:09:39 -05:00
translators
87acf1788b
Update: Translations from eints
...
vietnamese: 3 changes by KhoiCanDev
portuguese: 12 changes by jcteotonio
2025-01-08 04:42:08 +00:00
Rubidium
08d84b2f4a
Codechange: use AdviceType over StringID to remove vehicle advice news
2025-01-08 02:03:55 +01:00
translators
0437701ebe
Update: Translations from eints
...
swedish: 3 changes by joeax910
hebrew: 124 changes by yair-bn
spanish: 3 changes by MontyMontana
polish: 1 change by pAter-exe
2025-01-07 04:41:39 +00:00
translators
1bf45cd6ef
Update: Translations from eints
...
korean: 3 changes by telk5093
2025-01-06 04:43:13 +00:00
glx22
b88df0b2d7
Fix: Restore ability to disable service interval
2025-01-05 23:31:50 +01:00
glx22
7493b2d0c1
Codechange: Add callback to IntSettingDesc to support dynamic min/max
2025-01-05 23:31:50 +01:00
SamuXarick
bf02cb014b
Codefix: Replace C style cast with C++ style static_cast for type safety
2025-01-05 15:17:40 +01:00
translators
a97d220f0b
Update: Translations from eints
...
chinese (traditional): 161 changes by KogentaSan
chinese (simplified): 4 changes by WenSimEHRP
russian: 3 changes by Ln-Wolf
2025-01-05 04:41:44 +00:00
Rubidium
fe4ca52059
Codechange: replace magic numbers with named constants
2025-01-04 23:20:33 +01:00
Michael Lutz
681b0370b0
Feature: [Win32] Draw window title bar according to current Windows light/dark theme ( #13196 )
2025-01-04 22:03:33 +01:00
Rubidium
532f7de1f8
Codechange: make direct access to tooltip/widget_data protected
2025-01-04 21:55:43 +01:00
SamuXarick
e543768570
Cleanup: Tidy up variables in River_FoundEndNode ( #13276 )
2025-01-04 21:39:07 +01:00
Rubidium
76cc3438bf
Codechange: make GetSpecialNameString less magic-number heavy
2025-01-04 21:06:07 +01:00
Rubidium
1e383d576b
Codechange: change SPECSTR_ to StringID and remove unused enumeration
2025-01-04 21:06:07 +01:00
Rubidium
ed36305d29
Codechange: prefer SPECSTR_TOWNNAME_START over _ENGLISH
2025-01-04 21:06:07 +01:00
Rubidium
65731bb964
Codechange: use SPECSTR_..._END over _LAST, to prevent + 1 everywhere
2025-01-04 21:06:07 +01:00
Rubidium
bfc8ae6c52
Codechange: use accessor for (scrollbar_)index as they are read only
2025-01-04 20:51:47 +01:00
Peter Nelson
b653f875b0
Codechange: Space between `template` and `<` ( #13278 )
...
Make it all consistent so it matches CODINGSTYLE.
2025-01-04 17:56:14 +00:00
Loïc Guilloux
1364b9f641
Fix: Hide company settings from console commands ( #13269 )
2025-01-04 15:13:08 +01:00
Rubidium
6d9f30c343
Codefix: prevent matrix overflows on high resolution monitors
2025-01-04 12:18:37 +01:00
Rubidium
99d790c4bb
Codechange: split widget_data into its actual components
2025-01-04 11:33:24 +01:00
translators
df6e2d7aa4
Update: Translations from eints
...
english (au): 3 changes by krysclarke
spanish (mexican): 6 changes by absay
greek: 3 changes by gh658804
hebrew: 127 changes by yair-bn
finnish: 3 changes by hpiirai
catalan: 3 changes by J0anJosep
portuguese: 3 changes by azulcosta
portuguese (brazilian): 3 changes by pasantoro
polish: 3 changes by pAter-exe
2025-01-04 04:41:16 +00:00
Loïc Guilloux
a52923b3b9
Codechange: Make GetDefaultValueCallback() more similar to other setting override callbacks ( #13259 )
2025-01-04 00:17:47 +01:00
Peter Nelson
d38ecd6525
Change: Log changes to sandbox settings. ( #13267 )
...
One of the features of cheats is that there is a record of a cheat being used.
As cheats are slowly ending up in settings instead, add a flag so that changes to these sandbox settings are logged.
2025-01-03 23:12:49 +00:00
Rubidium
ef87acc1ff
Codechange: make STR_NULL the default for all widget construction functions
2025-01-03 23:25:27 +01:00
Rubidium
60b9eb5cc6
Codechange: replace last usage of SetDataTip with specific variant
2025-01-03 23:25:07 +01:00
Loïc Guilloux
cb18cb5832
Change: Disable service interval widgets for non-owned vehicles ( #13260 )
2025-01-03 18:38:45 +00:00
SamuXarick
59a45cc852
Codefix 6222ced: Rename variables to adhere to codestyle ( #13255 )
2025-01-03 12:20:09 -05:00
SamuXarick
b91f8c13b8
Codechange: Remove macros and use direct methods instead ( #13257 )
2025-01-03 17:13:41 +00:00
Loïc Guilloux
b3660bf24a
Fix: IntSettingDesc may have a callback for default value ( #13240 )
2025-01-03 15:05:56 +01:00
Rubidium
c972a9ae1f
Codechange: remove (unused) tooltip from function to set matrix dimensions
2025-01-03 15:05:10 +01:00
Rubidium
3ecd1187ba
Codechange: set sprite once for group UI
2025-01-03 14:19:35 +01:00
Rubidium
7c1ddd74d5
Codefix: use SetToolTip(..) instead of SetStringTip(STR_NULL, ..)
2025-01-03 14:18:59 +01:00
Rubidium
88c08561b3
Codefix: SetToolTip(STR_NULL) is a pointless
2025-01-03 14:15:50 +01:00
SamuXarick
6222cedcc1
Codefix: Rename variables to adhere codestyle
2025-01-03 13:54:46 +01:00
Rubidium
b60101853c
Codechange: add and use SetString over directly accessing widget_data
2025-01-03 12:14:55 +01:00
Rubidium
fb06ddafba
Codechange: add and use SetSprite over directly accessing widget_data
2025-01-03 11:13:16 +01:00
Rubidium
9ac1bad480
Codechange: add and use GetString over directly accessing widget_data
2025-01-03 11:11:01 +01:00
Rubidium
56d4d3cc7a
Codechange: add and use GetToolTip instead of direct access
2025-01-03 11:10:05 +01:00
Rubidium
f0a74fcabb
Codechange: use SetToolTip instead of accessing tool_tip directly
2025-01-03 11:09:49 +01:00
Rubidium
3dd0b93698
Codechange: use SetStringTip instead of accessing widget_data and tool_tip directly
2025-01-03 11:09:49 +01:00
Rubidium
3196e0709d
Codechange: replace internal SetDataTips with appropriate variants
2025-01-03 11:09:49 +01:00
Rubidium
176eabf9b2
Codefix: replace 0 with STR_NULL
2025-01-03 08:44:53 +01:00
translators
3852a2a0b4
Update: Translations from eints
...
spanish (mexican): 17 changes by absay
2025-01-03 04:43:20 +00:00
Rubidium
08f3fa54d1
Codechange: manual conversions to remove the global SetDataTip
2025-01-02 23:28:43 +01:00
Rubidium
7c2668d10f
Codechange: replace SetDataTip(0x0, with SetTooltip(
2025-01-02 23:28:43 +01:00
Rubidium
ee3ea57a85
Codechange: replace SetDataTip(RWV_ with SetResizeWidgetTypeTip(RWV_
2025-01-02 23:28:43 +01:00
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
Koen Bussemaker
701cb2e9d7
Codechange: Move two way signal EOL to a more logical place
2024-12-06 09:27:32 +01:00
translators
ca148022f7
Update: Translations from eints
...
english (au): 8 changes by krysclarke
greek: 8 changes by gh658804
russian: 8 changes by Ln-Wolf
finnish: 8 changes by hpiirai
french: 11 changes by glx22
portuguese (brazilian): 8 changes by pasantoro
polish: 8 changes by pAter-exe
2024-12-06 04:45:53 +00:00
SamuXarick
005c47c322
Codechange: Use Map::Iterate() on CreateDesertOrRainForest routine
2024-12-06 10:33:11 +10:00
SamuXarick
913d6eceb0
Codechange: Use Map::Iterate() on waypoint conversion
...
Still maintains the same logic as before when determining valid and invalid waypoints.
2024-12-06 10:33:11 +10:00
SamuXarick
7d0b1cd002
Codechange: Replace while loop with Map::Iterate()
2024-12-06 10:33:11 +10:00
SamuXarick
10e2d1ca36
Codechange: Use Map::Iterate() to iterate tiles
2024-12-06 10:33:11 +10:00
Peter Nelson
cfb995b6e9
Codechange: Reimplement engine sort order with std::rotate. ( #13124 )
2024-12-05 22:17:40 +00:00
Peter Nelson
f56b6756f1
Codechange: Sort EngineOverrideManager for fast lookups.
...
Allows quickly finding the EngineID given the type, grfid and local id of an engine, instead a linear scan.
This can reduce loading time when lots of engines are present and also affects performance in-game.
Lookup can be on the order of 10000 times faster.
2024-12-05 18:17:58 +00:00
Peter Nelson
01d1ea6264
Codechange: Add Slide container helper function.
...
This function will move the selected range between first and last to position, rotating elements as necessary.
Returns iterators to the new positions.
2024-12-05 18:17:58 +00:00
Peter Nelson
bc2513975f
Codechange: Don't inherit EngineOverrideManager from std::vector.
...
Inheriting from std::vector means some operations are needlessly complex, and shouldn't really be done anyway.
2024-12-05 18:17:58 +00:00
Peter Nelson
e73d6fcaac
Codechange: Store grfid with entity grfprops.
...
This allows using the grfid without having to dereference the grffile pointer.
Uses no extra storage as it fits within otherwise wasted padding space.
2024-12-05 18:17:58 +00:00
Peter Nelson
e750d10cee
Codechange: Use std::array for per-NewGRF rail/road type maps. ( #13142 )
...
This allows initialisation to be simplified.
2024-12-05 18:17:25 +00:00
translators
7469858f1f
Update: Translations from eints
...
norwegian (bokmal): 3 changes by eriksorngard
latvian: 3 changes by lexuslatvia
2024-12-05 04:46:10 +00:00
Peter Nelson
62da507aba
Codechange: Update minimum CMake version to 3.16 for all parts. ( #13141 )
...
The main CMakeList requires 3.16, so bump all other files to match.
2024-12-04 14:12:57 +00:00
Peter Nelson
6f8e30c55d
Codechange: Use unique_ptr throughout instead of new raw pointer for company news data. ( #13148 )
...
The pointer was already captured and converted to a unqiue_ptr, but hidden within the call stack.
This now makes it clearer that the object passed to Add.*NewsItem will become owned by the news item.
2024-12-04 12:18:34 +00:00
Peter Nelson
2ff18a4f05
Fix: String parameter not set when determining width of smallmap contour labels. ( #13145 )
2024-12-04 12:18:17 +00:00
Peter Nelson
efcafe49f7
Fix: [NewGRF] New engines did not have a default cargo type set. ( #13146 )
...
Engines defined outside the original range did not have their cargo type/cargo label fields initialised properly.
If these engines are also not assigned a cargo type, they would therefore use the cargo in slot 0 instead of falling back to first refittable.
2024-12-03 21:59:22 +00:00
Peter Nelson
9e182871c7
Add: Show house information in house placer.
2024-12-02 00:48:46 +00:00
Peter Nelson
041b9181f9
Codechange: Extract code to build cargo acceptance string for re-use.
2024-12-02 00:48:46 +00:00
Peter Nelson
2ede94bc40
Codechange: Adapt functions to get accepted cargo of prototype house.
2024-12-02 00:48:46 +00:00
Peter Nelson
3a158c7609
Change: Call custom house name callback in House Picker.
2024-12-02 00:48:46 +00:00
Peter Nelson
6a07f28103
Codechange: Store animated tile state in map to improve performance.
...
This allows animated tiles to be added and removed without searching in the animated tile list, providing a performance improvement when there are lots of animated tiles.
Save game version is bumped so that animated tile state can be converted.
2024-12-01 21:19:28 +00:00
Peter Nelson
44de8d77bf
Codechange: Move station tile flag cached bits from m6 to m3.
...
This frees up bits 0..1 of m6 for all tile types.
No savegame bump is needed as these bits are always reset on load.
2024-12-01 21:19:28 +00:00
Peter Nelson
be505ec459
Add: Accessor to test if a tile may be animated.
2024-12-01 21:19:28 +00:00
Peter Nelson
3a310f1802
Codechange: Store GRFConfig parameters in a vector. ( #13137 )
...
All GRFConfigs have space allocated for parameters, but only configured GRFConfigs need them.
Using a vector instead means that space is only used when parameters are used.
2024-12-01 15:15:21 +00:00
Peter Nelson
e28617fda6
Codefix: Avoiding passing new raw pointer into a smart pointer. ( #13138 )
...
Use `std::make_shared` or `std::make_unique` instead of `reset(new ...)`.
2024-12-01 14:22:41 +00:00
Peter Nelson
46176a81e3
Add #12975 : Cargo class bits 13 and 14 now define potable and non-potable. ( #12979 )
2024-12-01 13:48:18 +00:00
Peter Nelson
910dd65710
Change: Improve news window layouts.
...
* Use appropriate container widget nesting with padding, instead of single-sided padding.
* Use layer widget to allow main news message to overlay close box and date widgets, to more closely match the old fixed-pixel layout.
2024-12-01 09:44:11 +00:00
Peter Nelson
60f1618cc7
Add: Widget layer container widget type, NWID_LAYER.
...
This widget allows child widgets to be overlaid on top of each other.
Very similar to NWID_SELECTION except all layers are always visible.
2024-12-01 09:44:11 +00:00
translators
1885bd7166
Update: Translations from eints
...
portuguese: 5 changes by azulcosta
2024-12-01 04:47:46 +00:00
Peter Nelson
30bda88e97
Codefix: NWidgetStacked::AdjustPaddingForZoom duplicates inherited method. ( #13135 )
2024-11-30 23:15:17 +00:00
Peter Nelson
568bb1f5da
Change: [UI] Improve visual padding of vehicle news items. ( #13134 )
2024-11-30 15:29:36 +00:00
Peter Nelson
61cbdef92d
Codechange: Make AyStarStatus an enum class. ( #13129 )
...
This enforces type-safety.
2024-11-30 14:23:32 +00:00
translators
8d394c697c
Update: Translations from eints
...
dutch: 2 changes by Afoklala
polish: 2 changes by pAter-exe
2024-11-30 04:46:18 +00:00
Peter Nelson
b6aece5b88
Fix 51bd344f10: Incorrect translation table used for older NewGRFs. ( #13131 )
...
Incorrect logic was used to select the default translation table for older GRFs.
2024-11-29 07:46:08 +00:00
Peter Nelson
fe0afef36f
Codechange: Use unique_ptr instead of raw pointer for string layouts. ( #13128 )
2024-11-27 23:38:57 +00:00
SamuXarick
cf7710fb61
Codechange 8e9603b: Replace int32_t with AyStarStatus ( #13127 )
2024-11-27 23:26:07 +00:00
Peter Nelson
9bc64b553b
Codechange: Cache callback spritegroups. ( #13111 )
...
Each callback result requires a pool memory allocation, each of which is 24 bytes.
Build a cache of results so that if the same result is used later it refers to the same group.
2024-11-27 23:25:35 +00:00
Jonathan G Rennison
f5a6a31e4a
Codefix: Avoid divide by 0 in div/mod type varaction2 adjusts ( #13123 )
2024-11-27 23:24:46 +00:00
Peter Nelson
23e252ad40
Codechange: Replace FontMap's std::map with std::vector. ( #13126 )
2024-11-27 12:36:56 +00:00
Peter Nelson
8b8cd9ae2d
Codechange: Use vector for town PSA storage.
2024-11-27 12:35:27 +00:00
Peter Nelson
177e2ebf80
Codechange: Support saveload of reference vectors.
...
This uses the same data format as reference lists, but for vectors, so allows data structures to be changed without affecting savegame format.
2024-11-27 12:35:27 +00:00
translators
e7c63de55d
Update: Translations from eints
...
korean: 2 changes by telk5093
ukrainian: 7 changes by CodyMaster3
2024-11-27 04:49:29 +00:00
SamuXarick
8e9603bd33
Codechange: Rename and return AyStarStatus instead of int ( #13125 )
...
- Rename enum AystarStatus to AyStarStatus.
- Return AyStarStatus instead of int for AyStar::Main and AyStar::Loop functions.
2024-11-27 00:10:06 +01:00
translators
7c3b0e5c9c
Update: Translations from eints
...
polish: 1 change by pAter-exe
2024-11-26 04:49:08 +00:00
Peter Nelson
a3437df7b7
Fix #13121 : Crash when clicking on scrollbar if contents don't need scrolling. ( #13122 )
2024-11-25 08:20:20 +00:00
translators
5b02f51e17
Update: Translations from eints
...
galician: 7 changes by pvillaverde
vietnamese: 3 changes by KhoiCanDev
polish: 12 changes by pAter-exe
2024-11-25 04:48:28 +00:00
Peter Nelson
0446123194
Change: Show company finances column if it has any values in it. ( #13112 )
...
This solves finances not being show if the company inauguration date is in the future.
Current period is now always shown in the same position instead of moving for the first 2 years.
2024-11-24 11:59:30 +00:00
Peter Nelson
0c04966dc3
Fix #13022 : Ensure minimum size of scrollbar slider. ( #13119 )
...
When there are many more items than fit in a list, the scrollbar slider scales to fit but there is no minimum size. It becomes too small to click on and use.
Ensure scrollbar slider is at least the same size as the buttons either end.
2024-11-24 11:50:04 +00:00
Peter Nelson
0b0b4f50c4
Fix: Crash when exiting game with highscore window open. ( #13118 )
2024-11-24 10:36:21 +00:00
Peter Nelson
fa1849b855
Codechange: Use std::range::find_if where possible.
2024-11-24 10:36:03 +00:00
Peter Nelson
059a4b22f7
Codechange: Use projection-based std::range::find where possible.
...
This simplifies matching by class members and avoids wordy lambdas.
2024-11-24 10:36:03 +00:00
Peter Nelson
876d53282e
Codechange: Use std::ranges::count(_if).
2024-11-24 10:36:03 +00:00
Peter Nelson
3be0166801
Codechange: Use std::ranges::find where possible.
...
Replace `std::find(range.begin(), range.end(), ...)` with `std::ranges::find(range, ...)`.
2024-11-24 10:36:03 +00:00
Peter Nelson
1f18894408
Change: Determine industry directory width only on visible rows. ( #13097 )
...
When rebuilding the industry directory list, the width of every item in the list is obtained to get the maximum width required for the horizontal scrollbar. This can take considerable time if there are a lot of industries.
Instead, calculate only for the visible rows, and grow as needed.
2024-11-24 06:51:58 +00:00
translators
9399a92a4f
Update: Translations from eints
...
english (au): 2 changes by krysclarke
swedish: 4 changes by joeax910
chinese (traditional): 2 changes by KogentaSan
chinese (simplified): 3 changes by WenSimEHRP
greek: 4 changes by gh658804
russian: 3 changes by Ln-Wolf
finnish: 4 changes by hpiirai
portuguese (brazilian): 3 changes by pasantoro
polish: 46 changes by pAter-exe
2024-11-24 04:46:32 +00:00
Loïc Guilloux
681b1928b4
Fix #13110 : [Script] convert table keys to string when generating JSON ( #13113 )
2024-11-23 13:46:33 +01:00
Peter Nelson
b890dab2b4
Change: Treat recolour sprites as regular sprites in the SpriteCache. ( #13107 )
...
Recolour sprites are loaded when seen, instead of being loaded when needed. This could result in the sprite cache being filled up with recolour sprites, and also mean that replacing recolour sprites didn't release the previously allocated memory.
Instead, allow recolour sprites to be loaded as needed and freed when unneeded, like regular sprites.
2024-11-23 12:14:46 +00:00
Peter Nelson
00ae20fa02
Codechange: Tidy up GRFParameterInfo. ( #13114 )
...
Use member-initialisation, reorder members to reduce space, and prefer references.
SetValue/GetValue are moved to GRFConfig as they set the config's parameter values.
2024-11-23 12:13:52 +00:00
Jonathan G Rennison
b84a164590
Codechange: Avoid unnecessary re-reads/seeks in RandomAccessFile::ReadBlock
2024-11-23 21:48:22 +10:00
Peter Nelson
653e5e8b63
Codechange: Use std::visit for formatting script strings.
2024-11-23 10:55:41 +00:00
Peter Nelson
43da3e7693
Codechange: Use std::visit for ScriptDataVariant.
2024-11-23 10:55:41 +00:00
Peter Nelson
d875ac8947
Add: const operator->() for ScirptObjectRef.
2024-11-23 10:55:41 +00:00
translators
26ae50baf9
Update: Translations from eints
...
english (au): 1 change by krysclarke
chinese (traditional): 1 change by KogentaSan
korean: 5 changes by telk5093
greek: 1 change by gh658804
dutch: 1 change by KevinHeijsteeg2
2024-11-23 04:47:22 +00:00
Peter Nelson
a4b4095232
Codechange: Shuffle Engine members around to reduce size. ( #13115 )
...
Reduces overall size of Engine from 752 to 720 bytes.
2024-11-22 23:58:13 +00:00
Peter Nelson
16038879e4
Codechange: Speed up industry generation using industry-type checks. ( #13094 )
...
Store a list of industries per industry type. This allows industry generation checks which only consider a specific industry type to check a reduced set of industries, leading to a potential performance increase.
This also removes the need to track industry type counts as well.
2024-11-22 23:17:24 +00:00
Peter Nelson
a951896364
Add: Add cargo transported to industry production graph.
2024-11-22 20:47:51 +00:00
Peter Nelson
22035a4f2a
Add: Ability to show and filter different datasets on the same graph.
2024-11-22 20:47:51 +00:00
Peter Nelson
598fdf04a4
Codechange: Use vector instead of fixed array for graph data.
2024-11-22 20:47:51 +00:00
felixprigge
67a0fccfad
Fix: [Timetable] Use days as precision in day mode for accurate timetable syncing ( #12683 )
...
Co-authored-by: flowprint <61750128+flowprint@users.noreply.github.com>
2024-11-21 22:27:07 +00:00
Peter Nelson
6d3adc6169
Codechange: Remove ZeroedMemoryAllocator from ScriptText. ( #13108 )
...
ScriptText is much simplified from its original design. Use member initialisation instead.
2024-11-20 22:16:14 +00:00
Peter Nelson
13da98dab8
Fix: Error message not set when unable load an old save. ( #13106 )
2024-11-20 18:24:07 +00:00
translators
1b6a6f1cd2
Update: Translations from eints
...
chinese (simplified): 4 changes by WenSimEHRP
danish: 19 changes by bscargo
2024-11-20 04:46:40 +00:00
Peter Nelson
b730f8783e
Fix d450d4743: Division by zero when larger_towns is set to 0. ( #13104 )
...
Universe ended.
2024-11-20 00:09:02 +00:00
Peter Nelson
9b6b6d50c3
Fix: Network clients incorrectly truncated all strings to NETWORK_COMPANY_NAME_LENGTH. ( #13102 )
...
This should no longer be necessary since we used std::strings.
2024-11-19 23:44:54 +00:00
SamuXarick
85e9f5745a
Codefix: Replace magic number in Kdtree ( #13098 )
2024-11-19 20:34:25 +00:00
Peter Nelson
6c09dcdd66
Codechange: Use reference for non-optional StationList parameter. ( #13092 )
2024-11-19 20:33:32 +00:00
Peter Nelson
640a270ed6
Codefix: Use correct type for IndustryType in several industry functions. ( #13096 )
2024-11-19 20:32:06 +00:00
Peter Nelson
fcac5479f1
Codechange: Use std::visit for SetupCargoForClimate. ( #13103 )
2024-11-19 20:30:16 +00:00
Peter Nelson
fc8685d618
Codechange: Use functor for Kdtree's XYFunc. ( #13074 )
...
Kdtree uses a function pointer and incorrectly calls it a functor. The function pointer needs to be passed on instantiaton.
Instead, use an actual functor. This simplifies instantiation.
2024-11-19 20:29:56 +00:00
Koen Bussemaker
369ea29e1e
Codechange: Remove redundant checks in FindClosestTrainDepot
2024-11-19 20:42:43 +01:00
Peter Nelson
f9b5f78b8a
Codechange: Use std::visit for GetActiveCargoLabel.
2024-11-19 18:27:19 +00:00
Peter Nelson
25c5a64d39
Codechange: Use std::visit instead of std::get_if for string parameters. ( #13100 )
...
It's tidier and ensures all cases are handled, and doesn't use pointers.
2024-11-19 18:17:41 +00:00
SamuXarick
60ae50e016
Codechange: Make kdtree member functions const for const-correctness ( #13099 )
2024-11-19 12:36:56 +00:00
Michael Lutz
d2496b6ec4
Add: [NewGRF] Callback for custom refit mask for engines/vehicles.
2024-11-18 22:10:38 +01:00
Michael Lutz
a3ee05737f
Add: [NewGRF] Vehicle prop that allows refittability based on cargo class intersection.
2024-11-18 22:10:38 +01:00
Peter Nelson
c39810ff6a
Codechange: Replace path cache queues with vectors.
...
Ship and RoadVehicle path caches use a std::deque, which is quite memory hungry, especially for RoadVehicle which has two.
std::deque was used to be able to push/pop from either end.
Change to use a single std::vector each, which is now push/popped from the back.
2024-11-18 08:59:41 +00:00
Peter Nelson
d4f8453c22
Codefix: Clear and reserve storage when loading vectors from savegames.
2024-11-18 08:59:41 +00:00
translators
b8f3d0dd68
Update: Translations from eints
...
norwegian (bokmal): 4 changes by eriksorngard
2024-11-18 04:49:46 +00:00
Peter Nelson
d903806e59
Codechange: Add VectorSaveLoadHandler to simplify handlers for vectors. ( #13093 )
...
This reduces the duplication needed for each saved complex vector.
2024-11-17 23:46:32 +00:00
translators
a6c526cfa0
Update: Translations from eints
...
bulgarian: 4 changes by Alexandar83
2024-11-17 04:46:16 +00:00
Peter Nelson
04b6dfae48
Cleanup: Remove now-unneeded includes from yapf. ( #13088 )
2024-11-16 23:23:06 +00:00
Peter Nelson
ec1dc434ac
Codechange: Shuffle CommandCost members to reduce size. ( #13087 )
...
Prefer member initialisation as well.
2024-11-16 21:49:49 +00:00
Jonathan G Rennison
71ea58c6de
Codechange: Remove unused CYapfDestinationTileT ( #13086 )
2024-11-16 16:12:18 +00:00
Peter Nelson
57ac1cbe0c
Fix: Don't allow right-click to close world generation progress window. ( #13084 )
2024-11-16 13:54:47 +00:00
translators
8c395ed67c
Update: Translations from eints
...
vietnamese: 4 changes by KhoiCanDev
2024-11-16 04:48:13 +00:00
Peter Nelson
14e2839087
Codechange: Let's use this new emplace_back() thing. ( #13081 )
2024-11-15 20:28:17 +00:00
Peter Nelson
98c8445519
Codechange: Limit house default cargo label lists to original slot counts. ( #13079 )
...
Same as for IndustrySpec and IndustryTileSpec.
2024-11-15 08:07:02 +00:00
translators
d6c2f9edf1
Update: Translations from eints
...
polish: 5 changes by pAter-exe
2024-11-15 04:48:47 +00:00
Peter Nelson
61aff3fa49
Codechange: Limit industry default cargo label lists to original slot counts. ( #13072 )
...
IndustrySpec and IndustryTileSpec cargo label lists are only used for original industries. Original industries can only have up to 2 inputs and 3 outputs. Therefore having space for 16 input/outputs slots is unnecessary
This saves 216 bytes per industry type, and 164 bytes per industry tile type.
2024-11-14 19:05:18 +00:00
translators
9742038b68
Update: Translations from eints
...
chinese (simplified): 2 changes by WenSimEHRP
2024-11-13 04:45:59 +00:00
Koen Bussemaker
6faf4fa70a
Codechange: Simplified YAPF ship region node
2024-11-12 23:17:56 +01:00
Koen Bussemaker
3e195df3c7
Codechange: Cleaned up and renamed NodeList
2024-11-12 21:06:17 +01:00
Peter Nelson
bbc1f7b3dc
Add: Show and toggle follow vehicle state in vehicle view window. ( #13076 )
...
* After double-clicking on a location button to follow a vehicle, show that state by drawing the location button in a lowered state.
* Allow cancelling the follow state by clicking on the location button again.
2024-11-12 17:36:24 +00:00
translators
ce64d5f5d9
Update: Translations from eints
...
japanese: 56 changes by akaregi
2024-11-11 04:45:41 +00:00
translators
66198dea46
Update: Translations from eints
...
japanese: 50 changes by akaregi
german: 4 changes by SecretIdetity
french: 4 changes by ottdfevr
2024-11-10 04:45:21 +00:00
translators
5e4f8db7d6
Update: Translations from eints
...
latvian: 4 changes by lexuslatvia
2024-11-09 04:45:00 +00:00
translators
80f628063a
Update: Translations from eints
...
tamil: 7 changes by merni-ns
2024-11-08 04:45:16 +00:00
Thomas Winwood
b1bba967a1
Add: Improving town-owned bridges increases company rating ( #13036 )
2024-11-07 08:14:04 -05:00
Jonathan G Rennison
7b3525954c
Fix: x-axis direction of industry production graph ( #13062 )
2024-11-07 08:13:21 -05:00
translators
c9bd21d579
Update: Translations from eints
...
chinese (traditional): 4 changes by KogentaSan
2024-11-07 04:45:57 +00:00
Peter Nelson
d54341318e
Fix: VF_LOADING_FINISHED and VF_STOP_LOADING flags tested on wrong vehicle part. ( #13063 )
...
These flags are only set on the front part of a vehicle as they apply to the whole consist.
2024-11-07 00:25:05 +00:00
Charles Pigott
884b93c4c0
Add: Set application name for SDL2 ( #13061 )
2024-11-06 19:51:03 +00:00
Peter Nelson
465df3bab1
Change: Don't try to flood buoys or dock tiles.
...
This reduces the active flooding water tiles a little more.
2024-11-06 19:44:14 +00:00
Peter Nelson
8f9836793f
Change: Store water tile flooding state in the map.
...
This allows water tiles which cannot flood any further to not even try to flood.
On a large map with lots of water tiles this can noticeably reduce game loop processing time.
Mostly ported from JGRPP.
2024-11-06 19:44:14 +00:00
Tyler Trahan
4cd46e54aa
Fix #12940 : Use specific error when overbuilding station on signals ( #12943 )
2024-11-06 14:13:04 -05:00
Tyler Trahan
c3bb512bd9
Remove: Hidden setting for adjacent stations ( #12862 )
2024-11-06 14:11:07 -05:00
Joan Josep
5d7a7b2955
Codechange: Simplify IsCompanyBuildableVehicleType. ( #12868 )
2024-11-06 19:09:09 +00:00
Peter Nelson
3b6d3080f2
Add: Apply rail/road type conversion when NewGRFs are updated mid-game.
...
This will update the rail/road type of tiles on the map, taking account of tram state, if types are moved around.
2024-11-06 19:04:44 +00:00
Peter Nelson
8bb6572943
Add: Implement missing road type label conversion.
...
This was implemented for rail types but missed for road types.
This lets road type labels to be reordered, allowing for upgrades of NewGRF.
2024-11-06 19:04:44 +00:00
Peter Nelson
157d028915
Codechange: Simplify testing for railtype map conversion.
...
Build the list of railtype conversions at the same time as testing if conversion is needed.
This avoids having two similar loops which need to compare the same things.
2024-11-06 19:04:44 +00:00
Jonathan G Rennison
36c735ebfa
Codefix: Nullptr dereference in industry var 0xB4 when no cargoes accepted ( #13060 )
2024-11-06 18:53:48 +00:00
Jonathan G Rennison
59c399c795
Codefix: Documentation comment in IndustryDirectoryWindow ( #13059 )
2024-11-06 18:52:30 +00:00
translators
29df467d27
Update: Translations from eints
...
swedish: 4 changes by joeax910
2024-11-06 04:47:50 +00:00
translators
9da6cd4817
Update: Translations from eints
...
catalan: 4 changes by J0anJosep
2024-11-05 04:45:21 +00:00
translators
362db76e13
Update: Translations from eints
...
norwegian (nynorsk): 32 changes by Abaksle
2024-11-04 04:47:31 +00:00
Peter Nelson
f0f62961e1
Codechange: Make two water functions static. ( #13057 )
2024-11-03 23:25:51 +00:00
Peter Nelson
a91d889646
Fix #13053 : Payment transfers incorrect for non-passenger cargos. ( #13054 )
...
CargoPayment required cargo type to be set as state via SetCargo(). This was error prone as CargoPayment is per consist but cargo type can vary per vehicle part. Additionally if SetCargo was not called then the default "uninitialised" state was cargo slot 0, passengers.
Instead of trying to make sure it is set correctly, remove cargo type from CargoPayment and always pass it explicitly to the PayTransfer/PayFinalDelivery methods.
2024-11-03 18:53:01 +00:00
translators
cbde825785
Update: Translations from eints
...
korean: 5 changes by telk5093
finnish: 4 changes by hpiirai
2024-11-03 04:45:28 +00:00
Peter Nelson
a1233ee8a1
Codechange: Use span instead of marker terminated array for indexed sprite loading. ( #13050 )
2024-11-02 14:47:49 +00:00
translators
9193d69e0b
Update: Translations from eints
...
english (au): 4 changes by krysclarke
english (us): 4 changes by 2TallTyler
chinese (simplified): 4 changes by WenSimEHRP
greek: 4 changes by gh658804
russian: 4 changes by Ln-Wolf
dutch: 4 changes by Afoklala
portuguese: 4 changes by jcteotonio
portuguese (brazilian): 4 changes by pasantoro
2024-11-02 04:47:18 +00:00
translators
3a76af0909
Update: Translations from eints
2024-11-01 04:46:43 +00:00
Anatoly Eltsov
3fca0cf3ee
Feature: Industry production graph ( #10541 )
2024-10-31 22:35:04 +00:00
Peter Nelson
db1a1c5dd9
Change: Invalidate build toolbars when NewGRFs are changed.
...
If NewGRFs are changed while a rail or road toolbar is open, the toolbar could refer to an invalid rail/road type. If so, close it.
2024-10-31 09:10:01 +00:00
Peter Nelson
6d2b93d3b3
Codechange: Set up rail/road toolbar buttons during window's OnInit event.
...
This ensures the buttons are configured without extra initialisation methods.
2024-10-31 09:10:01 +00:00
Peter Nelson
0e3fdfb1b5
Codechange: Don't store pointer to RoadTypeInfo in road toolbar.
...
Always look up via stored RoadType instead. This matches out the rail toolbar behaves, and avoids keeping an non-owned pointer lying around.
2024-10-31 09:10:01 +00:00
Peter Nelson
552cf72b98
Codefix: Immediately return invalid rail/road type when looking for label 0. ( #13045 )
...
Looking for label 0 would incorrectly return the first undefined type instead of INVALID_RAIL/ROADTYPE, which could potentially cause incorrect behaviour.
2024-10-31 00:11:16 +00:00
Loïc Guilloux
9dae626237
Codefix: restore _generating_world and nearest town cache when failing to fund a random town ( #13042 )
2024-10-29 19:56:15 +01:00
Jonathan G Rennison
883be19865
Codefix a6f412c6: Missing this-> in YAPF
2024-10-29 19:07:14 +01:00
Jonathan G Rennison
07e8547eb5
Fix: Terraform of road waypoint tiles ( #13040 )
2024-10-29 14:08:15 +01:00
Koen Bussemaker
0200bc3720
Codechange: Renamed CHashTableT to HashTable and corrected code style
2024-10-29 08:35:47 +01:00
Peter Nelson
0e13a7d124
Fix 3f81124: Invalid data used for height map curves after first run. ( #13039 )
...
Static variable depended on other non-static variables.
2024-10-28 23:18:05 +00:00
SamuXarick
a96a83e330
Codechange: Code style issues in water regions ( #13019 )
2024-10-28 10:29:26 -04:00
translators
abd89b0748
Update: Translations from eints
...
german: 19 changes by Wuzzy2
2024-10-28 04:47:39 +00:00
Peter Nelson
e076aaf740
Codefix: Use SpriteID when passing sprite IDs. ( #13037 )
2024-10-27 18:54:49 +00:00
Peter Nelson
e1697a6ad1
Codechange: Don't use enums for non-enumerated values. ( #13031 )
...
In the past we have used enums to hold an arbitrary values. These values
are not enumerated types, so make them constants instead.
2024-10-27 18:02:49 +00:00
SamuXarick
a86f9dba0f
Codefix: Correct handling of GetDepotOrderType() comparison ( #13023 )
...
In the function where we check the depot order type, using `!=` with GetDepotOrderType() is not ideal because the function can return flag bits.
2024-10-27 18:47:22 +01:00
Peter Nelson
9cf47e69d6
Fix bb8a0c7641: Skip control codes when sorting strings. ( #13035 )
...
Now that SkipGarbage doesn't skip all multi-byte utf-8 characters, string control codes are not skipped either. This gave unintended sorting when NewGRF names start with colour codes.
Make SkipGarbage UTF-8 aware so that it is able to skip some unicode ranges as well.
2024-10-27 15:49:09 +00:00
translators
233ee16c44
Update: Translations from eints
...
bulgarian: 18 changes by Alexandar83
2024-10-27 04:47:27 +00:00
Peter Nelson
bb8a0c7641
Fix: SkipGarbage() skipped all multi-byte utf-8 characters. ( #13032 )
...
`char` is signed so `str[0] < '0'` applies to all characters higher than 127.
2024-10-26 21:01:33 +01:00
Peter Nelson
1191efa581
Fix #12914 : Fix use of invalidated pointer in viewport drawer. ( #12918 )
...
Use index of last child instead of pointer to update next_child element.
In case there is no child sprite yet, the most recent parent sprite's first_child is updated instead.
2024-10-26 15:24:41 +01:00
Peter Nelson
4f9c10d35f
Codechange: Simplify storage of WaterTileType in map. ( #13030 )
2024-10-26 10:17:44 +01:00
Peter Nelson
e50c1774fc
Codechange: Remove some unnecessary local variables.
2024-10-25 19:01:39 +01:00
Peter Nelson
c39554a210
Codechange: Simplify selection between pathfinder functions.
2024-10-25 19:01:39 +01:00
Peter Nelson
1403a55e5d
Codechange: Use uppercase naming for YAPF cost constant.
2024-10-25 19:01:39 +01:00
Peter Nelson
a171939ec3
Codechange: Remove `m_` prefix from pathfinders.
2024-10-25 19:01:39 +01:00
Peter Nelson
a496e9397c
Codechange: Prefer member-initialization.
2024-10-25 19:01:39 +01:00
Peter Nelson
a6f412c615
Codechange: Add `this->` to YAPF.
2024-10-25 19:01:39 +01:00
Peter Nelson
5b73654f94
Codechange: Add includes to YAPF .hpp files.
2024-10-25 19:01:39 +01:00
Peter Nelson
009e57ee03
Codechange: Use member initializer list.
2024-10-25 19:01:39 +01:00
Rubidium
ea6aa4653a
Codechange: replace magic numbers with enumeration
2024-10-25 18:37:11 +02:00
Rubidium
4a4c77ff04
Codechange: use functions described in documentation, instead of related other functions
2024-10-25 18:37:11 +02:00
Jonathan G Rennison
8ed983b3cd
Codechange: Re-order load update for SLV_139
...
It is no longer required to be performed before the first phase
of vehicle updates
2024-10-25 17:05:59 +02:00
Jonathan G Rennison
f19829d029
Fix #12831 : Delay vehicle cache init to after map upgrades in load
...
Split AfterLoadVehicles into two functions.
Vehicle cache init and other functionality requiring an upgraded and
valid map is now performed later in the load process.
2024-10-25 17:05:59 +02:00
Rubidium
dfb74e25f7
Codechange: remove parameter which value can always be deduced
2024-10-24 22:02:50 +02:00
SamuXarick
d5a13fb9f4
Codechange: Use TileOffsByAxis(...) in more places ( #13026 )
2024-10-24 15:58:15 -04:00
Rubidium
c9819f8957
Codechange: split GetRoadDir as bays have DiagDir and drive throughs have Axis
2024-10-24 20:40:32 +02:00
Da-W1nn3r
d6aa09f96a
Fix #12973 : Don't exclude high score after using sandbox
2024-10-24 08:38:16 +02:00
Rubidium
ce641af6a9
Codechange: use StationGfx over RoadStopDir + optional offset for drive through stop
2024-10-23 18:19:32 +02:00
Rubidium
38c9eb76a0
Codechange: add and use TileOffsByAxis(...) over TileOffsByDir(DiagDirToAxis(...))
2024-10-23 18:19:17 +02:00
Peter Nelson
7a71df2952
Codechange: Use fmt::format to convert value to binary string representation. ( #13016 )
...
Avoids manually iterating bits into an array.
2024-10-22 13:59:08 +01:00
translators
51ffb2a1a3
Update: Translations from eints
...
arabic (egypt): 3 changes by Alaadel
2024-10-22 04:47:27 +00:00
Peter Nelson
01807fa753
Change: Use Markdown for changelog.
...
Includes minor changes to how version changes are limited for display.
2024-10-22 00:34:16 +01:00
Peter Nelson
e98407973f
Fix #12993 : Replace known-bugs text with markdown version.
...
This allows a little bit better formatting/display in game.
(No attempt to check if these are still valid known-bugs...)
2024-10-22 00:34:16 +01:00
Peter Nelson
e3bfe2b668
Fix: Don't invalidate water regions on the other side of the map. ( #13012 )
...
When invalidating water regions with a tile at the very edge of the map, the region on the opposite side of the map would also be invalidated.
2024-10-22 00:33:29 +01:00
Peter Nelson
3eb7901ad9
Codechange: Use template parameter of SetBitIterator instead of casting later. ( #13015 )
...
This removes some manual casting.
2024-10-21 17:54:54 +01:00
Jonathan G Rennison
6ca9ddcffa
Codefix: [Win32] String handling in OTTDStringCompare, Win32StringContains
...
Avoid truncation if CompareStringEx is missing
Fix handling of zero length inputs
2024-10-21 17:34:30 +02:00
Jonathan G Rennison
d7a2efd623
Codefix: [Win32] Truncated stack trace symbols were not null-terminated
...
SymGetSymFromAddr64/IMAGEHLP_SYMBOL64 do not null-terminate
symbols with lengths >= the name buffer size
2024-10-21 17:34:03 +02:00
Rubidium
18e8a34081
Codechange: replace "magic" trick with simpler straight forward code
2024-10-20 15:49:32 +02:00
Rubidium
392bcf5c9a
Codechange: simplify ToTileIndexDiff by just calling TileDiffXY
2024-10-20 15:49:32 +02:00
Rubidium
1998e94ae7
Codechange: create the TileIndexDiff of the whole translation we want to execute
2024-10-20 15:49:32 +02:00
Rubidium
a6b7593a52
Codechange: use TileDiffXY(0, 0) over magic 0
2024-10-20 15:49:32 +02:00
Rubidium
3b0fcf442f
Codefix: use actual type instead of int for TileIndexDiff
2024-10-20 15:49:32 +02:00
Jonathan G Rennison
3105f6391c
Fix #13002 : Crash due to use of dangling types in picker GUI used/saved lists ( #13008 )
2024-10-20 09:37:17 +01:00
translators
582f37dc15
Update: Translations from eints
...
luxembourgish: 84 changes by phreeze83
2024-10-20 04:46:58 +00:00
Rubidium
4a359a4aed
Fix 8ca417b: drying of (edge) tiles should consider MP_VOID tiles
2024-10-19 23:32:34 +02:00
Peter Nelson
147ac56f11
Fix: ScriptTile::PlantTreeRectangle does not check that the end tile is in bounds. ( #13004 )
...
If the starting tile is near the edge of the map, the width and height could overflow the map boundary.
In some cases this might result in a different area being planted than expected.
2024-10-19 20:52:02 +01:00
Rubidium
9d2e07b1f6
Codechange: simplify terraform recursion logic
2024-10-19 15:40:36 +02:00
Rubidium
8ca417baa9
Codefix: do not wrap-around the map when flooding tiles
2024-10-19 09:00:21 +02:00
translators
5e8da0479a
Update: Translations from eints
...
luxembourgish: 23 changes by phreeze83
2024-10-19 04:45:07 +00:00
Jonathan G Rennison
ffcc594ea3
Codefix: Incorrect documentation comments in StringBuilder
2024-10-18 22:29:28 +02:00
Rubidium
b074a4d3ce
Codefix: remove duplicate typedef
2024-10-18 16:43:17 +02:00
translators
35d37d4768
Update: Translations from eints
...
norwegian (nynorsk): 2 changes by Abaksle
luxembourgish: 33 changes by phreeze83
2024-10-18 04:47:11 +00:00
Peter Nelson
2fda7d8297
Codechange: Simplify Station::train_station iteration when marking tiles dirty. ( #13003 )
2024-10-17 23:01:04 +01:00
translators
ae4a723889
Update: Translations from eints
...
norwegian (nynorsk): 8 changes by Abaksle
2024-10-17 04:47:13 +00:00
Peter Nelson
bacd3e83c6
Codechange: Use ScriptObjectRef to handle Event reference counting.
...
This removes manual reference counting.
2024-10-16 21:52:00 +01:00
Peter Nelson
8360fab18a
Codechange: Remove CCountedPtr.
...
This was originally generic and used by YAPF, but now it is used only by script objects.
CCountedPtr provided much more (untested) functionality than used.
ScriptObjectRef already exists for script objects and does the same thing, so use this instead.
2024-10-16 21:52:00 +01:00
Koen Bussemaker
d8029b1d84
Fix: CHashTableT's Clear function doesn't set number of items back to zero
2024-10-16 22:36:26 +02:00
Peter Nelson
d5b57a56f4
Codechange: Use std::unique_ptr for link graph schedule handlers. ( #12988 )
...
This removes manual memory management.
2024-10-15 02:11:06 +01:00
Rubidium
4a6ac52d8c
Cleanup: remove some unused #defines
2024-10-14 21:37:00 +02:00
translators
c2d58bb88f
Update: Translations from eints
...
vietnamese: 43 changes by KhoiCanDev
italian: 4 changes by Boh132Boh
2024-10-14 04:46:49 +00:00
translators
79c8eac2ee
Update: Translations from eints
...
vietnamese: 106 changes by KhoiCanDev
polish: 1 change by translators
2024-10-13 04:46:13 +00:00
translators
c813b2b42d
Update: Translations from eints
...
swedish: 19 changes by joeax910
french: 6 changes by ottdfevr
2024-10-10 04:45:29 +00:00
Peter Nelson
446db2c826
Codechange: Remove redundant NewsStringData data. ( #12983 )
...
Since SetDParamStr() always owns a copy of the string, there is no need to make another copy of it to keep it around while the news item exists.
This also fixes a leak in `CmdIndustrySetProduction` as the allocated data wasn't passed to AddIndustryNewsItem.
2024-10-08 19:48:55 +01:00
Jonathan G Rennison
d53b681cf7
Codefix f481c9fc: Incorrect references to previous items in DumpTarget
2024-10-08 20:23:08 +02:00
Peter Nelson
14b986609b
Add: AppendStringInPlace() to append translated string ID into an existing string. ( #12969 )
...
This allows avoiding a string copy when building strings.
2024-10-07 19:05:38 +01:00
Peter Nelson
3cd1200668
Fix #12976 : Incorrect widget rect scrolling for RTL languages. ( #12978 )
...
Industry directory, AS/GS and Textfile window did not consider RTL when applying horizontal scrolling.
2024-10-05 08:02:59 +01:00
translators
114c28e69c
Update: Translations from eints
...
korean: 1 change by telk5093
latvian: 6 changes by lexuslatvia
2024-10-05 04:45:35 +00:00
translators
26c2255897
Update: Translations from eints
...
norwegian (bokmal): 15 changes by eriksorngard
french: 1 change by FiglidiGP
2024-10-03 04:47:03 +00:00
Jonathan G Rennison
22b4a77e37
Codefix: Debug fmt strings in ItemizeBidi (ICU layout) ( #12965 )
2024-10-01 14:28:40 +01:00
Peter Nelson
ccced859f5
Codechange: Mark some water region functions static. ( #12964 )
...
These functions are not used elsewhere. This may affect how compilers generate code.
2024-10-01 14:28:16 +01:00
Jonathan G Rennison
386dbb7c80
Codefix: First format argument of IConsolePrint not passed by reference ( #12966 )
2024-10-01 14:12:19 +01:00
translators
7a0e50002b
Update: Translations from eints
...
galician: 5 changes by pvillaverde
2024-09-30 04:47:06 +00:00
translators
3ed2afa68e
Update: Translations from eints
...
catalan: 5 changes by J0anJosep
2024-09-29 04:45:28 +00:00
translators
b4f96f54df
Update: Translations from eints
...
danish: 14 changes by bscargo
dutch: 5 changes by Afoklala
2024-09-28 04:44:33 +00:00
translators
b42c4fa7ca
Update: Translations from eints
...
chinese (traditional): 4 changes by KogentaSan
english (us): 5 changes by 2TallTyler
korean: 6 changes by telk5093
italian: 16 changes by ciampix
2024-09-26 04:45:59 +00:00
translators
1251638508
Update: Translations from eints
...
chinese (simplified): 8 changes by WenSimEHRP
portuguese: 5 changes by azulcosta
polish: 13 changes by pAter-exe
2024-09-25 04:45:43 +00:00
translators
528f047242
Update: Translations from eints
...
english (au): 4 changes by krysclarke
chinese (traditional): 18 changes by KogentaSan
greek: 4 changes by gh658804
italian: 11 changes by Boh132Boh
russian: 4 changes by Ln-Wolf
finnish: 5 changes by hpiirai
portuguese (brazilian): 4 changes by pasantoro
polish: 78 changes by pAter-exe
2024-09-24 04:45:19 +00:00
Peter Nelson
51bd344f10
Change: Use default NewGRF cargo translation table. ( #12646 )
...
Instead of falling back to bitnum lookup or climate-dependent cargo types, install a default cargo translation table that performs either of these functions instead.
This allows better mapping of climate-dependent or bitnum cargo slots, falling back to INVALID_CARGO if they are not defined, and reduces special-casing.
2024-09-23 23:48:03 +01:00
Peter Nelson
e60c5f30a3
Fix ddf1510a23: House animation random data flag ignored. ( #12963 )
...
In the refactor to unified tile animation code, the test for `CALLBACK_1A_RANDOM_BITS` incorrectly got changed to a `HasBit()` test preventing it from working.
Use `HasFlag()` instead.
2024-09-23 17:18:28 +00:00
Peter Nelson
f149d84d4c
Fix: Crash when exiting game with end game window open. ( #12962 )
...
Caused by the end game window opening the highscore window on close, which `UnInitWindowSystem()` does not expect.
2024-09-23 17:58:44 +01:00
translators
856ee2aaca
Update: Translations from eints
...
english (au): 1 change by krysclarke
chinese (simplified): 1 change by WenSimEHRP
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
portuguese (brazilian): 1 change by pasantoro
2024-09-23 04:45:32 +00:00
Jonathan G Rennison
c1db57840e
Fix: DepotWindow::GetVehicleFromDepotWndPt not refreshing vehicle list ( #12907 )
2024-09-22 18:13:43 +01:00
Peter Nelson
eafee92476
Fix 3d4b98845a: TC_FORCED no longer working. ( #12961 )
...
Since initial colour is no longer passed to the text layout, TC_FORCED flag is not seen by the layouter, so it had no effect.
Instead, check for TC_FORCED when drawing and avoid using the string's colours if set.
2024-09-22 18:08:22 +01:00
Peter Nelson
0340e19e04
Codechange: Add to_underlying() to convert enum to underlying type. ( #12958 )
...
This simplifies and replaces static_cast and C-style casts doing the same.
`std::to_underlying()` exists in C++23 but not C++20.
2024-09-22 18:07:42 +01:00
Peter Nelson
376e882a14
Codechange: Add HasFlag() to test if a value is present in a bitset enum type. ( #12959 )
...
This simplifies tests for `(x & y) != y` with enum classes by reducing repetition, similar to HasBit(), and also makes the intent of the expression clearer.
2024-09-22 14:51:37 +01:00
Peter Nelson
d450d4743e
Fix #12957 : 1-in-X proportion of towns being cities is unnecessarily random. ( #12960 )
...
Using an actual random chance to generate cities means that there may be far less or far more than 'expected' towns being made as cities.
While this is the point of randomness, the wording of the setting is "Proporation of towns that will become cities: 1 in X" and does not mention randomness at all.
2024-09-22 14:42:01 +01:00
Peter Nelson
e45e8a39c8
Add: Overlay cargo icon in vehicle/depot list when holding shift+ctrl. ( #12938 )
2024-09-22 10:33:44 +01:00
translators
9404a03663
Update: Translations from eints
...
chinese (simplified): 1 change by WenSimEHRP
polish: 8 changes by pAter-exe
2024-09-22 04:47:22 +00:00
Jonathan G Rennison
a7d405b02d
Fix: ICUParagraphLayout line wrapping ( #12956 )
...
In the case where the overflow run is not the start run,
and the start run had a partial offset
2024-09-21 22:14:41 +01:00
Peter Nelson
16b4e737a3
Fix 3d8d0e0d26: Don't assume plural parameter is valid. ( #12954 )
...
A crash can occur if the parameter used for a plural isn't a numeric value.
2024-09-21 15:04:35 +01:00
Jeremy Gao
2eac527439
Fix: server menu tooltip shouldn't show language info ( #12955 )
2024-09-21 15:04:13 +01:00
Jonathan G Rennison
78c7dd1303
Fix #12945 : Relative paths passed to -c were not made absolute ( #12946 )
2024-09-21 13:58:28 +01:00
translators
6175a6b78a
Update: Translations from eints
...
dutch: 9 changes by Afoklala
2024-09-21 04:44:57 +00:00
translators
96000fc4ea
Update: Translations from eints
...
english (au): 1 change by krysclarke
english (us): 9 changes by 2TallTyler
galician: 13 changes by pvillaverde
korean: 9 changes by telk5093
greek: 1 change by gh658804
finnish: 1 change by hpiirai
lithuanian: 6 changes by isigitas
portuguese: 1 change by azulcosta
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by aefoes
2024-09-20 04:45:13 +00:00
Peter Nelson
6e940af08d
Fix #12952 : Incorrect string parameters passed for social plugin titles.
...
When no option is selected (i.e. during SetupSmallestSize), a different string parameter layout was used that did not match the visible layout.
2024-09-19 18:44:23 +01:00
Peter Nelson
719d063bd4
Fix d1463f415f: Wrong type of exception thrown by invalid string parameters.
...
`FormatString()` only catches `std::out_of_range`, but `GetNextParameter()` threw `std::runtime_error`.
2024-09-19 18:44:23 +01:00
Peter Nelson
3bfd9de68d
Fix: Highscore/Endgame window can disappear offscreen if game window is resized. ( #12951 )
2024-09-19 09:18:25 +01:00
translators
df0233f4c2
Update: Translations from eints
...
chinese (simplified): 9 changes by WenSimEHRP
catalan: 9 changes by J0anJosep
latvian: 1 change by lexuslatvia
french: 13 changes by glx22
portuguese: 9 changes by azulcosta
2024-09-19 04:45:53 +00:00
Jonathan G Rennison
1e3855c9c3
Fix: Crash when pressing arrow keys in bootstrap mode ( #12948 )
2024-09-18 16:41:54 -04:00
Peter Nelson
fe49dec527
Fix 33a7e9e512: Linker failure with release build. ( #12949 )
2024-09-18 20:18:49 +00:00
Peter Nelson
25a8abcd8e
Fix fcf8693c4f: Remove 100 byte limit for parsing string command parameters. ( #12950 )
...
This allows longer parameters to be used in plural and gender commands.
Each individual word list parameter is now limited to 253 bytes, allowing for a trailing NUL and leaving 0xFF reserved.
2024-09-18 20:55:36 +01:00
Heikki Piirainen
66c5a21d8f
Fix: erroneous error message
2024-09-18 06:50:06 +02:00
Jonathan G Rennison
9f1bb055b7
Change: Exclude parent item from directory sort in FiosGetFileList
2024-09-18 06:49:30 +02:00
translators
fcf8693c4f
Update: Translations from eints
...
english (au): 9 changes by krysclarke
greek: 9 changes by gh658804
russian: 9 changes by Ln-Wolf
finnish: 9 changes by hpiirai
latvian: 8 changes by lexuslatvia
portuguese (brazilian): 9 changes by pasantoro
2024-09-18 04:45:22 +00:00
Peter Nelson
a241ef8da0
Fix #12917 : Write to negative array index for some string patterns.
...
Don't popped closed pair from the parenthesis stack a second time.
2024-09-17 11:06:17 +01:00
Peter Nelson
33a7e9e512
Add: Unit test for ICU ScriptRun.
...
This is based on srtest from the ICU codebase.
2024-09-17 11:06:17 +01:00
translators
9ab0a47812
Update: Translations from eints
...
norwegian (bokmal): 4 changes by eriksorngard
2024-09-17 04:41:16 +00:00
Peter Nelson
4be3361aa3
Fix ad020759: Update town data loader for FileHandle change. ( #12942 )
...
A non-conflicting merge conflict...
2024-09-16 17:52:24 +01:00
Peter Nelson
74910d3d14
Fix 908ee729: Inverted condition prevented actually writing data to files. ( #12941 )
2024-09-16 13:45:23 +00:00
Tyler Trahan
ad020759c7
Feature: Import town data from JSON file ( #10409 )
2024-09-16 09:29:10 -04:00
Peter Nelson
908ee7292b
Codechange: Replace all FILE * with FileHandle RAII class. ( #12718 )
...
This removes the need to manually ensure all files are closed.
2024-09-16 08:45:26 +01:00
translators
3784a3d3d6
Update: Translations from eints
...
latvian: 5 changes by lexuslatvia
portuguese: 4 changes by azulcosta
2024-09-15 04:44:28 +00:00
Peter Nelson
9623c28f4d
Change: [NewGRF] Place all 8 bits of station tile layout in var 40/41. ( #12890 )
2024-09-14 21:37:40 +01:00
Jonathan G Rennison
2a5a0b0990
Codechange: No longer allow saving of incorrect string container table fields
...
See: 1250ce8f
2024-09-14 15:32:48 +01:00
Jonathan G Rennison
c277ff121e
Fix #12901 : Savegame format of company allow lists
2024-09-14 15:32:48 +01:00
Peter Nelson
d1463f415f
Codechange: Treat reading incorrect parameter type as a string error.
...
Previously reading a string as a number would return 0 instead.
2024-09-14 15:31:05 +01:00
Peter Nelson
3d8d0e0d26
Codechange: Use std::variant to store string parameter data.
...
This avoids storing two separate values and makes the test for which type is held clearer.
This replaces use of unique_ptr for conditionally storing a string, and is also used in place of StringParameterBackup.
2024-09-14 15:31:05 +01:00
Peter Nelson
b449839538
Codechange: Pass span instead of vector to HaveDParamChanged.
2024-09-14 15:31:05 +01:00
Peter Nelson
9eb28def57
Codechange: Return reference from GetNextParameterPointer.
...
GetNextParameterPointer can no longer return nullptr, and the callers do not check for nullptr, so return a reference instead.
2024-09-14 15:31:05 +01:00
translators
59b18560d4
Update: Translations from eints
...
english (us): 4 changes by 2TallTyler
dutch: 4 changes by Afoklala
2024-09-14 04:44:59 +00:00
translators
45a5868bb8
Update: Translations from eints
...
chinese (simplified): 4 changes by WenSimEHRP
korean: 4 changes by telk5093
italian: 9 changes by dominiccoletti
catalan: 4 changes by J0anJosep
2024-09-13 04:44:38 +00:00
Peter Nelson
ad5da0c924
Codechange: Use `__VA_OPT__(,)` instead of `, ##` ( #12921 )
...
`__VA_OPT__` is a C++20 standard, `##` is, apparently, a GNU extension.
MSVC needs /Zc:preprocessor adding for whatever reason.
2024-09-12 07:06:15 +01:00
Peter Nelson
7f5a3eaf83
Codefix: Avoid type-casting function pointer with incorrect type. ( #12929 )
...
Make `AutolengthProc` take `int` instead of `void *`, avoiding pointer parameters.
2024-09-12 06:49:45 +01:00
Peter Nelson
9631c68ce6
Codefix: Implement explicit ByteReader::PeekDWord() instead of type-punning pointer. ( #12928 )
2024-09-12 06:49:20 +01:00
Peter Nelson
6deee5e5e2
Fix: Train curve detection did not take shortened parts into account. ( #12910 )
...
Only the number of parts between curves was counted, which with shortened parts would be higher than full length parts and fail to limit as expected.
2024-09-12 06:47:54 +01:00
translators
bed2a060ce
Update: Translations from eints
...
english (au): 4 changes by krysclarke
greek: 4 changes by gh658804
russian: 4 changes by Ln-Wolf
finnish: 4 changes by hpiirai
polish: 4 changes by pAter-exe
2024-09-12 04:46:09 +00:00
Peter Nelson
2d51659ed2
Fix d8c36536: \u200B is not allowed in translations. ( #12935 )
2024-09-10 14:25:36 +01:00
Jonathan G Rennison
e477706bf5
Codechange: Add AssignBit function to assign the value of a single bit ( #12934 )
...
* Codechange: Add AssignBit function to assign the value of a single bit
* Codechange: Replace various uses of SB with AssignBit
* Codechange: Replace various uses of SB with a constant with SetBit
2024-09-10 08:36:58 -04:00
Tyler Trahan
27efa57b7b
Change: Standardize filter button strings ( #12847 )
2024-09-10 08:33:06 -04:00
Jonathan G Rennison
d0b3e0c47e
Fix: Crash in GetGameStringPtr when there are no GS strings ( #12933 )
2024-09-10 13:20:38 +01:00
translators
d8c36536be
Update: Translations from eints
...
danish: 20 changes by bscargo
2024-09-10 04:44:28 +00:00
Jonathan G Rennison
81b684aa42
Codefix: StationUsesDefaultType always returned false for rail waypoints
2024-09-07 14:58:28 +01:00
Jonathan G Rennison
cb2f4f319c
Fix: Picker window 'used' filter for rail waypoints
...
The first two field of struct PickerItem were not populated.
These are required for set operations.
2024-09-07 14:58:28 +01:00
Peter Nelson
29ff3d7b90
Fix: DupSprite did not copy the control_flags field ( #12906 )
...
Co-authored-by: Jonathan G Rennison <j.g.rennison@gmail.com>
2024-09-07 14:57:44 +01:00
Jonathan G Rennison
5c243ee8f0
Fix: Road stop availability callback ( #12931 )
2024-09-07 14:57:04 +01:00
Jonathan G Rennison
d5ff6b4156
Fix 8d62a8f0: Road stop variable 6B crashing for road stop preview in GUI ( #12930 )
2024-09-06 11:14:34 +01:00
translators
92cbf7ae43
Update: Translations from eints
...
french: 6 changes by glx22
2024-09-06 04:44:06 +00:00
translators
c1f8569587
Update: Translations from eints
...
galician: 1 change by pvillaverde
vietnamese: 1 change by myquartz
french: 1 change by FiglidiGP
2024-09-05 04:44:59 +00:00
translators
1d907611d1
Update: Translations from eints
...
polish: 1 change by pAter-exe
2024-09-04 04:44:39 +00:00
translators
34c09b3596
Update: Translations from eints
...
bulgarian: 3 changes by Alexandar83
2024-09-03 04:44:13 +00:00
Rubidium
f2a8e18792
Fix 208952f: incorrect truncation in string setting validation
2024-09-02 22:16:26 +02:00
translators
b80f205967
Update: Translations from eints
...
italian: 4 changes by Boh132Boh
bulgarian: 505 changes by Alexandar83
2024-09-02 04:45:08 +00:00
translators
ef7ad2606c
Update: Translations from eints
...
bulgarian: 161 changes by Alexandar83
2024-09-01 04:45:11 +00:00
translators
2eb3e77207
Update: Translations from eints
...
chinese (simplified): 2 changes by WenSimEHRP
bulgarian: 116 changes by Alexandar83
2024-08-31 04:44:42 +00:00
translators
bb770b7b56
Update: Translations from eints
...
norwegian (bokmal): 1 change by eriksorngard
2024-08-29 04:44:23 +00:00
translators
9eaa00cd89
Update: Translations from eints
...
czech: 1 change by JsSusenka
2024-08-26 04:45:38 +00:00
Peter Nelson
cb23651f43
Codechange: Replace BmpBuffer with RandomAccessFile.
2024-08-24 22:11:04 +01:00
Peter Nelson
719763dfcb
Codechange: Store start and end position in RandomAccessFile.
...
This allows callers to do more bounds checking.
2024-08-24 22:11:04 +01:00
Peter Nelson
b5264a72ae
Codechange: [NewGRF] Use reference to unique_ptr instead of .get() ( #12919 )
...
This allows assignment to reference when creating a new spec instead of setting and refetching.
2024-08-24 22:10:39 +01:00
Jonathan G Rennison
4070cf9968
Codefix: LinkGraphOverlay::dirty was never initialised
2024-08-24 21:06:33 +02:00
translators
3be96c6816
Update: Translations from eints
...
english (us): 1 change by 2TallTyler
2024-08-24 04:43:57 +00:00
translators
d3252315d3
Update: Translations from eints
...
bulgarian: 28 changes by DeyanVNikolov
spanish: 1 change by SeveralCircles
2024-08-23 04:43:15 +00:00
Peter Nelson
2327b7030d
Codechange: Use std::string to load ini file comments. ( #12909 )
...
This removes realloc/free and some funky old manual memory management.
2024-08-21 22:09:51 +01:00
Peter Nelson
4224d08e72
Codechange: Replace malloc/free with vector for TGP heightmap processing.
2024-08-20 22:15:30 +01:00
Peter Nelson
c4a638dfe1
Codechange: Replace malloc/free with vector for screenshot buffers.
2024-08-20 22:15:30 +01:00
Peter Nelson
059462814e
Codechange: Replace malloc/free with vector when loading heightmap data.
2024-08-20 22:15:30 +01:00
Peter Nelson
9a037fe5ae
Codechange: Replace malloc/free with vector when padding sprites.
2024-08-20 22:15:30 +01:00
Peter Nelson
0f0f3d74ca
Codefix: Delete PersistentStorage when a town is deleted. ( #12903 )
2024-08-19 08:18:01 +01:00
translators
e4c04e86c0
Update: Translations from eints
...
catalan: 1 change by J0anJosep
french: 1 change by ottdfevr
portuguese: 1 change by azulcosta
2024-08-18 04:42:47 +00:00
translators
4e11a9c49e
Update: Translations from eints
...
korean: 2 changes by telk5093
dutch: 1 change by Afoklala
2024-08-17 04:43:01 +00:00
translators
73cb7cd7df
Update: Translations from eints
...
swedish: 1 change by joeax910
chinese (traditional): 1 change by KogentaSan
chinese (simplified): 1 change by WenSimEHRP
2024-08-16 04:42:51 +00:00
translators
f14c152c72
Update: Translations from eints
...
english (au): 1 change by krysclarke
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese (brazilian): 1 change by pasantoro
2024-08-15 04:43:54 +00:00
Peter Nelson
ff972ec4ff
Codechange: Store custom station layouts in a map instead of nested vectors. ( #12898 )
...
The map key is the platforms and length combined. This simplifies allocation and searching for layouts.
2024-08-14 19:58:56 +01:00
Jonathan G Rennison
39465d7f5c
Codefix: Move saveload of road stop tile data ( #12883 )
...
So that road stop tile data is also saved/loaded for road waypoints
2024-08-13 19:49:53 +00:00
Peter Nelson
1ff35cb6f9
Codechange: Don't mark animated tiles dirty if frame is not changed.
...
If animation is continued but the animation frame has not changed then there is no need to mark the tile for refresh.
Loosely backport from JGRPP.
2024-08-13 20:04:44 +01:00
Peter Nelson
8754846901
Codechange: Allow adding to animated tile list without marking dirty.
...
This avoids redundant tile refreshes when the caller has already marked a tile dirty, or knows it does not need refreshing.
Loosely backported from JGRPP.
2024-08-13 20:04:44 +01:00
Peter Nelson
79369a886a
Codechange: Don't mark tiles dirty when deleting from animated tile list.
...
The callers of DeleteAnimatedTile already know if the tile needs refreshing, so it is redundant for DeleteAnimatedTile to do so.
Loosely backported from JGRPP.
2024-08-13 20:04:44 +01:00
Jonathan G Rennison
88110e9b2e
Fix: Train unit ID allocation when moving engine to new train at train limit ( #12887 )
2024-08-13 14:53:10 -04:00
Ivan Pravdin
4cddb3a38d
Fix 12860, 2bada59: Timetable does not show vehicles as early
...
Timetable does not show vehicles as early, only as on time.
Fix this by changing 'VehicleIsAboveLatenessThreshold()' to
accept number of ticks the vehicle is late. This allows to
use it with absolute value.
Codefix #12860 : Update comments
Co-authored-by: Tyler Trahan <tyler@tylertrahan.com>
2024-08-13 20:16:57 +02:00
Kaiden Joy
7a698c7f1c
Fix #12365 : Company Window now displays proper inauguration year and period while in wallclock mode.
2024-08-13 20:13:51 +02:00
Jonathan G Rennison
55ca1c77be
Codefix: Remove dead code for WID_SIL_FILTER_ENTER_BTN in sign window ( #12897 )
2024-08-13 08:37:31 +01:00
translators
bdd16ee97f
Update: Translations from eints
...
bulgarian: 77 changes by Alexandar83
2024-08-13 04:43:19 +00:00
Peter Nelson
367e508984
Codefix: Resolve CodeQL warnings by converting to size_t.
2024-08-12 13:33:58 +01:00
Peter Nelson
d0d5c5c400
Codechange: Pass BmpInfo and BmpData as references.
...
Avoids needing to check for nullptr.
2024-08-12 13:33:58 +01:00
Peter Nelson
f829b1d74a
Codechange: Replace BmpData palette and bitmap with vectors.
...
BmpInfo width and height members are now size_t to avoid multiplication warnings.
This avoids manual memory management and allows BmpData to clean up after itself.
2024-08-12 13:33:58 +01:00
translators
0633b94e8f
Update: Translations from eints
...
bulgarian: 76 changes by Alexandar83
2024-08-12 04:43:14 +00:00
translators
574ec4ede4
Update: Translations from eints
...
chinese (simplified): 33 changes by WenSimEHRP
bulgarian: 195 changes by Alexandar83
2024-08-11 04:43:19 +00:00
translators
0c4dcd562c
Update: Translations from eints
...
vietnamese: 28 changes by KhoiCanDev
bulgarian: 63 changes by Alexandar83
romanian: 10 changes by The-Bober
ukrainian: 147 changes by Quantom2
2024-08-10 04:45:34 +00:00
translators
c69e236f9c
Update: Translations from eints
...
bulgarian: 10 changes by Alexandar83
2024-08-09 04:43:18 +00:00