Commit Graph

30124 Commits

Author SHA1 Message Date
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