Commit Graph
460 Commits
Author SHA1 Message Date
Rubidiumandrubidium42 977dc23f06 Codechange: use designated initialisers for _tile_type_road_procs 2026-02-18 17:03:33 +01:00
Rubidiumandrubidium42 c6c06e13eb Codefix: wrong parameter names and partially missing parameters 2026-02-02 16:31:46 +01:00
Richard Wheeler 2347a56d7c Fix: Off by one and redundant logic in snowy road checks 2026-02-01 22:51:32 +00:00
Abigailandrubidium42 b23d4b6e56 Fix #15137: Roads built on steep slopes at the minimum snow level height have inconsistent snowiness 2026-01-31 16:47:19 +01:00
Rubidiumandrubidium42 4adf494ebc Codechange: enum-class-ify Commands 2026-01-28 23:32:51 +01:00
Cyprian Klimaszewskiandrubidium42 97f3e5b70f Codechange: Make TileType enum an enum class. 2026-01-24 08:34:05 +01:00
Cyprian Klimaszewskiandrubidium42 322ce224b4 Codechange: Make Price an enum class. 2026-01-14 22:07:02 +01:00
Rubidiumandrubidium42 2fcd4e189a Codechange: replace 'new PoolItem(...' with 'PoolItem::Create(...' 2026-01-03 16:04:32 +01:00
Cyprian KlimaszewskiandGitHub 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Peter NelsonandPeter Nelson 30955da3ce Codechange: Use enum class for Roadside. 2025-11-17 20:46:05 +00:00
Peter NelsonandPeter Nelson 2cd5a241c5 Codechange: Use enum class for RoadTileType. 2025-11-17 20:46:05 +00:00
Peter NelsonandPeter Nelson 0f5a4290df Codechange: Use enum class for RailTileType 2025-11-17 20:46:05 +00:00
Peter NelsonandPeter 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 NelsonandPeter 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 NelsonandGitHub 484ed1008a Codechange: Make TownRatingCheckType an enum class. (#14652) 2025-09-23 22:00:34 +01:00
Rubidiumandrubidium42 7c0f69a8fe Codefix: typos in comments and strings 2025-08-31 10:30:37 +02:00
Peter NelsonandPeter Nelson f30f808b50 Codechange: Implement tile proc handler to test for building bridge over tile. 2025-08-20 21:40:41 +01:00
Peter NelsonandPeter 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 NelsonandGitHub 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 NelsonandPeter Nelson aa9e5b38cd Codechange: Use DiagDirections when drawing level crossings. 2025-05-07 17:31:29 +01:00
froschandfrosch 8571af9833 Codechange: Turn ZoomLevel into enum class. 2025-05-03 23:21:09 +02:00
Peter NelsonandGitHub 2c4897c2cd Codechange: Use EnumBitSet for HouseZones. (#14137) 2025-04-28 20:27:43 +01:00
froschandfrosch 2bee313642 Codechange: Replace FindVehicleOnPos with 'for' loop. 2025-04-22 22:12:59 +02:00
froschandGitHub 2a62eea005 Codefix: Comment style. (#14064) 2025-04-21 17:25:09 +02:00
Peter NelsonandGitHub 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
froschandfrosch cde350dc01 Codechange: Replace macros GENERAL_SPRITE_COLOUR and COMPANY_SPRITE_COLOUR with functions GetColourPalette and GetCompanyPalette. 2025-04-18 23:41:37 +02:00
froschandfrosch 7cbf4f5560 Codechange: Expand the single usage of the macro CLRBITS. 2025-04-18 17:16:48 +02:00
froschandfrosch 42deccc4f5 Codechange: Merge (IsOn|Toggle)(Snow|Desert) into (IsOn|Toggle)SnowOrDesert. 2025-04-18 16:33:26 +02:00
froschandfrosch 252376ce3e Codechange: Rename DrawRoadAsSnowDesert to DrawRoadAsSnowOrDesert to be consistent with other functions. 2025-04-18 16:33:26 +02:00
Richard WheelerandGitHub a93087ec5c Fix #13980: Allow diagonal selection for road convert (#13983)
Fixes #13980
2025-04-12 18:50:11 +01:00
KuhnovicandGitHub 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
KuhnovicandGitHub 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 NelsonandPeter Nelson 732109e444 Codechange: Use EnumBitSet for RoadTypes. 2025-03-25 20:15:48 +00:00
Peter NelsonandPeter Nelson 819e097d6e Codechange: Use separate RoadTypes mask to list road or tram roadtypes.
This simplifies logic reduces ambiguity.
2025-03-25 20:15:48 +00:00
Peter NelsonandGitHub 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 NelsonandGitHub 21d2a94809 Codechange: Use EnumBitSet for GrfMiscBits. (#13873) 2025-03-22 21:07:59 +00:00
Peter NelsonandGitHub 17f7d0950e Fix #13838: Formatted error message of sub-errors may be lost. (#13840) 2025-03-18 08:39:40 +00:00
Rubidiumandrubidium42 5ea5855677 Codechange: use std::move over copying where applicable 2025-03-16 17:33:06 +01:00
Rubidiumandrubidium42 02f1bc0880 Codefix: remove some logically dead code 2025-03-12 22:00:33 +01:00
Peter NelsonandGitHub 91d22f7617 Codechange: Use EnumBitSet for VehStates. (#13755)
Renamed from VehStatus because pluralising that is weird.
2025-03-08 18:24:21 +00:00
Peter NelsonandGitHub a2accbccc3 Fix #13703: Don't set error owner for town-originated errors. (#13705) 2025-03-02 21:59:55 +00:00
Peter NelsonandPeter Nelson 96f260e718 Codechange: Pass TileDesc by reference. 2025-02-23 23:00:51 +00:00
Rubidiumandrubidium42 0449dc48c8 Codechange: explicitly initialise Depot member variables 2025-02-18 07:21:04 +01:00
Rubidiumandrubidium42 fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Rubidiumandrubidium42 ab8177ea77 Codechange: strongly type CompanyID 2025-02-16 14:02:18 +01:00
Peter NelsonandGitHub 2d7d085e8e Codechange: Use EncodedString for error messages. (#13569) 2025-02-16 10:04:32 +00:00
Rubidiumandrubidium42 c3d5e6d2a0 Codechange: Use EnumBitSet for DoCommandFlags 2025-02-14 00:28:57 +01:00
Peter NelsonandGitHub 59354576d4 Codechange: Use EnumBitSet for LandscapeTypes and remove LandscapeID. (#13436) 2025-02-01 23:09:18 +00:00
Peter NelsonandGitHub 917d5cc75d Codechange: Use EnumBitSet for RoadTypeFlags and RailTypeFlags. (#13415) 2025-01-30 22:08:51 +00:00
Peter NelsonandGitHub d22fd78b1c Codefix: Sprite offsets and counts are not SpriteIDs. (#13336) 2025-01-19 15:58:13 +00:00