Compare commits

...

1135 Commits

Author SHA1 Message Date
Peter Nelson 119d71ae95 Update: Changelog for 15.1 (#15164) 2026-01-24 20:26:56 +00:00
Peter Nelson 8fb4721457 Update: Backport language changes 2026-01-24 19:32:36 +00:00
Peter Nelson 175a0c4d83 Fix #15088: When building a new train, the refit button state may be incorrect. (#15162)
Invalidate vehicle view window when the vehicle chain is changed.

Co-authored-by: Abigail <abigailthomsonhicks@gmail.com>
2026-01-24 19:32:36 +00:00
Loïc Guilloux 903325e4c8 Fix #15160: Use savegame landscape to display company names in SaveLoad window (#15161) 2026-01-24 19:32:36 +00:00
Peter Nelson 3f7934604c Fix #15116: install fallback cargo translation table for old cargo sets (#15150)
Old combined cargo/industry sets may set up cargo types with labels and expect them to be usable without a translation table.

Install a fallback table if the NewGRF does not install one to give them a better chance of working.
2026-01-24 19:32:36 +00:00
Peter Nelson 5d7fddf52c Fix: Allow infinite water to be selected when loading heightmap (#15146) 2026-01-24 19:32:36 +00:00
Loïc Guilloux cae58f37b4 Fix #15153, beb213f9: Wrong tile used to get bridge reservation overlay (#15154) 2026-01-24 19:32:36 +00:00
Peter Nelson 4adacf7640 Fix 568b70e: Fjordia SlCompanyLiveries::Load crash (#15148)
Co-authored-by: qirlib <qirlib@gmail.com>
2026-01-24 19:32:36 +00:00
Peter Nelson 62649f4a83 Update: Changelog for 15.1 (#15128) 2026-01-22 18:46:01 +00:00
Peter Nelson c57db6ecdd Update: Backport language changes 2026-01-22 18:34:49 +00:00
Peter Nelson 4fd478295b Fix 595b696d61: Tile suitability test for farm field no longer handled snow tiles. (#15134) 2026-01-22 18:34:49 +00:00
Peter Nelson 3d8826bd16 Fix #15131, 3cf9b15959: Trees no longer spread on partially snowy tiles. (#15133) 2026-01-22 18:34:49 +00:00
Peter Nelson 175334b587 Update: Backport language changes 2026-01-18 19:30:43 +00:00
Richard Wheeler 2ec7382f5c Fix: Change tooltips to match change from checkboxes to switches (#15123) 2026-01-18 19:30:43 +00:00
Abigail eec49bc795 Fix #15069: World generation map edges GUI starts in an invalid state (#15082) 2026-01-18 19:30:43 +00:00
Peter Nelson e52b3e161f Update: Backport language changes 2026-01-17 10:30:36 +00:00
Peter Nelson fb56c25d2c Fix: [Script] Potential out of bounds array/string slice indexes. 2026-01-17 10:30:36 +00:00
Peter Nelson a80c9325b2 Fix: [Script] Potential out of bounds indexed string access. 2026-01-17 10:30:36 +00:00
Peter Nelson 632b038933 Fix: [Script] Check if array sort function modified array.
Do not allow a script to add or remove elements.
2026-01-17 10:30:36 +00:00
Loïc Guilloux 6cab2e1ff8 Codefix 701cb2e: Incorrect initialisation of treat_first_red_two_way_signal_as_eol (#15109) 2026-01-17 10:30:36 +00:00
Cyprian Klimaszewski 08503470cb Codefix: Remove unnecessary client side checks for setting an unbunch order (#15107) 2026-01-17 10:30:36 +00:00
Owen Rudge fe2c7c130f Fix: [CI] Use the latest version of GOGGalaxyPipelineBuilder to upload releases to GOG 2026-01-17 10:30:36 +00:00
Peter Nelson 0d3960148e Fix #15079: Incorrect dates shown on town cargo history graph. (#15080) 2026-01-17 10:30:36 +00:00
Peter Nelson 3c683c8303 Fix #15067: Mark NewGRF settings as modified after moving by drag & drop. (#15068) 2026-01-17 10:30:36 +00:00
Cyprian Klimaszewski 69ef22674a Fix 0b99a0b: Incorrect error message for aqueducts reaching northern map borders (#14974) 2026-01-17 10:30:36 +00:00
Tyler Trahan d859130613 Fix: Standardize wording of GRF/NewGRF (#15059) 2026-01-17 10:30:36 +00:00
Charles Pigott 89cdc726c8 Fix: [Fluidsynth] Don't try to load the default soundfont if it's not set or doesn't exist 2026-01-17 10:30:36 +00:00
Peter Nelson 1185f74588 Fix #15046: Crash on loading game due to invalid group parents. (#15049)
A bug when deleting groups could leave the group hierarchy in an invalid state.
2026-01-17 10:30:36 +00:00
Jonathan G Rennison ec0232ce11 Fix: disable_elrails handling with engines that use both RAIL and ELRL (#15045) 2026-01-17 10:30:36 +00:00
Peter Nelson a39c836fd1 Fix #15039: Name and version can disappear from content list. (#15040)
If the small font is set larger than the normal font, both name and version text disappeared.

Take account of the height of the small font when setting the resize height.
2026-01-17 10:30:36 +00:00
Tyler Trahan a5c36fa01b Fix #15026: Remove incorrect info from base sounds tooltip (#15029) 2026-01-17 10:30:36 +00:00
Loïc Guilloux a64ffbc5ca Fix: [Script] Improve reporting of invalid GetAPIVersion return (#15015) 2026-01-17 10:30:36 +00:00
SamuXarick 753f7e769a Fix: [Script] Retarget iterators on list swap (#14805)
Fix script list sorter to correctly retarget iterator when swapping lists.
Each sorter implementation now updates its internal iterator to remain valid after attaching to a new list, avoiding undefined behaviour.
2026-01-12 18:50:51 +01:00
Rubidium 6f735d73ab Codechange: [Script] Simplify constructors and add constness 2026-01-12 18:50:51 +01:00
Rubidium e21632ec24 Codechange: [Script] Move identical code from sub class to super class 2026-01-12 18:50:51 +01:00
Loïc Guilloux 252547ff8b Codechange: [Script] Reuse memory when changing values of ScriptList items (#14966) 2026-01-12 18:50:51 +01:00
Loïc Guilloux 64e01c7c8b Codechange: [Script] Replace map of sets with set of pairs for per value storage (#14930) 2026-01-12 18:50:51 +01:00
Tyler Trahan 30cc053596 Update: Changelog for 15.0 (#15005) 2026-01-01 17:05:18 +00:00
Charles Pigott 4f794f0cb5 Update: Backport language changes 2026-01-01 17:03:56 +00:00
Peter Nelson 2b8b882fc3 Fix #14982: Can't place buoys under bridges. (#15007)
Bridges can be built over buoys but not the other way around.
2026-01-01 17:03:56 +00:00
Jonathan G Rennison 347295c319 Fix b4ac5e22: Incorrect TileIndex used in TownCanBePlacedHere (#15002) 2026-01-01 17:03:56 +00:00
Charles Pigott b2d9036fdb Fix: Small ufos would loop over vehicles in depots forever (#15008)
* Codechange: Rename variables to be more meaningful

* Fix: Small ufos would loop over vehicles in depots forever
2026-01-01 17:03:56 +00:00
Charles Pigott 98131fdff3 Fix #15004: Crash when dropdown is open when end game screen appears (#15006) 2026-01-01 17:03:56 +00:00
Tyler Trahan 07032d1af3 Fix #14992, 046b0c6: Respect non-stop order setting when adding waypoint orders (#14993) 2026-01-01 17:03:56 +00:00
Tyler Trahan 7f2e4257a3 Fix: Use correct 'minutes per year' setting for old savegames (#14995) 2026-01-01 17:03:56 +00:00
Loïc Guilloux bd9e7898a4 Fix: potential division by 0 when drawing a line (#14994) 2026-01-01 17:03:56 +00:00
Michael Lutz 20477ff541 Codechange: Disable asserts for release (#14883) 2025-12-31 22:31:24 +00:00
Tyler Trahan 530546b8ca Update: Changelog for 15.0-RC4 (#14970) 2025-12-26 13:01:20 -05:00
Peter Nelson d79edfd974 Update: Backport language changes 2025-12-26 16:41:11 +00:00
Peter Nelson ddd4afd8ec Fix: Update language files for changes to English strings. 2025-12-26 16:41:11 +00:00
Peter Nelson 6e48325661 Fix f34c45c36d: Incorrect colour in cargo list in fund industry window. 2025-12-26 16:41:11 +00:00
Peter Nelson 2f2d6a419f Fix 8a8ebabb9d: Don't draw bridge deck rail sprites for default bridges. (#14985)
Bridge deck sprites for default rail/road types should only be drawn for custom bridges.
2025-12-26 16:41:11 +00:00
Jonathan G Rennison 7e30849c1e Fix b956af63: Incorrect TileIndex used in FindNearestGoodCoastalTownSpot (#14988) 2025-12-26 16:41:11 +00:00
Jonathan G Rennison 09240d8c22 Fix #12465: Click/tooltip alignment of industry chain cargo lines (#14963) 2025-12-26 16:41:11 +00:00
Peter Nelson 4b5b20a167 Fix 2d7d085e8e: "(Invalid parameter)" in error message when trying to remove another player's object. (#14981)
Formatted error string was thrown away.
2025-12-26 16:41:11 +00:00
Peter Nelson ac3ce09dd2 Fix #14978: Don't clear water tiles after removing buoys. (#14980)
Buoys have no owner and can be cleared by anyone, but the underlying tile (e.g. canal) should not be cleared if has a different owner.
2025-12-26 16:41:11 +00:00
Peter Nelson 448f322bd6 Fix: Update language files for changes to English strings. 2025-12-26 16:41:11 +00:00
Peter Nelson 7348c89fb3 Fix f34c45c36d: Incorrect string colour in industry directory. 2025-12-26 16:41:11 +00:00
Peter Nelson 81cb7fcd53 Fix #14973: Incorrect colour for some composed strings. 2025-12-26 16:41:11 +00:00
Peter Nelson 0755317f4d Fix c213218b66: Don't highlight selected dropdown item if it has a click result.
This is used by toggles and buttons within the dropdown item, and using those should not cause the row to look selected.
2025-12-26 16:41:11 +00:00
Peter Nelson f4dd4e455d Update: Backport language changes 2025-12-24 19:22:11 +00:00
Tyler Trahan 95ec0d2244 Fix #14938: Don't allow cacti to die off (#14956) 2025-12-24 19:22:11 +00:00
Rubidium 5434715724 Codefix: add missing tracing debug messages for Coordinator/Stun/Turn 2025-12-24 19:22:11 +00:00
Cyprian Klimaszewski ecd95d332c Fix cb1c240: Client list is not invalidated after company take over. (#14955) 2025-12-24 19:22:11 +00:00
Jonathan G Rennison 5854536b89 Fix #14951: Init and save/load TimerGameEconomy::days_since_last_month (#14962) 2025-12-24 19:22:11 +00:00
Loïc Guilloux 0858148c94 Fix #14958, e96f35c: Don't use not yet initialised member (#14959) 2025-12-24 19:22:11 +00:00
glx22 92ef1697ec Fix #14949, 0717746: Add the new callbacks to the callback table 2025-12-24 19:22:11 +00:00
glx22 a7961b41cb Codechange: Check command callbacks registration even in single player 2025-12-24 19:22:11 +00:00
Peter Nelson e7ba18bfd9 Fix #14945: Hang when deleting implicit orders during vehicle loading. (#14946) 2025-12-24 19:22:11 +00:00
Tyler Trahan 6338c487b8 Update: Changelog for 15.0-RC3 (#14940) 2025-12-20 14:10:15 -05:00
Peter Nelson 4c0a91aac2 Update: Backport language changes 2025-12-20 19:07:50 +00:00
Peter Nelson d04225a2fb Change: Automatically push/pop colours when formatting a sub-string. (#14006)
Reverts 226a44bf86.

This universally prevents the sub-string from changing colours in the outer string.
2025-12-20 19:07:50 +00:00
Peter Nelson 65902d4abe Fix #14932: Increase internal badge index size to avoid overflowing BadgeIDs. (#14933) 2025-12-20 19:07:50 +00:00
mmtunligit 27fbcb3cc5 Fix a41738e: Picker item recolour depends on gamemode (#14929) 2025-12-20 19:07:50 +00:00
Peter Nelson 8c6531f297 Fix #14921: Crash during station autorefit if station doesn't accept current cargo type. (#14924)
Add convenience helpers to correctly retrieve goods entry cargo available/totals.

Avoids having to check if cargo data is available before accessing it, which was missing for autorefit.
2025-12-20 19:07:50 +00:00
Peter Nelson 88a52b60f8 Fix #14917: Crash when opening house picker with no houses available. (#14920) 2025-12-20 19:07:50 +00:00
Peter Nelson aa4b5ca747 Fix #14916: Duration of error message window could be too short. (#14919)
The timer for automatically closing the error message was started when creating the window, instead of when first displaying the window.
2025-12-20 19:07:50 +00:00
Peter Nelson 5ce9c6cadd Fix #14915: Crash due to divide-by-zero of industry probabilities. (#14918) 2025-12-20 19:07:50 +00:00
Loïc Guilloux 2027912e8f Fix ff08a22: script configs were cleared by AIPL and GSDT chunks from intro game (#14910) 2025-12-20 19:07:50 +00:00
Rubidium dd835262ed Codefix: possible null pointer dereference 2025-12-20 19:07:50 +00:00
Rubidium 24364c3fbc Doc: not much is going to change in the 15.0 script APIs 2025-12-14 17:57:36 +01:00
Peter Nelson ca42564da8 Update: Changelog for 15.0-RC2 2025-12-13 18:13:31 +00:00
Peter Nelson 9062d25456 Update: Backport language changes 2025-12-13 11:54:27 +00:00
Rubidium 4213c62edd Fix #14677: desync due to using newgame time settings to validate savegame time settings 2025-12-13 11:54:27 +00:00
Peter Nelson a97587b3fe Revert: "Change: Support side-by-side fallback FontCaches instead of hierarchical. (#13303)"
This reverts commit 1829f7926d.
2025-12-13 11:54:27 +00:00
Peter Nelson 8ac9762a84 Revert: "Add: Automatically load fonts for missing glyphs. (#14856)"
This reverts commit c1d37d8699.
2025-12-13 11:54:27 +00:00
Peter Nelson 4ad85e0fe6 Fix: Graph label allocated size could be too small. (#14901)
Set initial size based on what could be displayed, instead of what is displayed right now.
2025-12-13 11:54:27 +00:00
Loïc Guilloux ab1ae7ec1a Codechange: [CI] setup-vcpkg action is now in OpenTTD/actions (#14897) 2025-12-13 11:54:27 +00:00
Peter Nelson 84c3ac6852 Fix #14891, a8650c6b06: Minimum sprite zoomlevel could break in some cases. (#14894)
Caused by sprite control flags not being reset when scanning available sprites.
2025-12-13 11:54:27 +00:00
Peter Nelson a6994a9550 Fix #14889: [FluidSynth] Don't try to load a soundfont that doesn't exist. 2025-12-13 11:54:27 +00:00
Peter Nelson f22f9d8b18 Codechange: Auto-reformat fluidsynth.cpp. 2025-12-13 11:54:27 +00:00
Peter Nelson 4b701e053f Update: Backport language changes 2025-12-08 18:06:36 +00:00
Loïc Guilloux b575769a7f Fix: [CI] Install NSIS for windows releases (#14885) 2025-12-08 18:06:36 +00:00
Rubidium 04f1a114dd Change #14155: Erato's the winner of the title game competition 2025-12-07 22:40:14 +01:00
Peter Nelson 9ea4d6b2df Doc: Update 15.0-rc1 changelog with last PR. (#14880) 2025-12-07 20:42:40 +00:00
Tyler Trahan 7f196c6652 Feature: House placer mode to replace existing houses (#14469) 2025-12-07 12:05:47 -05:00
Charles Pigott 0bf3de7658 Fix #14863: [Script] Improve documentation for GetAPIVersion (#14877) 2025-12-07 16:55:41 +00:00
Charles Pigott 0ef15fa991 Update: Improve wording of 15.0-RC1 changelog entries (#14876) 2025-12-07 16:55:28 +00:00
Rubidium ced54c3008 Update: Changelog for 15.0-RC1 2025-12-07 14:22:25 +01:00
Cyprian Klimaszewski bbf582ff3a Fix 92e895a: don't force proceed crashed trains 2025-12-07 13:19:50 +00:00
frosch 4339bf3dc7 Codechange: Use attribute syntax for debug_inline, so clang-format understands it. 2025-12-07 13:10:40 +00:00
Peter Nelson 2fc877c2ec Fix #14871, 80e58e751a: Possible crash when building NewGRF station under bridge. (#14872)
Triggered by reading random tile data before the tile is actually created.
2025-12-07 11:59:20 +00:00
Cyprian Klimaszewski 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Peter Nelson 4b7a3241bf Codechange: Remove unnecessary 'core' includes. (#14867) 2025-12-07 08:36:58 +00:00
translators 9e52df87ad Update: Translations from eints
chinese (traditional): 22 changes by KogentaSan
2025-12-07 04:43:11 +00:00
Richard Wheeler bc6a656deb Change: Package OpenGFX2 for Windows Store and GOG 2025-12-06 21:44:02 +00:00
Rubidium 55157f6df2 Doc: update contact information for Free Software Foundation 2025-12-06 19:47:10 +01:00
Peter Nelson 9adc4bfc0f Codechange: Make order load/unload flags value types. (#14861)
Order Load and Unload flags have complex logic to ensure that invalid combinations aren't used. In fact, apart from FullLoad and FullLoadAny, all mixed combinations are invalid.

Simplify logic by removing the use of bit values and treat each option as a value.
2025-12-06 18:30:31 +00:00
Cyprian Klimaszewski abf8438a1b Fix #14756: Invalidate nested focus before widget container is cleared. (#14809) 2025-12-06 12:52:44 -05:00
Cyprian Klimaszewski 92e895a37a Fix #14723: Set force proceed to TFP_SIGNAL if next tile has signals. (#14724) 2025-12-06 18:12:03 +01:00
Peter Nelson 046b0c6267 Codechange: Use enum class and EnumBitSet for various order flags. (#14783) 2025-12-06 12:29:11 +00:00
Peter Nelson c1d37d8699 Add: Automatically load fonts for missing glyphs. (#14856) 2025-12-06 12:22:25 +00:00
Rubidium 064f4df6cc Fix: always try to create at least one town 2025-12-06 12:55:47 +01:00
Rubidium 6e65b2387a Fix #14802: close NewGRF inspection window when overbuilding with default station/waypoint 2025-12-06 12:08:03 +01:00
Rubidium 1445aa9543 Codefix: some coding style improvements 2025-12-06 12:07:53 +01:00
Peter Nelson 1829f7926d Change: Support side-by-side fallback FontCaches instead of hierarchical. (#13303)
The text layouter system can now support using different fonts for different glyphs, including mixing scalable and sprite glyphs.
2025-12-06 10:47:12 +00:00
Rubidium 2c91607671 Fix #14839, e4cf6ca0ba: do not set stacked widget height, which might not be shown 2025-12-06 10:28:52 +01:00
Peter Nelson 22569515df Fix: Drop down scrolling broken for mixed-height items. (#14840) 2025-12-06 09:15:55 +00:00
translators 06d3ae7381 Update: Translations from eints
chinese (simplified): 22 changes by WenSimEHRP
2025-12-06 04:38:49 +00:00
translators ad63087928 Update: Translations from eints
portuguese: 2 changes by jcteotonio
2025-12-05 04:43:02 +00:00
Tyler Trahan bca8913d1d Change: Eliminate small seas instead of ending rivers there (#14797) 2025-12-04 10:55:13 -05:00
Peter Nelson bd338d6e42 Fix 25f1c97bea: Incorrect background colour in badge configuration list. (#14850)
Provide correct widget colour instead of assuming COLOUR_GREY.
2025-12-03 14:38:20 +00:00
Peter Nelson 7e046f112b Fix #14844: Use company colour remap for badges in picker window. (#14849)
(Except for houses, which are not company-owned.)
2025-12-03 14:38:03 +00:00
Jonathan G Rennison 73b260ce05 Codefix: Leading newlines in Squirrel error/callstack prints (#14851) 2025-12-03 08:19:49 +00:00
translators 43a82c2e27 Update: Translations from eints
portuguese: 8 changes by jcteotonio
2025-12-03 04:42:04 +00:00
dependabot[bot] c24526a2e1 Upgrade: Bump the actions group across 1 directory with 5 updates (#14731)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 14:49:36 +00:00
Tyler Trahan 595b696d61 Change: Avoid building farm fields in wetlands (#14846) 2025-12-02 14:28:12 +00:00
Tyler Trahan faf3bb9739 Fix #9071: Don't consider tram tracks when growing towns (#14833) 2025-12-01 11:44:28 -05:00
mmtunligit e96f35cda9 Codechange: Use SetDisplayedPlane instead of UpdateWidgetSize to hide various buttons (#14831) 2025-12-01 11:43:48 -05:00
translators 66185a312d Update: Translations from eints
luxembourgish: 23 changes by phreeze83
2025-12-01 04:48:24 +00:00
Peter Nelson 0600fbe34b Change: Explicitly reserve sprite group types >= 0x80. (#14836)
The NewGRF spec does not mention that sprite group `type` and the `num-ent1` fields are the same.

Reserve all unrecognised special types in case they are wanted at some point.
2025-11-30 09:12:29 +00:00
translators 84d89cc802 Update: Translations from eints
norwegian (bokmal): 17 changes by eriksorngard
portuguese: 17 changes by jcteotonio
2025-11-30 04:44:11 +00:00
Jonathan G Rennison 712ca5e3ec Codechange: [Script] Use std::optional for script list next iteration item (#14753)
Avoids false positive updates in Remove when iterating the final item
and leftover values being returned when IsEnd is true
2025-11-29 17:36:41 +00:00
Peter Nelson 069833963c Codechange: Replace drop down list's default bools with DropDownOptions. (#14837)
Improves maintainability and avoids positional ambiguity.
2025-11-29 16:17:44 +00:00
Peter Nelson 2675295675 Fix #8062: (Try to) ensure enough room for profit in vehicle group window.
Width of group info panel previously relied entirely on the size of other widgets.
2025-11-29 16:17:23 +00:00
Peter Nelson 91a12a3928 Codechange: Precalculate group column rects.
Simplifies drawing group list which no longer needs to calculate horizontal positions for each row.
2025-11-29 16:17:23 +00:00
Peter Nelson e15539c430 Codechange: Extract functions to get group name and profit sprite.
Improves readability and allows long if-else conditions to be replaced with early returns.
2025-11-29 16:17:23 +00:00
translators 1810354622 Update: Translations from eints
galician: 17 changes by pvillaverde
german: 47 changes by Wuzzy2
2025-11-29 04:39:53 +00:00
translators ff578faf95 Update: Translations from eints
korean: 17 changes by telk5093
hungarian: 18 changes by vargaviktor
portuguese: 9 changes by jcteotonio
2025-11-28 04:40:44 +00:00
Peter Nelson b9deabab7e Codefix: Add missing consts in group handling. (#14834) 2025-11-27 20:56:02 +00:00
translators fa0fd235c2 Update: Translations from eints
english (au): 9 changes by krysclarke
swedish: 17 changes by robert-i
english (us): 17 changes by 2TallTyler
greek: 9 changes by gh658804
russian: 9 changes by Ln-Wolf
finnish: 9 changes by hpiirai
portuguese (brazilian): 9 changes by pasantoro
polish: 9 changes by pAter-exe
2025-11-27 04:39:51 +00:00
Tyler Trahan 3e73a130d8 Fix 509cbed: Don't give up erroneously when building lakes (#14832) 2025-11-26 21:34:05 +00:00
TheDude-gh 75aee10e1e Add: [Script] ScriptTile::IsHouseTile 2025-11-26 20:44:50 +01:00
translators 67ded4f980 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
portuguese: 8 changes by jcteotonio
portuguese (brazilian): 8 changes by pasantoro
polish: 10 changes by pAter-exe
2025-11-26 04:41:30 +00:00
Peter Nelson f1937222d3 Change: Make picker label/text colours consistent. (#14829)
Use {GOLD} instead of {ORANGE} in house picker window, to match other picker windows.
2025-11-25 21:23:19 +00:00
mmtunligit c3f9cdf84f Codechange 7a0814c: Use SetDisplayedPlane instead of UpdateWidgetSize (#14823) 2025-11-25 06:05:24 -05:00
mmtunligit 3b541d4c74 Codefix: Add comments to SetViewport functions (#14822) 2025-11-25 06:04:16 -05:00
Tyler Trahan b4ac5e2231 Change: Ensure generated towns have enough room (#14803) 2025-11-25 05:39:17 -05:00
translators 5bd28fa692 Update: Translations from eints
portuguese: 4 changes by jcteotonio
2025-11-25 04:41:35 +00:00
Cyprian Klimaszewski 26a84fad55 Fix 98700eee43, Fix #14815: Properly handle picker window invalidation. (#14816) 2025-11-24 23:28:41 +01:00
Peter Nelson 3555f26ae6 Add: [NewGRF] Allow badges to be excluded from badge name list. (#14818)
This allows badges to have names that can be filtered, but avoid cluttering the purchase text.
2025-11-24 22:19:25 +00:00
Rubidium 5533a24d84 Codechange: silence CodeQL complaints about long switches 2025-11-24 23:17:44 +01:00
Rubidium 316f36fe14 Codefix: comparison of narrow type with wide type in loop condition 2025-11-24 23:02:00 +01:00
mmtunligit 07177467b3 Feature: Signs, waypoint and station names may be moved (#14744) 2025-11-24 14:56:19 -05:00
Richard Wheeler f128d0de1d Fix: Bridge deck sprites were not toyland aware (#14821) 2025-11-24 19:43:12 +00:00
Jonathan G Rennison 84eb3fb0e0 Fix #14800: Incorrect register processing in GetCustomStationRelocation (#14801)
ProcessRegisters must be called even if the sprite resolve result
is not valid.
A zero-length ResultSpriteGroup is valid because the output value
is an offset, not a sprite ID within the ResultSpriteGroup.
2025-11-24 06:22:58 -05:00
translators 74cb4dcefc Update: Translations from eints
portuguese: 11 changes by jcteotonio
2025-11-24 04:43:59 +00:00
Peter Nelson c9b73247e0 Codefix: Remove this-> from static call to CleaningPool. (#14817)
Don't call unnecessarily.
2025-11-23 21:37:43 +00:00
translators 7ffd3b2c48 Update: Translations from eints
catalan: 4 changes by J0anJosep
portuguese: 6 changes by jcteotonio
2025-11-23 04:43:07 +00:00
Peter Nelson e8dbd3aad2 Change: Add debug messages for errors encountered reading sounds. (#14810) 2025-11-22 12:31:08 +00:00
Peter Nelson f3b24d51c3 Fix ed67aedabf: Saved default houses had incorrect class and index information. (#14812)
Saved default houses would not appear properly in the 'Saved' tab after restarting the game.
2025-11-22 12:15:14 +00:00
Peter Nelson 821a496495 Codefix 0455627d16: Don't make temporary copies of order when converting old orders. (#14808) 2025-11-21 17:26:12 +00:00
Peter Nelson 9237685f4c Fix #14794: Default railtype missing for some NewGRF rail vehicles. (#14795) 2025-11-20 22:12:10 +00:00
Peter Nelson 98275ee5d3 Codechange: Use enum class for water-related enums. (#14804) 2025-11-19 20:35:11 +00:00
davidxn 4e24c205d6 Fix 741c431: Miscalculated cargo penalty for poor station rating (#14712) 2025-11-18 20:18:02 +00:00
kos 98700eee43 Fix #14755: Remove clicked type selection when not visible 2025-11-18 20:26:45 +01:00
Rubidium 62e568ce65 Codefix: shadowing variable, grouping loop increments 2025-11-18 20:22:31 +01:00
Jonathan G Rennison f0f964577d Fix 98481ecc: Incorrect parsing of var 6x parameter in NewGRF debug window 2025-11-18 20:21:03 +01:00
Jonathan G Rennison a321509d90 Fix 2b244441: [CMake] Regression tests failed if no previous crashes present
On CMake 3.x
2025-11-18 20:20:47 +01:00
Tyler Trahan 509cbedf0b Feature: Rivers can end in wetlands if unable to reach sea (#14784) 2025-11-18 07:38:55 -05:00
translators a8b000f982 Update: Translations from eints
swedish: 4 changes by joeax910
portuguese: 1 change by jcteotonio
2025-11-18 04:39:55 +00:00
Peter Nelson c3451b5d97 Codechange: Replace color with colour. 2025-11-18 00:02:48 +00:00
Peter Nelson 73660bfaf2 Codechange: Replace favorite with favourite. 2025-11-18 00:02:48 +00:00
Peter Nelson 30955da3ce Codechange: Use enum class for Roadside. 2025-11-17 20:46:05 +00:00
Peter Nelson 2cd5a241c5 Codechange: Use enum class for RoadTileType. 2025-11-17 20:46:05 +00:00
Peter Nelson 2851c70a59 Codechange: Use enum class for RailGroundType. 2025-11-17 20:46:05 +00:00
Peter Nelson 0f5a4290df Codechange: Use enum class for RailTileType 2025-11-17 20:46:05 +00:00
Peter Nelson e8ba7d0a08 Codefix f98b90ac2e: Use to_underlying instead of direct static_cast. (#14790) 2025-11-17 18:12:27 +00:00
Tyler Trahan e8d49ebfe6 Fix: Two lighthouse spawn issues (#14785)
* Fix: Lighthouses need sea to generate, not rivers

* Fix: Don't spawn lighthouses close together
2025-11-17 12:55:23 +00:00
translators 7398d2e290 Update: Translations from eints
portuguese: 17 changes by jcteotonio
portuguese (brazilian): 1 change by jcteotonio
maori (new zealand): 21 changes by Kyle-McDangersword
2025-11-17 04:41:35 +00:00
translators 21329071df Update: Translations from eints
portuguese: 21 changes by jcteotonio
2025-11-16 04:40:12 +00:00
SamuXarick 06d2f44891 Codechange: HighScore sorting to use std::vector (#14779)
Replaces the fixed-size array for company sorting with a std::vector and updates sorting to use std::ranges::sort. This removes the need for manual count management.
2025-11-15 16:40:36 -05:00
Muxy Du Goulp 05c40a6e55 Fix #14777: authorized_key: Correctly target key type for add/remove
The logic in ConNetworkAuthorizedKey for the `authorized_key` command was inverted.
The check `if (StrEqualsIgnoreCase(type, name)) continue;` caused the action (add/remove) to be incorrectly executed on the first key type encountered that *did not* match the requested type, rather than the intended one. This resulted in keys specified for 'admin' being added to 'rcon', for example.

This commit inverts the condition to ensure the action is performed only when the requested type matches the iterated key name.
2025-11-15 22:08:58 +01:00
Peter Nelson d61a21cc0b Codechange: Use enum class for command-related enums. (#14775) 2025-11-15 19:33:09 +00:00
Loïc Guilloux 2b24444146 Codechange: Detect crashes during regression (#14774) 2025-11-15 08:19:33 +00:00
translators 459d213f74 Update: Translations from eints
polish: 4 changes by pAter-exe
2025-11-15 04:38:42 +00:00
translators 2693e63247 Update: Translations from eints
norwegian (bokmal): 4 changes by eriksorngard
2025-11-14 04:39:19 +00:00
mmtunligit 7662105081 Change: Clamp terraform toolbar to main toolbar (#14725) 2025-11-13 18:25:21 -05:00
Rito12 c38aa9cc86 Fix #14701: Company colour remap for sprites in badge filter dropdowns. (#14732) 2025-11-13 18:24:46 -05:00
translators dbe329733c Update: Translations from eints
korean: 4 changes by telk5093
2025-11-13 04:40:24 +00:00
Rito12 120afd29f3 Codefix 394adb6: Make newgrf_badge_gui.cpp file docs compatible with the file name. (#14770) 2025-11-12 16:42:11 +00:00
translators c4b16cb4cd Update: Translations from eints
galician: 17 changes by pvillaverde
polish: 4 changes by Rito13
2025-11-12 04:39:35 +00:00
translators ae413728c1 Update: Translations from eints
english (au): 4 changes by krysclarke
english (us): 4 changes by 2TallTyler
greek: 4 changes by gh658804
hungarian: 4 changes by vargaviktor
russian: 4 changes by Ln-Wolf
finnish: 4 changes by hpiirai
portuguese: 4 changes by jcteotonio
portuguese (brazilian): 4 changes by pasantoro
2025-11-11 04:40:42 +00:00
Peter Nelson ca866cc083 Fix 394adb654e: Incorrect spacing for badges in dropdown lists. (#14768) 2025-11-10 21:43:35 +00:00
Peter Nelson aa6c694c67 Fix c2d4098afa: Unconfigured badge classes should be visible in column 0 by default. (#14766) 2025-11-10 21:41:02 +00:00
translators 744543e469 Update: Translations from eints
luxembourgish: 54 changes by phreeze83
2025-11-10 04:41:07 +00:00
Peter Nelson 376a39f67a Change: Use proper tooltip strings for freeform edge toggles. (#14765) 2025-11-09 22:40:08 +00:00
Loïc Guilloux b563c34ca4 Codefix 6d495d1: [Actions] vcpkg caching for codeql requires some permissions (#14767) 2025-11-09 21:31:59 +00:00
Rito12 9c338cf212 Codefix 8f14894: Correct the comment for GetClassBadge function. (#14759) 2025-11-09 17:29:44 +01:00
Peter Nelson d48463d2be Fix #14763: Crash if NewGRF currency separator is not valid. (#14764)
Ensure separator is a valid string.
2025-11-09 08:21:55 +00:00
translators f052ef213e Update: Translations from eints
luxembourgish: 54 changes by phreeze83
2025-11-07 04:39:02 +00:00
translators 94052a6ccb Update: Translations from eints
korean: 11 changes by telk5093
french: 14 changes by glx22
2025-11-06 04:41:15 +00:00
Jonathan G Rennison 6d5f150b3d Fix: BaseBitSet bit iteration for values which don't fit in 32 bits (#14757) 2025-11-04 20:23:18 +01:00
Peter Nelson 06d8e039c6 Codechange: Use std-find instead of for-loops in strgen. (#14754) 2025-11-04 15:26:15 +00:00
translators 3befbdd52f Update: Translations from eints
hungarian: 12 changes by vargaviktor
2025-11-04 04:38:48 +00:00
Peter Nelson 8226548e31 Fix fd32d1447e: Test for empty shares became inverted. (#14751) 2025-11-03 16:33:18 +00:00
Rito12 f759b691d7 Codechange: Use helper function for company recolour offset (#14740) 2025-11-03 12:25:32 +00:00
Peter Nelson 9001d4a884 Codefix: Clear m8 when making tiles.
m8 should be cleared when tiles do not use it.
2025-11-02 09:24:07 +00:00
Peter Nelson 00cdf1bc56 Codefix: Clear m6 more thoroughly when making tiles.
m6 bits 6-7 were previously used to be for bridge above state, but should now be cleared.
2025-11-02 09:24:07 +00:00
Peter Nelson 66b6d71e32 Codechange: Use std::initializer_list for NWidgetPart data. (#14749)
Avoids using C/C++ arrays.
2025-11-01 22:33:00 +00:00
Peter Nelson 34bbae05db Codechange: Use enum/EnumBitSet for livery in use flags. (#14746)
Replaces magic numbers.
2025-11-01 14:25:24 +00:00
translators 7c855c69fa Update: Translations from eints
dutch: 11 changes by Afoklala
2025-11-01 04:37:15 +00:00
Rito12 8ea347a811 Remove: Rail type cost from replace vehicle window. (#14748) 2025-10-31 10:26:47 -04:00
SamuXarick 20fd2b5014 Codefix: Add missing 'this->' in ScriptList (#14747) 2025-10-31 11:38:49 +00:00
Peter Nelson 038c4d2b87 Codechange: Make driver probe behave the same as loading by name. (#14736)
Inconsistent initialisation order when setting active driver and starting the driver.
2025-10-30 20:22:30 +00:00
SamuXarick 3f19240bbe Doc 313c6c4: [Script] GetAllRailTypes and GetRailType are from ScriptEngine (#14745) 2025-10-30 13:36:43 -04:00
SamuXarick 3ebedecb4a Add: [Script] Auto-convert ObjectType bool to integer when setting values for items in lists via [] (#14308) 2025-10-29 21:18:00 +01:00
translators 3b02761302 Update: Translations from eints
english (us): 11 changes by 2TallTyler
2025-10-29 04:41:13 +00:00
Peter Nelson 534918ccb0 Codechange: Simplify YAPF debug helpers a little. (#14741)
Remove template magic to get C-array size.
2025-10-28 22:05:23 +00:00
translators 6295310f25 Update: Translations from eints
chinese (traditional): 4 changes by KogentaSan
chinese (simplified): 11 changes by WenSimEHRP
catalan: 11 changes by J0anJosep
2025-10-28 04:38:50 +00:00
Tyler Trahan d1376d0b67 Fix #14737: Don't scale custom town and industry counts by land area (#14738) 2025-10-27 18:18:31 +00:00
translators b43cdcba01 Update: Translations from eints
norwegian (bokmal): 12 changes by eriksorngard
portuguese: 1 change by jcteotonio
polish: 2 changes by pAter-exe, 2 changes by Rito13
2025-10-27 04:41:32 +00:00
translators 1522c9f661 Update: Translations from eints
english (au): 11 changes by krysclarke
swedish: 11 changes by robert-i
chinese (traditional): 11 changes by KogentaSan
greek: 11 changes by gh658804
russian: 13 changes by Ln-Wolf
finnish: 15 changes by hpiirai
portuguese: 44 changes by jcteotonio
portuguese (brazilian): 11 changes by pasantoro, 1 change by jcteotonio
polish: 10 changes by Rito13, 1 change by pAter-exe
2025-10-26 04:38:02 +00:00
translators 7b703f688a Update: Translations from eints
galician: 1 change by pvillaverde
2025-10-25 04:38:31 +00:00
Peter Nelson a1920fc225 Change: Scale towns/industries by amount of land tiles. (#10063) 2025-10-24 16:32:09 -04:00
Rito12 70bf84175f Add: Show height difference in bridge is too low error message. (#14614) 2025-10-24 16:27:11 -04:00
Rito12 6ebe64703f Add: Game units for height. (#14615) 2025-10-24 16:25:16 -04:00
Jonathan G Rennison 2212169a8c Fix: Do not pre-fill industry production history for unused production slots (#14730) 2025-10-24 21:34:35 +02:00
Oliver Bechstein-Rumble 6fc4bef0e3 Fix #14240: Remember previous GUI scale when toggling auto-detect (#14380) 2025-10-24 21:33:55 +02:00
Peter Nelson 813cde3735 Fix: Don't set set town index for depot tiles. (#14729) 2025-10-24 21:30:50 +02:00
Peter Nelson 06b830dc07 Codechange: Prefer string equality instead of comparison. (#14727) 2025-10-24 21:30:03 +02:00
Loïc Guilloux a19f6c02e5 Codechange: Add prefix to dependabot commits (#14691) 2025-10-24 21:20:41 +02:00
SamuXarick e4b0e84a7c Doc 80666a0: Fix typo in game script changelog (#14714) 2025-10-24 21:19:47 +02:00
Peter Nelson d6eff806f0 Codechange: Use single vector for next station order.
Pass vector to insert into to avoid handling multiple vectors.

This may change the order of returned stations.
2025-10-23 21:02:27 +01:00
Peter Nelson fd32d1447e Codechange: Remove StationIDStack and SmallStack.
Use a std::vector or std::span instead.
2025-10-23 21:02:27 +01:00
Peter Nelson 5c89dff677 Codechange: Iterate road/tram masks instead of checking each type. (#14716) 2025-10-23 20:59:58 +01:00
Tyler Trahan 8e8eebd785 Doc: Define policy on AI usage in OpenTTD development (#14537) 2025-10-23 08:24:58 -04:00
SamuXarick 2396353c16 Codechange: Optimize FlowRiver (#13264) 2025-10-22 14:42:17 +02:00
Peter Nelson 9f7f314f81 Codechange: [Script] Add regression test for company president gender. 2025-10-19 17:32:48 +01:00
Peter Nelson 75ca1e3cda Fix a46a3a97f3: Incorrect parameter order for CmdSetCompanyManagerFace.
Style and bits were mixed up. Switch everything to style first, as the most significant parameter.
2025-10-19 17:32:48 +01:00
Peter Nelson bf3a07c5d2 Codechange: Silence uninitialized variable warning from GCC. (#14715)
`is_custom_layout` is not used uninitialized but GCC does not know that and produces a warning.
2025-10-19 11:45:13 +01:00
translators c627c64cc5 Update: Translations from eints
swedish: 1 change by robert-i
norwegian (bokmal): 4 changes by eriksorngard
chinese (simplified): 4 changes by WenSimEHRP
catalan: 1 change by J0anJosep
danish: 4 changes by bscargo
latvian: 8 changes by lexuslatvia
dutch: 4 changes by Afoklala
french: 5 changes by ottdfevr
2025-10-16 04:38:47 +00:00
Peter Nelson a949197264 Fix ef71ce0a9d: Crash when user enters a blank line in the console. (#14711)
Crash caused by reading outside the bounds of string_view (though not the underlying buffer)
2025-10-15 22:16:00 +00:00
Peter Nelson 8e055156e3 Codefix: Make sure safeguards.h is the last included non-table header. (#14687) 2025-10-11 10:22:50 +01:00
Rito12 f935e34d90 Codefix: Remove double SetDirty() calls. 2025-10-11 12:15:00 +08:00
Peter Nelson a617d009cc Codechange: Dereference with x-> instead of (*x). (#14700) 2025-10-05 15:47:33 +01:00
Peter Nelson c9fbc41636 Codechange: Script list iterator tidying. (#14698)
* Use `iter->` instead of `(*iter).`
* Use prefix instead of postfix operators
* Use `auto` instead of explicit iterator type.
* Use `std::next()` instead of assignment then increment.
* Use range-for where possible.
2025-10-05 07:57:09 +01:00
Peter Nelson 6fdacb0759 Codechange: Use find/find_if to search for rail/road types by label.
Replaces manual loops.
2025-10-04 18:16:45 +01:00
Peter Nelson 4d40966303 Codechange: Use FlatSet to store and test alternate rail/road types. 2025-10-04 18:16:45 +01:00
Peter Nelson 97674ac2a2 Fix f6c5da4cad: dump_info should not reverse non-ASCII label. (#14697)
Cargo/rail/road types labels are already in appropriate endian-ness.
2025-10-03 22:28:28 +01:00
translators 632ab6a4e5 Update: Translations from eints
chinese (traditional): 4 changes by KogentaSan
english (us): 1 change by 2TallTyler
korean: 1 change by telk5093
polish: 1 change by pAter-exe
2025-10-01 04:38:32 +00:00
Peter Nelson 5d5d27841b Fix: Bootstrap ignored default OpenTTD truetype fonts. (#14684)
Bootstrapping assumed that glyphs must be missing if there is no baseset, ignoring whether there actually are glyphs missing.
2025-09-30 22:16:50 +01:00
translators 9eacb889f8 Update: Translations from eints
english (au): 1 change by krysclarke
greek: 1 change by gh658804
hungarian: 4 changes by vargaviktor
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese: 1 change by jcteotonio
portuguese (brazilian): 1 change by pasantoro
2025-09-30 04:38:08 +00:00
Peter Nelson 42084ca516 Change: Make groups window group list aware of interface scaling. 2025-09-29 22:11:02 +01:00
Peter Nelson 3087194d80 Codechange: Use Rects for group window drawing.
Simplifies handling of LTR/RTL coordinates.
2025-09-29 22:11:02 +01:00
Peter Nelson 8a8ebabb9d Change: Provide road and rail overlay sprites for bridge decks. (#14557)
This allows bridges designed primarily with NewGRF railtypes and roadtypes to be at least somewhat compatible with built-in rail and road.
2025-09-29 22:08:16 +01:00
Rubidium aa7eb089c6 Codechange: make all Providers fully const (Font/Screenshot/Sound) 2025-09-29 23:39:13 +03:00
Peter Nelson dcc3a67752 Fix 9cdf740097: Don't make copy of format providers when making a screenshot. (#14681)
While here, use projection instead of lambda to select provider.
2025-09-29 20:02:08 +00:00
Peter Nelson f8aa2e64e4 Add: Include build cost in rail/road dropdowns. (#14599) 2025-09-29 19:23:02 +01:00
translators 8eaf511f0c Update: Translations from eints
english (us): 3 changes by 2TallTyler
galician: 9 changes by pvillaverde
2025-09-29 04:39:03 +00:00
Su c8220494de Change: replace the "(City)" identifier in the town directory with the city icon (#14634) 2025-09-28 21:18:23 +02:00
Peter Nelson 29136350cf Codechange: Initialise rail/road types with range-for.
Replace double loop with single loop that performs both parts together.
2025-09-28 19:27:47 +01:00
Peter Nelson ca8fb69ffd Codechange: Use std algorithm when allocating rail/road type.
Use `std::ranges::find()` instead of a `for`-loop to allocate rail and road types.
2025-09-28 19:27:47 +01:00
Peter Nelson 126669e10d Codechange: Make GetRail/RoadTypeInfoIndex() a member method.
This follows a similar pattern used for cargoes, houses and objects.

Also fixes incorrect documentation of GetRoadTypeInfoIndex().
2025-09-28 19:27:47 +01:00
Peter Nelson 5ed8f1203b Codechange: Cleanup unnecessary includes of spritecache.h (#14678) 2025-09-28 17:09:57 +00:00
Peter Nelson ff674829f5 Codechange: Replace Rect CentreTo with CentreToHeight. (#14675)
So far all callers only need to centre vertically, so not having to provide the existing width simplifies calls.
2025-09-28 13:09:36 +00:00
Peter Nelson 81530e2574 Change: Support interface scaling in network client list buttons. 2025-09-28 11:00:07 +01:00
Peter Nelson cb1c2409e6 Codechange: Rework network client list buttons.
Instead of calculating and storing which buttons to display for each
line and then further calculating what each line should be when
displaying it, store everything on one pass.

This simplifies/deduplicates logic.
2025-09-28 11:00:07 +01:00
translators 37f737417c Update: Translations from eints
english (au): 3 changes by krysclarke
swedish: 3 changes by robert-i
korean: 3 changes by telk5093
greek: 3 changes by gh658804
russian: 3 changes by Ln-Wolf
finnish: 3 changes by hpiirai
catalan: 3 changes by J0anJosep
portuguese: 3 changes by jcteotonio
portuguese (brazilian): 3 changes by pasantoro
polish: 3 changes by pAter-exe
2025-09-28 04:37:53 +00:00
Peter Nelson 31eec7106b Codechange: Use Rect WithX/WithY in some places. 2025-09-28 00:31:23 +01:00
Peter Nelson 6d3f39609f Codechange: Add WithX/WithY methods to Rect.
This simplifies creating a new Rect with specific horizontal or vertical coordinates.
2025-09-28 00:31:23 +01:00
Peter Nelson 380f9e8b48 Change: Prefer normal/medium weight font in FontConfig fallback detection. (#14672)
This way it behaves similar to Windows.
2025-09-28 00:30:47 +01:00
Rubidium e58fdb8840 Codefix: shadowing of variables 2025-09-28 01:19:32 +03:00
Jonathan G Rennison f64e1cdae0 Fix: Industry accept/produce when not contiguous range from 0 (#14555) 2025-09-27 18:12:49 +01:00
Jonathan G Rennison 9307e1929e Fix #14604: Clearing tiles to build objects did not update town ratings (#14616) 2025-09-27 18:11:42 +01:00
Peter Nelson bfe5fb7339 Codechange: FlatSet's contains() should be const. (#14665)
This function does not modify contents, so should be marked const.
2025-09-27 18:10:39 +01:00
Peter Nelson 0aaeb6f7e7 Codechange: Rename TrackFollowers to follower. (#14664)
Replaces use of codestyle breaking `F` in places.
2025-09-27 18:10:22 +01:00
Peter Nelson 69ea970d6e Codefix 18e28077cc: Local variable icon shadowed member variable icon. (#14668)
Rename rects used in league table to avoid name shadowing. Now uses the same naming as in ScriptLeagueWindow.
2025-09-27 13:08:06 +01:00
Rubidium 5e7cb08411 Fix #14549: changing interface scale could underflow map zoom 2025-09-27 07:41:20 +03:00
translators 910eeef17f Update: Translations from eints 2025-09-27 04:38:00 +00:00
Peter Nelson 18e28077cc Fix: League Table layout broken with RTL languages. (#14667) 2025-09-27 01:50:33 +01:00
Peter Nelson 41837d093b Change: Record and show multiple errors for each NewGRF. (#14658) 2025-09-26 19:00:45 +01:00
Tyler Trahan 0b99a0b66a Feature: Draw infinite water when all borders are water (#13289) 2025-09-26 14:37:27 +00:00
Kuhnovic 5822c8cc65 Codechange: Set YAPF startup nodes directly. (#14663) 2025-09-26 16:33:20 +02:00
Kuhnovic aa6fb0e9e5 Codechange: Simplified logic of ship leaving a depot. (#14661) 2025-09-26 13:35:11 +02:00
Kuhnovic f4f1beba64 Codechange: Moved PruneIntermediateNodeBranch to rail pathfinder. (#14662) 2025-09-26 11:37:50 +02:00
Kuhnovic 6401855842 Fix bff8501: Gcc 15 warns about duplicate type. (#14660) 2025-09-26 10:04:50 +02:00
Peter Nelson 80e58e751a Fix #14607: Bridge-over-station discrepancy depending on build order. (#14608)
When building a custom station, the callback-derived tile layout is ignored during the bridge height test. This caused a discrepancy between building a station under a bridge vs building a bridge over the same station.

Test the station tile layout callback during the bridge height test.
2025-09-24 22:45:18 +01:00
Peter Nelson 42c9f84d74 Fix 3ac1a2f1e4: Game crash due to invalid vehicle type information. (#14628)
Use std::variant instead of union for vehicle info.

RailVehicleInfo is now non-POD so using in a union causes undefined behaviour.
2025-09-24 22:44:41 +01:00
Kuhnovic ecb761fc69 Codechange: Simplified structure of yapf_ship_regions. (#14640) 2025-09-24 21:34:01 +02:00
translators bec4e71d53 Update: Translations from eints
hungarian: 5 changes by vargaviktor
2025-09-24 04:37:55 +00:00
Peter Nelson 6ad7c1c40a Fix d85f4b3ebf: Incorrect row height in network server list. (#14653) 2025-09-23 23:15:21 +01:00
Peter Nelson 484ed1008a Codechange: Make TownRatingCheckType an enum class. (#14652) 2025-09-23 22:00:34 +01:00
Peter Nelson 2b164111a9 Codechange: Use EnumBitSet for TownFlags. (#14651) 2025-09-22 19:04:55 +00:00
Peter Nelson 43e65d04e4 Codefix: Incorrect naming and location of widget names for build docks window. (#14650) 2025-09-22 07:18:08 +01:00
translators 853dc245a0 Update: Translations from eints
chinese (simplified): 4 changes by WenSimEHRP
catalan: 5 changes by J0anJosep
2025-09-22 04:38:24 +00:00
Peter Nelson 1229a498b7 Codechange: Add constant for INVALID_WIDGET. (#14649)
Replaces direct use of -1, making it easier to find.
2025-09-21 21:47:04 +00:00
Peter Nelson 1278f62e2e Codechange: Call shorter variant of DrawFrameRect and GfxFillRect. (#14647)
Pass rect instead of breaking it up when possible.
2025-09-21 20:30:59 +01:00
Peter Nelson 71eba489bc Codechange: Deduplicate DrawButtonDropdown. (#14646)
Use Rect methods to position components.
2025-09-21 20:26:06 +01:00
Peter Nelson a7b06fc9f5 Codechange: Don't use Point for non-2D coordinate. (#14645)
`HandleScrollbarHittest` returns min and max coordinates, not x and y.
Also avoid referring to the min and max coordinates as top and bottom, as these functions are used for both vertical and horizontal scrollbars.
2025-09-21 14:57:53 +01:00
Peter Nelson 29012c3fce Codechange: Move settings entry size global variables. (#14644)
_setting_circle_size and (the incorrectly named) SETTING_HEIGHT variables are now static members of BaseSettingEntry.

Neither of these are constants, so they no longer use constant naming style.
2025-09-21 13:41:47 +01:00
Peter Nelson 13ab9c1adc Fix 6e90b828c6: Off-by-one in Rect::CentreTo. (#14643)
* Rect right/bottom are inclusive so -1 must be taken from width/height.
* Misnamed variable, `new_right` is actually `new_top`.
2025-09-21 13:41:23 +01:00
Peter Nelson 69697a62d3 Fix 8c58fb1efd: Doubled beep sounds when clicking toolbar buttons.
* ShowDropDownList() now issues a beep, so individual toolbar buttons no longer need to do it.
* HandleButtonClick() may be called twice for some buttons, as it is called by automatically for PUSH buttons.

This caused some beeps to sound louder than others.
2025-09-21 10:12:22 +01:00
Peter Nelson ce166bbbc3 Codechange: Demagicify main toolbar button type.
Use WWT_PUSHIMGBTN for non-menu buttons so they automatically raise, replacing the custom OnTimeout function.
2025-09-21 10:12:22 +01:00
Peter Nelson 70d4182850 Fix #14631, Fix 1cb0cbcb6c: Waypoint customs spec not allocated properly on initial construction. (#14633)
Split AllocateSpecToStation/RoadStop into Allocate and Assign functions, allowing command tests to occur separately.
2025-09-21 09:32:25 +01:00
translators 030bbc6399 Update: Translations from eints
vietnamese: 4 changes by KhoiCanDev
2025-09-21 04:37:37 +00:00
Peter Nelson d07ff71c67 Fix ed67aedabf: Wrong button type for town menu in scenario editor toolbar. (#14641)
The button was changed from an action to a menu, which should be WWT_IMGBTN instead of WWT_PUSHIMGBTN.
2025-09-21 01:25:31 +00:00
Tyler Trahan 20067d2db5 Doc: Update station rating comments and doxygen. 2025-09-20 19:28:40 -04:00
Tyler Trahan 2ab3b5516f Codechange: Early continue for cargos not moved by this station 2025-09-20 19:28:40 -04:00
Kuhnovic 1ac5baab31 Change: Add lock penalty to ship pathfinder. (#14603) 2025-09-20 22:52:59 +02:00
Kuhnovic bff850128c Codechange: Use YAPF for river builder pathfinder. (#14606) 2025-09-20 21:42:06 +02:00
translators 2aaffbe23c Update: Translations from eints
korean: 8 changes by telk5093
dutch: 4 changes by Afoklala
portuguese: 10 changes by jcteotonio
2025-09-20 04:37:32 +00:00
Peter Nelson 68e37b7b50 Change: [Script] Decouple RAILTYPE_INVALID from internal presentation. (#14630)
RAILTYPE_INVALID is now -1, which matches ROADTYPE_INVALID.
2025-09-19 22:02:08 +01:00
translators 264cbd8ab5 Update: Translations from eints
english (au): 4 changes by krysclarke
portuguese: 13 changes by jcteotonio
2025-09-19 04:38:27 +00:00
Peter Nelson 17fbe0b911 Change: Determine automatic interface scale by window size. (#14627)
Replace OS-dependent interface scaling with scaling dependent on the window size.

This works on all platforms and should provide a more comfortable experience for new players. Manual interface scale setting works as before.
2025-09-18 18:52:14 +01:00
translators 2d13bcb7b9 Update: Translations from eints
french: 5 changes by ottdfevr
portuguese: 31 changes by jcteotonio
2025-09-18 04:37:46 +00:00
Jonathan G Rennison d54bf49936 Fix: Variant cycle detection in FinaliseEngineArray (#14629) 2025-09-17 22:42:42 +01:00
Kuhnovic 262c364a28 Fix #14620: Use full file path when deleting files. (#14623) 2025-09-17 21:43:22 +02:00
Peter Nelson 129825077b Change: Apply interface scale to window snap distance. (#14625) 2025-09-17 12:29:16 +01:00
translators 445d2b3e22 Update: Translations from eints
swedish: 2 changes by robert-i
norwegian (bokmal): 4 changes by eriksorngard
chinese (traditional): 5 changes by KogentaSan
english (us): 5 changes by 2TallTyler
greek: 2 changes by gh658804
russian: 2 changes by Ln-Wolf
finnish: 2 changes by hpiirai
danish: 2 changes by bscargo
portuguese: 6 changes by jcteotonio
portuguese (brazilian): 9 changes by pasantoro
polish: 12 changes by pAter-exe
2025-09-17 04:37:43 +00:00
translators f487cde056 Update: Translations from eints
swedish: 2 changes by robert-i
greek: 2 changes by gh658804
russian: 3 changes by Ln-Wolf
finnish: 2 changes by hpiirai
danish: 3 changes by New-Authentication
portuguese: 44 changes by jcteotonio
portuguese (brazilian): 2 changes by pasantoro
polish: 2 changes by pAter-exe
2025-09-16 04:37:32 +00:00
Tyler Trahan 5dea170589 Fix #14588: Show error when unable to clone partly-cleared crashed train (#14591) 2025-09-15 19:05:35 -04:00
Kuhnovic faacae2c3f Change: Removed disable_node_optimization YAPF setting (#14578) 2025-09-15 21:59:12 +02:00
Kuhnovic 26fef5b62b Fix 4eaeccd: FioRemove should return false if the file does not exist. (#14619) 2025-09-15 21:17:18 +02:00
Peter Nelson f2f6609206 Fix #14572: Incorrect playlist entry was removed if there are duplicates. (#14583) 2025-09-15 18:52:07 +01:00
Peter Nelson 5f20a97b36 Fix 313c6c45aa: [Script] Return rail types as list instead of bitmask. (#14617)
This is more idiomatic for scripts, and avoids exposing internal representation.
2025-09-15 13:59:04 +01:00
Kuhnovic 7d252ff7fc Change: Ask for confirmation before deleting a savegame / scenario / heightmap. (#14621) 2025-09-15 13:14:56 +02:00
Peter Nelson 7240ed5817 Cleanup 3ac1a2f1e4: Don't load/save a train's railtypes property. (#14618)
A train's railtypes property is always reset by Train::ConsistChanged on load, so storing is not necessary.
2025-09-15 08:21:09 +01:00
translators c111abad37 Update: Translations from eints
portuguese: 1 change by jcteotonio
2025-09-15 04:38:59 +00:00
Michael Lutz 52e97c981c Add: Show all railtypes in the build vehicle and engine preview dialogs. 2025-09-14 17:11:26 +02:00
Michael Lutz 313c6c45aa Add: [Script] Function to get all rail types of an rail engine. 2025-09-14 17:11:26 +02:00
Michael Lutz 1779da51c2 Add: [NewGRF] Train property to set multiple track types for an engine. 2025-09-14 17:11:26 +02:00
Michael Lutz 3ac1a2f1e4 Codechange: Store the rail type of rail engines as a RailTypes bitmask. 2025-09-14 17:11:26 +02:00
Michael Lutz 0715903b24 Codechange: Use an enum for vehicle acceleration model. 2025-09-14 17:11:26 +02:00
translators 748700bd9e Update: Translations from eints
catalan: 2 changes by J0anJosep
latvian: 53 changes by lexuslatvia
portuguese: 36 changes by jcteotonio
2025-09-14 04:38:01 +00:00
translators 96b59af4d1 Update: Translations from eints
norwegian (bokmal): 2 changes by eriksorngard
vietnamese: 14 changes by KhoiCanDev
russian: 1 change by Ln-Wolf
dutch: 1 change by Afoklala
2025-09-13 04:36:41 +00:00
Peter Nelson 3356aa7c69 Codechange: Remove two vector typedefs which are only used once. (#14612) 2025-09-12 19:41:18 +01:00
Peter Nelson ee664f7e8c Codechange: Prefer EnumBitSet's All() method over bitwise comparisons. (#14611)
This makes the intent of the operation clearer.
2025-09-12 19:37:17 +01:00
Peter Nelson b1dc37fb05 Fix 9a294ab2ed: Bridge height check for waypoints didn't include axis in layout. (#14609)
It's unlikely that X and Y axis waypoints have different heights, but not impossible.
2025-09-12 08:28:42 +01:00
translators 3317997976 Update: Translations from eints
english (au): 1 change by krysclarke
swedish: 1 change by robert-i
chinese (traditional): 1 change by KogentaSan
chinese (simplified): 2 changes by WenSimEHRP
korean: 1 change by telk5093
greek: 1 change by gh658804
finnish: 1 change by hpiirai
portuguese: 9 changes by jcteotonio
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by Rito13
2025-09-12 04:43:48 +00:00
Peter Nelson d095526406 Codechange: Range-check rail/road/tram maps by size instead of constant. (#14602)
* Compare against the size of the array instead of the constant used to define the array.
* `type_map` alias now uses auto to avoid defining the type each time.
* `_cur_gps.grffile->railtype_map` is now aliased to `type_map` to simplify and standardise.
2025-09-11 12:31:34 +01:00
translators fe9093df96 Update: Translations from eints
english (us): 1 change by 2TallTyler
korean: 1 change by telk5093
hungarian: 1 change by vargaviktor
danish: 2 changes by New-Authentication
dutch: 1 change by nicobresseleers
portuguese: 12 changes by jcteotonio
2025-09-11 04:37:58 +00:00
Peter Nelson e10200efa4 Change: Allow bridges over locks. (#14595)
The bridge must be at least 2 levels higher than the lock.
2025-09-10 18:41:56 +01:00
translators eb09d18418 Update: Translations from eints
english (au): 1 change by krysclarke
swedish: 1 change by robert-i
chinese (traditional): 1 change by KogentaSan
vietnamese: 1 change by KhoiCanDev
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese: 76 changes by jcteotonio
portuguese (brazilian): 1 change by pasantoro
polish: 4 changes by pAter-exe
2025-09-10 04:36:50 +00:00
translators 033114da8c Update: Translations from eints
italian: 64 changes by Boh132Boh
portuguese: 172 changes by jcteotonio
2025-09-09 04:38:39 +00:00
Peter Nelson 5f84ff5c3f Change: Allow bridges over docks. (#14594) 2025-09-08 21:43:31 +01:00
Peter Nelson 43842f0bcc Fix: Don't add spacing in rail/road type dropdowns if no badges are present. (#14598) 2025-09-08 21:42:49 +01:00
translators 16cd420e4c Update: Translations from eints
portuguese: 44 changes by jcteotonio
portuguese (brazilian): 6 changes by jcteotonio
2025-09-08 04:40:24 +00:00
Peter Nelson 89a90080c5 Codechange: Split table data out of rail.cpp (#14597) 2025-09-07 15:44:54 +00:00
Peter Nelson 80541a7682 Fix c02ef3e456: [AI] Incorrect infrastructure cost for road/tram tiles. (#14596)
Infrastructure total count should be split between road and tram pieces.
2025-09-07 14:11:05 +01:00
translators f82bd95faf Update: Translations from eints
portuguese: 25 changes by jcteotonio
2025-09-07 04:37:41 +00:00
translators 64dbb9383b Update: Translations from eints
chinese (traditional): 1 change by KogentaSan
danish: 28 changes by New-Authentication
portuguese: 30 changes by jcteotonio
2025-09-06 04:38:23 +00:00
Peter Nelson 244a267304 Codechange: Give better names to water tile layouts. (#14592) 2025-09-05 19:02:00 +00:00
Peter Nelson a2f3d59707 Codefix: Use of nullptr instead of std::nullopt. (#14590) 2025-09-05 14:05:02 +01:00
translators 122023be8d Update: Translations from eints
danish: 10 changes by New-Authentication
french: 1 change by ottdfevr
2025-09-05 04:39:06 +00:00
Peter Nelson 6613da5d7e Fix #14586, Fix 069ff846e4: Empty station tile layouts incorrectly substituted with default layouts. (#14587)
It is no longer possible for a layout to be missing, so the nullptr check should have been removed.
2025-09-04 21:11:02 +00:00
Peter Nelson 8d96ea1a5e Fix #14584: Crash due to drawing non-existent orders of new vehicle. (#14585)
When the vehicle list window is grouped by orders, no check was made that vehicle's order list existed.
2025-09-04 02:18:26 +00:00
Peter Nelson 4ed4a8b602 Codechange: Remove MusicSystem::displayed_playlist. (#14582)
It is not actually used for display, and is basically a copy of the standard playlist with duplicated maintenance.
2025-09-04 02:56:19 +01:00
Peter Nelson 5d15c8b8ab Fix: Wrong row may be selected in music playlists. (#14581)
Include frame offset when clicking on music playlist to ensure the correct row is selected.
2025-09-03 18:02:26 +00:00
Peter Nelson f3951214c1 Codechange: Shuffle MusicSongInfo members to reduce alignment padding. (#14580) 2025-09-03 17:22:50 +00:00
Kuhnovic 80f672d5b4 Codechange: Remove redundant data members from YAPF ship node. (#14577) 2025-09-03 12:52:15 +02:00
translators 5602555a7a Update: Translations from eints
danish: 8 changes by New-Authentication
2025-09-03 04:38:23 +00:00
Peter Nelson 736998b595 Codechange: Use span instead of raw pointer for animated cursors. (#14575)
This allows the terminator entry to be removed.
2025-09-02 21:48:24 +01:00
Peter Nelson 7d4282b341 Fix #14569: Ensure music playlist window is large enough. (#14570)
Take number of tracks allowed in custom playlist into account, instead of just the number of tracks loaded.
2025-09-02 20:18:33 +01:00
Cornelius Diekmann dd426bb8c7 Codefix f6555cf: fix comment track vs. tile (#14571) 2025-09-02 13:55:08 +02:00
Loïc Guilloux 7a6e04561d Fix #14278, ccd586a7: [Script] Don't set members inside operator new() (#14568) 2025-09-02 12:58:31 +02:00
translators fce2748bb7 Update: Translations from eints
portuguese: 5 changes by jcteotonio
2025-09-02 04:39:43 +00:00
Peter Nelson 960b840291 Fix 6d6e64b1f0: Road stop properties 0x13/0x14 were not skipped properly. (#14567)
These properties where changed to be variable length for consistency, but ignoring them treated them as fixed length.
2025-09-01 18:52:55 +01:00
Peter Nelson 73045f9b0e Fix #13922: Ensure music track no widget is wide enough for track no. (#14566) 2025-09-01 08:44:33 +00:00
translators 4c77026167 Update: Translations from eints
galician: 2 changes by pvillaverde
vietnamese: 24 changes by MagicalDrizzle
french: 1 change by ottdfevr
2025-09-01 04:42:09 +00:00
Peter Nelson ff5e067341 Fix 7b60e5ccad: Badge filters were only applied to trains. (#14565) 2025-08-31 23:04:48 +01:00
Peter Nelson 24a4a1652b Update: Changelog for 15.0-beta3 (#14407) 2025-08-31 14:49:25 -04:00
Peter Nelson a23970af32 Fix f30f808b50: Bridge over bridge head could be built one level too low. (#14564) 2025-08-31 19:15:49 +01:00
Peter Nelson febf8b0d57 Fix #14561: Vehicle effects missing for vehicle on bridge. (#14563) 2025-08-31 18:27:46 +01:00
Loïc Guilloux 4b9afbe35b Codefix: [Script] Mention ScriptError::ERR_STATION_TOO_SPREAD_OUT in API doc (#14562) 2025-08-31 15:18:51 +00:00
Loïc Guilloux 80666a0d51 Add: [Script] ScriptError::ERR_BRIDGE_TOO_LOW (#14560) 2025-08-31 14:04:02 +00:00
Rubidium 7c0f69a8fe Codefix: typos in comments and strings 2025-08-31 10:30:37 +02:00
Rubidium 4fb749886a Codefix: typos in variable/constant/function names 2025-08-31 10:30:37 +02:00
Rubidium da8422a656 Codefix: typos in string names 2025-08-31 10:30:37 +02:00
translators 37b72f9dcf Update: Translations from eints
galician: 21 changes by pvillaverde
french: 9 changes by ottdfevr
2025-08-31 04:38:04 +00:00
Loïc Guilloux fac55d0278 Fix #14506, aac3a5b6: Restore prefilling of _stations_nearby_list (#14551) 2025-08-30 21:11:09 +02:00
Peter Nelson b867939f37 Fix #14553: Parameter configuration of pre-action 14 NewGRFs did not work. (#14554) 2025-08-30 19:47:37 +01:00
translators 011fca6e21 Update: Translations from eints
danish: 59 changes by bscargo
2025-08-30 04:37:31 +00:00
Jonathan G Rennison 32d93e1c67 Cleanup: Misspellings of "dropdown" in order_gui.cpp 2025-08-29 21:40:35 +02:00
translators 5c285f3e0c Update: Translations from eints
italian: 12 changes by da-cal
maori (new zealand): 85 changes by Kyle-McDangersword
2025-08-29 04:38:53 +00:00
Richard Wheeler 72fc2032e6 Change: Update OpenTTD TTF fonts to v0.8
Add new private range special symbols for recent OpenTTD updates: town and city icons for sans (supporting #14504), left arrow for small and sans (supporting #14174). Add Hebrew alphabet to small and serif fonts, for first (beta) support for Hebrew. Fix new shekel glyph height in all fonts. Fix i ogonek right bearing and umlaut alignment in sans font. Fixes #14179
2025-08-28 22:50:15 +01:00
Richard Wheeler c6c72404e1 Change: Set endgame background to match original graphics borders 2025-08-28 21:22:31 +01:00
Kuhnovic 10e81af663 Codechange: Deduplicate YAPF estimate calculation. (#14527) 2025-08-28 21:09:00 +02:00
Peter Nelson e6323e6760 Fix: File/directory titles not updated if language is changed. (#14542) 2025-08-28 17:42:00 +01:00
Peter Nelson 2978cfa5c9 Fix fbd71a9d72: Missing space after old file type identifier. (#14541) 2025-08-27 18:06:49 +01:00
translators 41ecb25238 Update: Translations from eints
maori (new zealand): 2 changes by translators
2025-08-27 04:39:11 +00:00
Kyle McDangersword 2907dff157 Add #14536: Maori (New Zealand) language 2025-08-26 20:52:25 +02:00
Peter Nelson 68af94cf3e Fix 7344dfe651: Hang when clicking on a link in a text file. (#14539)
When text is not wrapped, a line's `wrapped_width` is 0, causing the Layouter to get stuck in an infinite loop.
2025-08-26 18:28:16 +01:00
Loïc Guilloux 995f30bff0 Codefix bd1a3fe0: Incorrect handling of squirrel stack (#14538) 2025-08-26 16:00:01 +02:00
translators d3d25a39a0 Update: Translations from eints
norwegian (bokmal): 5 changes by eriksorngard
2025-08-26 04:40:50 +00:00
Jonathan G Rennison c4912c94e4 Fix: Incorrect use of GetDescription in town/industry load handler (#14526)
GetLoadDescription should be used instead such that skipping incoming
table fields works as expected
2025-08-25 15:16:04 +01:00
Peter Nelson 6eb5c166dc Fix: Account for both text and icon size in station waiting cargo display. (#14535) 2025-08-25 15:15:10 +01:00
translators 5996aa4a57 Update: Translations from eints
chinese (traditional): 4 changes by KogentaSan
english (us): 5 changes by 2TallTyler
chinese (simplified): 5 changes by WenSimEHRP
2025-08-25 04:42:04 +00:00
glx22 6d495d1fb9 Codechange: [Actions] Use NuGet for vcpkg binary caching 2025-08-24 21:38:16 +02:00
glx22 0f2d1dc39c Codechange: [Actions] Setup vcpkg via a composite action 2025-08-24 21:38:16 +02:00
Cornelius Diekmann c9fc7c0caa Doc: Symbol consistency in landscape_grid.html (#14531)
The table in landscape_grid.html uses both the letter `O` as well as the digit `0` (zero) to denote bits.
The digit `0` represents actual values, while the letter `O` is a placeholder for free bits.
2025-08-24 12:46:10 +00:00
Jonathan G Rennison 294006b1c8 Fix: Incorrect Company::freegroups handling on company merger (#14534) 2025-08-24 12:26:34 +00:00
Jonathan G Rennison 98ffd3cdb1 Fix: Off-by-one when drawing diagonal lines (#14523) 2025-08-24 13:24:17 +01:00
translators 98090fe948 Update: Translations from eints
swedish: 5 changes by robert-i
korean: 5 changes by telk5093
hungarian: 9 changes by vargaviktor
catalan: 5 changes by J0anJosep
2025-08-24 04:42:03 +00:00
translators 0d736d7555 Update: Translations from eints
greek: 7 changes by gh658804
finnish: 6 changes by hpiirai
dutch: 9 changes by Afoklala
2025-08-23 04:39:05 +00:00
Peter Nelson 54f328beeb Codechange: Remove output pointer from GetTileArea(). (#14530)
This simplifies things and removes undocumented type `ETileArea`
2025-08-22 21:27:31 +01:00
translators 2aaf0c0211 Update: Translations from eints
english (au): 5 changes by krysclarke
chinese (traditional): 5 changes by KogentaSan
russian: 5 changes by Ln-Wolf
finnish: 8 changes by hpiirai
portuguese: 7 changes by jcteotonio
portuguese (brazilian): 6 changes by pasantoro
polish: 5 changes by pAter-exe
2025-08-22 04:40:24 +00:00
translators b3beff9781 Update: Translations from eints
swedish: 2 changes by joeax910
chinese (traditional): 2 changes by KogentaSan
english (us): 4 changes by 2TallTyler
chinese (simplified): 2 changes by WenSimEHRP
finnish: 2 changes by hpiirai
2025-08-21 04:40:46 +00:00
Peter Nelson 7a47f7b834 Change: Tweak tubular bridges to remove baked-in pillars. 2025-08-20 21:40:41 +01:00
Peter Nelson 9a294ab2ed Feature: Allow stations and roadstops under bridges.
Bridges above stations will have pillars excluded if they conflict with the station layout.

Partly based on the system implemented in JGRPP.

Co-authored-by: <su@angel-island.zone>
2025-08-20 21:40:41 +01:00
Peter Nelson 6d6e64b1f0 Add: [NewGRF] Bridge pillar exclusion information for stations and roadstops.
NewGRF stations and roadstops can now specify bridge pillar and minimum height information for their tiles.
2025-08-20 21:40:41 +01:00
Peter Nelson f30f808b50 Codechange: Implement tile proc handler to test for building bridge over tile. 2025-08-20 21:40:41 +01:00
translators 77503776b6 Update: Translations from eints
english (au): 2 changes by krysclarke
norwegian (bokmal): 7 changes by eriksorngard
chinese (traditional): 2 changes by KogentaSan
korean: 7 changes by telk5093
russian: 2 changes by Ln-Wolf
catalan: 24 changes by J0anJosep
portuguese (brazilian): 2 changes by pasantoro
polish: 2 changes by pAter-exe
2025-08-20 04:40:05 +00:00
Peter Nelson 1cb0cbcb6c Codechange: Standardise how AllocateSpecToStation/RoadStop are called. (#14525)
Replace use of negative value with std::optional and update doxygen.
2025-08-19 18:52:36 +01:00
translators 5eeede82c5 Update: Translations from eints
swedish: 4 changes by robert-i
english (us): 2 changes by 2TallTyler
greek: 2 changes by gh658804
2025-08-19 04:39:40 +00:00
Peter Nelson 3a5eaf367a Feature: Option to disable activate-on-release behaviour of toolbar dropdown buttons. 2025-08-18 19:48:22 +01:00
Peter Nelson ea9bee2a3e Fix: Close dropdown menu when user clicks on a differenet window.
This did not happen if the clicked window is flagged as unfocusable (i.e. the main toolbar.)
2025-08-18 19:48:22 +01:00
translators 1850ad1aa2 Update: Translations from eints
chinese (traditional): 2 changes by KogentaSan
russian: 2 changes by Ln-Wolf
2025-08-18 04:46:26 +00:00
Jonathan G Rennison add40a2de2 Fix #10222: Off by one drawing even-width horizontal/vertical lines 2025-08-17 20:41:49 +01:00
Jonathan G Rennison 80f72d3722 Fix: Off-by-one in Blitter::DrawLineGeneric 2025-08-17 20:41:22 +01:00
Loïc Guilloux 2d60b9d7b9 Codefix: [macos] variable length array warnings with clang-17 (#14521) 2025-08-17 19:47:31 +02:00
translators 88923a3f18 Update: Translations from eints
english (au): 2 changes by krysclarke
chinese (simplified): 4 changes by WenSimEHRP
finnish: 2 changes by hpiirai
french: 52 changes by glx22
portuguese: 2 changes by jcteotonio
portuguese (brazilian): 2 changes by pasantoro
polish: 2 changes by pAter-exe
2025-08-17 04:45:07 +00:00
translators 94ba9b1454 Update: Translations from eints
hungarian: 2 changes by vargaviktor
finnish: 2 changes by hpiirai
dutch: 3 changes by Afoklala
2025-08-16 04:41:07 +00:00
dP 628a23a990 Fix: [Script] Invalid title on GSGoal.Question windows (#14519) 2025-08-16 00:55:09 +02:00
Peter Nelson 0a1c0b8b48 Change: Hide bridge pillars if obstructed by tile below.
Tiles can now control if pillars are drawn on a bridge above it. There is no visible change with default bridges.
2025-08-15 23:20:18 +01:00
Peter Nelson 48b42492bc Add: [NewGRF] Add extra information to bridges about pillars.
Bridges can now include information about pillars and blocked edges for each bridge piece.

This data is set for default bridges, and NewGRFs can provide their own pillar information.
2025-08-15 23:20:18 +01:00
Su 85af200788 Add: Identify cities on the main viewport by appending an icon to their names (#14504)
Co-authored-by: Peter Nelson <peter1138@openttd.org>
2025-08-15 16:49:25 -04:00
Tyler Trahan 3d806d6a65 Fix: 'Map edges' GUI buttons shouldn't initialize with water on northeast edge (#14514) 2025-08-14 08:25:16 -04:00
Peter Nelson 980121cdf5 Codefix: Don't store palette for track detail in temporary global variable. (#14516)
Pass palette via parameters instead.
2025-08-14 12:28:36 +01:00
translators 1399efd72a Update: Translations from eints
portuguese: 2 changes by jcteotonio
2025-08-14 04:44:10 +00:00
Peter Nelson 376b2f42c9 Fix 0878f71051: Incorrect station layout for even platform counts. (#14515) 2025-08-13 23:18:26 +01:00
Peter Nelson 0878f71051 Codechange: Add RailStationTileLayout iterator. (#14510)
This allows iterating a predefined or calculated rail station layout without allocating extra memory and copying.
2025-08-13 17:23:19 +01:00
translators 5b5bdd346d Update: Translations from eints
english (au): 2 changes by krysclarke
chinese (traditional): 2 changes by KogentaSan
english (us): 4 changes by 2TallTyler
chinese (simplified): 2 changes by WenSimEHRP
greek: 2 changes by gh658804
portuguese (brazilian): 2 changes by pasantoro
polish: 2 changes by pAter-exe
2025-08-13 04:43:07 +00:00
Peter Nelson f898acae3e Codechange: Remove line break before opening brace of Yapf classes. (#14513) 2025-08-12 21:08:41 +01:00
translators f1a33d50a7 Update: Translations from eints
english (au): 1 change by krysclarke
chinese (simplified): 1 change by WenSimEHRP
2025-08-12 04:42:13 +00:00
Peter Nelson b4ebb26c55 Codechange: Remove SpriteGroupType from SpriteGroup. (#14511) 2025-08-11 23:14:44 +01:00
Tyler Trahan f596498a28 Fix #14486: Make cargo graph All/None tooltips less specific (#14509) 2025-08-11 16:08:05 -04:00
Peter Nelson 1af721a6f0 Add: [Badges] Vehicle variable to query badges of current rail or road types. (#14312) 2025-08-11 19:08:48 +01:00
Peter Nelson cd61682ebf Codefix: Don't unnecessarily extract string from bridge CommandCost result. (#14507) 2025-08-10 22:01:03 +01:00
Tyler Trahan 78f7060994 Fix: Standardize "rail waypoint" strings (#14505) 2025-08-10 10:56:33 -04:00
translators 3587db6a23 Update: Translations from eints
swedish: 1 change by robert-i
english (us): 1 change by 2TallTyler
portuguese: 1 change by jcteotonio
2025-08-10 04:46:46 +00:00
translators 850bf1c715 Update: Translations from eints
dutch: 6 changes by Afoklala
2025-08-09 04:42:25 +00:00
Peter Nelson 4a4613e630 Change: Reduce visual height of default rail waypoints. (#14503)
Added 20 years ago, these were perhaps out of proportion with default rail stations.
2025-08-08 17:53:46 +01:00
frosch 66b775016a Fix: Original graphics' tycoon-of-the-century sprite assumes a black background. 2025-08-08 18:15:24 +02:00
Kuhnovic 40457fc0dd Change: Separate ships travelling in opposite direction (#14493) 2025-08-08 09:52:01 +02:00
translators c8a07fe90b Update: Translations from eints
chinese (traditional): 36 changes by KogentaSan
2025-08-08 04:47:48 +00:00
merni-ns e1b404089c Fix #13307: Return non-zero value when there is a mistake in command-line arguments
Specifically, when the savegame passed to -q cannot be read or when non-existent/invalid options are passed
2025-08-07 23:28:57 +02:00
Peter Nelson e1a50abcbb Codechange: Move fallback font detection to FontCacheFactory.
Provides a standard interface instead of relying on defines.
2025-08-07 19:38:00 +01:00
Peter Nelson 140f2b291a Codechange: Use ProviderManager interface to register FontCache factories.
This removes use of #ifdefs to select the appropriate loader, and also replaces FontCache self-registration.
2025-08-07 19:38:00 +01:00
Peter Nelson ed1262cab9 Codefix: Move provider instances to static members. (#14501)
Avoids misnaming in global scope.
2025-08-07 09:21:44 +01:00
translators 2b6cb8a2d2 Update: Translations from eints
english (au): 1 change by krysclarke
norwegian (bokmal): 1 change by eriksorngard
chinese (traditional): 2 changes by KogentaSan
greek: 1 change by gh658804
hungarian: 1 change by vargaviktor
german: 190 changes by Wuzzy2
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese (brazilian): 1 change by pasantoro
polish: 3 changes by pAter-exe
2025-08-07 04:48:50 +00:00
Peter Nelson 1ccbd735d8 Codechange: Extract function to draw custom rail station foundations. (#14492) 2025-08-06 23:46:53 +01:00
translators 73a69fd171 Update: Translations from eints
swedish: 55 changes by robert-i
norwegian (bokmal): 8 changes by eriksorngard
spanish (mexican): 1 change by absay
chinese (simplified): 1 change by WenSimEHRP
2025-08-06 04:47:48 +00:00
Mizuki Nguyen 45929c1672 Add: Currency: Vietnamese Dong (#14474) 2025-08-05 20:16:12 +01:00
Peter Nelson cb12a59eed Fix #14495: Dangling references in Industry Production graph window. (#14496) 2025-08-05 20:14:55 +01:00
Peter Nelson 439723b718 Codechange: Use handler structs for NewGRF action map sprite groups. (#14489)
Reduces code duplication for mapping sprite groups across GRF features.
2025-08-05 20:14:30 +01:00
Peter Nelson b0f247df23 Fix #14498: Crash when cloning aircraft with no orders. (#14499) 2025-08-05 20:08:23 +01:00
Tyler Trahan 8c58fb1efd Fix: Missing button beeps (#14470) 2025-08-05 13:57:45 -04:00
translators dea40880a4 Update: Translations from eints
english (us): 5 changes by 2TallTyler
portuguese: 2 changes by jcteotonio
polish: 1 change by pAter-exe
2025-08-05 04:48:13 +00:00
translators d545cec9a2 Update: Translations from eints
english (au): 5 changes by krysclarke
chinese (traditional): 7 changes by KogentaSan
chinese (simplified): 11 changes by WenSimEHRP
korean: 5 changes by telk5093
greek: 7 changes by gh658804
hungarian: 5 changes by vargaviktor
russian: 7 changes by Ln-Wolf
finnish: 5 changes by hpiirai
portuguese: 5 changes by jcteotonio
portuguese (brazilian): 5 changes by pasantoro
polish: 6 changes by pAter-exe
2025-08-04 04:50:00 +00:00
Peter Nelson 5b1c6772da Fix 557fb0bd78, bd57aee3a9: Remove separate x-axis label for industry/town production graph. (#14497)
This is no longer necessary (and is wrong) as it's now part of the horizontal scale selector.
2025-08-03 20:04:17 +01:00
Peter Nelson 5ee186e850 Codefix: Possible use of uninitialised variable. (#14494)
Realistically this can't happen but gcc 12.2 warns.
2025-08-03 10:48:26 +00:00
translators 61c1f2a35b Update: Translations from eints
polish: 6 changes by pAter-exe
2025-08-03 04:48:21 +00:00
Peter Nelson bd57aee3a9 Add: Town cargo history graphs. (#14461) 2025-08-02 23:19:43 +01:00
kojonek2 aac3a5b683 Fix #12900: Join station window will be shown for stations with existing stations in tile gaps 2025-08-02 20:37:02 +02:00
translators 8f9d4150bc Update: Translations from eints
norwegian (bokmal): 11 changes by eriksorngard
english (us): 6 changes by 2TallTyler
korean: 6 changes by telk5093
dutch: 6 changes by Afoklala
2025-08-02 04:46:00 +00:00
translators 4d03b4b618 Update: Translations from eints
portuguese: 1 change by jcteotonio
2025-08-01 04:49:17 +00:00
Loïc Guilloux 2a0e0b4b68 Fix #14490, 0455627d: Incorrect detection of final order when drawing timetable (#14491) 2025-08-01 03:39:02 +02:00
Ian Earle ec7c8dd095 Codefix: Updating doxygen file documentation string for group_sl.cpp (#14488) 2025-07-31 12:39:22 -04:00
Tyler Trahan 48e3aa1027 Fix #14415: Update survey option text when changing setting (#14487) 2025-07-31 06:03:51 -04:00
translators 22bcb8bd46 Update: Translations from eints
english (au): 6 changes by krysclarke
chinese (traditional): 8 changes by KogentaSan
spanish (mexican): 6 changes by absay
greek: 6 changes by gh658804
hungarian: 6 changes by vargaviktor
russian: 6 changes by Ln-Wolf
finnish: 6 changes by hpiirai
portuguese: 6 changes by jcteotonio
portuguese (brazilian): 6 changes by pasantoro
2025-07-31 04:47:22 +00:00
translators fe95782047 Update: Translations from eints 2025-07-30 04:47:35 +00:00
Peter Nelson 557fb0bd78 Change: Add support for different horizontal graph scales. 2025-07-30 01:13:05 +01:00
Peter Nelson d09dfd843c Codechange: Extend industry cargo history to 24 years.
Monthly data is stored for the current 24 months.
Quarterly data is stored for a further 2-6 years.
Yearly data is stored for a further 6-24 years.
2025-07-30 01:13:05 +01:00
translators 8675d7b498 Update: Translations from eints
chinese (simplified): 5 changes by WenSimEHRP
2025-07-29 04:48:22 +00:00
translators 7c8759552a Update: Translations from eints
japanese: 40 changes by akaregi
hungarian: 6 changes by nemesbala
2025-07-28 04:48:20 +00:00
Peter Nelson 614a01907a Codechange: Make functions for click and confirm beeps. (#14484)
Avoids repetition.
2025-07-27 21:54:32 +01:00
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson 5eeda026a4 Codechange: Allow unused graph ranges to be masked. 2025-07-20 14:03:54 +01:00
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson 67e56391c7 Fix #8167: No error sub-message when trying to clear protected buildings. (#14444) 2025-07-14 23:23:15 +01:00
Peter Nelson 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
Peter Nelson 9ce2aca949 Codechange: Get/pass ScriptStorage by reference instead of pointer. 2025-07-14 19:19:29 +01:00
Peter Nelson 55098a2f2e Codechange: Get/pass engine by reference instead of pointer. 2025-07-14 19:19:29 +01:00
Peter Nelson 7ff0c67f77 Codechange: Get/pass script controller by reference instead of pointer. 2025-07-14 19:19:29 +01:00
Peter Nelson 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
Peter Nelson 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
Peter Nelson 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
Peter Nelson a6143eea21 Codechange: Include more relevant headers for script_storage. (#14437) 2025-07-14 07:49:50 +01:00
Peter Nelson 1d38cbafcb Codechange: Use unique_ptr for ScriptInfo instances.
Replaces raw pointers, slightly.
2025-07-14 00:10:14 +01:00
Peter Nelson 992d58d799 Codechange: Pass ScriptInfo by reference to IsSameScript. 2025-07-14 00:10:14 +01:00
Peter Nelson 8f34b7a821 Codechange: Keep Squirrel engine in unique_ptr. 2025-07-14 00:10:14 +01:00
Peter Nelson bf6d0c4934 Codechange: Don't pre-fill font metrics when loading fonts. (#14436)
Each font cache implementation sets its own metrics based on the loaded font, so there is no need to pre-fill with (unscaled, invalid) default metrics.
2025-07-13 23:38:31 +01:00
Michael Lutz 3c4fb21a5e Fix: [Win32] Link failure with newer Windows SDK version due to WinRT changes. (#14432) 2025-07-13 22:34:32 +01:00
translators baced00e9f Update: Translations from eints
spanish (mexican): 1 change by absay
english (us): 1 change by 2TallTyler
galician: 10 changes by pvillaverde
dutch: 1 change by Afoklala
portuguese: 10 changes by jcteotonio
2025-07-13 04:45:12 +00:00
translators aaf5d39b15 Update: Translations from eints
english (au): 1 change by krysclarke
chinese (traditional): 1 change by KogentaSan
chinese (simplified): 1 change by WenSimEHRP
korean: 1 change by telk5093
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese: 1 change by azulcosta
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by pAter-exe
2025-07-11 04:45:38 +00:00
Richard Wheeler 7db135099a Fix: Scale graph gridlines and axes with GUI scale (#12131) 2025-07-10 00:05:48 +01:00
Peter Nelson 290144c5c9 Fix #14396: Industry production graph showed zero instead of N/A.
Record the number of valid history records per industry so that the graph avoids showing values which are not present as zero.
2025-07-09 23:02:58 +01:00
Peter Nelson 9b55ad5b8d Codechange: Generic type and container for history statistics. 2025-07-09 23:02:58 +01:00
Peter Nelson f6e78a480d Change: Make truncation ellipsis translatable. (#14417) 2025-07-09 22:55:43 +01:00
Tyler Trahan 259830777c Fix #14375: When loading config, validate timekeeping mode and minutes per year (#14405) 2025-07-09 16:04:38 -04:00
Tyler Trahan 753905ae2d Fix #14377: Make house picker window remember house protection state when closed (#14406) 2025-07-09 14:18:19 +00:00
Peter Nelson d2ee2add28 Codechange: Remove ZOOM_LVL_GUI macro. (#14423) 2025-07-09 11:05:06 +01:00
translators 8de32c4509 Update: Translations from eints
portuguese: 7 changes by jcteotonio
2025-07-09 04:45:29 +00:00
Peter Nelson 77b572619a Codechange: Make use of ZoomLevels range iteration. (#14422) 2025-07-08 14:00:12 +01:00
Peter Nelson b21c8a3450 Codechange: Simplify test for bridges above bridge ramps. (#14421) 2025-07-08 13:55:36 +01:00
translators 6d86c760c6 Update: Translations from eints
hungarian: 9 changes by vargaviktor
2025-07-08 04:43:02 +00:00
translators d44e693b25 Update: Translations from eints
norwegian (bokmal): 17 changes by eriksorngard
spanish (mexican): 6 changes by absay
english (us): 21 changes by 2TallTyler
2025-07-07 04:45:34 +00:00
translators b0ea6c0974 Update: Translations from eints
chinese (traditional): 6 changes by KogentaSan
chinese (simplified): 6 changes by WenSimEHRP
2025-07-06 04:44:01 +00:00
Peter Nelson 84e9e106c1 Codefix: SpriteFontCache was never deleted. (#14414) 2025-07-05 13:22:45 +01:00
translators ebd984d894 Update: Translations from eints
english (au): 3 changes by krysclarke
korean: 6 changes by telk5093
greek: 3 changes by gh658804
russian: 3 changes by Ln-Wolf
dutch: 6 changes by Afoklala
portuguese: 4 changes by jcteotonio
portuguese (brazilian): 3 changes by pasantoro
2025-07-05 04:43:09 +00:00
translators f23845805a Update: Translations from eints
english (au): 6 changes by krysclarke
greek: 7 changes by gh658804
russian: 6 changes by Ln-Wolf
finnish: 25 changes by hpiirai
portuguese: 19 changes by jcteotonio
portuguese (brazilian): 6 changes by pasantoro
polish: 6 changes by pAter-exe
2025-07-04 04:42:38 +00:00
Loïc Guilloux 655291facb Fix #14385: [Strgen] Don't count parameters more than one time (#14413) 2025-07-04 01:10:50 +02:00
Peter Nelson 16b0371c1b Codechange: Remove owner from CargoPayment. (#14411)
Owner can instead be looked up from the CargoPayment's vehicle.

This reduces the size of each CargoPayment slightly.
2025-07-03 23:11:12 +01:00
Heikki Piirainen febba930b0 Fix: Inconsistent capitalization in game settings 2025-07-03 17:11:51 +02:00
translators bf07751ee7 Update: Translations from eints
spanish (mexican): 12 changes by absay
portuguese: 1 change by jcteotonio
2025-07-03 04:44:02 +00:00
Tyler Trahan e578668a93 Fix #14360: Don't reuse strings for Low/Medium/High setting values (#14409) 2025-07-02 06:09:39 -04:00
translators 226b098c55 Update: Translations from eints
portuguese: 17 changes by jcteotonio
2025-07-02 04:42:46 +00:00
Peter Nelson 0391eec189 Change: Improve sprite ellipsis appearance. (#14404)
Make spacing more consistent with periods.
2025-07-01 17:34:26 +01:00
translators b84b641ed9 Update: Translations from eints
hungarian: 7 changes by vargaviktor
2025-07-01 04:45:31 +00:00
Peter Nelson 4fe6adb2dd Fix c2d4098afa: Crash when accessing unconfigurable badge feature. (#14403)
Some features support badges but do not have a way to configure them. Accessing these features could crash the game.
2025-06-30 21:45:08 +01:00
Peter Nelson 36d7e09369 Fix: Include sort button width in content list header minimal size. (#14402) 2025-06-30 20:40:26 +01:00
Peter Nelson 42a9d27fd9 Fix: Don't draw truncation ellipsis if it's too wide. (#14401) 2025-06-30 20:40:04 +01:00
Peter Nelson 80d2194511 Fix: Don't include ellipsis width in RTL truncation offset. (#14400)
This caused the right-most glyphs to be truncated.
2025-06-30 10:03:24 +01:00
translators 7c33a67e7b Update: Translations from eints
galician: 30 changes by pvillaverde
danish: 6 changes by bscargo
2025-06-30 04:44:29 +00:00
translators 9bcf1cf29b Update: Translations from eints
korean: 8 changes by telk5093
polish: 3 changes by pAter-exe
2025-06-29 04:45:43 +00:00
Peter Nelson 4b6d409ee8 Codefix: Out-of-range cargo type passed to a string affected remaining parameters. (#14398)
When the string codes CARGO_TINY, CARGO_SHORT or CARGO_LONG encountered an out-of-range string, they did not read the extra amount parameter. This leads to later parameters being used in the wrong place.

Change the order of operation so that all parameters for these string codes are always read, even if the cargo type is not valid.
2025-06-28 21:50:36 +01:00
translators a37ad181ff Update: Translations from eints
dutch: 12 changes by Afoklala
polish: 12 changes by pAter-exe
2025-06-28 04:42:40 +00:00
Peter Nelson 20ed5be905 Codechange: Use FontSizeToName() instead of switch block. (#14395) 2025-06-27 20:38:39 +00:00
translators f41ad372a3 Update: Translations from eints
chinese (traditional): 1 change by KogentaSan
2025-06-27 04:42:22 +00:00
Peter Nelson bd2430dc94 Codechange: Use FlatSet to avoid trying to add variant parents multiple times. 2025-06-26 08:33:34 +01:00
Peter Nelson 1ddc03b916 Codechange: Give FlatSet insert() a return value.
This now returns an iterator, and whether an insert was performed.

Allows the caller to know if the item was already in the FlatSet without explicitly checking first.
2025-06-26 08:33:34 +01:00
translators 1ff12b6e74 Update: Translations from eints
english (au): 8 changes by krysclarke
chinese (traditional): 23 changes by KogentaSan
chinese (simplified): 12 changes by WenSimEHRP
greek: 8 changes by gh658804
russian: 6 changes by Ln-Wolf
finnish: 8 changes by hpiirai
portuguese: 9 changes by jcteotonio
portuguese (brazilian): 8 changes by pasantoro
2025-06-26 04:43:34 +00:00
Peter Nelson d5ebd20110 Fix 319caef58f: Buildings with non-zero subtile offsets broken in house picker. (#14390)
Partially reverts 319caef58f. Conversion of subtile position was originally correct.
2025-06-25 17:33:15 +00:00
translators b3c96a7785 Update: Translations from eints
english (au): 4 changes by krysclarke
norwegian (bokmal): 4 changes by eriksorngard
chinese (traditional): 4 changes by KogentaSan
korean: 4 changes by telk5093
greek: 4 changes by gh658804
hungarian: 4 changes by vargaviktor
russian: 4 changes by Ln-Wolf
finnish: 4 changes by hpiirai
portuguese: 4 changes by jcteotonio
portuguese (brazilian): 4 changes by pasantoro
2025-06-25 04:42:43 +00:00
Peter Nelson 8f01ae675e Revert 0853c1979b: Button to toggle showing advanced signal types (#9617) (#14219) 2025-06-24 20:18:08 +02:00
Peter Nelson a46a3a97f3 Change: New company face definition system and UI. (#14319)
Bits used by company faces are now defined by a variable system instead of being hardcoded, allowing future expansion.

The four face types covering gender and skin colour are now separate face styles with their own definitions.
2025-06-24 07:59:49 +01:00
translators ebc74c8905 Update: Translations from eints 2025-06-24 04:43:09 +00:00
Jonathan G Rennison e436b32468 Codechange: Remove now unused sprite cache memory error strings 2025-06-23 21:22:37 +01:00
Peter Nelson 7744f49a9e Change: Simplify sprite cache memory management
* Remove custom allocator
* Use std::unique_ptr for sprite data
* Perform LRU cache eviction in a single pass
2025-06-23 21:22:37 +01:00
Peter Nelson 1d67094863 Add: Buttons to change picker preview image height. (#14373)
Adjusted height is remembered per picker type, but not saved.
2025-06-23 08:24:49 +01:00
Peter Nelson 8901f9adca Fix #14361: Removing a badge filter did not clear it. (#14379) 2025-06-23 08:24:03 +01:00
translators c15568be5f Update: Translations from eints
ukrainian: 20 changes by StepanIvasyn
latvian: 13 changes by lexuslatvia
2025-06-22 04:43:50 +00:00
Patric Stout 3571f77d46 Codechange: typo in GoG's workflow (#14386) 2025-06-21 09:25:39 +00:00
dependabot[bot] 1b2a3b0cb1 Upgrade: Bump Apple-Actions/import-codesign-certs in the actions group (#13945)
Bumps the actions group with 1 update: [Apple-Actions/import-codesign-certs](https://github.com/apple-actions/import-codesign-certs).

Updates `Apple-Actions/import-codesign-certs` from 3 to 5
- [Release notes](https://github.com/apple-actions/import-codesign-certs/releases)
- [Commits](https://github.com/apple-actions/import-codesign-certs/compare/v3...v5)

---
updated-dependencies:
- dependency-name: Apple-Actions/import-codesign-certs
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-21 09:18:32 +00:00
Peter Nelson 5766ba51d7 Codefix: Clean up incorrect indentation for multi-line comments. (#14383) 2025-06-20 19:01:44 +01:00
translators a927925996 Update: Translations from eints
portuguese: 13 changes by jcteotonio
2025-06-20 04:42:53 +00:00
translators de6e420917 Update: Translations from eints
ukrainian: 11 changes by StepanIvasyn
portuguese: 18 changes by jcteotonio
2025-06-19 04:43:06 +00:00
Adam Zmuda 9238f508eb Fix #14081: Check if removed item is a savegame (#14371) 2025-06-18 10:05:18 +02:00
translators 7aa4e7fc58 Update: Translations from eints
ukrainian: 12 changes by StepanIvasyn
portuguese: 8 changes by jcteotonio
2025-06-18 04:43:22 +00:00
Peter Nelson c882ad5142 Fix: Allow object picker to resize if there are no classes. (#14372) 2025-06-17 19:04:34 +01:00
Peter Nelson e4cf6ca0ba Fix: Mis-sized widgets due to missing widget fill. (#14370)
In most places where we calculate and set widget resize step we neglect
to set widget fill step to match. Initial widget sizing uses fill step
instead of resize step, which means the initial size may not be a
multiple of the resize step as intended. In particular this will cause
WWT_MATRIX to be misrendered.

Whether or not this matters depends on the widget type being resized and
the window layout, however for consistency always set fill step to the
same as resize step when calculating.
2025-06-17 17:40:11 +01:00
Peter Nelson 4144865c73 Change: Tweak layout of music player widgets.
This removes some magic numbers and gets rid of spacers.
2025-06-17 08:54:08 +01:00
Peter Nelson 7ec78e94db Fix: Don't include height of blank text in frame and inset widgets. 2025-06-17 08:54:08 +01:00
translators dd826ea49c Update: Translations from eints
spanish: 13 changes by Unely
portuguese: 30 changes by jcteotonio
2025-06-17 04:41:57 +00:00
Peter Nelson 009b68caeb Codechange: Use toolbar minimal sizing with intro menu buttons. (#14368)
The intro menu buttons use toolbar icons, so use SetToolbarMinimalSize() on them for consistency.
2025-06-17 01:12:39 +01:00
Colin Caine 5f8e04457e Codechange: Use default OnHotkey handler for focusing editboxes (#14358) 2025-06-16 22:25:54 +02:00
Henry 56bc391763 Codechange: Remove manual memory management of AIScannerInfo::info_dummy (#14338)
Co-authored-by: Henry Wilson <henry@henryandlizzy.uk>
2025-06-16 10:30:22 +01:00
translators ea410cfe85 Update: Translations from eints
chinese (traditional): 4 changes by KogentaSan
chinese (simplified): 69 changes by WenSimEHRP
ukrainian: 57 changes by StepanIvasyn
portuguese: 35 changes by jcteotonio
2025-06-16 04:43:21 +00:00
Henry c71515e790 Codechange: Remove manual memory management from CountArticulatedParts (#14336)
Co-authored-by: Henry Wilson <henry@henryandlizzy.uk>
2025-06-15 21:38:00 +01:00
Peter Nelson cdd555edd5 Codechange: Use vector with unique_ptr instead of linked-list for base set lists. (#14332) 2025-06-15 21:32:29 +01:00
Michael Lutz e163aab892 Fix: Train path reservations on different railtypes could join leading to train crashes. (#14366)
This could happen if the compatibility between the railtypes was not symmetric. If for
example a reservation of a first train ended at a railtype transition with an already present
reservation on the other side, a reversing train could end up crashing with the first train.
2025-06-15 22:09:04 +02:00
translators 98b488f366 Update: Translations from eints
chinese (traditional): 3 changes by KogentaSan
chinese (simplified): 108 changes by WenSimEHRP
ukrainian: 21 changes by StepanIvasyn
dutch: 9 changes by Afoklala
portuguese: 177 changes by jcteotonio
2025-06-15 04:42:32 +00:00
Loïc Guilloux d0b56022d8 Fix #14362, 4b677e8256: Class with non static methods may have a default constructor (#14363) 2025-06-14 23:39:22 +02:00
Peter Nelson 1cd0391926 Fix #14356, ff7eb996e6: Incorrect sprite group chosen for stations and road stops. (#14359) 2025-06-14 13:38:45 +01:00
glx22 8e3acbfa84 Codechange: Deduplicate DefSQClass::DefSQ[Static]Method() 2025-06-14 12:41:39 +02:00
glx22 90e21bc713 Codechange: Remove useless SQConstruct parameters 2025-06-14 12:41:39 +02:00
glx22 4b677e8256 Codechange: Don't export default constructors 2025-06-14 12:41:39 +02:00
glx22 ccffbb4142 Codechange: Remove manual param count for constructors too 2025-06-14 12:41:39 +02:00
glx22 6d601e2eb1 Codechange: Use more descriptive variable names 2025-06-14 12:41:39 +02:00
translators a1786fa1f4 Update: Translations from eints
norwegian (bokmal): 13 changes by eriksorngard
ukrainian: 28 changes by StepanIvasyn
portuguese: 16 changes by jcteotonio
polish: 1 change by pAter-exe
2025-06-13 04:42:21 +00:00
Jonathan G Rennison d3e4e07daa Codechange: Remove ReferenceThroughBaseContainer 2025-06-12 18:50:49 +01:00
Jonathan G Rennison 63f1c2aa3a Codechange: Use TypedIndexContainer for typed index containers
Instead of ReferenceThroughBaseContainer
2025-06-12 18:50:49 +01:00
Jonathan G Rennison d0e49a297f Codechange: Add TypedIndexContainer adapter type
This is equivalent in functionality to ReferenceThroughBaseContainer,
except only for the correct index type, instead of any type matching
ConvertibleThroughBase.
The also serves to unambiguously document the index type at the
point of definition of the container.
2025-06-12 18:50:49 +01:00
Peter Nelson 401ebed03a Add: Show and sort online content version in list. (#14355) 2025-06-12 18:27:16 +01:00
translators b012d9e3dc Update: Translations from eints
danish: 18 changes by bscargo
portuguese: 23 changes by jcteotonio
2025-06-12 04:42:39 +00:00
Peter Nelson 28cc0079f2 Codechange: Create ScriptAllocator with make_unique instead of new. (#14340) 2025-06-11 23:28:08 +01:00
Peter Nelson b2d69ae606 Codechange: Use AutoRelease to simplify cleanup after FontConfig calls. (#14354) 2025-06-11 21:24:31 +01:00
Peter Nelson 9c16603da6 Codechange: Add AutoRelease helper to use function as unique_ptr deleter. (#14353)
This allows passing the function as a template parameter instead of requiring a custom deleter functor.
2025-06-11 20:13:49 +01:00
translators f8776b0a6f Update: Translations from eints
hungarian: 9 changes by vargaviktor
finnish: 13 changes by hpiirai
ukrainian: 1 change by imlystyi
tamil: 2 changes by merni-ns
lithuanian: 1 change by khamper
spanish: 22 changes by Unely
portuguese: 46 changes by jcteotonio
2025-06-11 04:42:30 +00:00
Peter Nelson f2318c35db Fix 0455627d16: Order backups were no longer created when selling vehicles. (#14352) 2025-06-10 18:03:05 +01:00
Peter Nelson c702e05517 Codechange: Replace C-casts for FontConfig with helper functions. (#14349)
Add `ToFcString()` and `FromFcString()` to remove C-style casts and make reinterpret_casts safer and clearer.
2025-06-10 17:11:22 +01:00
Peter Nelson 8f5ac84a3d Fix 20738865f0: Remove colour codes from Game Options strings. (#14348)
When merging the game options and settings windows, colour codes were removed from strings. This change didn't get propagated to all translations.
2025-06-10 17:10:57 +01:00
translators 8c90be8c9f Update: Translations from eints
english (au): 9 changes by krysclarke
spanish (mexican): 10 changes by absay
english (us): 9 changes by 2TallTyler
korean: 13 changes by telk5093
lithuanian: 3 changes by khamper
portuguese: 13 changes by jcteotonio
polish: 9 changes by pAter-exe
2025-06-10 04:42:12 +00:00
Peter Nelson 4f18c18735 Fix: Remove U+200C characters from Lithuanian translation. (#14347)
This character prevents OpenTTD Sans being used.
2025-06-09 11:53:31 +00:00
translators 3908df5fbe Update: Translations from eints
chinese (traditional): 9 changes by KogentaSan
greek: 9 changes by gh658804
russian: 9 changes by Ln-Wolf
portuguese (brazilian): 9 changes by pasantoro
2025-06-09 04:43:26 +00:00
SamuXarick ac8b236885 Fix: [Script] Make ScriptOrder functions aware of road waypoints (#13419) 2025-06-08 16:49:36 -04:00
SamuXarick 484f18f987 Codechange: Code style changes to AI/GS GUI files (#13665) 2025-06-08 16:48:36 -04:00
SamuXarick 893a75f2c0 Codechange: Iterate with VehiclesOnTile when attaching a just bought wagon to a locomotive (#14284) 2025-06-08 16:45:58 -04:00
Peter Nelson de660cba02 Change: Consistent toolbar sizes with dedicated NWidgetParts. (#14344)
Add SetToolbarSpacerMinimalSize() and SetToolbarMinimalSize() NWidgetParts and use to make toolbar button sizes consistent.
2025-06-08 18:13:47 +00:00
Peter Nelson 7c9c2aec49 Codechange: Use vehicle tile hash to search for free wagons. (#14343)
Avoids iterating the vehicle pool.
2025-06-08 19:07:43 +01:00
translators 4b18622c4e Update: Translations from eints
chinese (traditional): 4 changes by KogentaSan
english (us): 4 changes by 2TallTyler
french: 4 changes by ottdfevr
2025-06-08 04:43:18 +00:00
Peter Nelson 2f725d1e85 Add: Hover on graph legend to highlight line. 2025-06-07 15:50:25 +01:00
Peter Nelson 10841ea3fd Codechange: Add constant for common blink interval. 2025-06-07 15:50:25 +01:00
Peter Nelson ecafbf884e Add: Allow separate expansion of town buildings and roads in scenario editor. (#14341) 2025-06-07 13:56:43 +00:00
translators 6b5cde463a Update: Translations from eints
english (au): 4 changes by krysclarke
spanish (mexican): 3 changes by absay
greek: 4 changes by gh658804
hungarian: 4 changes by vargaviktor
russian: 5 changes by Ln-Wolf
dutch: 4 changes by Afoklala
portuguese (brazilian): 4 changes by pasantoro
polish: 4 changes by pAter-exe
2025-06-07 04:40:06 +00:00
Loïc Guilloux 9339b8270c Fix: Wrong error message about script Save() returned value (#14334) 2025-06-06 19:01:50 +02:00
Peter Nelson a6de925ba6 Fix #14333, 20d83677eb: Incorrect change from index to range iteration. (#14335) 2025-06-06 16:57:26 +00:00
glx22 938acbe6ef Add: [Script] Cloning ScriptList 2025-06-05 22:37:33 +02:00
glx22 7200e7f509 Add: [Script] Framework for cloning selected ScriptObject 2025-06-05 22:37:33 +02:00
Jonathan G Rennison 7dcc932d44 Fix: Drag drop line position when dragging NewGRF from file to active panel (#14316) 2025-06-05 14:09:51 -04:00
Peter Nelson 48764b0fed Add: Badge dropdown filters to picker window. 2025-06-05 17:55:24 +01:00
Peter Nelson 7b60e5ccad Add: Badge dropdown filters to build vehicle window. 2025-06-05 17:55:24 +01:00
Peter Nelson 25f1c97bea Change: Add badge dropdown filters and configuration. 2025-06-05 17:55:24 +01:00
Peter Nelson 308ce39747 Codechange: Add DropDownUnselectable component.
This component makes a drop down item unselectable, as it says on the tin.
2025-06-05 17:55:24 +01:00
Peter Nelson 82f5af7ecd Codechange: Allow all widget types to have a WidgetID index. 2025-06-05 17:55:24 +01:00
glx22 31fbb17c5b Codechange: Replace ScriptObject::[SG]etAllowDoCommand with ScriptObject::DisableDoCommandScope 2025-06-05 01:39:40 +02:00
glx22 4beb23af30 Codechange: TicToc can now accumulate and output every tick 2025-06-04 23:59:06 +02:00
glx22 fca75fd06a Codechange: Use brace counting to detect end of class in squirrel-exporter 2025-06-04 19:48:27 +02:00
glx22 6482e16564 Codechange: Deduplicate namespace opening in squirrel-exporter 2025-06-04 19:48:27 +02:00
glx22 e0d8158957 Codechange: Don't use literal tabs in squirrel-exporter 2025-06-04 19:48:27 +02:00
Owen Rudge b0dbe631b3 Codechange: [CI] Azure Code Signing has been rebranded 'Trusted Signing' 2025-06-04 09:16:18 +01:00
Peter Nelson 2e78c24ba3 Codefix: Use bitset .None() or .Any() instead of comparing against an empty bitset. (#14327) 2025-06-04 07:31:44 +01:00
translators 8f10f9fb5a Update: Translations from eints
finnish: 1 change by hpiirai
2025-06-04 04:43:00 +00:00
Peter Nelson 5bf31a431e Fix 4c8f1b0f81: Hidden-by-facility station signs were not ignored when handling clicks. (#14326) 2025-06-03 20:53:53 +00:00
Loïc Guilloux 9e8fc8da48 Fix: [Script] SQOpsLimiter had no effect for native valuator/filter (#14322) 2025-06-03 14:05:29 +02:00
Peter Nelson ea0b3983a5 Codechange: Deduplicate common parts of graph windows with cargo legends.
This unifies handling on the cargo selected to avoid having to rewrite it for every cargo graph window.
2025-06-02 17:40:39 +01:00
Peter Nelson 43d57a6b7e Codefix 5c45738613: Rename CompanyGraphWindow to BaseCompanyGraphWindow.
This makes it clearer that it isn't a final graph window.
2025-06-02 17:40:39 +01:00
translators 6d0dd90e20 Update: Translations from eints
korean: 2 changes by telk5093
portuguese: 2 changes by jcteotonio
2025-06-02 04:43:26 +00:00
Peter Nelson b7b2b57805 Fix bd1a3fe0b7: Crash if loading compatibility scripts fails. (#14318) 2025-05-31 19:59:23 +01:00
Peter Nelson 4ab48f34f5 Fix 5664b1e2f6: Upgrade button in NewGRF window no longer worked. (#14315) 2025-05-31 08:20:55 +00:00
translators 621c031307 Update: Translations from eints
dutch: 4 changes by Afoklala
2025-05-31 04:39:26 +00:00
Loïc Guilloux 2cd3c8db86 Codechange: [Script] Don't report multiple errors on valuator/filter failure (#14303) 2025-05-30 14:38:41 +02:00
translators 10c159a79f Update: Translations from eints
norwegian (bokmal): 4 changes by eriksorngard
korean: 4 changes by telk5093
2025-05-29 04:47:48 +00:00
Peter Nelson c233e5ee2c Codechange: Tweak layouts of graph windows to reduce spacers. 2025-05-28 18:40:33 +01:00
Peter Nelson 5c45738613 Codechange: Improve inheritance of graph windows.
BaseGraphWindow contains parts that are only relevant to company-series data -- these are moved to a separate class.
2025-05-28 18:40:33 +01:00
translators 3aca5d62a8 Update: Translations from eints
spanish (mexican): 4 changes by absay
chinese (simplified): 4 changes by WenSimEHRP
hungarian: 5 changes by vargaviktor
french: 27 changes by glx22
polish: 4 changes by pAter-exe
2025-05-28 04:47:09 +00:00
Peter Nelson 7c9393e822 Codechange: Remove terminator from airport tile lists. (#14306) 2025-05-27 20:23:59 +01:00
translators 808af15975 Update: Translations from eints
english (au): 4 changes by krysclarke
chinese (traditional): 5 changes by KogentaSan
english (us): 5 changes by 2TallTyler
greek: 4 changes by gh658804
russian: 4 changes by Ln-Wolf
finnish: 4 changes by hpiirai
latvian: 6 changes by lexuslatvia
portuguese: 4 changes by jcteotonio
portuguese (brazilian): 4 changes by pasantoro
2025-05-27 04:48:27 +00:00
Peter Nelson e2d066e5d3 Codefix: Effect vehicles don't use v->tile, so shouldn't be in the vehicle tile hash. (#14302) 2025-05-26 21:45:46 +01:00
translators e23a591a1e Update: Translations from eints
galician: 10 changes by pvillaverde
turkish: 20 changes by BeratSJ
latvian: 2 changes by lexuslatvia
2025-05-26 04:49:25 +00:00
Peter Nelson b042e7a439 Codefix: Prefer static inline const keyword order. (#14301) 2025-05-25 20:32:56 +01:00
Peter Nelson 948ceb3b17 Add: Button to configure badges in build picker window. 2025-05-25 09:13:05 +01:00
Peter Nelson f28dc3cca4 Add: Button to configure badges in build vehicle window. 2025-05-25 09:13:05 +01:00
Peter Nelson c2d4098afa Add: Configuration of NewGRF badges. 2025-05-25 09:13:05 +01:00
Peter Nelson daef052329 Add: Generic "configure list/view" vertical ellipsis icon. 2025-05-25 09:13:05 +01:00
Peter Nelson 29970fb496 Codechange: Add DropDownToggle component. 2025-05-25 09:13:05 +01:00
Peter Nelson 6e90b828c6 Codechange: Add CentreTo Rect method. 2025-05-25 09:13:05 +01:00
Peter Nelson c213218b66 Codechange: Pass click state to Dropdown Draw() function.
This allows drawing to change depending on last click position.
2025-05-25 09:13:05 +01:00
Peter Nelson 984d864c72 Codechange: Add OnClick handler for dropdown items.
This allows each dropdown item to indicate if something different should happen depending on where in the item was clicked.
2025-05-25 09:13:05 +01:00
Peter Nelson 04e07dff84 Codechange: Add Up/Down buttons, to fit in with the settings-button style. 2025-05-25 09:13:05 +01:00
translators b82e32c360 Update: Translations from eints
norwegian (bokmal): 1 change by eriksorngard
spanish (mexican): 1 change by absay
chinese (simplified): 1 change by WenSimEHRP
korean: 1 change by telk5093
danish: 68 changes by bscargo
2025-05-25 04:48:20 +00:00
Loïc Guilloux 5e765a2787 Codechange: [CMake] Use ".sq.hpp" instead of ".hpp.sq" for API exports (#14297) 2025-05-24 22:38:37 +02:00
Kuhnovic 34c0b09764 Codechange: Removed T prefix from water region related types. (#14290) 2025-05-24 18:12:16 +02:00
Loïc Guilloux fea120a710 Fix #14295, 0455627d16: v->cur_implicit_order_index is never INVALID_VEH_ORDER_ID (#14296) 2025-05-24 13:53:51 +00:00
translators c366e6a48e Update: Translations from eints
chinese (simplified): 1 change by WenSimEHRP
dutch: 1 change by Afoklala
2025-05-24 04:44:57 +00:00
Peter Nelson b42abfbefc Fix 0455627d16: Incorrect script order position mapping. (#14294) 2025-05-23 19:55:22 +01:00
Kuhnovic 180ec6505b Codechange: Use strong types for water regions. (#14289) 2025-05-23 20:54:42 +02:00
Peter Nelson 0455627d16 Codechange: Move ownership of Orders to OrderList. (#13948)
Removes the orders pool, and orders are now stored directly in each OrderList.

Iterating orders now no longer needs to traverse a linked-list, all orders in an OrderList are sequential.
2025-05-23 10:36:28 +01:00
Peter Nelson 7344dfe651 Change: Reflow Textfile window content incrementally.
This avoids a stall when reflowing a long text file with some truetype fonts.
2025-05-23 07:42:10 +01:00
Peter Nelson 46b745a06a Codechange: Use a helper method to test if text file window is wrapped. 2025-05-23 07:42:10 +01:00
Peter Nelson 940071a5f2 Codechange: Add alternating iterator to take elements from middle of range. 2025-05-23 07:42:10 +01:00
Peter Nelson 780c26237f Codechange: Add OnScrollbarScroll window event, called when a scrollbar position changes. 2025-05-23 07:42:10 +01:00
translators 321f7e8683 Update: Translations from eints
swedish: 3 changes by joeax910
2025-05-23 04:45:57 +00:00
Peter Nelson 1064309ecf Change: Don't measure group name widths in company livery window. (#14291)
Measuring the name width did not also take account of indentation levels so didn't prevent cropping, and the window can be resized anyway.

This avoids a potential bottleneck due to layouting group names if there are a lot of groups present.
2025-05-22 22:57:50 +01:00
SamuXarick 5fef32bde7 Change: [Script] Move GSStation::GetOwner to GSBaseStation::GetOwner (#13406)
* Add: [Script] GSBaseStation::GetOwner

Added method for Game Scripts to retrieve the owner of a basestation.

* Cleanup: [Script] Remove ScriptStation::GetOwner

Due to class inheritance, GSStation::GetOwner and GSWaypoint::GetOwner can both reach GetOwner defined at GSBaseStation.
2025-05-22 13:47:04 +02:00
translators 467f832c2f Update: Translations from eints
english (au): 1 change by krysclarke
chinese (traditional): 10 changes by KogentaSan
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
latvian: 1 change by lexuslatvia
portuguese: 1 change by jcteotonio
portuguese (brazilian): 1 change by pasantoro
polish: 10 changes by pAter-exe
2025-05-22 04:47:11 +00:00
Peter Nelson 5fe6578f64 Codechange: Improve performance of exclusive preview engine test. (#14270)
Check group statistics to test if a company has built an exclusive preview engine.

This improves performance by avoiding iterating the vehicle pool.
2025-05-21 21:19:38 +01:00
Peter Nelson 9f190aa534 Codechange: Use group's children list to improve performance of group UI. 2025-05-21 19:50:07 +01:00
Peter Nelson 000a79c093 Codechange: Improve performance of evaluating group hierarchy.
Store a list of child groups in each group, to avoid having to iterate the group pool to find its children.
2025-05-21 19:50:07 +01:00
SamuXarick 8f3f25de4b Codefix: Missing 'this->' in VehiclesNearTileXY::Iterator::Iterator (#14288) 2025-05-21 20:28:47 +02:00
Peter Nelson 1d8db2223f Fix #14234, 5aa4ad5135: Crash due to unexpected NUL char in string. (#14235)
Gracefully handle an unexpected NUL character in non-debug builds.
2025-05-21 18:47:04 +01:00
translators 82876c25e0 Update: Translations from eints 2025-05-21 04:46:46 +00:00
Peter Nelson a2addf0fe7 Fix: Clear rail vehicle flipped flag if reverse probability callback returns false. (#14281)
This now distinguishes between not-flipped and callback not implemented.
2025-05-20 23:03:55 +01:00
Peter Nelson acf594a7b7 Fix #14271, 7fd0e6c27d: Crash due to incorrect parameter index in string. (#14272) 2025-05-20 23:03:27 +01:00
Loïc Guilloux 4b1b2a4310 Change: [Script] Don't allow scripts to instantiate ScriptEvent (#14276) 2025-05-20 15:37:05 +02:00
frosch 2926179d02 Fix: Restore the behaviour when entering numbers in query windows: clamp integers out of range to the maximum valid value. 2025-05-20 12:57:30 +02:00
frosch c1389c77b2 Codechange: ParseInteger optionally clamps out-of-range values, instead of treating them as invalid. 2025-05-20 12:57:30 +02:00
translators ecadf1b322 Update: Translations from eints
hungarian: 4 changes by meskobalazs
2025-05-20 04:46:13 +00:00
Peter Nelson ce83f583bc Codechange: Use EnumBitSet for VehicleRailFlags. (#14280) 2025-05-19 18:56:45 +01:00
Peter Nelson 77d6f6c69f Codechange: Make ContentType::State an enum class. (#14279) 2025-05-19 17:11:28 +01:00
SamuXarick ad3a34e9ef Add: [Script] ScriptVehicleList_Waypoint (#13456)
Creates a list of vehicles that have orders to a given waypoint.
2025-05-19 14:48:17 +02:00
Loïc Guilloux 1b0fd0e6fd Fix b2c57123: [Script] Conversion from ScriptEvent to ScriptEventCompanyTown subclasses (#14274) 2025-05-18 15:40:47 +02:00
translators 9bbc525e53 Update: Translations from eints
catalan: 17 changes by J0anJosep
2025-05-18 04:50:09 +00:00
Peter Nelson 940a7127f8 Fix f8bdc1e612: Empty first parameter of EncodedString was skipped. (#14273)
This would place the remaining parameters one position too early.
2025-05-17 22:55:48 +00:00
translators 617169c1c9 Update: Translations from eints
norwegian (bokmal): 2 changes by eriksorngard
english (us): 9 changes by 2TallTyler
romanian: 3 changes by The-Bober
dutch: 2 changes by Afoklala
2025-05-17 04:44:32 +00:00
translators 521d0465d9 Update: Translations from eints
korean: 2 changes by telk5093
hungarian: 26 changes by meskobalazs
2025-05-16 04:47:27 +00:00
translators 6c84dd1f32 Update: Translations from eints
persian: 371 changes by realsepehrz
romanian: 49 changes by The-Bober
portuguese: 2 changes by azulcosta
2025-05-15 04:46:38 +00:00
Peter Nelson c8a336f760 Codechange: Move GetNthSetBit() to BaseBitSet.
This now returns the correct type, or std::nullopt instead of -1.
2025-05-14 07:22:12 +01:00
Peter Nelson c50ee282f9 Codechange: EnumBitSet bits can be iterated directly. 2025-05-14 07:22:12 +01:00
Peter Nelson 66c16a1d1f Codechange: Add Count() method to BaseBitSet. 2025-05-14 07:22:12 +01:00
translators ecc3438519 Update: Translations from eints
polish: 2 changes by pAter-exe
2025-05-14 04:46:05 +00:00
Loïc Guilloux c16d5f3a8d Change: [Script] ScriptVehicleList_Station accepts an optional VehicleType parameter (#14260) 2025-05-13 16:41:23 +02:00
Peter Nelson 87fa1e41d5 Codechange: Use std::byte for sound buffers. 2025-05-13 14:51:17 +01:00
Peter Nelson 5585363407 Codechange: Use std::byte for glyph sprite buffer. 2025-05-13 14:51:17 +01:00
translators c718858999 Update: Translations from eints
english (au): 2 changes by krysclarke
chinese (traditional): 2 changes by KogentaSan
spanish (mexican): 2 changes by absay
chinese (simplified): 11 changes by WenSimEHRP
greek: 2 changes by gh658804
hungarian: 2 changes by vargaviktor
persian: 17 changes by realsepehrz
russian: 2 changes by lexuslatvia
finnish: 4 changes by hpiirai
latvian: 2 changes by lexuslatvia
portuguese (brazilian): 2 changes by pasantoro
2025-05-13 04:47:36 +00:00
Peter Nelson 156f98ba06 Fix #14256, dfd9fbf873: Company finance windows not updated when paused. (#14258)
Refresh company finance windows via a WindowTimer instead of in game loop.

As the invalidation affects multiple windows this is a global timer instead of window-specific.
2025-05-13 01:23:27 +01:00
Peter Nelson bc778545b3 Fix 0829604b4f: Dragging of selected order was still not possible. (#14259)
Check click_count condition earlier so that drag and drop is activated.
2025-05-13 01:22:58 +01:00
Peter Nelson 431e57d087 Fix 0ce30d05c8: Replacing a dropdown list could reposition it partially off-screen. (#14261) 2025-05-13 01:22:45 +01:00
Peter Nelson d37d4c18b5 Change: Remove Apply button from NewGRF config window when unneeded. (#14254)
When configuring NewGRFs outside of a game, the changes are always applied when the window is closed, even if the Apply button is not used.

The Apply button only needs appear during a game when changes are not automatically applied.
2025-05-13 01:22:23 +01:00
Jonathan G Rennison d107b7c8c0 Fix 3cf9b159: Incorrect tile colour in smallmap for snowy MP_CLEAR tiles in vegetation mode
See: #13659
2025-05-12 19:04:43 +02:00
Peter Nelson d9247fa1a0 Change: Remove extra close buttons from some windows. (#14124)
All windows have an X button to close it, so remove the redundant close buttons.
2025-05-12 14:54:44 +01:00
frosch a62081d79e Fix #14251: Out-of-bounds writes via TextRefStack. (#14255) 2025-05-12 13:59:33 +02:00
Peter Nelson 0aacd7acb3 Codechange: Use GrfSpecFeature type instead of uint8_t. (#14253) 2025-05-12 08:44:39 +01:00
translators 2516c435b7 Update: Translations from eints
swedish: 9 changes by joeax910
2025-05-12 04:47:40 +00:00
Rubidium 568b70e556 Codechange: replace memmove with std::move(_backwards) 2025-05-11 21:51:57 +02:00
Rubidium 3cd040ffe9 Codechange: unify moving of pixels in the blitters 2025-05-11 21:51:57 +02:00
Peter Nelson b38527ca05 Change: Move OpenTTD version to intro viewport. (#14233)
This stops the length of the game version from affecting the main menu.
2025-05-11 20:01:22 +01:00
Rubidium 03116ea878 Codechange: remove now unused cpp_sizeof 2025-05-11 13:48:23 +02:00
Rubidium 02d8ae018c Codechange: simplify getting the value of a NewGRF property 2025-05-11 13:48:23 +02:00
Rubidium f2b48bad79 Codechange: remove last (hidden) users of memset 2025-05-11 06:07:01 +02:00
frosch c037722cb5 Fix 51a7edd: NewGRF debug sprite picker was broken. (#14246) 2025-05-10 20:27:43 +02:00
Rubidium a48a5f0cc6 Codechange: replace memcpy with std::copy_n 2025-05-10 16:50:58 +02:00
Loïc Guilloux a45f23686d Fix #14241, 6e10584: Invalid string parameters in subsidies list window (#14243) 2025-05-09 18:08:17 +02:00
Rubidium f8aceb6c37 Codechange: use value initialisation over memset 2025-05-09 17:20:41 +02:00
Rubidium 7981fcb297 Codechange: use std::fill_n over memset 2025-05-09 17:20:41 +02:00
Rubidium 92bd78dd25 Codechange: use std::ranges::fill over memset 2025-05-09 17:20:41 +02:00
Rubidium 96873dee63 Codechange: use std::array.fill over memset 2025-05-09 17:20:41 +02:00
frosch 228f9ca941 Fix #13854: 40bpp-anim blitter recolouring failed for 32bpp pixels without mask channel. (#14242) 2025-05-09 17:16:29 +02:00
frosch a277cb2b4c Change: [NewGRF] Increase the textstack for all callbacks to 16 registers. 2025-05-09 12:39:11 +02:00
frosch c6fa5022cb Add: [NewGRF] All callbacks returning D0xx strings, have now the option to return any string id via register 0x100. 2025-05-09 12:39:11 +02:00
frosch 84bc78fd8f Add: [NewGRF] Special value 0x7FFE for VarAction2 results specifying 'return calculated result'. 2025-05-09 12:38:58 +02:00
frosch 9d32087236 Add: [NewGRF] Special value 0x7FFF for Action2 references specifying explicit 'callback/sprite-resolving failed'. 2025-05-09 12:38:58 +02:00
translators b1cdf5024f Update: Translations from eints
spanish (mexican): 7 changes by absay
2025-05-09 04:46:47 +00:00
Peter Nelson ae1f469aac Fix #14234, 16b4e73: Skip PLURAL data if parameter is invalid. (#14236) 2025-05-08 09:06:56 +01:00
glx22 1d18b4a80b Codechange: remove core/mem_func.hpp 2025-05-08 09:33:18 +02:00
glx22 aba5e1258e Codechange: use assignment over MemCpyT 2025-05-08 09:33:18 +02:00
glx22 6356311fbc Codechange: use std::copy_n over MemCpyT 2025-05-08 09:33:18 +02:00
glx22 a013f81120 Codechange: use std::array's fill over memset 2025-05-08 09:33:18 +02:00
glx22 82244779eb Codechange: use C++ initialisation over MemSetT 2025-05-08 09:33:18 +02:00
translators 6680169251 Update: Translations from eints 2025-05-08 04:46:44 +00:00
Peter Nelson 2feba80fd7 Codechange: Codestyle fixes for elrail code. 2025-05-07 20:34:33 +01:00
Peter Nelson 4a8dd494ee Codechange: Don't abbreviate TileLocationGroup type name. 2025-05-07 20:34:33 +01:00
frosch d00196cd65 Change: Rearrange buttons in the intro screen, remove unnecessary ones. 2025-05-07 18:41:48 +02:00
frosch 4111ce2698 Add: WWT_IMGTEXTBTN, WWT_PUSHIMGTEXTBTN 2025-05-07 18:41:48 +02:00
Peter Nelson a7019b859c Codechange: Use DiagDirections when checking for flat buildable tiles. 2025-05-07 17:31:29 +01:00
Peter Nelson aa9e5b38cd Codechange: Use DiagDirections when drawing level crossings. 2025-05-07 17:31:29 +01:00
Peter Nelson 1ac9f24f38 Codechange: Use (Diag)Directions when drawing catenary. 2025-05-07 17:31:29 +01:00
Peter Nelson 87544eff0c Codechange: Use DiagDirections to collect rail fence data. 2025-05-07 17:31:29 +01:00
Peter Nelson 1cbc4da054 Codechange: Use Directions for water flooding data. 2025-05-07 17:31:29 +01:00
Peter Nelson 968bb8961e Codechange: Add Directions and DiagDirections EnumBitSets. 2025-05-07 17:31:29 +01:00
Peter Nelson e0dbbbb032 Codechange: Add Reset() and missing &=/|= operators for BaseBitSet. 2025-05-07 17:31:29 +01:00
Peter Nelson c4d033967b Codechange: Remove some unnecessary includes from network files. (#14226) 2025-05-07 16:46:14 +01:00
frosch 22fedca77e Codechange: Integrate ResolverObject::ResetState() into DoResolve(), no need to call it manually. 2025-05-06 22:24:41 +02:00
frosch f8c928ed98 Codechange: Make temporary storage a member of ResolverObject. 2025-05-06 22:24:41 +02:00
frosch eb9bbb2456 Codechange: Remove direct access to temporary storage from TextRefStack. 2025-05-06 22:24:41 +02:00
frosch 6faa667644 Codechange: Remove global GetRegister(), instead return 100+ registers directly from GetXxxCallback(). 2025-05-06 22:24:41 +02:00
frosch f59cf73b88 Codechange: Access temporary storage through ResolverObject during sprite layout preprocessing. 2025-05-06 22:24:41 +02:00
frosch 85be7a4d92 Codechange: Access temporary storage through ResolverObject during Resolve. 2025-05-06 22:24:41 +02:00
frosch 99d7a775ad Codechange: Make GetRegister return a signed integer, matching the underlying TemporaryStorageArray. 2025-05-06 22:24:41 +02:00
frosch 74030a63e6 Codechange: Move SpriteLayoutProcessor's operations closer to the ResolverObject. 2025-05-06 22:24:41 +02:00
Rubidium 0ffdc86a2c Codechange: use std::ranges::equal over memcmp 2025-05-06 21:29:21 +02:00
Rubidium 89deb3876f Codechange: use fstream to compare file equality 2025-05-06 21:29:21 +02:00
frosch cd7ac64f9d Codefix: Fix compilation with DEBUG_DUMP_COMMANDS. (#14228) 2025-05-06 21:11:30 +02:00
frosch 592cc49b62 Codechange: Turn _grow_town_result into a local variable in GrowTownAtRoad. 2025-05-06 20:58:17 +02:00
frosch 5af877d12d Codechange: Do not assign _grow_town_result in GrowTownInTile, instead return the new value. 2025-05-06 20:58:17 +02:00
frosch 22af391064 Codechange: Move _grow_town_result out of GrowTownWithExtraHouse, GrowTownWithRoad, GrowTownWithBridge and GrowTownWithTunnel. 2025-05-06 20:58:17 +02:00
Rubidium d70aeb72a7 Codechange: C++ initialise LanguageHeaderPack 2025-05-06 20:03:35 +02:00
Rubidium 8f1e94c546 Codechange: use C++ initialisation over MemSetT 2025-05-06 20:03:35 +02:00
Rubidium cc51b29234 Codechange: use std::fill_n/copy_n over MemSetT/MemCpyT 2025-05-06 20:03:35 +02:00
Rubidium 0d922c9d62 Codechange: use std::array's fill over memset 2025-05-06 20:03:35 +02:00
Rubidium 4c1cd4fe4c Codefix: remove unused mem_func includes 2025-05-06 20:03:35 +02:00
Peter Nelson 9735fbbaa1 Codechange: Use LRUCache for layouted LineCache.
This avoids needing to manually manage the size of the cache.
2025-05-06 18:09:00 +01:00
Peter Nelson 8c4f8af66e Codechange: Move std::unique_ptr out of LRUCache implementation.
This is an implementation detail of how OpenGLSprites are stored.
2025-05-06 18:09:00 +01:00
frosch 8bbfbd0347 Codechange: Move spritelayout preprocessing to a separate class, which owns the heap allocations involved. 2025-05-06 18:30:42 +02:00
frosch d9c43e7fda Codechange: Make TileLayoutSpriteGroup::ProcessRegisters return a DrawTileSpriteSpan on the stack, instead of a reference to a global. 2025-05-06 18:30:42 +02:00
frosch 51a7edd941 Codechange: Remove _input_events_this_tick. 2025-05-06 18:29:41 +02:00
frosch 42f9312f71 Codechange: Make station variable cache a member of StationScopeResolver. 2025-05-06 18:29:41 +02:00
frosch b20b6da937 Codechange: The compiler ensures static variables are initialised only once, no need to track that manually. 2025-05-06 18:29:41 +02:00
frosch 75a775e59d Codechange: Make GetCurrentLocale return a std::string instead of a reference to a static buffer.
For win32 this is even a fix, because the static buffer was only updated once. Later calls discarded the determined locale.
2025-05-06 18:29:41 +02:00
frosch 0d5b3ebd7f Codechange: Declare all IntervalTimers const, which can be const. 2025-05-06 18:29:41 +02:00
frosch 61cec33be2 Codechange: Add 'const' to static variables, which are only initialised once. 2025-05-06 18:29:41 +02:00
frosch 1900125c98 Codechange: Use string_view for FileExists. 2025-05-06 18:29:41 +02:00
Peter Nelson d571491405 Codechange: Replace std::bitset<CONTENT_TYPE_END> with ContentTypes. (#14223)
#14214 added `ContentTypes` as en `EnumBitSet`, but some std::bitset existed already; they are now `ContentTypes` too.
2025-05-06 17:20:01 +01:00
translators eca826b0a4 Update: Translations from eints
korean: 7 changes by telk5093
hungarian: 3 changes by vargaviktor
latvian: 3 changes by lexuslatvia
polish: 6 changes by pAter-exe
2025-05-06 04:46:37 +00:00
frosch 13349254ea Fix #14216, d030d17: RealSpriteGroups referencing CallbackResultSpriteGroups were always treated as callback-failure. (#14218) 2025-05-05 16:13:41 +02:00
Peter Nelson e23de03a99 Codechange: Use FlatSet for sprite picker list. 2025-05-05 14:00:38 +01:00
Peter Nelson b06273f716 Codechange: Use FlatSet when searching tiles around stations. 2025-05-05 14:00:38 +01:00
Peter Nelson 7679b0bc46 Codechange: Use FlatSet when filtering and drawing badge names. 2025-05-05 14:00:38 +01:00
Peter Nelson 5fd7344a6d Codechange: Use FlatSet when creating rivers. 2025-05-05 14:00:38 +01:00
Peter Nelson 7c834921b2 Codechange: Use FlatSet for per-industry type industry lists. 2025-05-05 14:00:38 +01:00
Peter Nelson 6070f8d4f3 Codechange: Add FlatSet implementation.
This is a flat set implemented using a sorted vector for storage.
2025-05-05 14:00:38 +01:00
Peter Nelson 2355d67e11 Codechange: Use EnumBitSet instead of Vector to record received content types. (#14214) 2025-05-05 08:55:34 +01:00
translators a46b885640 Update: Translations from eints
english (au): 1 change by krysclarke
russian: 2 changes by Ln-Wolf
2025-05-05 04:47:18 +00:00
Peter Nelson d7563096c6 Doc: Tweak documentation for consistency. (#14211)
* Remove/add line breaks so spacing is the same.
* Fix ToC links.
2025-05-04 20:16:29 +01:00
Peter Nelson ac76212b80 Fix: Closing the Game Options window closes all textfile windows.
Record the parent window that opens a textfile window so only child windows are closed instead of all.
2025-05-04 19:36:46 +01:00
Peter Nelson dabf2ede67 Change: Add methods to close child windows with a specific window number. 2025-05-04 19:36:46 +01:00
Rubidium 0724b3cda8 Codechange: replace SQChar with char 2025-05-04 16:59:06 +02:00
Rubidium 1f411f8a16 Codechange: use string_view for squirrel parameter checks 2025-05-04 16:59:06 +02:00
Rubidium 588b0de3de Codechange: hide SQString internals behind std::string_view/std::span 2025-05-04 16:59:06 +02:00
Rubidium 635ca3739f Codechange: use std::string_view in squirrel lexer 2025-05-04 16:59:06 +02:00
Rubidium 4255a94779 Codechange: use std::span over char* for writing the buffers 2025-05-04 15:32:52 +02:00
Rubidium 6817f52d9b Codechange: move definition of getcwd for Windows to where it is used 2025-05-04 15:32:52 +02:00
Rubidium 6189bbc45a Codechange: return std::string_view for convert_from_fs 2025-05-04 15:32:52 +02:00
Rubidium 6caa08098c Codechange: remove char* StringConsumer 2025-05-04 15:32:52 +02:00
Peter Nelson 3e608b5fe4 Fix: Zoom-scroll extra viewports only if the mouse cursor is over the viewport. (#14209) 2025-05-04 14:16:05 +01:00
Rubidium afc1e76575 Codefix: StartNewThread uses char* after returning 2025-05-04 14:05:15 +02:00
Rubidium 8f74c08ea6 Codechange: put SQRegFunctions into initializer_list and use ranged for loops 2025-05-04 14:05:05 +02:00
Rubidium f4fc8f6b38 Codechange: replace Error with simple throw 2025-05-04 14:05:05 +02:00
Rubidium 9d8a612bfb Codechange: remove unused function 2025-05-04 10:43:56 +02:00
Rubidium 5e3c7c4146 Codechange: char* -> char * 2025-05-04 10:43:56 +02:00
Rubidium 3f2b39e3f8 Codechange: replace char* where out-of-date 2025-05-04 10:43:56 +02:00
Rubidium d697280493 Codechange: remove now obsolete char* tests
The function is std::string_view and there are std::string_view tests as well.
2025-05-04 10:43:56 +02:00
Rubidium d01bebbd18 Codefix 26a4da9b01: MinGW compilation failure 2025-05-04 09:07:02 +02:00
translators 7d7a6bd32c Update: Translations from eints
norwegian (bokmal): 3 changes by eriksorngard
2025-05-04 04:46:05 +00:00
frosch 8571af9833 Codechange: Turn ZoomLevel into enum class. 2025-05-03 23:21:09 +02:00
frosch c0d4ab69d0 Codechange: Add a container to index data by zoom level. 2025-05-03 23:21:09 +02:00
frosch 7055ea0aee Codechange: Define sequential operators for ZoomLevel. 2025-05-03 23:21:09 +02:00
frosch bbfda39ac3 Codechange: Add ZoomLevels bit set. 2025-05-03 23:21:09 +02:00
frosch 48d09af039 Codechange: Simplify weird range check. 2025-05-03 23:21:09 +02:00
Rubidium d464961c41 Codechange: use std::string_view for SQ stack and function info 2025-05-03 23:02:09 +02:00
Rubidium 0bc773215e Codechange: use std::optional<std::string_view> to make the intent of function clearer 2025-05-03 23:02:09 +02:00
Rubidium ead3b96883 Codechange: use std::string_view to create SQString 2025-05-03 23:02:09 +02:00
Rubidium fca99967a7 Codechange: make sq_scratchpad use std::span<char> 2025-05-03 23:02:09 +02:00
Rubidium b4d9682f21 Codechange: use std::string_view for sq_throwerror 2025-05-03 23:02:09 +02:00
Rubidium ec79ceb2be Codechange: use std::string_view for sq_pushstring 2025-05-03 23:02:09 +02:00
Rubidium 3020e615a9 Codechange: use std::string_view for squirrel compilation 2025-05-03 23:02:09 +02:00
Rubidium 26a4da9b01 Codechange: replace last strncmp uses 2025-05-03 21:51:01 +02:00
Peter Nelson 31754a0afd Fix: Changing monospace font didn't refresh the monospace width cache. (#14185) 2025-05-03 18:34:45 +01:00
Peter Nelson 7596f98e2d Codechange: Cache layouted text for the last used width. (#14177) 2025-05-03 18:33:47 +01:00
Peter Nelson bd1a3fe0b7 Change: Remove the limit of 20 parameters to a Script Text string. (#14193) 2025-05-03 18:33:29 +01:00
frosch 518a34c286 Codechange: Use std::byte for generic buffers. 2025-05-03 18:43:20 +02:00
frosch 02082a0211 Codechange: Deduplicate array lookup. 2025-05-03 18:43:20 +02:00
frosch bb767608de Codechange: Pass SpriteType as direct parameter to SpriteEncoder::Encoder. 2025-05-03 18:43:20 +02:00
frosch c3aa3f140c Codechange: Use more std::string_view. (#14197) 2025-05-03 18:40:37 +02:00
frosch 74a275f37b Add: [NewGRF] Add purchase list Action3 CID for houses, industries, industry tiles, airports and airport tiles. (#14121) 2025-05-03 17:50:20 +02:00
frosch 9ac9798d7f Codechange: Remove usages of stoi and stol. (#14196) 2025-05-03 17:46:30 +02:00
Rubidium b6afd8d2b6 Codechange: remove some completely unused squirrel files 2025-05-03 17:14:10 +02:00
Rubidium 85f1110569 Codechange: rewrite ini file parsing with the StringConsumer 2025-05-03 17:13:33 +02:00
Rubidium 6a9f694158 Codechange: remove StrEmpty 2025-05-03 15:58:14 +02:00
Rubidium d037dbb42a Codechange: use std::string_view for locales 2025-05-03 15:58:14 +02:00
Rubidium 96fd291693 Codechange: introduce GetEnv that returns optional based on std::getenv 2025-05-03 15:58:14 +02:00
Rubidium 04a6a55e94 Codechange: replace StripTrailingWhitespace with StrTrimView 2025-05-03 15:57:53 +02:00
Rubidium 1f39d469ff Codechange: pass the characters to trim to StrTrimView 2025-05-03 15:57:53 +02:00
Rubidium e2db8277b8 Codefix: implement StrTrimInPlace without assigning a borrowed view of itself 2025-05-03 15:57:53 +02:00
Rubidium 4109b6848b Codechange: replace manual trim and std::from_chars with ParseInteger 2025-05-03 15:57:53 +02:00
Rubidium 414f6a3067 Codechange: add support for parsing octal numbers 2025-05-03 15:57:53 +02:00
Rubidium c79abc6da6 Codechange: reduce dependence on C-style strings in OpenGL 2025-05-03 14:24:49 +02:00
Rubidium 278aee2c19 Codechange: use std::string_view for sq_getstring 2025-05-03 14:24:28 +02:00
translators f4f05dea33 Update: Translations from eints
chinese (traditional): 1 change by KogentaSan
chinese (simplified): 1 change by WenSimEHRP
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
dutch: 8 changes by Afoklala
portuguese: 3 changes by jcteotonio
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by pAter-exe
2025-05-03 04:45:31 +00:00
Peter Nelson 8b14faaa40 Codechange: Add version of DrawStringMultiLine that performs clipping test. (#14189)
Normally DrawStringMultiLine does not perform any clipping, as the return value may be needed if it the text is not drawn.

In some specific cases the height is already known, so it is possible to test for clipping, which can cut down on layouting time for text which won't be visible.
2025-05-02 22:59:55 +01:00
Iris-Persephone 2f020abe74 Add: "Many random towns" button in scenario editor now prompts for the number of towns, with defaults based on new game settings (#14158) 2025-05-02 22:54:21 +01:00
Peter Nelson 3eba97f67c Codechange: Scrollbar Count no longer needs to be clamped to uint16_t. (#14184) 2025-05-02 22:21:05 +01:00
Peter Nelson f7db4938ce Fix #14098: Use 64-bit type for MIDI realtime information. (#14144) 2025-05-02 22:20:44 +01:00
Rubidium c420ba349d Codechange: use std::string_view over char* 2025-05-02 23:12:43 +02:00
Rubidium f2a32c6d13 Codechange: use std::byte instead of char for calculating arbitrary byte offsets 2025-05-02 23:12:43 +02:00
Peter Nelson 932dca927b Fix: Crash/Undefined behaviour in station view window. (#14183)
No column limit was applied when drawing waiting cargo, which could cause out-of-bounds array access.
2025-05-02 08:02:35 +01:00
translators e0a9c7d818 Update: Translations from eints
english (au): 2 changes by krysclarke
chinese (traditional): 3 changes by KogentaSan
chinese (simplified): 6 changes by WenSimEHRP
greek: 2 changes by gh658804
russian: 2 changes by Ln-Wolf
finnish: 3 changes by hpiirai
portuguese (brazilian): 2 changes by pasantoro
polish: 2 changes by pAter-exe
2025-05-02 04:45:34 +00:00
Peter Nelson ae9646eb0a Change: Use same padding as NewGRF parameters for AI/GS parameters lists. (#14118) 2025-05-01 22:36:53 +01:00
Rubidium 5ca686261e Codechange: use std::string_view for the string setting defaults 2025-05-01 23:24:43 +02:00
Rubidium 5c7b04a0c2 Codechange: use std::string_view for 'x-of-many' settings 2025-05-01 23:24:43 +02:00
Rubidium 7805c1c189 Codechange: use std::string_view for ini_key 2025-05-01 23:24:43 +02:00
Peter Nelson d958d50985 Fix: Small order list arrow was wrong direction for RTL text. (#14174)
Add sprite for small left arrow and use for small order list when using an RTL language.
2025-05-01 22:08:24 +01:00
Loïc Guilloux 41b113840a Fix: [Script] Access to enum/consts defined outside of main.nut (#14176) 2025-05-01 18:16:32 +02:00
Loïc Guilloux 1f212e6f2a Fix: Handle \t when loading GS strings from savegame (#14180) 2025-05-01 16:48:02 +02:00
Loïc Guilloux 6f4994329c Fix bf8a241f: Handle \t in trailing whitespaces (#14178) 2025-05-01 12:32:00 +02:00
translators a30f251d05 Update: Translations from eints
hungarian: 99 changes by meskobalazs
russian: 8 changes by Ln-Wolf
finnish: 24 changes by hpiirai
latvian: 70 changes by lexuslatvia
2025-05-01 04:47:22 +00:00
Rubidium fbe80f31fe Codechange: replace char* in GetOptData with std::string_view 2025-04-30 23:49:06 +02:00
Rubidium c1a287ad17 Codechange: make some saveload functions work natively with std::string_view 2025-04-30 23:49:06 +02:00
Rubidium 855377191e Codechange: replace some more char*s with std::string_view 2025-04-30 23:49:06 +02:00
frosch a80c11a6e8 Fix 66733e2a: Textbuf was broken, and did not insert any input. (#14173) 2025-04-30 19:31:52 +00:00
Peter Nelson 7dd3bed10f Fix #14170, 7fd0e6c27d: Missing spaces for timetabled order strings. (#14172) 2025-04-30 19:54:54 +01:00
frosch 316279f4b4 Codechange: Use more std::string_view. 2025-04-30 19:33:56 +02:00
frosch 9cf36dac39 Codechange: Use data() instead of c_str(), if no NUL termination is needed. 2025-04-30 19:33:56 +02:00
frosch 9e90d4ed79 Codefix: Do not assign nullptr to std::string_view. 2025-04-30 19:33:56 +02:00
frosch 36ce1f890a Codechange: Remove c_str, if std::string_view is already accepted. 2025-04-30 19:33:56 +02:00
frosch b564fbb5e6 Codechange: Use StringConsumer to parse hotkeys. 2025-04-30 19:33:56 +02:00
frosch 66733e2a50 Codechange: Use std::string_view in IME input handling. 2025-04-30 19:33:56 +02:00
frosch 6db13df3b5 Add: [BaseSet] Allow basesets to set minor and patch versions in obg/obs/obm files. 2025-04-30 15:23:27 +02:00
frosch d30fee4a99 Codechange: Improve debug/error messages when reading baseset metadata. 2025-04-30 15:23:27 +02:00
Rubidium 708e6a512d Codechange: replace char* with C++ style strings 2025-04-30 12:05:04 +02:00
Peter Nelson 356b0159c7 Fix 261e09a549: Compilation failure with Fluidsynth enabled. (#14167) 2025-04-30 07:27:57 +01:00
translators 7bec2029fa Update: Translations from eints
english (au): 4 changes by krysclarke
norwegian (bokmal): 5 changes by eriksorngard
chinese (traditional): 4 changes by KogentaSan
greek: 8 changes by gh658804
russian: 4 changes by Ln-Wolf
finnish: 4 changes by hpiirai
portuguese: 4 changes by jcteotonio
portuguese (brazilian): 4 changes by pasantoro
polish: 4 changes by pAter-exe
2025-04-30 04:46:51 +00:00
Peter Nelson 0abebfce1c Codechange: Use result of .find() instead of looking up multiple times. (#14154) 2025-04-29 23:52:46 +01:00
Peter Nelson aa9e8b422c Fix #14166, dfd9fbf873: Loan was no longer invalidated when refreshing finance window. (#14168)
In most cases the company loan does not change, but it should be updated in case it does.
2025-04-29 23:52:11 +01:00
Rubidium f4ad614285 Codechange: use std::string_view for FS2OTTD and OTTD2FS 2025-04-29 22:33:32 +02:00
Rubidium ef71ce0a9d Codechange: return std::string_view for Textbuf::GetText() 2025-04-29 22:15:49 +02:00
Rubidium 261e09a549 Codechange: remove char* from base driver code 2025-04-29 21:09:18 +02:00
frosch d030d17bd6 Codechange: Do not use a mutable global to return calculated VarAction2 results. 2025-04-29 20:35:46 +02:00
frosch e90b68d504 Codechange: Pass SpriteGroup as reference to ResolveReal. 2025-04-29 20:35:46 +02:00
frosch 7c946d97da Codefix: Build with OPTION_DEDICATED=OFF and CMAKE_DISABLE_PRECOMPILE_HEADERS=ON. 2025-04-29 20:26:23 +02:00
frosch afe3dfb3a4 Codechange: Use format instead of to_string. 2025-04-29 20:26:23 +02:00
frosch fda93b6f35 Codechange: Add format_append as short-hand to format_to + back_inserter. 2025-04-29 20:26:23 +02:00
frosch 98481ecc01 Codechange: Replace strtol, strtoll, stroul and strtoull with ParseInteger. 2025-04-29 20:14:56 +02:00
frosch cdafc50c94 Codechange: Replace atoi and atoll with ParseInteger. 2025-04-29 20:14:56 +02:00
frosch 3973199879 Change: ParseInteger now checks for trailing junk chars. 2025-04-29 20:14:56 +02:00
frosch 79b2202f2e Codechange: Use StringConsumer for parsing more strings. 2025-04-29 20:14:56 +02:00
frosch e7d758c82a Codechange: Replace sscanf with StringConsumer. 2025-04-29 20:14:56 +02:00
frosch 8027e31f47 Codechange: Remove virtual functions SpriteGroup::GetResult and GetNumResults. They are only implemented in and called via ResultSpriteGroup. 2025-04-29 10:35:10 +02:00
frosch 010b944173 Codechange: Move SpriteGroup cast from callers into Resolve. 2025-04-29 10:35:10 +02:00
Rubidium af25eecc15 Codechange: use const for std::string_view where appropriate 2025-04-29 10:15:18 +02:00
Rubidium 78250c3bba Codechange: remove const char* overloads when there are std::string_view and std::string& overloads 2025-04-29 10:14:53 +02:00
Peter Nelson a5578166bb Codechange: Pass Script Info by reference. 2025-04-28 23:08:20 +01:00
Peter Nelson 341cdbc16b Codechange: Pass Script engine by reference. 2025-04-28 23:08:20 +01:00
Peter Nelson 72ca962b84 Codechange: Pass ScriptInstance by reference. 2025-04-28 23:08:20 +01:00
Peter Nelson 13fcc0900e Change: Use enum/bitset to track which script configuration items are defined. (#14150)
Removes magic numbers, and simplifies compatibility. It is no longer necessary to provide values which won't be used.
2025-04-28 23:07:57 +01:00
Rubidium b20b56d5fc Codechange: store revision information in C++ style strings 2025-04-28 23:48:32 +02:00
Rubidium 8b1c1cc33d Codechange: provide 'sv' (string_view) literals globally 2025-04-28 23:39:33 +02:00
Rubidium be53bd320d Codechange: replace char* from settingsgen 2025-04-28 23:27:46 +02:00
frosch 47b5ca6115 Fix: [NewGRF] Computed VarAction2 callback results were not always properly masked to 15 bit results. 2025-04-28 23:25:31 +02:00
frosch d90f6f01cc Codechange: CALLBACK_FAILED is an internal constant, do not use it as numeric value in VA2 computations. 2025-04-28 23:25:31 +02:00
frosch 30b1eb6e5f Fix: [NewGRF] The result of Action123 evaluation affected rerandomisation in a weird corner case. (#14139)
Rerandomisation does not care about the Resolve result.
But we skipped it, in case of 'invalid SpriteGroup reference'.
2025-04-28 23:24:42 +02:00
frosch b281c5616e Change: [NewGRF] If Action123 does not resolve in a valid SpriteSet, prefer drawing the default sprite instead of an invalid sprite. 2025-04-28 22:20:54 +02:00
frosch 7b08170ac8 Codechange: Replace a magic value with a maybe less magical constant. 2025-04-28 22:20:54 +02:00
Rubidium 360670626b Codechange: replace char* with std::string_view 2025-04-28 21:31:12 +02:00
Rubidium 9107c3f6c6 Codechange: add std::string_view variant of FileHandle::Open 2025-04-28 21:31:12 +02:00
Peter Nelson 2c4897c2cd Codechange: Use EnumBitSet for HouseZones. (#14137) 2025-04-28 20:27:43 +01:00
frosch f5a9eae8b1 Fix: [NewGRF] AI station construction callback did not work for stations with ID >= 0x100. 2025-04-28 20:50:13 +02:00
frosch e2084bbdcd Codechange: Replace out parameters with result tuples. 2025-04-28 20:50:13 +02:00
frosch 0c6426cb2d Fix: Out-of-bounds read, if NewGRF stations provided no spritesets. 2025-04-28 20:49:20 +02:00
frosch 0f1ef96ca1 Codechange: Road stops do not use RealSpriteGroup, ResolveReal is never called. 2025-04-28 20:49:20 +02:00
Rubidium 9116f96e2e Codechange: replace char * with std::string_view 2025-04-28 17:53:18 +02:00
Rubidium c6ea0ce961 Codechange: use std::span for transferring data in network code 2025-04-28 17:53:18 +02:00
frosch b7e7f08f78 Codechange: Simplify usage of GRFFileProps by adding some common helper methods. 2025-04-28 13:44:46 +02:00
frosch 46494c6d44 Codechange: Rename GRFFileProps to SubstituteGRFFileProps. 2025-04-28 13:44:46 +02:00
Richard Wheeler 298e02d593 Fix: List Ctrl+Click behaviour for vehicle details tooltip (#14127)
Also change mention of "road vehicle" to "vehicle", in line with vehicle order, refit, reverse, etc. tooltips. Fixes #14128
2025-04-28 07:00:18 +01:00
translators 68ba2735ea Update: Translations from eints
swedish: 109 changes by Brickblock1
spanish (mexican): 1 change by absay
english (us): 1 change by 2TallTyler
2025-04-28 04:46:30 +00:00
Rubidium 794ba1f5da Fix 29ceaf0a8: checking std::optional against nullptr caused crash 2025-04-27 21:10:12 +02:00
Rubidium 49ef3eee13 Codechange: replace char* with std::string_view 2025-04-27 20:08:02 +02:00
frosch e1859df1c0 Codechange: Use enums as keys for the spritegroups in FixedGRFFileProps. 2025-04-27 19:50:51 +02:00
frosch 05504ec463 Codechange: Use SingleGRFFileProps, if the feature has no spritegroup keys. 2025-04-27 19:50:51 +02:00
frosch 41a20e512d Codechange: Use proper enum type to index sprite groups in VariableGRFFileProps. 2025-04-27 19:50:51 +02:00
frosch 893aa0fb91 Codechange: Add an explicit enum member for the default spritegroup of badges. 2025-04-27 19:50:51 +02:00
Rubidium 29ceaf0a84 Codechange: use std::string_view over const char * 2025-04-27 18:04:04 +02:00
Rubidium c7056866a3 Codechange: remove manual param count; in all cases strlen(params) == nparams 2025-04-27 17:57:53 +02:00
Rubidium 781187b8a6 Codechange: replace C-style strings with std::string_view related to strings functions 2025-04-27 17:57:42 +02:00
Rubidium 4e3e3d5be6 Codechange: introduce transparent hash lookup for strings 2025-04-27 17:57:42 +02:00
Peter Nelson 7bbf380931 Fix #14125, 828e808444: NewGRF sounds were not loaded. (#14130)
NewGRF Action 11 should be handled in both INIT and ACTIVATION stages for sounds to be loaded.

Additionally the Action 0 feature test failed due to offsets involved.
2025-04-27 15:20:38 +00:00
Rubidium b9667ec3d1 Codechange: use std::string_view for scripts 2025-04-27 17:00:25 +02:00
translators 864fe29028 Update: Translations from eints
english (au): 1 change by krysclarke
chinese (traditional): 1 change by KogentaSan
galician: 66 changes by pvillaverde
chinese (simplified): 1 change by WenSimEHRP
korean: 72 changes by telk5093
greek: 1 change by gh658804
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
portuguese: 1 change by jcteotonio
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by pAter-exe
2025-04-27 04:44:13 +00:00
Peter Nelson 5a7893b730 Fix #14104, 67a0fcc: Don't base timetable timing decisions on client settings. (#14105)
Client settings different between clients so the resultant timings may be different.

Partially reverts 67a0fcc.
2025-04-26 22:39:01 +01:00
Peter Nelson b87ce9c845 Change: Draw info headers as shade of window colour instead of pixel colour. (#14123)
Use the normal or lightest colour gradient to pick a suitable colour, instead of an arbitrary pixel colour.

(Except for the NewGRF window's info panel, this happens to be the same colour.)
2025-04-26 22:38:24 +01:00
frosch 55fad9c78a Add: Limit height of settings description, and add scrollbar. (#14102) 2025-04-26 22:34:18 +02:00
frosch d85f6dccc5 Fix 5575379: Crash with default airports. (#14120) 2025-04-26 22:29:01 +02:00
frosch f62f728187 Codechange: Move usage of ResolverObjects to newgrf_xxx.cpp (#14116) 2025-04-26 20:53:50 +02:00
frosch be39a05327 Fix: Road vehicle blocking and train collissions used slightly inconsistent distance thresholds. 2025-04-26 19:32:59 +02:00
frosch 3a70d1e2f7 Codechange: Pass the max-distance as parameter to VehiclesNearTileXY. 2025-04-26 19:32:59 +02:00
frosch 2df1233f1f Codechange: Clamp the search area to valid values for the hash bucket selection.
The bucket selection uses a truncating division instead of a flooring division, so it does not work for negative positions.
Anyhow, there are no negative tile coordinates, so just clamp the search area.
2025-04-26 19:32:59 +02:00
frosch 0f76ba122c Codefix: VehiclesNearTileXY yielded all vehicles with matching hashes, even if they are far away. 2025-04-26 19:32:59 +02:00
frosch c14e4a6db1 Codefix: Rect::Contains did not consider the bottom/right edges as inside. 2025-04-26 19:32:59 +02:00
Rubidium 3235ec4cf8 Codefix: checking unsigned int >= 0 is pointless, check before subtraction 2025-04-26 18:31:36 +02:00
frosch ce2155ab27 Codechange: Remove unused FindVehicleOnPosXY/HasVehicleOnPosXY. 2025-04-26 16:54:56 +02:00
frosch 98ac75e74f Codechange: Replace FindVehicleOnPosXY/HasVehicleOnPosXY with VehiclesNearTileXY/HasVehicleNearTileXY. 2025-04-26 16:54:56 +02:00
frosch 9f1c04c0e1 Codechange: Add VehiclesNearTileXY and HasVehicleNearTileXY to iterate over/check for ground vehicles near a tile coordinate. 2025-04-26 16:54:56 +02:00
frosch ac3ed9f3ad Codechange: Deduplicate and simplify tile hash arithmetic. 2025-04-26 16:54:56 +02:00
Rubidium b4d4d730a5 Codechange: use std::string_view for town name generation 2025-04-26 16:30:30 +02:00
Rubidium 30f381acee Codechange: use std::string_view for NetworkAddress 2025-04-26 16:30:16 +02:00
Rubidium e1db09a41f Codechange: use std::string_view for NewsTypeData 2025-04-26 16:30:16 +02:00
Rubidium 42f0aa24f6 Codechange: use std::string_view for connection/URI strings 2025-04-26 16:30:16 +02:00
Rubidium a5812a45f8 Codechange: use std::string view for URI and std::move for data 2025-04-26 16:30:16 +02:00
Rubidium d1a7d30572 Codechange: use std::string_view for some settings functions 2025-04-26 16:30:16 +02:00
Rubidium 4476ce804d Codechange: use std::string_view for GetNextParameterString 2025-04-26 16:30:16 +02:00
frosch 398524e49a Add: [NewGRF] Provide random bits in var10 of house callback 1C 'construction stage changed'. (#14095) 2025-04-26 15:58:44 +02:00
frosch 55753795bf Fix: [NewGRF] Cargo-types for airport-tile animation-triggers were not properly translated. (#14092) 2025-04-26 15:58:30 +02:00
frosch 1ea1dbd19e Add: [NewGRF] Station/roadstop animation-triggers 'tile loop' (bit 7) and 'path reservation' (bit 8). (#14080) 2025-04-26 14:44:55 +02:00
frosch d3ae6bc9a8 Fix: [NewGRF] For animation-triggers which do not supply a cargo-type in var18, the var18 bits should remain empty. (#14091) 2025-04-26 14:44:07 +02:00
frosch 0d9074769d Change: [NewGRF] Animation-trigger 'construction stage changed' of houses and industries now also triggers at construction start. (#14089) 2025-04-26 14:42:49 +02:00
Rubidium 365eed533d Codechange: use std::string_view for console commands 2025-04-26 14:15:10 +02:00
Rubidium f04cf54939 Codechange: make IConsoleCmdExec use C++ strings internally 2025-04-26 14:15:10 +02:00
Loïc Guilloux 28d0e6dfc0 Change: [Script] Reject scripts using negative version (#14096) 2025-04-26 14:02:36 +02:00
Peter Nelson 4a5db57f7b Fix #14107: Mark the company value in the company view window dirty when it changes. (#14112) 2025-04-26 11:56:11 +00:00
Peter Nelson dfd9fbf873 Codechange: Defer refreshing company finance windows. (#14111)
During each game tick every cargo payment will issue an Invalidate of the status bar and company finance window. While this doesn't paint the window yet, it does need to search for open windows, and then mark a area of dirty blocks, which is done for every Invalidate.

Instead, set a bit in a CompanyMask, and test these bits once after the game tick is complete.

This reduces the amount of dirtying, and allows more specific widgets to be dirtied instead of the whole window.
2025-04-26 10:50:51 +00:00
Peter Nelson a1f086e60c Fix #14107: Invalidate all shared vehicle windows when changing group. (#14110)
Previously only windows of the first vehicle were invalidated.
2025-04-26 10:49:41 +00:00
translators bb1d561369 Update: Translations from eints
chinese (traditional): 9 changes by KogentaSan
english (us): 66 changes by 2TallTyler
greek: 65 changes by gh658804
russian: 77 changes by Ln-Wolf
dutch: 66 changes by Afoklala
portuguese: 65 changes by jcteotonio
polish: 68 changes by pAter-exe
2025-04-26 04:44:12 +00:00
Rubidium 08ce16018b Codechange: make start-ai console command parsing work with std::string_view 2025-04-25 19:04:22 +02:00
Rubidium ccbf7f4a46 Codechange: validate the given seed 2025-04-25 19:04:22 +02:00
Rubidium 86039a5b69 Codechange: make SetDebugString use C++-style strings and function types 2025-04-25 19:04:22 +02:00
Rubidium 498a0f1c1b Codechange: use C++ strings over C-strings 2025-04-25 19:04:22 +02:00
frosch 4a09860c53 Fix: Focus settings filter box (only) when the tab becomes active. (#14100) 2025-04-25 12:04:26 +02:00
frosch f554d799d7 Change: [NewGRF] Provide shared random bits in multi-tile animation-triggers of airport tiles and objects, just like for other features. (#14090) 2025-04-25 10:01:01 +02:00
Peter Nelson 8b927220c7 Change: Move Game Options toggles to before label, add Off/On text. (#14097) 2025-04-25 07:49:33 +01:00
translators e61762a805 Update: Translations from eints
english (au): 65 changes by krysclarke
norwegian (bokmal): 67 changes by eriksorngard
chinese (traditional): 67 changes by KogentaSan
spanish (mexican): 66 changes by absay
chinese (simplified): 91 changes by WenSimEHRP
finnish: 65 changes by hpiirai
french: 61 changes by ottdfevr
portuguese (brazilian): 65 changes by pasantoro
2025-04-25 04:46:37 +00:00
Peter Nelson 87b5b0ffa3 Fix 2b80812922: Map size column in server list may be too wide. (#14094)
Incorrect change from SetDParamMaxValue to GetParamMaxValue.
2025-04-24 21:05:31 +01:00
Rubidium 2087bca87d Codechange: replace atoi with ParseInteger in console commands 2025-04-24 18:10:01 +02:00
Rubidium ddc0d6ead3 Codechange: use string comparision for ConExec's second parameter 2025-04-24 18:10:01 +02:00
Richard Wheeler a01d47b333 Doc: Correct baseset obg file MD5 and url documentation (#14086) 2025-04-24 12:24:32 +01:00
frosch 880a947eb3 Fix: [NewGRF] Randomisation-trigger 'path reservation' did not work for waypoints. 2025-04-24 09:19:43 +02:00
frosch bc0eaf9ac4 Codechange: Allow passing waypoints to Trigger(Station|RoadStop)Randomisation. 2025-04-24 09:19:43 +02:00
Peter Nelson c0cd7cafe4 Change: Remove minimum width from advanced settings panel of Game Options window. (#14088)
Previous minimum width of 400 was fairly arbitrary and isn't necessary when
the minimum size is suitably constrained by other widgets in the window.

This allows the window to be narrower for CJK languages.
2025-04-23 23:39:35 +00:00
Peter Nelson 7846f0f4ee Fix a4dc7249ee: Changing language or interface scale could hang. (#14087)
A bit of hysteresis caused by OnResize calling ReInit calling OnResize calling ReInit calling OnResize calling ReInit ...
2025-04-24 00:29:54 +01:00
Peter Nelson 78d3eaf3e2 Change: Slider widget can now be colourful. 2025-04-23 19:07:52 +01:00
Peter Nelson 20738865f0 Change: Use standard mauve/yellow scheme for game options window.
This is the colour scheme used by AI/GS settings, NewGRF settings and (previously) advanced settings.
2025-04-23 19:07:52 +01:00
Peter Nelson 17e7dafa2a Change: Add alternate_colour widget data for boolean button.
Allows boolean button to have different background and button colours.
2025-04-23 19:07:52 +01:00
Peter Nelson 7953a97cbb Change: Adjust section names in Graphics options tab.
"Interface size" and "Graphics" section names do not make much sense any more.
2025-04-23 19:07:52 +01:00
Peter Nelson 77da79a052 Codechange: Remove unnecessary SetMinimalSize from Game Options window. 2025-04-23 19:07:52 +01:00
Peter Nelson a4dc7249ee Change: Merge Game Options and Game Settings together.
Game Settings is now an additional 'Advanced' tab in the Game Options window.
2025-04-23 19:07:52 +01:00
frosch 6f056283f2 Fix: [NewGRF] For roadstop multi-tile-animation-triggers, the upper 16 bits were not the same for all tiles. (#14084) 2025-04-23 19:26:09 +02:00
Loïc Guilloux f8bdc1e612 Fix f5ffd47: Don't skip separator while reading a record (#14083) 2025-04-23 17:30:51 +02:00
Peter Nelson 6d5aee0545 Codechange: Restructure RoadStop Entries to reduce pointers. (#14069)
A RoadStop must own both west and east `Entry`s, but they are allocated separately.

Combine this allocation into one instead.
2025-04-23 08:29:34 +01:00
Peter Nelson 41ed5f9822 Fix c7d6934816: Town view caption lost "(City)" flag. (#14082) 2025-04-23 08:14:08 +01:00
translators d9dc6cb5e4 Update: Translations from eints
english (au): 1 change by krysclarke
chinese (traditional): 7 changes by KogentaSan
chinese (simplified): 201 changes by WenSimEHRP
greek: 1 change by gh658804
hungarian: 9 changes by meskobalazs
russian: 1 change by Ln-Wolf
finnish: 1 change by hpiirai
latvian: 1 change by lexuslatvia
portuguese: 1 change by azulcosta
portuguese (brazilian): 1 change by pasantoro
polish: 1 change by pAter-exe
2025-04-23 04:46:38 +00:00
Peter Nelson d028c7f9e2 Codefix: Incorrect type for OnDropdownSelect widget parameter. (#14074) 2025-04-22 22:44:25 +01:00
Rubidium 4149384ebc Codechange: simplify and move GetArgumentInteger 2025-04-22 23:16:15 +02:00
frosch 2bee313642 Codechange: Replace FindVehicleOnPos with 'for' loop. 2025-04-22 22:12:59 +02:00
frosch 06c399b79e Codechange: Replace HasVehicleOnPos and callbacks with HasVehicleOnTile and lambda-predicates. 2025-04-22 22:12:59 +02:00
frosch dacd77b2bd Codechange: Use FindVehicleOnPos instead of HasVehicleOnPos, if there is no stop condition. 2025-04-22 22:12:59 +02:00
frosch fca3103d8c Codechange: Add iterator for vehicles on a tile. 2025-04-22 22:12:59 +02:00
Rubidium 917ef03e97 Codechange: use std::string_view in IConsole settings API 2025-04-22 19:52:37 +02:00
Rubidium b279bc37e7 Codechange: use std::string_view to set string settings 2025-04-22 19:52:37 +02:00
Rubidium fdb8defa64 Codechange: use std::string_view to parse setting values 2025-04-22 19:52:37 +02:00
Peter Nelson 12118b201c Change: Enhance visibility of disabled bool button. (#14071)
Apply masked fill to background as well.
2025-04-22 17:37:30 +01:00
translators 415ac07a08 Update: Translations from eints
chinese (simplified): 32 changes by WenSimEHRP
hungarian: 38 changes by meskobalazs
2025-04-22 04:46:01 +00:00
Peter Nelson 3aa82d5e63 Codechange: Use EnumBitSet for RoadStopStatusFlags. (#14068) 2025-04-21 20:16:23 +01:00
Peter Nelson 81edd1123a Change: Use scaled instead of fixed dimensions for framerate graphs. (#14039) 2025-04-21 20:15:57 +01:00
frosch d7ddea4032 Codechange: Turn AnimationTrigger enums into enum classes. (#14067) 2025-04-21 20:53:31 +02:00
frosch 61a0a520f6 Codechange: Unify random trigger enums and turn them into enum classes. (#14066) 2025-04-21 20:03:34 +02:00
frosch f399b8eb29 Codechange: Unify naming of NewGRF animation callbacks. 2025-04-21 19:06:13 +02:00
frosch 264abfafe6 Codechange: Rename storage of random triggers to include the term 'random'. 2025-04-21 19:06:13 +02:00
frosch 39220a5feb Codechange: Unify naming of NewGRF random trigger functions. 2025-04-21 19:06:13 +02:00
frosch 368d131fb7 Codechange: Use 'construction stage' consistently, instead of 'construction state'. 2025-04-21 19:06:13 +02:00
frosch 98445088b1 Codechange: Move VehicleEnteredDepotThisTick call to a more suitable position. (#14065) 2025-04-21 17:52:03 +02:00
Peter Nelson 7d03cee512 Change: Include dragged train in depot tile length display. (#14060)
In the depot, when dragging a train over another train, the tile length displayed now includes the length of the dragged train.

As the parts are not moved yet, length changes due to callbacks are not taken into account.
2025-04-21 16:37:10 +01:00
frosch 2a62eea005 Codefix: Comment style. (#14064) 2025-04-21 17:25:09 +02:00
Peter Nelson 5b2754fdee Change: Use standard boolean toggle buttons for game options toggles. 2025-04-21 16:23:11 +01:00
Peter Nelson d89753b88d Codechange: Add dedicated widget for boolean toggle buttons. 2025-04-21 16:23:11 +01:00
Peter Nelson e3d2d68bd4 Change: Draw boolean toggle as a slider widget.
This improves usability as the slider position indicates the state instead of a red/green colour change.
2025-04-21 16:23:11 +01:00
Rubidium e3858e81dc Codechange: use std::string_view over const std::string& for finding files 2025-04-21 17:20:00 +02:00
frosch 354ad43edb Codechange: Remove unnecessary string constructions. (#14063) 2025-04-21 16:46:31 +02:00
Peter Nelson e1fdc10227 Fix e114ed357d: Incorrect test of object flags allowed HQ to be removed. (#14062) 2025-04-21 15:45:29 +01:00
Loïc Guilloux 305c892b3a Change: "setting" console command now shows default value (#14061) 2025-04-21 16:00:37 +02:00
Peter Nelson 788845f731 Change: Allow Double-Ctrl+Click on default size box to clear saved size. (#14055) 2025-04-21 14:16:29 +01:00
Peter Nelson 0cf7048a67 Change: Don't select content when toggling its download status. (#14059)
This improves usability when toggling content sorted by status, as the list position no longer jumps to the now (de)selected item, making it easier to (de)select multiple items.
2025-04-21 13:20:52 +01:00
Peter Nelson 9ff2b4991f Change: Add scrollbar to infrastructure window. (#14056)
Company infrastructure window will no longer overflow the screen when lots of rail and road types are present.

To further declutter the list, we now only show a value when the count for that item is non-zero.
2025-04-21 08:46:09 +01:00
translators 5502618ac3 Update: Translations from eints
romanian: 1 change by ALEX11BR
2025-04-21 04:45:21 +00:00
Peter Nelson e9a92b8795 Fix: Odd drawing and crash if scrollbar is not tall enough. (#14052)
Under certain conditions the scrollbar "tab" could be too large for the scrollbar, and cause issues.

Caused by an off-by-one in height calculation.
2025-04-20 23:23:52 +01:00
frosch 0efbb3a7a7 Doc: PR template referenced non-existing label. (#14050) 2025-04-20 23:02:33 +02:00
frosch 689f55a0ea Fix #14044: Negative string parameters from GS were rendered as zero. (#14049)
String parameters are always stored as uint64_t. Negative values are sign-extended to int64_t and then casted to uint64_t.
The same applies to encoded strings. But ScriptText encoded them as int64_t.

Co-authored-by: rubidium42 <rubidium42@users.noreply.github.com>
2025-04-20 23:01:49 +02:00
Rubidium 4e14f0ac3f Codechange: pass network tokens as std::string_view or with move semantics where appropriate 2025-04-20 22:43:24 +02:00
Rubidium c13956a58a Codechange: use std::string_view for connection strings 2025-04-20 22:43:24 +02:00
Rubidium 31433882a4 Codechange: use std::string_view for passing NetworkError strings 2025-04-20 22:43:24 +02:00
frosch 8aa2f6b8a6 Codefix: StringConsumer integer parsing failed for the most negative value, which has no positive equivalent. (#14048) 2025-04-20 22:20:53 +02:00
Peter Nelson fc45bb5a2b Codechange: Replace bitstuffed VehicleEnterTileStatus. (#14027)
VehicleEnterTileStatus was an bitset-style enum, but bitstuffed with a StationID. However the StationID part was only used by trains, and only in two locations.

Instead, return just the enum bitset. The two places which require the StationID just call GetStationIndex() directly.
2025-04-20 21:10:02 +01:00
frosch cb113cfed0 Codefix: Add missing header includes. 2025-04-20 22:06:18 +02:00
frosch 461b73e21b Codefix: stdafx.h and safeguards.h should be the first and last include in every source file, and not appear in any header file. 2025-04-20 22:06:18 +02:00
frosch 54de376c55 Codechange: Make the squirrel-exporter skip ctor lists. 2025-04-20 21:07:12 +02:00
frosch 6256b55671 Codechange: Make the squirrel-exporter skip function bodies. 2025-04-20 21:07:12 +02:00
Rubidium 26de3404a4 Codechange: use std::string_view for sending chat messages 2025-04-20 13:31:41 +02:00
Rubidium bb259b8e77 Codechange: use std::string_view for sending a remote console command (result) 2025-04-20 13:31:41 +02:00
Rubidium d99edf2bbc Codechange: use std::string_view for kicking/banning 2025-04-20 13:31:41 +02:00
Rubidium a0246bc8a7 Codechange: use std::string_view over std::string for NetworkTextMessage 2025-04-20 13:31:41 +02:00
Rubidium a0e4dab771 Codechange: use std::string_view for NetworkAddress::IsInNetmask of std::string 2025-04-20 13:31:41 +02:00
frosch ff2da0fc73 Codechange: Remove CircularTileSearch. 2025-04-20 12:50:45 +02:00
frosch b956af631e Codechange: Replace CircularTileSearch with SpiralTileSequence. 2025-04-20 12:50:45 +02:00
frosch 0dada5a750 Codechange: Add SpiralTileSequence to iterate over a tile area the same ways as CircularTileSearch. 2025-04-20 12:50:45 +02:00
frosch b9bd7b2cfe Codechange: Confusion of 'radius' and 'diameter' in variable names and comments. 2025-04-20 12:50:45 +02:00
Peter Nelson e43e4327a7 Fix: Incorrect string display for autoreplace wagon removal status. (#14038) 2025-04-20 10:44:37 +01:00
translators ee81313254 Update: Translations from eints
welsh: 1 change by Ansbaradigeidfran
vietnamese: 2 changes by KhoiCanDev
2025-04-20 04:43:37 +00:00
Peter Nelson 2b92d76e9d Fix e49150f9ca: House picker crashes if selection is not available. (#14030)
This occurs because the extra invalidation in OnInit() also happens on construction, and too early.

Solution is to validate all instead of just position when invalidating in OnInit().
2025-04-19 15:04:18 +01:00
translators d248f45d67 Update: Translations from eints
vietnamese: 7 changes by KhoiCanDev
2025-04-19 04:44:03 +00:00
frosch 43ea6c9b88 Codechange: Turn AyStar into an actual class with virtual methods instead of function pointers. 2025-04-19 00:24:15 +02:00
frosch 97ead8e241 Codechange: Remove unused options from AyStar. 2025-04-19 00:24:15 +02:00
frosch 53899c3c21 Codechange: Replace vehicle viewport hash macros with functions. 2025-04-18 23:41:37 +02:00
frosch cde350dc01 Codechange: Replace macros GENERAL_SPRITE_COLOUR and COMPANY_SPRITE_COLOUR with functions GetColourPalette and GetCompanyPalette. 2025-04-18 23:41:37 +02:00
frosch c2c5dae760 Codechange: Turn GREY_SCALE macro into constexpr function. 2025-04-18 23:41:37 +02:00
frosch 8f335a84cf Codechange: Turn GetCustom(Vehicle|Rotor)(Sprite|Icon) macros into functions. 2025-04-18 23:41:37 +02:00
frosch 8f8e997575 Codechange: Replace local macro with lambda. 2025-04-18 23:41:37 +02:00
frosch 68016031cf Codechange: Turn macros GetCompanyHQSize and IncreaseCompanyHQSize into functions. 2025-04-18 23:41:37 +02:00
frosch 0eb6964311 Codechange: Change ScreenshotCallback into a std::function, so there is no need for void* user data. 2025-04-18 22:43:41 +02:00
frosch c09e825e0b Codechange: Change SetDateCallback into a std::function, so there is no need for void* user data. 2025-04-18 22:43:41 +02:00
frosch 0d4588688f Codechange: Manage script event queue using smart pointers. 2025-04-18 19:47:28 +02:00
frosch b9f4ef3d78 Codechange: Move ScriptStorage constructor into source file, so private members can have partially incomplete types. 2025-04-18 19:47:28 +02:00
frosch af14809697 Codechange: Add filename and line number to errors/warnings of the squirrel-exporters. (#14031) 2025-04-18 19:43:32 +02:00
frosch 50252cb5df Codechange: Ini(Load|Save)WindowSettings expect a WindowDesc*, no void*. (#14029) 2025-04-18 18:44:58 +02:00
Peter Nelson 394adb654e Codechange: Move GUI parts of badges to a separate file. (#14023) 2025-04-18 17:20:31 +01:00
Peter Nelson 67d6089f39 Change: Don't replace stripped control codes with '?' for scripts. (#14028) 2025-04-18 17:20:08 +01:00
frosch 45917dbaa3 Codechange: Remove unused macro strncasecmp. 2025-04-18 17:16:48 +02:00
frosch 84e175ce63 Codechange: Determine array length using 'std::size' instead of using a separate constant. 2025-04-18 17:16:48 +02:00
frosch 7cbf4f5560 Codechange: Expand the single usage of the macro CLRBITS. 2025-04-18 17:16:48 +02:00
frosch d97936e77a Codechange: Replace ALIGN macro with C++11 alignas specifier. 2025-04-18 17:16:48 +02:00
frosch f82e172610 Codechange: Expand and remove DEF_CONSOLE_CMD and DEF_CONSOLE_HOOK macros. 2025-04-18 17:16:48 +02:00
frosch 42deccc4f5 Codechange: Merge (IsOn|Toggle)(Snow|Desert) into (IsOn|Toggle)SnowOrDesert. 2025-04-18 16:33:26 +02:00
frosch 252376ce3e Codechange: Rename DrawRoadAsSnowDesert to DrawRoadAsSnowOrDesert to be consistent with other functions. 2025-04-18 16:33:26 +02:00
frosch 26db4ccf09 Codechange: Turn bit-stuffed FiosType enum into a struct. (#14019) 2025-04-18 15:20:55 +02:00
frosch b862d4937f Codechange: Turn custom vehicle spritenums into enum, and use them consistently. (#14022) 2025-04-18 15:19:28 +02:00
Peter Nelson 2c59838acb Codechange: (re)set multiple bitset flags in one call. (#14017) 2025-04-18 14:07:57 +01:00
frosch 31e716449d Codechange: Change StationNameInformation to not use macros. (#14020) 2025-04-18 15:06:46 +02:00
frosch 5aed046d11 Fix: [NewGRF] Strange things happened, when using the synchronised tile loop animation trigger for houses. (#14011) 2025-04-17 12:15:49 +02:00
translators 421f202539 Update: Translations from eints
luxembourgish: 103 changes by phreeze83
latvian: 1 change by lexuslatvia
2025-04-17 04:45:26 +00:00
Peter Nelson 1f83ea41fc Fix: [NewGRF] PrepareLayout worked on a copy of the data resulting in bad sprite layouts. (#14013) 2025-04-16 21:27:36 +00:00
Peter Nelson 378ea52ac6 Codechange: Use EnumBitSet for CzechChooseFlags. 2025-04-16 19:44:28 +01:00
Peter Nelson ea0817390f Codechange: Use EnumBitSet for CzechAllowFlags. 2025-04-16 19:44:28 +01:00
Peter Nelson 6ea10edef8 Codechange: Use std::unique_ptrs for handling station cargo display. (#14009)
Replaces manual management of raw pointers.
2025-04-16 19:43:45 +01:00
Peter Nelson a281ac4674 Codefix: Information for NewGRF specs remained duplicated after loading.
After loading airports+tiles, industries+tiles, houses and objects, their specs are copied from the NewGRF's loading storage to the final global storage.

Instead, move the specs to the their new storage, and clear the NewGRF's storage once done. (Stations and RoadStops are different, and the NewGRF's storage is the final storage location.)
2025-04-16 19:43:07 +01:00
Peter Nelson f9ab492e64 Codechange: Pass HouseSpec by reference to IsHouseSpecValid(). 2025-04-16 19:43:07 +01:00
translators b57f3262ec Update: Translations from eints
spanish: 101 changes by MontyMontana
2025-04-16 04:44:48 +00:00
Peter Nelson fa0814e257 Codefix: Codestyle consistency fixes. (#14008) 2025-04-15 20:57:13 +00:00
frosch 03ed59a004 Codechange: Turn AnimationStatus into an enum class. 2025-04-15 20:42:44 +02:00
frosch 47f0f4dd9e Fix: [NewGRF] Animation speed properties of houses and stations had wrong default. 2025-04-15 20:42:44 +02:00
frosch 301b209b87 Fix: [NewGRF] Roadstop animation/randomisation was not triggered on vehicle arrival. (#14003) 2025-04-15 14:53:29 +02:00
translators 5fad689782 Update: Translations from eints
norwegian (bokmal): 1 change by eriksorngard
2025-04-15 04:44:48 +00:00
Peter Nelson 5008568dfc Codechange: Rename CenterBounds to CentreBounds and move to geometry header. (#14002) 2025-04-14 23:55:40 +01:00
Michael Lutz fc20ce301a Doc: Missing changelog entry for 15.0-beta2. (#14001) 2025-04-14 18:50:02 +00:00
frosch d2c9828b4c Codechange: Move IsUtf8Part to only file using it. 2025-04-14 18:56:23 +02:00
frosch 588fedb5db Codechange: Remove unused Utf8Consume, Utf8Decode, Utf8EncodedCharLen. 2025-04-14 18:56:23 +02:00
frosch bf8a241f69 Codechange: Parse translation files using StringConsumer. 2025-04-14 18:10:14 +02:00
frosch b27fd83ff1 Codechange: Parse translation strings using StringConsumer. 2025-04-14 18:10:14 +02:00
frosch b81a35ea89 Codechange: Use StringConsumer and Builder in StrMakeValid and StrValid. 2025-04-14 18:07:23 +02:00
frosch dc21fae18e Codechange: Add InPlaceReplacement to couple StringConsumer and Builder on the same buffer. 2025-04-14 18:07:23 +02:00
frosch f5ffd4789b Codechange: Use StringConsumer in FormatString. 2025-04-14 16:57:41 +02:00
frosch 15a17d832f Codechange: Use StringConsumer in HandleNewGRFStringControlCodes. 2025-04-14 16:57:41 +02:00
frosch 98efd3c96e Codefix #13872: Use StringConsumer in TranslateTTDPatchCodes. 2025-04-14 16:57:41 +02:00
John Taylor 069edc1a4b Fix #13954: Plotting graphs with limited data to the right. (#13956) 2025-04-14 16:57:07 +02:00
translators 3dacf46870 Update: Translations from eints
vietnamese: 7 changes by KhoiCanDev
2025-04-14 04:44:46 +00:00
Peter Nelson d48bc18721 Codechange: Rename badge_class to class_index and badge_classes to gui_classes internally. (#13995)
These names are already used in some places, so this brings a bit of consistency.
2025-04-13 21:06:09 +01:00
frosch 131b7c7122 Codechange: Replace Utf8Decode usages with StringConsumer. 2025-04-13 21:59:10 +02:00
frosch 9bcd3feb17 Codechange: Make SQFile a buffered reader, based on StringConsumer. 2025-04-13 21:59:10 +02:00
frosch 3964d053b5 Codechange: Replace BufState with StringConsumer. 2025-04-13 21:59:10 +02:00
frosch 96eee0e8e4 Codechange: Base ByteReader on StringConsumer. 2025-04-13 21:59:10 +02:00
frosch 800d6e339d Codechange: Add StringConsumer. 2025-04-13 21:59:10 +02:00
Peter Nelson 4721a1f93e Fix: Don't display badges if the class has no name. (#13994)
Unnamed badges are intended to be for internal-use, not for player information.

Additionally if there is no name to the class, then is causes problems when user configuration comes.
2025-04-13 18:00:41 +01:00
1563 changed files with 50797 additions and 37010 deletions
-1
View File
@@ -50,7 +50,6 @@ Describe here
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.
* The bug fix is important enough to be backported? (label: 'backport requested')
* This PR touches english.txt or translations? Check the [guidelines](https://github.com/OpenTTD/OpenTTD/blob/master/docs/eints.md)
* This PR affects the save game format? (label 'savegame upgrade')
* This PR affects the GS/AI API? (label 'needs review: Script API')
* ai_changelog.hpp, game_changelog.hpp need updating.
* The compatibility wrappers (compat_*.nut) need updating.
+2
View File
@@ -10,3 +10,5 @@ query-filters:
- cpp/irregular-enum-init
# Our GUI code tends to use switches for OnClick handlers, DrawWidget, and UpdateWidgetSize. Sometimes GUIs just don't have many elements, but we want to keep consistency.
- cpp/trivial-switch
# Our (GUI) code tends to use long switches.
- cpp/long-switch
+2
View File
@@ -8,3 +8,5 @@ updates:
actions:
patterns:
- "*"
commit-message:
prefix: "Upgrade: "
+1 -1
View File
@@ -158,7 +158,7 @@ def scan_source_files(path, strings_found):
# Most files we can just open, but some use magic, that requires the
# G++ preprocessor before we can make sense out of it.
if new_path == "src/table/cargo_const.h":
p = subprocess.run(["g++", "-E", new_path], stdout=subprocess.PIPE)
p = subprocess.run(["g++", "-E", "-DCHECK_UNUSED_STRINGS", new_path], stdout=subprocess.PIPE)
output = p.stdout.decode()
else:
with open(new_path) as fp:
+1 -1
View File
@@ -105,4 +105,4 @@ jobs:
steps:
- name: Check annotations
uses: OpenTTD/actions/annotation-check@v5
uses: OpenTTD/actions/annotation-check@v6
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Fix dubious ownership
run: |
+5 -14
View File
@@ -30,20 +30,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup vcpkg caching
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
- name: Install dependencies
run: |
@@ -74,7 +65,7 @@ jobs:
# We only use breakpad from vcpkg, as its CMake files
# are a bit special. So the Ubuntu's variant doesn't work.
${{ runner.temp }}/vcpkg/vcpkg install breakpad
${{ steps.vcpkg.outputs.vcpkg }} install breakpad
echo "::endgroup::"
env:
+5 -14
View File
@@ -32,20 +32,11 @@ jobs:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup vcpkg caching
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
- name: Install OpenGFX
run: |
@@ -74,7 +65,7 @@ jobs:
cmake .. \
-DCMAKE_OSX_ARCHITECTURES=${{ inputs.full_arch }} \
-DVCPKG_TARGET_TRIPLET=${{ inputs.arch }}-osx \
-DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_TOOLCHAIN_FILE=${{ steps.vcpkg.outputs.vcpkg-cmake }} \
${{ inputs.extra-cmake-parameters }} \
# EOF
echo "::endgroup::"
+1 -1
View File
@@ -21,7 +21,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
+1 -1
View File
@@ -57,4 +57,4 @@ jobs:
steps:
- name: Check annotations
uses: OpenTTD/actions/annotation-check@v5
uses: OpenTTD/actions/annotation-check@v6
+5 -14
View File
@@ -18,20 +18,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup vcpkg caching
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}\vcpkg
${{ runner.temp }}\vcpkg\bootstrap-vcpkg.bat -disableMetrics
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
- name: Install OpenGFX
shell: bash
@@ -69,7 +60,7 @@ jobs:
cmake .. \
-GNinja \
-DVCPKG_TARGET_TRIPLET=${{ inputs.arch }}-windows-static \
-DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}\vcpkg\scripts\buildsystems\vcpkg.cmake" \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.vcpkg.outputs.vcpkg-cmake }}" \
# EOF
echo "::endgroup::"
+9 -17
View File
@@ -21,23 +21,15 @@ jobs:
actions: read
contents: read
security-events: write
packages: read
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup vcpkg caching
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
- name: Install dependencies
run: |
@@ -67,7 +59,7 @@ jobs:
# We only use breakpad from vcpkg, as its CMake files
# are a bit special. So the Ubuntu's variant doesn't work.
${{ runner.temp }}/vcpkg/vcpkg install breakpad
${{ steps.vcpkg.outputs.vcpkg }} install breakpad
echo "::endgroup::"
env:
@@ -83,7 +75,7 @@ jobs:
echo "::endgroup::"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: cpp
config-file: ./.github/codeql/codeql-config.yml
@@ -99,7 +91,7 @@ jobs:
echo "::endgroup::"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
with:
category: /language:cpp
upload: False
@@ -117,6 +109,6 @@ jobs:
output: sarif-results/cpp.sarif
- name: Upload results
uses: github/codeql-action/upload-sarif@v3
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: sarif-results/cpp.sarif
+2 -2
View File
@@ -14,12 +14,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 4
- name: Get pull-request commits
uses: OpenTTD/actions/checkout-pull-request@v5
uses: OpenTTD/actions/checkout-pull-request@v6
- name: Check commits
uses: OpenTTD/OpenTTD-git-hooks@main
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
+2 -2
View File
@@ -15,7 +15,7 @@ jobs:
steps:
- name: Download source
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: internal-source
@@ -78,7 +78,7 @@ jobs:
echo "::endgroup::"
- name: Store bundles
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: openttd-docs
path: build/bundles/*.tar.xz
+11 -22
View File
@@ -21,7 +21,7 @@ jobs:
steps:
- name: Download source
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: internal-source
@@ -35,14 +35,6 @@ jobs:
- name: Enable Rust cache
uses: Swatinem/rust-cache@v2
- name: Setup vcpkg caching
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
- name: Install dependencies
run: |
echo "::group::Install system dependencies"
@@ -113,20 +105,17 @@ jobs:
# EOF
echo "::endgroup::"
# We use vcpkg for our dependencies, to get more up-to-date version.
echo "::group::Install vcpkg and dependencies"
git clone https://github.com/microsoft/vcpkg /vcpkg
(
cd /vcpkg
./bootstrap-vcpkg.sh -disableMetrics
)
echo "::group::Install breakpad dependencies"
cargo install --locked dump_syms
echo "::endgroup::"
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
with:
vcpkg-location: /vcpkg
mono-install-command: 'yum install -y mono-complete'
- name: Install GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
@@ -137,7 +126,7 @@ jobs:
echo "::group::CMake"
cmake ${GITHUB_WORKSPACE} \
-DCMAKE_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_TOOLCHAIN_FILE=${{ steps.vcpkg.outputs.vcpkg-cmake }} \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
-DOPTION_PACKAGE_DEPENDENCIES=ON \
@@ -168,14 +157,14 @@ jobs:
echo "::endgroup::"
- name: Store bundles
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: openttd-linux-generic
path: build/bundles
retention-days: 5
- name: Store symbols
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: symbols-linux-generic
path: build/symbols
+9 -18
View File
@@ -23,7 +23,7 @@ jobs:
xcode-version: latest-stable
- name: Download source
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: internal-source
@@ -37,18 +37,9 @@ jobs:
- name: Enable Rust cache
uses: Swatinem/rust-cache@v2
- name: Setup vcpkg caching
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
- name: Install dependencies
env:
@@ -86,7 +77,7 @@ jobs:
echo "::endgroup::"
- name: Import code signing certificates
uses: Apple-Actions/import-codesign-certs@v3
uses: Apple-Actions/import-codesign-certs@v5
with:
# The certificates in a PKCS12 file encoded as a base64 string
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_BASE64 }}
@@ -104,7 +95,7 @@ jobs:
cmake ${GITHUB_WORKSPACE} \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DVCPKG_TARGET_TRIPLET=arm64-osx \
-DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_TOOLCHAIN_FILE=${{ steps.vcpkg.outputs.vcpkg-cmake }} \
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
@@ -125,7 +116,7 @@ jobs:
cmake ${GITHUB_WORKSPACE} \
-DCMAKE_OSX_ARCHITECTURES=x86_64 \
-DVCPKG_TARGET_TRIPLET=x64-osx \
-DCMAKE_TOOLCHAIN_FILE=${{ runner.temp }}/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_TOOLCHAIN_FILE=${{ steps.vcpkg.outputs.vcpkg-cmake }} \
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
@@ -212,14 +203,14 @@ jobs:
mv _CPack_Packages/*/Bundle/openttd-*.zip bundles/
- name: Store bundles
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: openttd-macos-universal
path: build-x64/bundles
retention-days: 5
- name: Store symbols
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: symbols-macos-universal
path: build-x64/symbols
+5 -5
View File
@@ -30,14 +30,14 @@ jobs:
steps:
- name: Checkout (Release)
if: github.event_name == 'release'
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
# We generate a changelog; for this we need the full git log.
fetch-depth: 0
- name: Checkout (Manual)
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.inputs.ref }}
# We generate a changelog; for this we need the full git log.
@@ -45,7 +45,7 @@ jobs:
- name: Checkout (Trigger)
if: github.event_name == 'repository_dispatch'
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.event.client_payload.ref }}
# We generate a changelog; for this we need the full git log.
@@ -202,14 +202,14 @@ jobs:
echo "::endgroup::"
- name: Store bundles
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: openttd-source
path: build/bundles/*
retention-days: 5
- name: Store source (for other jobs)
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: internal-source
path: source.tar.gz
+11 -11
View File
@@ -15,7 +15,7 @@ jobs:
steps:
- name: Download source
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: internal-source
@@ -25,17 +25,17 @@ jobs:
tar -xf source.tar.gz --strip-components=1
- name: Download x86 build
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: openttd-windows-x86
- name: Download x64 build
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: openttd-windows-x64
- name: Download arm64 build
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: openttd-windows-arm64
@@ -74,16 +74,16 @@ jobs:
mkdir -p builds/common-binaries/baseset
cd builds/common-binaries/baseset
echo "::group::Download OpenGFX"
curl -L https://cdn.openttd.org/opengfx-releases/7.1/opengfx-7.1-all.zip -o opengfx-all.zip
echo "::group::Download OpenGFX2"
curl -L https://cdn.openttd.org/opengfx2_classic-releases/0.8/opengfx2_classic-0.8-all.zip -o opengfx2_classic.zip
echo "::endgroup::"
echo "::group::Unpack OpenGFX"
unzip opengfx-all.zip
tar xf opengfx-*.tar
echo "::group::Unpack OpenGFX2"
unzip opengfx2_classic.zip
tar xf OpenGFX2_Classic-0.8.tar
echo "::endgroup::"
rm -f opengfx-all.zip opengfx-*.tar
rm -f opengfx2_classic.zip OpenGFX2_Classic-0.8.tar
- name: Install OpenMSX
shell: bash
@@ -185,7 +185,7 @@ jobs:
move output\OpenTTD.appxbundle bundles\internal\openttd-${{ inputs.version }}-windows-store.appxbundle
- name: Store bundles
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: openttd-windows-store
path: builds/bundles
+9 -18
View File
@@ -30,7 +30,7 @@ jobs:
steps:
- name: Download source
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: internal-source
@@ -45,24 +45,15 @@ jobs:
- name: Enable Rust cache
uses: Swatinem/rust-cache@v2
- name: Setup vcpkg caching
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}\vcpkg
${{ runner.temp }}\vcpkg\bootstrap-vcpkg.bat -disableMetrics
- name: Setup vcpkg
id: vcpkg
uses: OpenTTD/actions/setup-vcpkg@v6
- name: Install dependencies
shell: bash
run: |
echo "::group::Install choco dependencies"
choco install pandoc
choco install pandoc nsis
echo "::endgroup::"
echo "::group::Install breakpad dependencies"
@@ -111,7 +102,7 @@ jobs:
cmake ${GITHUB_WORKSPACE} \
-GNinja \
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
-DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}\vcpkg\scripts\buildsystems\vcpkg.cmake" \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.vcpkg.outputs.vcpkg-cmake }}" \
-DOPTION_USE_NSIS=ON \
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
@@ -141,7 +132,7 @@ jobs:
cmake ${GITHUB_WORKSPACE} \
-GNinja \
-DVCPKG_TARGET_TRIPLET=${{ matrix.arch }}-windows-static \
-DCMAKE_TOOLCHAIN_FILE="${{ runner.temp }}\vcpkg\scripts\buildsystems\vcpkg.cmake" \
-DCMAKE_TOOLCHAIN_FILE="${{ steps.vcpkg.outputs.vcpkg-cmake }}" \
-DHOST_BINARY_DIR=${GITHUB_WORKSPACE}/build-host \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DOPTION_SURVEY_KEY=${{ inputs.survey_key }} \
@@ -202,14 +193,14 @@ jobs:
AZURE_CODESIGN_PROFILE_NAME: ${{ secrets.AZURE_CODESIGN_PROFILE_NAME }}
- name: Store bundles
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: openttd-windows-${{ matrix.arch }}
path: build/bundles
retention-days: 5
- name: Store symbols
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: symbols-windows-${{ matrix.arch }}
path: build/symbols
@@ -14,7 +14,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Check for finding script functions that require company/deity mode enforcement/checks
run: |
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Check for unused strings
run: |
+6 -6
View File
@@ -21,7 +21,7 @@ jobs:
steps:
- name: Download all bundles
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
- name: Calculate checksums
run: |
@@ -70,14 +70,14 @@ jobs:
done
- name: Store bundles
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: cdn-bundles
path: bundles/*
retention-days: 5
- name: Store breakpad symbols
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: cdn-symbols
path: symbols/*
@@ -88,7 +88,7 @@ jobs:
- prepare
name: Publish bundles
uses: OpenTTD/actions/.github/workflows/rw-cdn-upload.yml@v5
uses: OpenTTD/actions/.github/workflows/rw-cdn-upload.yml@v6
secrets:
CDN_SIGNING_KEY: ${{ secrets.CDN_SIGNING_KEY }}
DEPLOYMENT_APP_ID: ${{ secrets.DEPLOYMENT_APP_ID }}
@@ -103,7 +103,7 @@ jobs:
- prepare
name: Publish symbols
uses: OpenTTD/actions/.github/workflows/rw-symbols-upload.yml@v5
uses: OpenTTD/actions/.github/workflows/rw-symbols-upload.yml@v6
secrets:
SYMBOLS_SIGNING_KEY: ${{ secrets.SYMBOLS_SIGNING_KEY }}
with:
@@ -130,7 +130,7 @@ jobs:
installation_retrieval_payload: "OpenTTD/workflows"
- name: Trigger 'Publish Docs'
uses: peter-evans/repository-dispatch@v3
uses: peter-evans/repository-dispatch@v4
with:
token: ${{ steps.generate_token.outputs.token }}
repository: OpenTTD/workflows
+17 -18
View File
@@ -15,40 +15,39 @@ jobs:
steps:
- name: Download source
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: internal-source
path: internal-source
- name: Download bundle (Windows x86)
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: openttd-windows-x86
path: openttd-windows-x86
- name: Download bundle (Windows x64)
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: openttd-windows-x64
path: openttd-windows-x64
- name: Download bundle (MacOS)
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: openttd-macos-universal
path: openttd-macos-universal
- name: Download bundle (Linux)
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: openttd-linux-generic
path: openttd-linux-generic
- name: Install GOG Galaxy Build Creator
run: |
wget https://cdn.gog.com/open/galaxy/pipeline/build_creator/gnu-linux/GOGGalaxyBuildCreator-1.4.0.AppImage
7z x GOGGalaxyBuildCreator-1.4.0.AppImage
chmod +x ./app/GOGGalaxyPipelineBuilder
wget https://cdn.gog.com/open/galaxy/pipeline/10.6.7.17/gnu-linux/GOGGalaxyPipelineBuilder
chmod +x ./GOGGalaxyPipelineBuilder
- name: Install OpenGFX
shell: bash
@@ -56,16 +55,16 @@ jobs:
mkdir -p gog/opengfx/baseset
cd gog/opengfx/baseset
echo "::group::Download OpenGFX"
curl -L https://cdn.openttd.org/opengfx-releases/7.1/opengfx-7.1-all.zip -o opengfx-all.zip
echo "::group::Download OpenGFX2"
curl -L https://cdn.openttd.org/opengfx2_classic-releases/0.8/opengfx2_classic-0.8-all.zip -o opengfx2_classic.zip
echo "::endgroup::"
echo "::group::Unpack OpenGFX"
unzip opengfx-all.zip
tar xf opengfx-*.tar
echo "::group::Unpack OpenGFX2"
unzip opengfx2_classic.zip
tar xf OpenGFX2_Classic-0.8.tar
echo "::endgroup::"
rm -f opengfx-all.zip opengfx-*.tar
rm -f opengfx2_classic.zip OpenGFX2_Classic-0.8.tar
- name: Install OpenMSX
shell: bash
@@ -77,7 +76,7 @@ jobs:
curl -L https://cdn.openttd.org/openmsx-releases/0.4.2/openmsx-0.4.2-all.zip -o openmsx-all.zip
echo "::endgroup::"
echo "::group::Unpack OpenGFX"
echo "::group::Unpack OpenMSX"
unzip openmsx-all.zip
tar xf openmsx-*.tar
echo "::endgroup::"
@@ -145,8 +144,8 @@ jobs:
echo "::endgroup::"
echo "::group::Upload to GOG"
../app/GOGGalaxyPipelineBuilder build-game --username "${{ secrets.GOG_USERNAME }}" --password "${{ secrets.GOG_PASSWORD }}" --branch Testing windows.json
../app/GOGGalaxyPipelineBuilder build-game --username "${{ secrets.GOG_USERNAME }}" --password "${{ secrets.GOG_PASSWORD }}" --branch Testing macos.json
../app/GOGGalaxyPipelineBuilder build-game --username "${{ secrets.GOG_USERNAME }}" --password "${{ secrets.GOG_PASSWORD }}" --branch Testing linux.json
../GOGGalaxyPipelineBuilder build-game --username "${{ secrets.GOG_USERNAME }}" --password "${{ secrets.GOG_PASSWORD }}" --branch Testing windows.json
../GOGGalaxyPipelineBuilder build-game --username "${{ secrets.GOG_USERNAME }}" --password "${{ secrets.GOG_PASSWORD }}" --branch Testing macos.json
../GOGGalaxyPipelineBuilder build-game --username "${{ secrets.GOG_USERNAME }}" --password "${{ secrets.GOG_PASSWORD }}" --branch Testing linux.json
echo "::endgroup::"
)
+5 -5
View File
@@ -18,31 +18,31 @@ jobs:
steps:
- name: Download source
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: internal-source
path: internal-source
- name: Download bundle (Windows x86)
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: openttd-windows-x86
path: openttd-windows-x86
- name: Download bundle (Windows x64)
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: openttd-windows-x64
path: openttd-windows-x64
- name: Download bundle (MacOS)
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: openttd-macos-universal
path: openttd-macos-universal
- name: Download bundle (Linux)
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
name: openttd-linux-generic
path: openttd-linux-generic
+23
View File
@@ -196,6 +196,29 @@ These include:
You may also want the guide to [compiling OpenTTD](./COMPILING.md).
## Use of AI
OpenTTD is a labour of love, created by people.
Please refrain from submitting issues or pull requests that have been generated by an LLM or other fully-automated tools.
Any submission that is in violation of this policy will be closed, and the submitter may be blocked from this repository without warning.
If you submit an issue, you need to understand what your issue description is saying.
You need to be able to answer questions about your bug report or feature request.
Using an AI tool to _proofread_ your issue/comment text is acceptable. Using an AI tool to _write_ your issue/comment text is not.
If you submit a pull request, you need to understand what every line of code you've changed does.
If you can't explain why your PR is doing something, then do not submit it.
Using an AI tool to generate entire lines of code is unacceptable.
The rationale behind this policy is that automated contributions are a waste of the maintainers' time.
Humans spend their time and brainpower reviewing every submission.
Issues or pull requests generated by automation tools create an imbalance of effort between the submitter and the reviewer.
Nobody learns anything when a maintainer reviews code written by an LLM.
Additionally, AI-generated code conflicts with this project's license (GPL v2), since you cannot truly release code for use if you didn't author it yourself.
## Project goals
### What are the goals of the official branch?
+2 -3
View File
@@ -6,7 +6,7 @@ GNU General Public License
_Version 2, June 1991_
_Copyright © 1989, 1991 Free Software Foundation, Inc.,_
_51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA_
_[https://fsf.org/](https://fsf.org/)_
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -304,8 +304,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
with this program. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
Also add information on how to contact you by electronic and paper mail.
+1 -1
View File
@@ -1,7 +1,7 @@
# This file is part of OpenTTD.
# OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
# OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
# See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
# Doxyfile 1.9.4
+2 -14
View File
@@ -37,12 +37,10 @@ Both 'stable' and 'nightly' versions are available for download:
OpenTTD is also available for free on [Steam](https://store.steampowered.com/app/1536610/OpenTTD/), [GOG.com](https://www.gog.com/game/openttd), and the [Microsoft Store](https://www.microsoft.com/p/openttd-official/9ncjg5rvrr1c). On some platforms OpenTTD will be available via your OS package manager or a similar service.
## 1.2) OpenTTD gameplay manual
OpenTTD has a [community-maintained wiki](https://wiki.openttd.org/), including a gameplay manual and tips.
## 1.3) Supported platforms
OpenTTD has been ported to several platforms and operating systems.
@@ -56,6 +54,7 @@ The currently supported platforms are:
Other platforms may also work (in particular various BSD systems), but we don't actively test or maintain these.
### 1.3.1) Legacy support
Platforms, languages and compilers change.
We'll keep support going on old platforms as long as someone is interested in supporting them, except where it means the project can't move forward to keep up with language and compiler features.
@@ -72,7 +71,6 @@ For some platforms these will be downloaded during the installation process if r
For some platforms, you will need to refer to [the installation guide](https://wiki.openttd.org/en/Manual/Installation).
### 1.4.1) Free graphics and sound files
The free data files, split into OpenGFX for graphics, OpenSFX for sounds and
@@ -85,7 +83,6 @@ OpenMSX for music can be found at:
Please follow the readme of these packages about the installation procedure.
The Windows installer can optionally download and install these packages.
### 1.4.2) Original Transport Tycoon Deluxe graphics and sound files
If you want to play with the original Transport Tycoon Deluxe data files you have to copy the data files from the CD-ROM into the baseset/ directory.
@@ -100,7 +97,6 @@ You need to copy the following files:
- trgir.grf or TRGI.GRF
- trgtr.grf or TRGT.GRF
### 1.4.3) Original Transport Tycoon Deluxe music
If you want the Transport Tycoon Deluxe music, copy the appropriate files from the original game into the baseset folder.
@@ -108,7 +104,6 @@ If you want the Transport Tycoon Deluxe music, copy the appropriate files from t
- TTD for DOS: The GM.CAT file
- Transport Tycoon Original: The GM.CAT file, but rename it to GM-TTO.CAT
## 1.5) Add-on content / mods
OpenTTD features multiple types of add-on content, which modify gameplay in different ways.
@@ -117,7 +112,6 @@ Most types of add-on content can be downloaded within OpenTTD via the 'Check Onl
Add-on content can also be installed manually, but that's more complicated; the [OpenTTD wiki](https://wiki.openttd.org/) may offer help with that, or the [OpenTTD directory structure guide](./docs/directory_structure.md).
### 1.5.1) Social Integration
OpenTTD has the ability to load plugins to integrate with Social Platforms like Steam, Discord, etc.
@@ -126,7 +120,6 @@ To enable such integration, the plugin for the specific platform has to be downl
See [OpenTTD's website](https://www.openttd.org), under Downloads, for what plugins are available.
### 1.6) OpenTTD directories
OpenTTD uses its own directory structure to store game data, add-on content etc.
@@ -137,7 +130,6 @@ For more information, see the [directory structure guide](./docs/directory_struc
If you want to compile OpenTTD from source, instructions can be found in [COMPILING.md](./COMPILING.md).
## 2.0) Contact and Community
'Official' channels
@@ -160,12 +152,10 @@ You can play OpenTTD with others, either cooperatively or competitively.
See the [multiplayer documentation](./docs/multiplayer.md) for more details.
### 2.2) Contributing to OpenTTD
We welcome contributors to OpenTTD. More information for contributors can be found in [CONTRIBUTING.md](./CONTRIBUTING.md)
### 2.3) Reporting bugs
Good bug reports are very helpful. We have a [guide to reporting bugs](./CONTRIBUTING.md#bug-reports) to help with this.
@@ -173,12 +163,10 @@ Good bug reports are very helpful. We have a [guide to reporting bugs](./CONTRI
Desyncs in multiplayer are complex to debug and report (some software development skils are required).
Instructions can be found in [debugging and reporting desyncs](./docs/debugging_desyncs.md).
### 2.4) Translating
OpenTTD is translated into many languages. Translations are added and updated via the [online translation tool](https://translator.openttd.org).
## 3.0) Licensing
OpenTTD is licensed under the GNU General Public License version 2.0.
@@ -215,6 +203,6 @@ See `src/3rdparty/openttd_social_integration_api/LICENSE` for the complete licen
The atomic datatype support detection in `cmake/3rdparty/llvm/CheckAtomic.cmake` is licensed under the Apache 2.0 license.
See `cmake/3rdparty/llvm/LICENSE.txt` for the complete license text.
## 4.0 Credits
## 4.0) Credits
See [CREDITS.md](./CREDITS.md)
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.0 to 0.7. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.1 to 1.0. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.2 to 1.1. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.11 to 1.10. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 12 to 1.11. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.3 to 1.2. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.4 to 1.3. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.5 to 1.4. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.6 to 1.5. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.7 to 1.6. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.8 to 1.7. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.9 to 1.8. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.10 to 1.9. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 13 to 12. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 14 to 13. */
+9 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 15 to 14. */
@@ -36,3 +36,11 @@ AITown.FoundTown <- function(tile, size, city, layout, name) { return AITown.Fou
AIVehicle.SetNameCompat14 <- AIVehicle.SetName;
AIVehicle.SetName <- function(id, name) { return AIVehicle.SetNameCompat14(id, AICompat14.Text(name)); }
AIObject.constructorCompat14 <- AIObject.constructor;
foreach(name, object in CompatScriptRootTable) {
if (type(object) != "class") continue;
if (!object.rawin("constructor")) continue;
if (object.constructor != AIObject.constructorCompat14) continue;
object.constructor <- function() : (name) { AILog.Error("'" + name + "' is not instantiable"); }
}
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.11 to 1.10. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 12 to 1.11. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.3 to 1.2. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.4 to 1.3. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.5 to 1.4 */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.6 to 1.5. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.7 to 1.6. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.8 to 1.7. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.9 to 1.8. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 1.10 to 1.9. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 13 to 12. */
+1 -1
View File
@@ -2,7 +2,7 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 14 to 13. */
+12 -1
View File
@@ -2,13 +2,16 @@
* This file is part of OpenTTD.
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
*/
/* This file contains code to downgrade the API from 15 to 14. */
GSBridge.GetBridgeID <- GSBridge.GetBridgeType;
/* Emulate old GSText parameter padding behaviour */
GSText.SCRIPT_TEXT_MAX_PARAMETERS <- 20;
class GSCompat14 {
function Text(text)
{
@@ -78,3 +81,11 @@ GSTown.FoundTown <- function(tile, size, city, layout, name) { return GSTown.Fou
GSVehicle.SetNameCompat14 <- GSVehicle.SetName;
GSVehicle.SetName <- function(id, name) { return GSVehicle.SetNameCompat14(id, GSCompat14.Text(name)); }
GSObject.constructorCompat14 <- GSObject.constructor;
foreach(name, object in CompatScriptRootTable) {
if (type(object) != "class") continue;
if (!object.rawin("constructor")) continue;
if (object.constructor != GSObject.constructorCompat14) continue;
object.constructor <- function() : (name) { GSLog.Error("'" + name + "' is not instantiable"); }
}
+309
View File
@@ -1,5 +1,313 @@
## 15.x
### 15.1 (2026-01-24)
- Fix #15088: When building a new train, the refit button state may be incorrect (#15162)
- Fix #15160: Incorrect company names displayed in load game window (#15161)
- Fix #15153: Wrong tile used to get bridge reservation overlay (#15154)
- Fix #15116: Old cargo/industry sets without cargo translation table broken (#15150)
- Fix: Possible crash converting company liveries in older savegames/scenarios (#15148)
- Fix: Allow infinite water to be (de)selected when loading heightmap (#15146)
- Fix: Tile suitability test for farm field no longer handled snow tiles (#15134)
- Fix #15131: Trees no longer spread on partially snowy tiles (#15133)
- Fix: Change tooltips to match change from checkboxes to switches (#15123)
- Fix: [Script] Potential out of bounds array/string slice indexes (#15106)
- Fix: [Script] Potential out of bounds indexed string access (#15106)
- Fix: [Script] Check if array sort function modified array (#15106)
- Fix #15069: World generation map edges GUI starts in an invalid state (#15082)
- Fix #15079: Incorrect dates shown on town cargo history graph (#15080)
- Fix #15067: Mark NewGRF settings as modified after moving by drag & drop (#15068)
- Fix: Incorrect error message for aqueducts reaching northern map borders (#14974)
- Fix: Standardize wording of GRF/NewGRF (#15059)
- Fix #15046: Crash on loading game due to invalid group parents (#15049)
- Fix: Disable_elrails handling with engines that use both RAIL and ELRL (#15045)
- Fix: [Fluidsynth] Read settings from system and user config files if available (#15044)
- Fix #15039: Name and version can disappear from content list (#15040)
- Fix #15026: Remove incorrect info from base sounds tooltip (#15029)
- Fix: [Script] Improve reporting of invalid GetAPIVersion return (#15015)
- Fix: [Script] Undefined behaviour after calling SwapList during iteration (#14805)
### 15.0 (2026-01-01)
- Fix: Small ufos would loop over vehicles in depots forever (#15008)
- Fix #14982: Can't place buoys under bridges (#15007)
- Fix #15004: Crashes when dropdown is held open during endgame screen (#15006)
- Fix: Further improve town spawning near water (#15002)
- Fix: Use correct 'minutes per year' setting for old savegames (#14995)
- Fix: Rare crash dividing by 0 when drawing a line (#14994)
- Fix #14992: Respect non-stop order setting when adding waypoint orders (#14993)
### 15.0-RC4 (2025-12-26)
- Fix: Incorrect text colour in fund industry window (#14987)
- Fix: Towns failed to find spawn locations near water (#14988)
- Fix: Don't draw bridge deck rail sprites for default bridges (#14985)
- Fix: "(Invalid parameter)" in error message when trying to remove another player's object (#14981)
- Fix #14978: Don't clear water tiles after removing buoys (#14980)
- Fix #14973: Composed strings are incorrect colour (#14976)
- Fix: Badge filter toggles no longer worked (#14972)
- Fix #12465: Click/tooltip alignment of industry chain cargo lines (#14963)
- Fix #14951: Possible incorrect data in industry production graphs (#14962)
- Fix #14958: Crash when opening station window (#14959)
- Fix #14938: Don't allow cacti to die off (#14956)
- Fix: Don't allow joining a company after it was taken over (#14955)
- Fix #14949: Crash when moving station sign in a network game (#14950)
- Fix #14945: Hang when deleting implicit orders during vehicle loading (#14946)
### 15.0-RC3 (2025-12-20)
- Fix #14932: [NewGRF] Increase internal badge index size to avoid overflowing BadgeIDs (#14933)
- Fix: Crash related to object picker recolours in Scenario Editor (#14929)
- Fix #14921: Crash during station autorefit if station doesn't accept current cargo type (#14924)
- Fix #14917: Crash when opening house picker with no houses available (#14920)
- Fix #14916: Duration of error message window could be too short (#14919)
- Fix #14915: Crash due to divide-by-zero of industry probabilities (#14918)
- Fix: Script configs were cleared by intro game (#14910)
- Fix: [NewGRF] Automatically push/pop colours when formatting a sub-string (#14006)
### 15.0-RC2 (2025-12-13)
- Fix #14677: Desync due to using newgame time settings to validate savegame time settings (#14904)
- Fix: Graph label allocated size could be too small (#14901)
- Fix #14891: Minimum sprite zoomlevel could break in some cases showing placeholder sprites instead (#14894)
- Fix #14889: [FluidSynth] Don't try to load a soundfont that doesn't exist (#14890)
- Revert: Dynamic font loading changes removed (#14903)
### 15.0-RC1 (2025-12-07)
- Feature: Automatically load extra fonts for missing glyphs (#13303, #14856)
- Feature: Rivers can end in wetlands if unable to reach sea (#14784, #14846)
- Feature: Signs, waypoint and station names may be moved (#14744)
- Feature: House placer mode to replace existing houses (#14469)
- Feature: Draw infinite water when all borders are water (#13289)
- Add: [NewGRF] Allow badges to be excluded from badge name list (#14818)
- Add: [Script] ScriptTile::IsHouseTile (#14806)
- Add: Game units for height (#14615)
- Add: Show height difference in bridge is too low error message (#14614)
- Add: Include build cost in rail/road dropdowns (#14599)
- Add: Show all railtypes in the build vehicle and engine preview dialogs (#14357)
- Add: [Script] Function to get all rail types of an rail engine (#14357)
- Add: [NewGRF] Train property to set multiple track types for an engine (#14357)
- Add: [Script] Auto-convert ObjectType bool to integer when setting values for items in lists via [] (#14308)
- Change: Ensure generated towns have enough room (#14803)
- Change: Eliminate small seas instead of ending rivers there (#14797)
- Change: Clamp terraform toolbar to main toolbar (#14725)
- Change: Make groups window group list aware of interface scaling (#14679)
- Change: Prefer normal/medium weight font in FontConfig fallback detection (#14672)
- Change: Support interface scaling in network client list buttons (#14659)
- Change: Record and show multiple errors for each NewGRF (#14658)
- Change: Replace the "(City)" identifier in the town directory with the city icon (#14634)
- Change: Determine automatic interface scale by window size (#14627)
- Change: Apply interface scale to window snap distance (#14625)
- Change: Ask for confirmation before deleting a savegame / scenario / heightmap (#14621)
- Change: Add lock penalty to ship pathfinder (#14603)
- Change: Allow bridges over locks & docks (#14595, #14594)
- Change: Removed disable_node_optimization YAPF setting (#14578)
- Change: Provide road and rail overlay sprites for bridge decks (#14557)
- Change: Scale number of towns/industries by amount of land tiles (#10063)
- Fix #14802: Close NewGRF inspection window when overbuilding with default station/waypoint (#14859)
- Fix #14839: Do not set stacked widget height, which might not be shown (#14858)
- Fix: Incorrect background colour in badge configuration list (#14850)
- Fix #14844: Use company colour remap for badges in picker window (#14849)
- Fix: Drop down scrolling broken for mixed-height items (#14840)
- Fix #8062: (Try to) ensure enough room for profit in vehicle group window (#14835)
- Fix #9071: Don't consider tram tracks when growing towns (#14833)
- Fix: Saved default houses had incorrect class and index information (#14812)
- Fix #14756: Invalidate nested focus before widget container is cleared (#14809)
- Fix #14800: Incorrect register processing in GetCustomStationRelocation (#14801)
- Fix #14755: Remove clicked type selection when not visible (#14796)
- Fix: Incorrect parsing of var 6x parameter in NewGRF debug window (#14789)
- Fix: Improve lighthouse spawn conditions (#14785)
- Fix #14777: authorized_key add/remove console commands did not apply to correct list (#14778)
- Fix: Incorrect spacing for badges in dropdown lists (#14768)
- Fix: Unconfigured badge classes should be visible in column 0 by default (#14766)
- Fix #14763: Crash if NewGRF currency separator is not valid (#14764)
- Fix #14701: Company colour remap for sprites in badge filter dropdowns (#14732)
- Fix: Do not pre-fill industry production history for unused production slots (#14730)
- Fix: Depot-related crash when loading old savegames (#14729)
- Fix #14721, #14723: Inconsistent behaviour when skipping signals (#14724)
- Fix: Miscalculated cargo penalty for poor station rating (#14712)
- Fix: Crash when user enters a blank line in the console (#14711)
- Fix: Console command dump_info should not reverse non-ASCII label (#14697)
- Fix: Incorrect parameter order for CmdSetCompanyManagerFace (#14695)
- Fix: Bootstrap ignored default OpenTTD truetype fonts (#14684)
- Fix: League Table layout broken with RTL languages (#14667)
- Fix #14549: Changing interface scale could underflow viewport zoom (#14655)
- Fix: Incorrect row height in network server list (#14653)
- Fix: Doubled beep sounds when clicking toolbar buttons (#14642)
- Fix: Wrong button type for town menu in scenario editor toolbar (#14641)
- Fix #14631: Waypoint customs spec not allocated properly on initial construction (#14633)
- Fix: Variant cycle detection in FinaliseEngineArray (#14629)
- Fix #14620: Use full file path when deleting files (#14623)
- Fix: [Script] Return rail types as list instead of bitmask (#14617)
- Fix #14604: Clearing tiles to build objects did not update town ratings (#14616)
- Fix: Bridge height check for waypoints didn't include axis in layout (#14609)
- Fix #14607: Bridge-over-station discrepancy depending on build order (#14608)
- Fix: Don't add spacing in rail/road type dropdowns if no badges are present (#14598)
- Fix: [Script] Incorrect infrastructure cost for road/tram tiles (#14596)
- Fix #14588: Show error when unable to clone partly-cleared crashed train (#14591)
- Fix #14586: Empty station tile layouts incorrectly substituted with default layouts (#14587)
- Fix #14584: Crash due to drawing non-existent orders of new vehicle (#14585)
- Fix #14572: Incorrect playlist entry was removed if there are duplicates (#14583)
- Fix: Wrong row may be selected in music playlists (#14581)
- Fix #14569: Ensure music playlist window is large enough (#14570)
- Fix #14278: [Script] Memory allocation limit did not work and could result in a crash (#14568)
- Fix: Road stop properties 0x13/0x14 were not skipped properly (#14567)
- Fix #13922: Ensure music track number widget is wide enough for track number (#14566)
- Fix: Badge filters were only applied to trains (#14565)
- Fix: [NewGRF] Industry acceptance/production when not contiguous range from 0 (#14555)
- Fix #14240: Remember previous GUI scale when toggling auto-detect (#14380)
- Remove: Rail type cost from replace vehicle window (#14748)
### 15.0-beta3 (2025-08-31)
- Feature: Identify cities in the main viewport by appending an icon to their names (#14504)
- Feature: Allow stations and roadstops under bridges (#14477)
- Feature: Separate ships travelling in opposite direction (#14493)
- Feature: Town and Industry cargo history graphs (#14321, #14461)
- Feature: New company face definition system and UI (#14319)
- Feature: Rework intro screen menu (#14220, #14233)
- Feature: Scrollbar for infrastructure window (#14056)
- Feature: Double-Ctrl+Click on default size box to clear saved size (#14055)
- Feature: Configure badges in build vehicle and picker windows (#13993, #14021)
- Feature: Player configuration of badge display (#13993, #14021)
- Feature: Merge Game Options and Game Settings together (#13242, #14088)
- Feature: Option to disable activate-on-release behaviour of toolbar dropdown buttons (#10938)
- Add: Maori (New Zealand) language (#14540)
- Add: Vietnamese Dong currency (#14474)
- Add: Buttons to change picker preview image height (#14373)
- Add: Show and sort online content version in list (#14355)
- Add: Allow separate expansion of town buildings and roads in scenario editor (#14341)
- Add: Hover on graph legend to highlight line (#14314)
- Add: [Script] Ability to clone ScriptList objects (#14305)
- Add: [NewGRF] All callbacks returning D0xx strings, have now the option to return any string id via register 0x100 (#14224)
- Add: [BaseSet] Allow basesets to set minor and patch versions in obg/obs/obm files (#14169)
- Add: "Many random towns" button in scenario editor now prompts for the number of towns, with defaults based on new game settings (#14158)
- Add: [NewGRF] Special value 0x7FFE for VarAction2 results specifying 'return calculated result' (#14149)
- Add: [NewGRF] Special value 0x7FFF for Action2 references specifying explicit 'callback/sprite-resolving failed' (#14149)
- Add: [NewGRF] Add purchase list Action3 CID for houses, industries, industry tiles, airports and airport tiles (#14121)
- Add: [NewGRF] Provide random bits in var10 of house callback 1C 'construction stage changed' (#14095)
- Add: [NewGRF] Station/roadstop animation-triggers 'tile loop' (bit 7) and 'path reservation' (bit 8) (#14080)
- Add: [Script] ScriptVehicleList_Waypoint (#13456)
- Change: Update OpenTTD TTF fonts to v0.8 (#14546)
- Change: Hide bridge pillars if obstructed by tile below (#14517)
- Change: Reduce visual height of default rail waypoints (#14503)
- Change: Improve sprite ellipsis appearance (#14404)
- Change: [Script] Don't allow scripts to instantiate ScriptEvent (#14276)
- Change: [Script] ScriptVehicleList_Station accepts an optional VehicleType parameter (#14260)
- Change: Remove Apply button from NewGRF config window when unneeded (#14254)
- Change: [NewGRF] Increase the textstack for all callbacks to 16 registers (#14224)
- Change: Remove button to toggle showing advanced signal types (#14219)
- Change: [Script] Remove the limit of 20 parameters to a Text string (#14193)
- Change: [NewGRF] If Action123 does not resolve in a valid SpriteSet, prefer drawing the default sprite instead of an invalid sprite (#14143)
- Change: Remove extra close buttons from some windows (#14124)
- Change: Limit height of settings description, and add scrollbar (#14102)
- Change: [NewGRF] Provide shared random bits in multi-tile animation-triggers of airport tiles and objects, just like for other features (#14090)
- Change: [NewGRF] Animation-trigger 'construction stage changed' of houses and industries now also triggers at construction start (#14089)
- Change: "setting" console command now shows default value (#14061)
- Change: Include dragged train in depot tile length display (#14060)
- Change: Don't select content when toggling its download status (#14059)
- Change: Draw boolean settings toggles as a slider widget (#14051, #14071)
- Change: Don't replace stripped control codes with '?' for scripts (#14028)
- Change: [Script] Move GSStation::GetOwner to GSBaseStation::GetOwner (#13406)
- Fix #14561: Vehicle effects were missing for vehicle on bridge (#14563)
- Fix #14553: Parameter configuration of pre-action 14 NewGRFs did not work (#14554)
- Fix: File/directory titles not updated if language is changed (#14542)
- Fix: Missing space after old file type identifier (#14541)
- Fix: Account for both text and icon size in station waiting cargo display (#14535)
- Fix: Crash when buying out company with groups (#14534)
- Fix #10222: Off by one drawing lines of certain widths (#14520, #14522, #14523)
- Fix: [Script] Invalid title on GSGoal.Question windows (#14519)
- Fix: 'Map edges' GUI buttons shouldn't initialize with water on northeast edge (#14514)
- Fix #14415: Update survey option text when changing setting (#14487)
- Fix #14480: Music player playlist buttons are clickable but non-operational in intro menu (#14482)
- Fix: Missing button beeps (#14470)
- Fix #14464: Invalid string parameter in scenario editor when unable to build industry (#14465)
- Fix: [Linkgraph] Use correct station ID when erasing flows (#14459)
- Fix: Vehicle liveries did not update when switching company (#14456)
- Fix: Engine preview window could have the wrong size (#14455)
- Fix #8167: No error sub-message when trying to clear protected buildings (#14444)
- Fix #14433: [NewGRF] Road tile for drive-through stops was not drawn (#14434)
- Fix: [Win32] Build failure with newer Windows SDK version due to WinRT changes (#14432)
- Fix #14396: Industry production graph showed zero when data was unavailable (#14416)
- Fix #14385: Crash in industry view due to incorrect string parameter calculations (#14413)
- Fix #14360: Stop reusing strings for Low/Medium/High setting values to improve translations (#14409)
- Fix #14377: Make house picker window remember house protection state when closed (#14406)
- Fix #14375: When loading config, validate timekeeping mode and minutes per year (#14405)
- Fix: Include sort button width in content list header minimal size (#14402)
- Fix: Don't draw truncation ellipsis if it's too wide (#14401)
- Fix: Don't include ellipsis width in RTL truncation offset (#14400)
- Fix: Buildings with non-zero subtile offsets broken in house picker (#14390)
- Fix #12900: Could not use join station with new non-square stations (#14378)
- Fix: Allow object picker to resize if there are no classes (#14372)
- Fix #14081: Only allow "rm" & "del" console commands to remove savegames (#14371)
- Fix: Train path reservations on different railtypes could join leading to train crashes (#14366)
- Fix #14356: Incorrect sprite group chosen for stations and road stops (#14359)
- Fix: Wrong error message about script Save() returned value (#14334)
- Fix: Hidden-by-facility station signs were not ignored when handling clicks (#14326)
- Fix: [Script] SQOpsLimiter had no effect for native valuator/filter (#14322)
- Fix: Crash if loading compatibility scripts fails (#14318)
- Fix #14277: Aircraft could land when a zeppelin was on the runway (#14317)
- Fix: Drag drop line position when dragging NewGRF from file to active panel (#14316)
- Fix: Upgrade button in NewGRF window no longer worked (#14315)
- Fix: [NewGRF] Clear rail vehicle flipped flag if reverse probability callback returns false (#14281)
- Fix: [Script] Conversion from ScriptEvent to ScriptEventCompanyTown subclasses (#14274)
- Fix: Empty first parameter of EncodedString was skipped (#14273)
- Fix #14271: Crash due to incorrect parameter index in string (#14272)
- Fix: Restore the behaviour when entering numbers in query windows: clamp integers out of range to the maximum valid value (#14268)
- Fix: Replacing a dropdown list could reposition it partially off-screen (#14261)
- Fix: Click+Dragging of selected order was not possible (#14259)
- Fix #14256: Company finance windows not updated when paused (#14258)
- Fix: Incorrect tile colour in smallmap for snowy clear tiles in vegetation mode (#14257)
- Fix #14241: Invalid string parameters in subsidies list window (#14243)
- Fix #13854: 40bpp-anim blitter recolouring failed for 32bpp pixels without mask channel (#14242)
- Fix #14234: Crash due to broken invalid string parameter handling (#14235, #14236)
- Fix: Closing the Game Options window closes all textfile windows (#14210)
- Fix: Zoom-scroll extra viewports only if the mouse cursor is over the viewport (#14209)
- Fix: Changing monospace font didn't refresh the monospace width cache, causing wrapping issues (#14185)
- Fix: Crash/Undefined behaviour in station view window (#14183)
- Fix: Handle tab characters when loading GS strings from savegame (#14180)
- Fix: [Script] Access to enum/consts defined outside of main.nut (#14176)
- Fix: Small order list arrow was wrong direction for RTL text (#14174)
- Fix #14170: Missing spaces for timetabled order strings (#14172)
- Fix #14166: Loan was no longer invalidated when refreshing finance window (#14168)
- Fix #14098: Ability to play MIDI tracks over 7 minutes long (#14144)
- Fix: [NewGRF] AI station construction callback did not work for stations with ID >= 0x100 (#14142)
- Fix: Out-of-bounds read, if NewGRF stations provided no spritesets (#14140)
- Fix: [NewGRF] The result of Action123 evaluation affected rerandomisation in a weird corner case (#14139)
- Fix: [NewGRF] Computed VarAction2 callback results were not always properly masked to 15 bit results (#14138)
- Fix #14125: NewGRF sounds were not loaded (#14130)
- Fix: List Ctrl+Click behaviour for vehicle details tooltip (#14127)
- Fix: Road vehicle blocking and train collisions used slightly inconsistent distance thresholds (#14114)
- Fix #14107: Mark the company value in the company view window dirty when it changes (#14112)
- Fix #14107: Invalidate all shared vehicle windows when changing group (#14110)
- Fix #14104: Don't base timetable timing decisions on client settings (#14105)
- Fix: Focus settings filter box (only) when the tab becomes active (#14100)
- Fix: [Script] Reject scripts using negative version (#14096)
- Fix: Map size column in server list could be too wide (#14094)
- Fix: [NewGRF] Cargo-types for airport-tile animation-triggers were not properly translated (#14092)
- Fix: [NewGRF] For animation-triggers which do not supply a cargo-type in var18, the var18 bits should remain empty (#14091)
- Fix: Changing language or interface scale could hang (#14087)
- Fix: [NewGRF] For roadstop multi-tile-animation-triggers, the upper 16 bits were not the same for all tiles (#14084)
- Fix: Town view caption lost "(City)" flag (#14082)
- Fix: [NewGRF] Randomisation-trigger 'path reservation' did not work for waypoints (#14076)
- Fix: Incorrect test of object flags allowed HQ to be removed (#14062)
- Fix: Odd drawing and crash if scrollbar is not tall enough (#14052)
- Fix: Incorrect string display for autoreplace wagon removal status (#14038)
- Fix: House picker crashes if selection is not available (#14030)
- Fix: [NewGRF] PrepareLayout worked on a copy of the data resulting in bad sprite layouts (#14013)
- Fix: [NewGRF] Strange things happened, when using the synchronised tile loop animation trigger for houses (#14011)
- Fix: [NewGRF] Animation speed properties of houses and stations had wrong default (#14005)
- Fix: [NewGRF] Roadstop animation/randomisation was not triggered on vehicle arrival (#14003)
- Fix: Don't display badges if the class has no name (#13994)
- Fix #13954: Plotting graphs with limited data to the right (#13956)
- Fix #13307: Return non-zero value when there is a mistake in command-line arguments (#13547)
- Fix: [Script] Make ScriptOrder functions aware of road waypoints (#13419)
- Fix: Scale graph gridlines and axes with GUI scale (#12131)
- Fix: Original graphics' tycoon-of-the-century sprite assumes a black background (#11679, #14545)
### 15.0-beta2 (2025-04-13)
- Feature: Snow-covered rocks are now visible (#13627)
@@ -20,6 +328,7 @@
- Add: Ukrainian Hryvnia currency (#12877)
- Add: Convert 32bpp-only sprites to 8bpp when needed (#11602)
- Change: [Script] Start GS (but don't run it) when generating world in scenario editor (#13961)
- Change: [Script] Add vehicle owner to crash event (#13878)
- Change: Make tree placement at world generation look more organic (#13515)
- Change: [MacOS] Put the icon in a rounded rectangle (#13446)
- Change: [Script] GetWaypointID to return the StationID of any waypoint (#13407)
+1 -1
View File
@@ -56,7 +56,7 @@ function(set_options)
option(OPTION_DEDICATED "Build dedicated server only (no GUI)" OFF)
option(OPTION_INSTALL_FHS "Install with Filesystem Hierarchy Standard folders" ${DEFAULT_OPTION_INSTALL_FHS})
option(OPTION_USE_ASSERTS "Use assertions; leave enabled for nightlies, betas, and RCs" ON)
option(OPTION_USE_ASSERTS "Use assertions; leave enabled for nightlies, betas, and RCs" OFF)
option(OPTION_USE_NSIS "Use NSIS to create windows installer; enable only for stable releases" OFF)
option(OPTION_TOOLS_ONLY "Build only tools target" OFF)
option(OPTION_DOCS_ONLY "Build only docs target" OFF)
+13
View File
@@ -25,6 +25,12 @@ if(EDITBIN_EXECUTABLE)
execute_process(COMMAND ${EDITBIN_EXECUTABLE} /nologo /subsystem:console ${OPENTTD_EXECUTABLE})
endif()
# Remove previous crash files
file(GLOB CRASH_FILES "regression/crash*")
if(CRASH_FILES)
file(REMOVE ${CRASH_FILES})
endif()
# Run the regression test
execute_process(COMMAND ${OPENTTD_EXECUTABLE}
-x
@@ -40,6 +46,13 @@ execute_process(COMMAND ${OPENTTD_EXECUTABLE}
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Detect any crash
file(GLOB CRASH_FILES "regression/crash*.log")
if (CRASH_FILES)
file(READ ${CRASH_FILES} CRASH_LOG)
message(FATAL_ERROR "OpenTTD crashed: ${CRASH_LOG}")
endif()
if(REGRESSION_OUTPUT)
message(FATAL_ERROR "Unexpected output: ${REGRESSION_OUTPUT}")
endif()
+99 -99
View File
@@ -17,41 +17,48 @@ if(NOT APILC)
endif()
macro(dump_fileheader)
get_filename_component(SCRIPT_API_FILE_NAME "${SCRIPT_API_FILE}" NAME)
string(APPEND SQUIRREL_EXPORT "\n#include \"../${SCRIPT_API_FILE_NAME}\"")
get_filename_component(SCRIPT_API_FILE_NAME "${SCRIPT_API_FILE}" NAME_WE)
string(APPEND SQUIRREL_EXPORT "\n#include \"../${SCRIPT_API_FILE_NAME}.hpp\"")
if(NOT "${APIUC}" STREQUAL "Template")
string(REPLACE "script_" "template_" SCRIPT_API_FILE_NAME "${SCRIPT_API_FILE_NAME}")
string(APPEND SQUIRREL_EXPORT "\n#include \"../template/${SCRIPT_API_FILE_NAME}.sq\"")
string(APPEND SQUIRREL_EXPORT "\n#include \"../template/${SCRIPT_API_FILE_NAME}.sq.hpp\"")
endif()
endmacro()
macro(open_namespace)
if(NOT NAMESPACE_OPENED)
string(APPEND SQUIRREL_EXPORT "\nnamespace SQConvert {")
set(NAMESPACE_OPENED TRUE)
endif()
endmacro()
macro(dump_class_templates NAME)
string(REGEX REPLACE "^Script" "" REALNAME ${NAME})
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<${NAME} *> { static inline ${NAME} *Get(HSQUIRRELVM vm, int index) { return static_cast<${NAME} *>(Squirrel::GetRealInstance(vm, index, \"${REALNAME}\")); } };")
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<${NAME} &> { static inline ${NAME} &Get(HSQUIRRELVM vm, int index) { return *static_cast<${NAME} *>(Squirrel::GetRealInstance(vm, index, \"${REALNAME}\")); } };")
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<const ${NAME} *> { static inline const ${NAME} *Get(HSQUIRRELVM vm, int index) { return static_cast<${NAME} *>(Squirrel::GetRealInstance(vm, index, \"${REALNAME}\")); } };")
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<const ${NAME} &> { static inline const ${NAME} &Get(HSQUIRRELVM vm, int index) { return *static_cast<${NAME} *>(Squirrel::GetRealInstance(vm, index, \"${REALNAME}\")); } };")
string(APPEND SQUIRREL_EXPORT "\n\ttemplate <> struct Param<${NAME} *> { static inline ${NAME} *Get(HSQUIRRELVM vm, int index) { return static_cast<${NAME} *>(Squirrel::GetRealInstance(vm, index, \"${REALNAME}\")); } };")
string(APPEND SQUIRREL_EXPORT "\n\ttemplate <> struct Param<${NAME} &> { static inline ${NAME} &Get(HSQUIRRELVM vm, int index) { return *static_cast<${NAME} *>(Squirrel::GetRealInstance(vm, index, \"${REALNAME}\")); } };")
string(APPEND SQUIRREL_EXPORT "\n\ttemplate <> struct Param<const ${NAME} *> { static inline const ${NAME} *Get(HSQUIRRELVM vm, int index) { return static_cast<${NAME} *>(Squirrel::GetRealInstance(vm, index, \"${REALNAME}\")); } };")
string(APPEND SQUIRREL_EXPORT "\n\ttemplate <> struct Param<const ${NAME} &> { static inline const ${NAME} &Get(HSQUIRRELVM vm, int index) { return *static_cast<${NAME} *>(Squirrel::GetRealInstance(vm, index, \"${REALNAME}\")); } };")
if("${NAME}" STREQUAL "ScriptEvent")
string(APPEND SQUIRREL_EXPORT "\n template <> struct Return<${NAME} *> { static inline int Set(HSQUIRRELVM vm, ${NAME} *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, \"${REALNAME}\", res, nullptr, DefSQDestructorCallback<${NAME}>, true); return 1; } };")
string(APPEND SQUIRREL_EXPORT "\n\ttemplate <> struct Return<${NAME} *> { static inline int Set(HSQUIRRELVM vm, ${NAME} *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } Squirrel::CreateClassInstanceVM(vm, \"${REALNAME}\", res, nullptr, DefSQDestructorCallback<${NAME}>, true); return 1; } };")
elseif("${NAME}" STREQUAL "ScriptText")
string(APPEND SQUIRREL_EXPORT "\n")
string(APPEND SQUIRREL_EXPORT "\n template <> struct Param<Text *> {")
string(APPEND SQUIRREL_EXPORT "\n static inline Text *Get(HSQUIRRELVM vm, int index) {")
string(APPEND SQUIRREL_EXPORT "\n if (sq_gettype(vm, index) == OT_INSTANCE) {")
string(APPEND SQUIRREL_EXPORT "\n return Param<ScriptText *>::Get(vm, index);")
string(APPEND SQUIRREL_EXPORT "\n }")
string(APPEND SQUIRREL_EXPORT "\n if (sq_gettype(vm, index) == OT_STRING) {")
string(APPEND SQUIRREL_EXPORT "\n return new RawText(Param<const std::string &>::Get(vm, index));")
string(APPEND SQUIRREL_EXPORT "\n }")
string(APPEND SQUIRREL_EXPORT "\n if (sq_gettype(vm, index) == OT_NULL) {")
string(APPEND SQUIRREL_EXPORT "\n return nullptr;")
string(APPEND SQUIRREL_EXPORT "\n }")
string(APPEND SQUIRREL_EXPORT "\n throw sq_throwerror(vm, fmt::format(\"parameter {} has an invalid type ; expected: 'Text'\", index - 1));")
string(APPEND SQUIRREL_EXPORT "\n }")
string(APPEND SQUIRREL_EXPORT "\n };")
string(APPEND SQUIRREL_EXPORT "\n\ttemplate <> struct Param<Text *> {")
string(APPEND SQUIRREL_EXPORT "\n\t\tstatic inline Text *Get(HSQUIRRELVM vm, int index) {")
string(APPEND SQUIRREL_EXPORT "\n\t\t\tif (sq_gettype(vm, index) == OT_INSTANCE) {")
string(APPEND SQUIRREL_EXPORT "\n\t\t\t\treturn Param<ScriptText *>::Get(vm, index);")
string(APPEND SQUIRREL_EXPORT "\n\t\t\t}")
string(APPEND SQUIRREL_EXPORT "\n\t\t\tif (sq_gettype(vm, index) == OT_STRING) {")
string(APPEND SQUIRREL_EXPORT "\n\t\t\t\treturn new RawText(Param<const std::string &>::Get(vm, index));")
string(APPEND SQUIRREL_EXPORT "\n\t\t\t}")
string(APPEND SQUIRREL_EXPORT "\n\t\t\tif (sq_gettype(vm, index) == OT_NULL) {")
string(APPEND SQUIRREL_EXPORT "\n\t\t\t\treturn nullptr;")
string(APPEND SQUIRREL_EXPORT "\n\t\t\t}")
string(APPEND SQUIRREL_EXPORT "\n\t\t\tthrow sq_throwerror(vm, fmt::format(\"parameter {} has an invalid type ; expected: 'Text'\", index - 1));")
string(APPEND SQUIRREL_EXPORT "\n\t\t}")
string(APPEND SQUIRREL_EXPORT "\n\t};")
else()
string(APPEND SQUIRREL_EXPORT "\n template <> struct Return<${NAME} *> { static inline int Set(HSQUIRRELVM vm, ${NAME} *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, \"${REALNAME}\", res, nullptr, DefSQDestructorCallback<${NAME}>, true); return 1; } };")
string(APPEND SQUIRREL_EXPORT "\n\ttemplate <> struct Return<${NAME} *> { static inline int Set(HSQUIRRELVM vm, ${NAME} *res) { if (res == nullptr) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, \"${REALNAME}\", res, nullptr, DefSQDestructorCallback<${NAME}>, true); return 1; } };")
endif()
endmacro()
@@ -66,7 +73,6 @@ macro(reset_reader)
unset(STATIC_METHODS)
unset(CLS)
unset(START_SQUIRREL_DEFINE_ON_NEXT_LINE)
set(CLS_LEVEL 0)
unset(CLS_IN_API)
endmacro()
@@ -75,6 +81,9 @@ reset_reader()
file(STRINGS "${SCRIPT_API_FILE}" SOURCE_LINES)
set(NUM_LINE 0)
set(CLS_LEVEL 0)
set(BRACE_LEVEL 0)
macro(doxygen_check)
if(NOT "${DOXYGEN_SKIP}" STREQUAL "")
message(FATAL_ERROR "${SCRIPT_API_FILE}:${NUM_LINE}: a DOXYGEN_API block was not properly closed")
@@ -110,7 +119,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
continue()
endif()
if("${LINE}" MATCHES "^([ ]*)\\* @api (.*)$")
if("${LINE}" MATCHES "^([\t ]*)\\* @api (.*)$")
set(LINE ${CMAKE_MATCH_2})
# By default, classes are not selected
if(NOT CLS_LEVEL)
@@ -148,22 +157,28 @@ foreach(LINE IN LISTS SOURCE_LINES)
continue()
endif()
# Count braces to skip function bodies
string(REGEX REPLACE "[^{]" "" OPENING_BRACES "${LINE}")
string(LENGTH "${OPENING_BRACES}" OPENING_BRACES)
string(REGEX REPLACE "[^}]" "" CLOSING_BRACES "${LINE}")
string(LENGTH "${CLOSING_BRACES}" CLOSING_BRACES)
math(EXPR BRACE_LEVEL "${BRACE_LEVEL} + ${OPENING_BRACES} - ${CLOSING_BRACES}")
# Ignore forward declarations of classes
if("${LINE}" MATCHES "^( *)class(.*);")
if("${LINE}" MATCHES "^(\t*)class(.*);")
continue()
endif()
# We only want to have public functions exported for now
if("${LINE}" MATCHES "^( *)class (.*) (: public|: protected|: private|:) ([^ ]*)")
if("${LINE}" MATCHES "^(\t*)class (.*) (: public|: protected|: private|:) ([^ ]*)")
if(NOT CLS_LEVEL)
if(NOT DEFINED API_SELECTED)
message(WARNING "Class '${CMAKE_MATCH_2}' has no @api. It won't be published to any API.")
message(WARNING "${SCRIPT_API_FILE}:${NUM_LINE}: Class '${CMAKE_MATCH_2}' has no @api. It won't be published to any API.")
set(API_SELECTED FALSE)
endif()
unset(IS_PUBLIC)
unset(CLS_PARAM_0)
set(CLS_PARAM_1 1)
set(CLS_PARAM_2 "x")
unset(CLS_PARAMS)
set(CLS_TYPES "x")
set(CLS_IN_API ${API_SELECTED})
unset(API_SELECTED)
set(CLS "${CMAKE_MATCH_2}")
@@ -181,19 +196,19 @@ foreach(LINE IN LISTS SOURCE_LINES)
math(EXPR CLS_LEVEL "${CLS_LEVEL} + 1")
continue()
endif()
if("${LINE}" MATCHES "^( *)public")
if("${LINE}" MATCHES "^(\t*)public")
if(CLS_LEVEL EQUAL 1)
set(IS_PUBLIC TRUE)
endif()
continue()
endif()
if("${LINE}" MATCHES "^( *)protected")
if("${LINE}" MATCHES "^(\t*)protected")
if(CLS_LEVEL EQUAL 1)
unset(IS_PUBLIC)
endif()
continue()
endif()
if("${LINE}" MATCHES "^( *)private")
if("${LINE}" MATCHES "^(\t*)private")
if(CLS_LEVEL EQUAL 1)
unset(IS_PUBLIC)
endif()
@@ -221,7 +236,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
endif()
# We need to make specialized conversions for structs
if("${LINE}" MATCHES "^( *)struct ([^ ]*)")
if("${LINE}" MATCHES "^(\t*)struct ([^ ]*)")
math(EXPR CLS_LEVEL "${CLS_LEVEL} + 1")
# Check if we want to publish this struct
@@ -243,7 +258,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
endif()
# We need to make specialized conversions for enums
if("${LINE}" MATCHES "^( *)enum ([^ ]*)")
if("${LINE}" MATCHES "^(\t*)enum ([^ ]*)")
math(EXPR CLS_LEVEL "${CLS_LEVEL} + 1")
# Check if we want to publish this enum
@@ -266,7 +281,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
endif()
# Maybe the end of the class, if so we can start with the Squirrel export pretty soon
if("${LINE}" MATCHES "};")
if(BRACE_LEVEL LESS CLS_LEVEL)
math(EXPR CLS_LEVEL "${CLS_LEVEL} - 1")
if(CLS_LEVEL)
unset(IN_ENUM)
@@ -280,7 +295,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
endif()
# Empty/white lines. When we may do the Squirrel export, do that export.
if("${LINE}" MATCHES "^([ ]*)$")
if("${LINE}" MATCHES "^([ \t]*)$")
if(NOT START_SQUIRREL_DEFINE_ON_NEXT_LINE)
continue()
endif()
@@ -304,33 +319,17 @@ foreach(LINE IN LISTS SOURCE_LINES)
string(APPEND SQUIRREL_EXPORT "\n")
if("${APIUC}" STREQUAL "Template")
# First check whether we have enums to print
if(DEFINED ENUMS)
if(NOT NAMESPACE_OPENED)
string(APPEND SQUIRREL_EXPORT "\nnamespace SQConvert {")
set(NAMESPACE_OPENED TRUE)
endif()
endif()
# Then check whether we have structs/classes to print
if(DEFINED STRUCTS)
if(NOT NAMESPACE_OPENED)
string(APPEND SQUIRREL_EXPORT "\nnamespace SQConvert {")
set(NAMESPACE_OPENED TRUE)
endif()
string(APPEND SQUIRREL_EXPORT "\n /* Allow inner classes/structs to be used as Squirrel parameters */")
open_namespace()
string(APPEND SQUIRREL_EXPORT "\n\t/* Allow inner classes/structs to be used as Squirrel parameters */")
foreach(STRUCT IN LISTS STRUCTS)
dump_class_templates(${STRUCT})
endforeach()
endif()
if(NOT NAMESPACE_OPENED)
string(APPEND SQUIRREL_EXPORT "\nnamespace SQConvert {")
set(NAMESPACE_OPENED TRUE)
else()
string(APPEND SQUIRREL_EXPORT "\n")
endif()
string(APPEND SQUIRREL_EXPORT "\n /* Allow ${CLS} to be used as Squirrel parameter */")
open_namespace()
string(APPEND SQUIRREL_EXPORT "\n\t/* Allow ${CLS} to be used as Squirrel parameter */")
dump_class_templates(${CLS})
string(APPEND SQUIRREL_EXPORT "\n} // namespace SQConvert")
@@ -340,23 +339,23 @@ foreach(LINE IN LISTS SOURCE_LINES)
endif()
string(APPEND SQUIRREL_EXPORT "\n")
string(APPEND SQUIRREL_EXPORT "\ntemplate <> SQInteger PushClassName<${CLS}, ScriptType::${APIUC}>(HSQUIRRELVM vm) { sq_pushstring(vm, \"${API_CLS}\", -1); return 1; }")
string(APPEND SQUIRREL_EXPORT "\ntemplate <> SQInteger PushClassName<${CLS}, ScriptType::${APIUC}>(HSQUIRRELVM vm) { sq_pushstring(vm, \"${API_CLS}\"); return 1; }")
string(APPEND SQUIRREL_EXPORT "\n")
# Then do the registration functions of the class.
string(APPEND SQUIRREL_EXPORT "\nvoid SQ${API_CLS}_Register(Squirrel *engine)")
string(APPEND SQUIRREL_EXPORT "\nvoid SQ${API_CLS}_Register(Squirrel &engine)")
string(APPEND SQUIRREL_EXPORT "\n{")
string(APPEND SQUIRREL_EXPORT "\n DefSQClass<${CLS}, ScriptType::${APIUC}> SQ${API_CLS}(\"${API_CLS}\");")
string(APPEND SQUIRREL_EXPORT "\n\tDefSQClass<${CLS}, ScriptType::${APIUC}> SQ${API_CLS}(\"${API_CLS}\");")
if("${SUPER_CLS}" STREQUAL "Text")
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.PreRegister(engine);")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.PreRegister(engine);")
else()
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.PreRegister(engine, \"${API_SUPER_CLS}\");")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.PreRegister(engine, \"${API_SUPER_CLS}\");")
endif()
if(NOT "${SUPER_CLS}" MATCHES "^ScriptEvent")
if("${CLS_PARAM_2}" STREQUAL "v")
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.AddSQAdvancedConstructor(engine);")
if((DEFINED CLS_PARAMS OR DEFINED METHODS) AND NOT "${SUPER_CLS}" MATCHES "^ScriptEvent" AND NOT "${CLS}" STREQUAL "ScriptEvent")
if("${CLS_TYPES}" STREQUAL "v")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.AddSQAdvancedConstructor(engine);")
else()
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.AddConstructor<void (${CLS}::*)(${CLS_PARAM_0}), ${CLS_PARAM_1}>(engine, \"${CLS_PARAM_2}\");")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.AddConstructor<void (${CLS}::*)(${CLS_PARAMS})>(engine, \"${CLS_TYPES}\");")
endif()
endif()
string(APPEND SQUIRREL_EXPORT "\n")
@@ -376,7 +375,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
foreach(i RANGE ${LEN})
string(APPEND SPACES " ")
endforeach()
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.DefSQConst(engine, ${CLS}::${ENUM_VALUE},${SPACES}\"${ENUM_VALUE}\");")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQConst(engine, ${CLS}::${ENUM_VALUE},${SPACES}\"${ENUM_VALUE}\");")
endforeach()
if(MLEN)
string(APPEND SQUIRREL_EXPORT "\n")
@@ -397,7 +396,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
foreach(i RANGE ${LEN})
string(APPEND SPACES " ")
endforeach()
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.DefSQConst(engine, ${CLS}::${CONST_VALUE},${SPACES}\"${CONST_VALUE}\");")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQConst(engine, ${CLS}::${CONST_VALUE},${SPACES}\"${CONST_VALUE}\");")
endforeach()
if(MLEN)
string(APPEND SQUIRREL_EXPORT "\n")
@@ -423,7 +422,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
foreach(i RANGE ${LEN})
string(APPEND SPACES " ")
endforeach()
string(APPEND SQUIRREL_EXPORT "\n ScriptError::RegisterErrorMap(${ENUM_STRING},${SPACES}${CLS}::${ENUM_ERROR});")
string(APPEND SQUIRREL_EXPORT "\n\tScriptError::RegisterErrorMap(${ENUM_STRING},${SPACES}${CLS}::${ENUM_ERROR});")
endforeach()
if(MLEN)
string(APPEND SQUIRREL_EXPORT "\n")
@@ -444,7 +443,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
foreach(i RANGE ${LEN})
string(APPEND SPACES " ")
endforeach()
string(APPEND SQUIRREL_EXPORT "\n ScriptError::RegisterErrorMapString(${CLS}::${ENUM_ERROR_TO_STRING},${SPACES}\"${ENUM_ERROR_TO_STRING}\");")
string(APPEND SQUIRREL_EXPORT "\n\tScriptError::RegisterErrorMapString(${CLS}::${ENUM_ERROR_TO_STRING},${SPACES}\"${ENUM_ERROR_TO_STRING}\");")
endforeach()
if(MLEN)
string(APPEND SQUIRREL_EXPORT "\n")
@@ -463,8 +462,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
foreach(STATIC_METHOD IN LISTS STATIC_METHODS)
string(REPLACE ":" ";" STATIC_METHOD "${STATIC_METHOD}")
list(GET STATIC_METHOD 0 FUNCNAME)
list(GET STATIC_METHOD 1 ARGC)
list(GET STATIC_METHOD 2 TYPES)
list(GET STATIC_METHOD 1 TYPES)
string(LENGTH "${FUNCNAME}" LEN)
math(EXPR LEN "${MLEN} - ${LEN}")
if("${TYPES}" STREQUAL "v")
@@ -479,9 +477,9 @@ foreach(LINE IN LISTS SOURCE_LINES)
string(APPEND SPACES " ")
endforeach()
if("${TYPES}" STREQUAL "v")
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.DefSQAdvancedStaticMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\");")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQAdvancedStaticMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\");")
else()
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.DefSQStaticMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\",${SPACES}${ARGC}, \"${TYPES}\");")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQStaticMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\",${SPACES}\"${TYPES}\");")
endif()
endforeach()
if(MLEN)
@@ -501,8 +499,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
foreach(METHOD IN LISTS METHODS)
string(REPLACE ":" ";" METHOD "${METHOD}")
list(GET METHOD 0 FUNCNAME)
list(GET METHOD 1 ARGC)
list(GET METHOD 2 TYPES)
list(GET METHOD 1 TYPES)
string(LENGTH "${FUNCNAME}" LEN)
math(EXPR LEN "${MLEN} - ${LEN}")
if("${TYPES}" STREQUAL "v")
@@ -517,16 +514,16 @@ foreach(LINE IN LISTS SOURCE_LINES)
string(APPEND SPACES " ")
endforeach()
if("${TYPES}" STREQUAL "v")
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.DefSQAdvancedMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\");")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQAdvancedMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\");")
else()
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.DefSQMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\",${SPACES}${ARGC}, \"${TYPES}\");")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.DefSQMethod(engine, &${CLS}::${FUNCNAME},${SPACES}\"${FUNCNAME}\",${SPACES}\"${TYPES}\");")
endif()
endforeach()
if(MLEN)
string(APPEND SQUIRREL_EXPORT "\n")
endif()
string(APPEND SQUIRREL_EXPORT "\n SQ${API_CLS}.PostRegister(engine);")
string(APPEND SQUIRREL_EXPORT "\n\tSQ${API_CLS}.PostRegister(engine);")
string(APPEND SQUIRREL_EXPORT "\n}")
reset_reader()
@@ -539,9 +536,13 @@ foreach(LINE IN LISTS SOURCE_LINES)
continue()
endif()
if(NOT BRACE_LEVEL EQUAL CLS_LEVEL)
continue()
endif()
# Add enums
if(IN_ENUM)
string(REGEX MATCH "([^, ]+)" ENUM_VALUE "${LINE}")
string(REGEX MATCH "([^,\t ]+)" ENUM_VALUE "${LINE}")
list(APPEND ENUM_VALUES "${ENUM_VALUE}")
# Check if this a special error enum
@@ -549,12 +550,12 @@ foreach(LINE IN LISTS SOURCE_LINES)
if("${ENUM}" MATCHES ".*::ErrorMessages")
# syntax:
# enum ErrorMessages {
# ERR_SOME_ERROR, // [STR_ITEM1, STR_ITEM2, ...]
#\tERR_SOME_ERROR,\t// [STR_ITEM1, STR_ITEM2, ...]
# }
# Set the mappings
if("${LINE}" MATCHES "\\[(.*)\\]")
string(REGEX REPLACE "[ ]" "" MAPPINGS "${CMAKE_MATCH_1}")
string(REGEX REPLACE "[ \t]" "" MAPPINGS "${CMAKE_MATCH_1}")
string(REPLACE "," ";" MAPPINGS "${MAPPINGS}")
foreach(MAPPING IN LISTS MAPPINGS)
@@ -568,11 +569,11 @@ foreach(LINE IN LISTS SOURCE_LINES)
endif()
# Add a const (non-enum) value
if("${LINE}" MATCHES "^[ ]*static const [^ ]+ ([^ ]+) = -?\\(?[^ ]*\\)?[^ ]+;")
if("${LINE}" MATCHES "^[ \t]*static const [^ ]+ ([^ ]+) = -?\\(?[^ ]*\\)?[^ ]+;")
list(APPEND CONST_VALUES "${CMAKE_MATCH_1}")
continue()
endif()
if("${LINE}" MATCHES "^[ ]*static constexpr [^ ]+ ([^ ]+) = -?\\(?[^ ]*\\)?[^ ]+;")
if("${LINE}" MATCHES "^[ \t]*static constexpr [^ ]+ ([^ ]+) = -?\\(?[^ ]*\\)?[^ ]+;")
list(APPEND CONST_VALUES "${CMAKE_MATCH_1}")
continue()
endif()
@@ -584,41 +585,43 @@ foreach(LINE IN LISTS SOURCE_LINES)
endif()
if("${LINE}" MATCHES "~")
if(DEFINED API_SELECTED)
message(WARNING "Destructor for '${CLS}' has @api. Tag ignored.")
message(WARNING "${SCRIPT_API_FILE}:${NUM_LINE}: Destructor for '${CLS}' has @api. Tag ignored.")
unset(API_SELECTED)
endif()
continue()
endif()
unset(IS_STATIC)
if("${LINE}" MATCHES "static")
if("${LINE}" MATCHES "static ")
set(IS_STATIC TRUE)
endif()
string(REGEX REPLACE "(virtual|static|const)[ ]+" "" LINE "${LINE}")
string(REGEX REPLACE "(virtual|static|const)[ \t]+" "" LINE "${LINE}")
string(REGEX REPLACE "{.*" "" LINE "${LINE}")
set(PARAM_S "${LINE}")
string(REGEX REPLACE "\\*" "" LINE "${LINE}")
string(REGEX REPLACE "\\(.*" "" LINE "${LINE}")
string(REGEX REPLACE ".*\\(" "" PARAM_S "${PARAM_S}")
# Parameters start at first "(". Further "(" will appear in ctor lists.
string(REGEX MATCH "\\(.*" PARAM_S "${PARAM_S}")
string(REGEX REPLACE "\\).*" "" PARAM_S "${PARAM_S}")
string(REGEX REPLACE "^\\(" "" PARAM_S "${PARAM_S}")
string(REGEX MATCH "([^ ]+)( ([^ ]+))?" RESULT "${LINE}")
string(REGEX MATCH "([^ \t]+)( ([^ ]+))?" RESULT "${LINE}")
set(FUNCTYPE "${CMAKE_MATCH_1}")
set(FUNCNAME "${CMAKE_MATCH_3}")
if("${FUNCTYPE}" STREQUAL "${CLS}" AND NOT FUNCNAME)
if(DEFINED API_SELECTED)
message(WARNING "Constructor for '${CLS}' has @api. Tag ignored.")
message(WARNING "${SCRIPT_API_FILE}:${NUM_LINE}: Constructor for '${CLS}' has @api. Tag ignored.")
unset(API_SELECTED)
endif()
set(CLS_PARAM_0 "${PARAM_S}")
set(CLS_PARAMS "${PARAM_S}")
if(NOT PARAM_S)
continue()
endif()
elseif(NOT FUNCNAME)
continue()
endif()
endif()
string(REPLACE "," ";" PARAMS "${PARAM_S}")
if(IS_STATIC)
@@ -627,9 +630,7 @@ foreach(LINE IN LISTS SOURCE_LINES)
set(TYPES "x")
endif()
set(LEN 1)
foreach(PARAM IN LISTS PARAMS)
math(EXPR LEN "${LEN} + 1")
string(STRIP "${PARAM}" PARAM)
if("${PARAM}" MATCHES "\\*|&")
if("${PARAM}" MATCHES "^char")
@@ -668,13 +669,12 @@ foreach(LINE IN LISTS SOURCE_LINES)
unset(API_SELECTED)
if("${FUNCTYPE}" STREQUAL "${CLS}" AND NOT FUNCNAME)
set(CLS_PARAM_1 ${LEN})
set(CLS_PARAM_2 "${TYPES}")
set(CLS_TYPES "${TYPES}")
elseif("${FUNCNAME}" MATCHES "^_" AND NOT "${TYPES}" STREQUAL "v")
elseif(IS_STATIC)
list(APPEND STATIC_METHODS "${FUNCNAME}:${LEN}:${TYPES}")
list(APPEND STATIC_METHODS "${FUNCNAME}:${TYPES}")
else()
list(APPEND METHODS "${FUNCNAME}:${LEN}:${TYPES}")
list(APPEND METHODS "${FUNCNAME}:${TYPES}")
endif()
continue()
endif()
+2 -2
View File
@@ -19,7 +19,7 @@ endif()
file(READ "${API_FILES}" SCRIPT_API_BINARY_FILES)
foreach(FILE IN LISTS SCRIPT_API_BINARY_FILES)
file(STRINGS "${FILE}" LINES REGEX "^void SQ${APIUC}.*_Register\\(Squirrel \\*engine\\)$")
file(STRINGS "${FILE}" LINES REGEX "^void SQ${APIUC}.*_Register\\(Squirrel &engine\\)$")
if(LINES)
string(REGEX REPLACE ".*api/${APILC}/(.*)" "#include \"\\1\"" FILE "${FILE}")
list(APPEND SQUIRREL_INCLUDES "${FILE}")
@@ -28,7 +28,7 @@ foreach(FILE IN LISTS SCRIPT_API_BINARY_FILES)
continue()
endif()
string(REGEX REPLACE "^.*void " " " LINE "${LINE}")
string(REGEX REPLACE "Squirrel \\*" "" LINE "${LINE}")
string(REGEX REPLACE "Squirrel &" "" LINE "${LINE}")
list(APPEND SQUIRREL_REGISTER "${LINE}")
endforeach()
endif()
+1 -1
View File
@@ -246,7 +246,7 @@ the array so you can quickly see what is used and what is not.
<td class="bits" rowspan=4><span class="free">OOOO OOOO OOOO OOOO</span></td>
<td class="bits" rowspan=5><span class="free">OOOO OOO</span><span class="used" title="Non-flooding state">X</span></td>
<td class="bits"><span class="free">OOOO OOOO</span></td>
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">0000</span> <span class="free">OOO0</span></td>
<td class="bits"><span class="used" title="Water tile type: coast, clear, lock, depot">0000</span> <span class="free">OOOO</span></td>
<td class="bits" rowspan=5><span class="free">OOOO OOOO</span></td>
<td class="bits" rowspan=5><span class="free">OOOO OOOO</span></td>
<td class="bits" rowspan=5><span class="free">OOOO OOOO OOOO OOOO</span></td>
+7 -2
View File
@@ -16,8 +16,11 @@
; - `openttd -I <name>` starts OpenTTD with the given set (case sensitive)
; - adding `graphicsset = <name>` to the misc section of openttd.cfg makes
; OpenTTD start with that graphics set by default
; - there is a command line tool for all platforms called md5sum that can
; create the MD5 checksum you need.
; - `grfid -m` can give the GRF file MD5 checksums that you need
; - The `--md5` output option for `nmlc` can also give the MD5 if you are
; encoding from an nml source
; - Simple file MD5 checksums, eg. using `md5sum` are not correct for grf
; container versions other than 1
; - all files specified in this file are search relatively to the path where
; this file is found, i.e. if the graphics files are in a subdir you have
; to add that subdir to the names in this file to! It will NOT search for
@@ -44,6 +47,8 @@ description.en_US = howdie
palette = DOS
; preferred blitter, optional; either 8bpp (default) or 32bpp.
blitter = 8bpp
; url, optional
url = https://github.com/my/baseset
; The files section lists the files that replace sprites.
; The file names are case sensitive.
+3 -3
View File
@@ -2,8 +2,8 @@
## Table of contents
- 1.0) About
- 2.0) Known bugs
- 1.0) [About](#10-about)
- 2.0) [Known bugs](#20-known-bugs)
## 1.0) About
@@ -12,7 +12,7 @@ that are the same as these. If you do, do not act surprised, because
we WILL flame you!
The current list of known bugs that we intend to fix can be found in our
bug tracking system at https://github.com/OpenTTD/OpenTTD/issues
bug tracking system at [https://github.com/OpenTTD/OpenTTD/issues](https://github.com/OpenTTD/OpenTTD/issues)
Also check the closed bugs when searching for your bug in this system as we
might have fixed the bug in the mean time.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
019dba4830a64ee4345d3d647633e1da
c56aad31380c077d619e124bd87c8270
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
// This is the DOS 2CC translation map which OpenTTD translates if needed upon loading.
//
+3
View File
@@ -10,6 +10,7 @@ if(GRFCODEC_FOUND)
${CMAKE_CURRENT_SOURCE_DIR}/airport_preview.nfo
${CMAKE_CURRENT_SOURCE_DIR}/aqueduct.nfo
${CMAKE_CURRENT_SOURCE_DIR}/autorail.nfo
${CMAKE_CURRENT_SOURCE_DIR}/bridge_decks.nfo
${CMAKE_CURRENT_SOURCE_DIR}/canals.nfo
${CMAKE_CURRENT_SOURCE_DIR}/chars.nfo
${CMAKE_CURRENT_SOURCE_DIR}/elrails.nfo
@@ -31,6 +32,8 @@ if(GRFCODEC_FOUND)
${CMAKE_CURRENT_SOURCE_DIR}/airport_preview.png
${CMAKE_CURRENT_SOURCE_DIR}/aqueduct.png
${CMAKE_CURRENT_SOURCE_DIR}/autorail.png
${CMAKE_CURRENT_SOURCE_DIR}/bridge_decks.png
${CMAKE_CURRENT_SOURCE_DIR}/bridge_decks_toyland.png
${CMAKE_CURRENT_SOURCE_DIR}/canals.png
${CMAKE_CURRENT_SOURCE_DIR}/canal_locks.png
${CMAKE_CURRENT_SOURCE_DIR}/chars.png
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Airport previews"
-1 * 0 05 16 09
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Extra airport graphics"
-1 * 3 05 10 0F
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Aqueduct graphics by Jonathan G. Rennison / PaulC"
// temperate aqueduct
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Autorail graphics"
-1 * 3 05 13 37
+70
View File
@@ -0,0 +1,70 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Bridge decks"
-1 * 0 07 83 01 \7= 03 19
-1 * 3 05 1B 18
-1 sprites/bridge_decks.png 8bpp 96 16 64 31 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 16 16 64 31 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 176 16 64 39 -31 -8 normal
-1 sprites/bridge_decks.png 8bpp 256 16 64 23 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 336 16 64 23 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 416 16 64 39 -31 -8 normal
-1 sprites/bridge_decks.png 8bpp 96 71 64 31 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 16 71 64 31 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 176 71 64 39 -31 -8 normal
-1 sprites/bridge_decks.png 8bpp 256 71 64 23 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 336 71 64 23 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 416 71 64 39 -31 -8 normal
-1 sprites/bridge_decks.png 8bpp 96 126 64 31 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 16 126 64 31 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 176 126 64 39 -31 -8 normal
-1 sprites/bridge_decks.png 8bpp 256 126 64 23 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 336 126 64 23 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 416 126 64 39 -31 -8 normal
// X and Y axis are swapped for road surface.
-1 sprites/bridge_decks.png 8bpp 16 181 64 31 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 96 181 64 31 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 176 181 64 39 -31 -8 normal
-1 sprites/bridge_decks.png 8bpp 256 181 64 23 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 336 181 64 23 -31 0 normal
-1 sprites/bridge_decks.png 8bpp 416 181 64 39 -31 -8 normal
// Toyland bridge decks, skip if not toyland.
-1 * 0 07 83 01 \7! 03 19
-1 * 3 05 1B 18
-1 sprites/bridge_decks_toyland.png 8bpp 96 16 64 31 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 16 16 64 31 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 176 16 64 39 -31 -8 normal
-1 sprites/bridge_decks_toyland.png 8bpp 256 16 64 23 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 336 16 64 23 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 416 16 64 39 -31 -8 normal
-1 sprites/bridge_decks_toyland.png 8bpp 96 71 64 31 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 16 71 64 31 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 176 71 64 39 -31 -8 normal
-1 sprites/bridge_decks_toyland.png 8bpp 256 71 64 23 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 336 71 64 23 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 416 71 64 39 -31 -8 normal
-1 sprites/bridge_decks_toyland.png 8bpp 96 126 64 31 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 16 126 64 31 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 176 126 64 39 -31 -8 normal
-1 sprites/bridge_decks_toyland.png 8bpp 256 126 64 23 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 336 126 64 23 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 416 126 64 39 -31 -8 normal
// X and Y axis are swapped for road surface.
-1 sprites/bridge_decks_toyland.png 8bpp 16 181 64 31 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 96 181 64 31 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 176 181 64 39 -31 -8 normal
-1 sprites/bridge_decks_toyland.png 8bpp 256 181 64 23 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 336 181 64 23 -31 0 normal
-1 sprites/bridge_decks_toyland.png 8bpp 416 181 64 39 -31 -8 normal
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Canal graphics by George"
-1 * 3 05 08 41
+13 -3
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Font characters by PaulC, Bilbo and Jasper Vries"
@@ -671,9 +671,9 @@
// U+2026: Horizontal Ellipsis
-1 * 18 12 04 00 01 26 20 01 01 26 20 02 01 26 20 03 01 26 20
-1 sprites/chars.png 8bpp 560 370 11 12 0 -1 normal
-1 sprites/chars.png 8bpp 560 370 9 12 0 -1 normal
-1 sprites/chars.png 8bpp 560 390 5 7 0 0 normal
-1 sprites/chars.png 8bpp 560 400 15 21 0 -2 normal
-1 sprites/chars.png 8bpp 560 400 14 21 0 -2 normal
-1 sprites/mono.png 8bpp 265 270 7 13 0 0 normal
// U+2039: Single Left-Pointing Angle Quotation Mark
@@ -840,3 +840,13 @@
-1 sprites/chars.png 8bpp 630 400 6 21 0 -2 normal
-1 sprites/mono.png 8bpp 325 270 7 13 0 0 normal
-1 sprites/mono.png 8bpp 340 270 7 13 0 0 normal
// U+E29D: Small left arrow
-1 * 6 12 01 01 01 9D E2
-1 sprites/chars.png 8bpp 10 430 5 5 0 1 normal
// U+E29B: Town
// U+E29C: City
-1 * 6 12 01 00 02 9B E2
-1 sprites/chars.png 8bpp 20 430 10 10 0 0 normal
-1 sprites/chars.png 8bpp 40 430 10 10 0 0 normal
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Electrified rail by Michael Blunck"
-1 * 3 05 05 30
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Foundations. Non-halftile ones by Marcin Grzegorczyk"
-1 * 6 07 83 01 \7! 00 5B
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Monospaced characters (Liberation Mono)"
-1 * 0 12 01 03 60 20 00
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "One way road graphics"
-1 * 3 05 09 12
+2 -1
View File
@@ -5,7 +5,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
// Sources for OpenTTD's required base graphics.
// Checks whether the correct version of OpenTTD is used before
@@ -100,3 +100,4 @@
#include "palette.nfo"
#include "road_waypoints.nfo"
#include "overlay_rocks.nfo"
#include "bridge_decks.nfo"
+3 -2
View File
@@ -1,10 +1,10 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "OpenTTD GUI graphics"
-1 * 3 05 15 \b 191 // OPENTTD_SPRITE_COUNT
-1 * 3 05 15 \b 192 // OPENTTD_SPRITE_COUNT
-1 sprites/openttdgui.png 8bpp 66 8 64 31 -31 7 normal
-1 sprites/openttdgui.png 8bpp 146 8 64 31 -31 7 normal
-1 sprites/openttdgui.png 8bpp 226 8 64 31 -31 7 normal
@@ -196,3 +196,4 @@
-1 sprites/openttdgui.png 8bpp 567 440 12 10 0 0 normal
-1 sprites/openttdgui.png 8bpp 581 440 10 10 0 0 normal
-1 sprites/openttdgui.png 8bpp 593 440 10 10 0 0 normal
-1 sprites/openttdgui.png 8bpp 605 440 8 10 0 0 normal
Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 26 KiB

+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Overlay rocks"
-1 * 3 05 1A 5F
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "All black palette"
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Road waypoints"
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Road stop graphics"
-1 * 3 05 11 08
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Pre-signal, semaphore, and PBS graphics by Michael Blunck"
-1 * 3 05 04 F0
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Sloped tracks"
-1 * 3 05 0F 0C
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 0 0C "Tram track graphics by PikkaBird"
-1 * 3 05 0B 77
+1 -1
View File
@@ -1,7 +1,7 @@
// This file is part of OpenTTD.
// OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
// OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
// See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
//
-1 * 63 0C "Tunnel portal overlays for railtypes by Snail (Jacopo Coletto)"
Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More