Commit Graph

525 Commits

Author SHA1 Message Date
Peter Nelson 0d2aed3b87 Codechange: make FloodingBehaviour a scoped enum (#15632) 2026-05-31 06:07:05 +01:00
Rubidium 2ff631caa2 Codechange: make GameMode a scoped enum 2026-05-30 23:20:20 +02:00
Peter Nelson e97a4e1b06 Codechange: improve readability of logic of trains for depot enter/exit
Replaces magical hexadecimal values, masking and shifts with various Coord2Ds.
2026-05-30 17:24:04 +01:00
Peter Nelson 81bdc44d1a Codechange: use EnumIndexArray for Direction and DiagDirection indexed arrays 2026-05-30 07:39:21 +01:00
Peter Nelson c74431e734 Codechange: make Axis a scoped enum 2026-05-27 07:49:39 +01:00
Peter Nelson 2fcb7f2b02 Codechange: use existing helpers to convert to/from Axis (#15629) 2026-05-26 19:59:52 +01:00
Rubidium bcda4a72ee Codechange: make WindowClass a scoped enum 2026-05-20 21:39:04 +02:00
Peter Nelson e7845e48dc Codechange: make DisplayOption a scoped enum/enum bitset (#15611) 2026-05-19 06:21:38 +01:00
Peter Nelson 792f6d99a3 Codechange: make ExpensesType a scoped enum (#15572) 2026-05-04 08:20:52 +01:00
Peter Nelson 4a7cbf29f0 Codechange: prefer AutoRestoreBackup over Backup/Restore (#15480) 2026-04-27 08:02:41 +01:00
Peter Nelson 77403627a8 Codechange: make VehicleType a scoped enum 2026-04-26 07:00:13 +01:00
Peter Nelson 2bf84ea78c Codechange: make GrfSpecFeature a scoped enum (#15487) 2026-04-19 19:04:27 +01:00
Peter Nelson 8568f1f7bc Codechange: rename and make RailSpriteType a scoped enum
RailTypeSpriteGroup is now renamed to RailSpriteType
2026-04-16 21:01:17 +01:00
Tyler Trahan 2b530751dd Feature: Trains with an engine on the rear drive backwards when reversing 2026-04-13 21:52:22 -04:00
Peter Nelson 73dafe5021 Codechange: use EnumBitSet for DisallowedRoadDirections (#15479) 2026-04-13 22:48:44 +01:00
Peter Nelson b33b0d92a0 Codechange: make RoadBits an EnumBitSet (#15476) 2026-04-13 21:23:17 +01:00
Peter Nelson a5a60c8615 Codechange: make RoadTramType a scoped enum, and use EnumBitSet (#15477) 2026-04-13 18:15:41 +01:00
Peter Nelson 4db1672611 Codechange: make TropicZone a scoped enum (#15442) 2026-04-07 08:33:16 +01:00
Cyprian Klimaszewski 21bee91fa7 Codechange: Make some variables and constants documentation comments recognised by doxygen. 2026-02-21 15:05:13 +01:00
Rubidium 6438bb4d07 Change: distinguish between 'Flat land required' and 'Land sloped in wrong direction' for building depots 2026-02-21 11:44:23 +01:00
Rubidium 549d555be7 Codechange: document a number of parameters and return types 2026-02-18 22:57:05 +01:00
Rubidium fd7f211351 Codechange: use designated initialisers for _tile_type_rail_procs 2026-02-18 17:03:33 +01:00
Rubidium b4bfa06054 Codechange: add missing map-accessor documentation 2026-02-14 18:51:19 +01:00
Rubidium c6c06e13eb Codefix: wrong parameter names and partially missing parameters 2026-02-02 16:31:46 +01:00
Rubidium 4adf494ebc Codechange: enum-class-ify Commands 2026-01-28 23:32:51 +01:00
Cyprian Klimaszewski 97f3e5b70f Codechange: Make TileType enum an enum class. 2026-01-24 08:34:05 +01:00
Cyprian Klimaszewski 322ce224b4 Codechange: Make Price an enum class. 2026-01-14 22:07:02 +01:00
Rubidium 2fcd4e189a Codechange: replace 'new PoolItem(...' with 'PoolItem::Create(...' 2026-01-03 16:04:32 +01:00
Cyprian Klimaszewski 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Rubidium 1445aa9543 Codefix: some coding style improvements 2025-12-06 12:07:53 +01: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 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
Michael Lutz 3ac1a2f1e4 Codechange: Store the rail type of rail engines as a RailTypes bitmask. 2025-09-14 17:11:26 +02:00
Peter Nelson f30f808b50 Codechange: Implement tile proc handler to test for building bridge over tile. 2025-08-20 21:40:41 +01: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 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
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 87544eff0c Codechange: Use DiagDirections to collect rail fence data. 2025-05-07 17:31:29 +01:00
frosch 61cec33be2 Codechange: Add 'const' to static variables, which are only initialised once. 2025-05-06 18:29:41 +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
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 cde350dc01 Codechange: Replace macros GENERAL_SPRITE_COLOUR and COMPANY_SPRITE_COLOUR with functions GetColourPalette and GetCompanyPalette. 2025-04-18 23:41:37 +02:00
Kuhnovic 319a657454 Fix 42fbcec76f: Fixed accidental changes to autorail/road AI behavior (#13968)
* Revert 4bd72e4a78, Fix #11528: Starting autorail dragging from existing track tiles resulted in adding non-continuous tracks.

* Fix 4bd72e4a78: Fixed accidental changes to autorail/road AI behavior
2025-04-12 16:09:10 +02:00
Kuhnovic 4bd72e4a78 Fix #11528: Starting autorail dragging from existing track tiles resulted in adding non-continuous tracks. (#13885) 2025-04-04 15:21:04 +00:00
Peter Nelson 47d078c033 Codechange: Use EnumBitSet for RailTypes. 2025-03-25 20:15:48 +00:00
Peter Nelson adb20f99ea Fix: Autoreplace rail/road list only listed buildable types. (#13887)
Instead list all possible types which includes hidden types compatible with buildable types.
2025-03-25 08:22:30 +00:00
Peter Nelson 17f7d0950e Fix #13838: Formatted error message of sub-errors may be lost. (#13840) 2025-03-18 08:39:40 +00:00