1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 17:19:09 +00:00
Commit Graph

31575 Commits

Author SHA1 Message Date
Colin Caine
078ce59bdb Merge 7b68c184fb into 614a01907a 2025-07-27 20:56:42 +00:00
614a01907a Codechange: Make functions for click and confirm beeps. (#14484)
Avoids repetition.
2025-07-27 21:54:32 +01:00
f51067f9f5 Codechange: Give all bridge sprite tables descriptive names. (#14483)
Finish off the work started 17 years ago...
2025-07-27 20:14:37 +01:00
009b7cbc57 Fix #14480: Music player playlist buttons are clickable but non-operational in intro menu. (#14482)
In the intro menu the music is hardcoded to be the introduction track. Therefore, prevent these buttons being clickable.
2025-07-27 16:03:47 +01:00
translators
79524af5fc Update: Translations from eints
spanish (mexican): 6 changes by absay
galician: 6 changes by pvillaverde
dutch: 6 changes by Afoklala
polish: 3 changes by pAter-exe
2025-07-27 04:48:17 +00:00
translators
d764d59f5a Update: Translations from eints
chinese (traditional): 7 changes by KogentaSan
welsh: 62 changes by Ansbaradigeidfran
2025-07-26 04:46:16 +00:00
13759e9f23 Fix: Display GRFID in correct hex format. (#14478) 2025-07-25 08:41:48 +01:00
translators
3e06c69e26 Update: Translations from eints
portuguese: 1 change by jcteotonio
polish: 6 changes by pAter-exe
2025-07-25 04:47:26 +00:00
translators
7eb042feac Update: Translations from eints
english (us): 5 changes by 2TallTyler
2025-07-24 04:46:38 +00:00
10eeba86a6 Codechange: Simplify/breakout logic for selecting bridge table sprites.
Move various base offsets to separate functions where they can be reused and documented.

No longer rely on coincidences to select the correct data between bridges and aqueducts.
2025-07-23 20:31:15 +01:00
d99dad9e9e Codechange: Pass bridge pillar palette/sprite by reference. 2025-07-23 20:31:15 +01:00
translators
ae917cb8c6 Update: Translations from eints
vietnamese: 134 changes by MagicalDrizzle
2025-07-23 04:48:20 +00:00
translators
6d95cea73a Update: Translations from eints
english (au): 5 changes by krysclarke
korean: 6 changes by telk5093
greek: 5 changes by gh658804
russian: 5 changes by Ln-Wolf
finnish: 5 changes by hpiirai
portuguese: 5 changes by jcteotonio
portuguese (brazilian): 5 changes by pasantoro
2025-07-22 04:46:31 +00:00
921d83c324 Codechange: Unify structures with sprite sub-tile bounds and simplify bounding boxes. (#14424)
Lots of different structs contain variations on sub-tile bounds with different naming. Unify into a single struct that can be inherited and passed directly to AddSortableSpriteToDraw.

At the same time, offsets now work more logically: sub-tile bounds now specify the bounding box, and an offset can be applied to the sprite.
2025-07-22 00:02:00 +01:00
c69fc76395 Codefix: Rail type bridge offset is not a SpriteID. (#14471) 2025-07-21 20:00:04 +00:00
translators
1d21edde8d Update: Translations from eints
english (us): 1 change by 2TallTyler
2025-07-21 04:47:54 +00:00
b82ffa3542 Codechange: Decouple glyph map from SpriteFontCache instances. (#14449)
This makes the map independent from the SpriteFontCache instances.
2025-07-20 22:58:43 +01:00
8e2df7809b Codechange: Add distinct type to hold pixel drawing colour. (#14457)
This is used for individual pixels as well as line drawing.
2025-07-20 22:57:55 +01:00
Jonathan G Rennison
821784004d Fix: [Linkgraph] Incorrect NodeID to StationID conversion for EraseFlows 2025-07-20 16:07:11 +02:00
Jonathan G Rennison
f0447d59d4 Codechange: Use StationID as StationIDStack Titem type 2025-07-20 16:06:03 +02:00
Jonathan G Rennison
cbdd358ae8 Codechange: Allow SmallStack Titem type to be non-structural 2025-07-20 16:06:03 +02:00
2cdd50f40e Fix 03f5f7145f: Wrong colour used when string POP_COLOURs back to initial colour. (#14468)
Fixing ellipsis colour broke the PUSH_COLOUR/POP_COLOUR system, reverting to the last used colour instead of the initial colour.
2025-07-20 14:30:18 +01:00
56942a15c7 Add: Industry accepted and waiting history graphs.
Records amount of cargo accepted, and a rolling average of the waiting amount.

Average waiting samples the waiting amount once per day for each industry, spread out over an economy day.
2025-07-20 14:03:54 +01:00
5eeda026a4 Codechange: Allow unused graph ranges to be masked. 2025-07-20 14:03:54 +01:00
edc5b8ea1f Fix #14464: Invalid string parameter in scenario editor when unable to build industry. (#14465)
Resolved by removing the Build Industry command callback. This was used to display an error message in the scenario editor, however an error is already automatically displayed.
2025-07-20 14:03:29 +01:00
a8650c6b06 Codechange: Make SpriteCacheCtrlFlags an enum bit set. (#14462)
Due to header dependencies, this requires types to split from the spritecache header.
2025-07-19 23:49:15 +01:00
7bb4940ebd Codechange: Use unique_ptr for all pointers in script instance. (#14339)
Removes manual memory management with new/delete.
2025-07-19 09:29:30 +01:00
translators
b8e56cd05d Update: Translations from eints
chinese (traditional): 3 changes by KogentaSan
chinese (simplified): 1 change by ahyangyi
2025-07-19 04:43:14 +00:00
df5237e721 Fix: Vehicle liveries did not update when switching company. (#14456)
Vehicle liveries must be refreshed if "Show vehicle-type specific liveries" is set to "Own company".
2025-07-18 23:43:07 +00:00
03f5f7145f Fix f6e78a480d: Truncation ellipsis always drawn in initial colour. (#14451)
Truncation ellipsis is now a layouted line, so we can no longer rely on implicitly using the last set colour.
2025-07-18 18:24:19 +01:00
0dc40877fd Codechange: Initialise/reset font cache with FontSizes bitset. (#14448)
Instead of choosing either "Normal/Small/Large" or "Monospace", use an EnumBitSet to allow any combination.
2025-07-18 18:23:28 +01:00
Jonathan G Rennison
03672ed8eb Fix: EngineImageType mismatch between sizing and drawing in preview window (#14455) 2025-07-18 07:02:46 -04:00
Loïc Guilloux
1b01a0636c Fix #14362, 4b677e8256: Don't crash old scripts doing silly instantiation (#14394) 2025-07-17 13:30:33 +02:00
nikolas
bccbd64037 Fix: GL error typo (#14376) 2025-07-17 07:18:35 +01:00
Ivan Pravdin
434163aa31 Fix #14277: Aircraft can land when Zeppeliner in the runway (#14317) 2025-07-17 07:26:57 +02:00
translators
55605ae8f2 Update: Translations from eints
english (au): 1 change by krysclarke
catalan: 1 change by J0anJosep
portuguese: 8 changes by jcteotonio
2025-07-17 04:45:55 +00:00
Jonathan G Rennison
7f792e9c5f Codefix: Spelling error in name of GetGRFStringTextStackParameters (#14447) 2025-07-16 09:21:25 -04:00
translators
6b6caa6fa8 Update: Translations from eints
chinese (traditional): 1 change by KogentaSan
greek: 1 change by gh658804
hungarian: 1 change by vargaviktor
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
catalan: 49 changes by J0anJosep
portuguese: 2 changes by jcteotonio
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by pAter-exe
2025-07-16 04:46:46 +00:00
67e56391c7 Fix #8167: No error sub-message when trying to clear protected buildings. (#14444) 2025-07-14 23:23:15 +01:00
e015e3ecc3 Codefix 3fde611012: AirportMovingDataFlag should be enum class (#14435)
`AirportMovingDataFlag` was changed to use `enum class` naming style, but wasn't actually changed to be `enum class`.
2025-07-14 23:22:51 +01:00
Henry Wilson
8330957a4d Codechange: Remove manual memory management from IcuStringIterator 2025-07-14 23:55:24 +02:00
9ce2aca949 Codechange: Get/pass ScriptStorage by reference instead of pointer. 2025-07-14 19:19:29 +01:00
55098a2f2e Codechange: Get/pass engine by reference instead of pointer. 2025-07-14 19:19:29 +01:00
7ff0c67f77 Codechange: Get/pass script controller by reference instead of pointer. 2025-07-14 19:19:29 +01:00
b2de1ff66f Fix #14433: Broken road stop drawing due to incorrect modes conversion. (#14434)
The mask was treated as a single RoadStopDrawMode instead of a RoadStopDrawModes bitset.
2025-07-14 17:25:53 +01:00
Loïc Guilloux
fc924161ab Fix 0455627d: Don't draw timetable panel if no orders (#14441) 2025-07-14 14:18:54 +00:00
61a299bc99 Codechange: Use SpriteID as GlyphID for SpriteFontCache. (#14439)
This reduces the amount of lookups in the character map as rendering a cached layout no longer needs to do so.
2025-07-14 13:28:10 +01:00
7546c1acab Codefix f220ed179d: GetUnicodeGlyph takes a unicode character. (#14438)
Previous change erroneously changed type to GlyphID, based on naming. It should actually be char32_t.
2025-07-14 08:01:42 +00:00
a6143eea21 Codechange: Include more relevant headers for script_storage. (#14437) 2025-07-14 07:49:50 +01:00
1d38cbafcb Codechange: Use unique_ptr for ScriptInfo instances.
Replaces raw pointers, slightly.
2025-07-14 00:10:14 +01:00