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