Commit Graph
439 Commits
Author SHA1 Message Date
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
Rubidiumandrubidium42 0aa9faf187 Codechange: use INVALID_TOWN instead of 0 to denote 'not applicable' 2025-01-19 16:54:42 +01:00
Peter NelsonandGitHub 1e77fd0b61 Codechange: Remove unnecessary 'return_cmd_error` macro. (#13160)
This macro is a leftover from when errors used to be packed into a single int32_t.

`return CommandCost` is clearer, and doesn't need a macro.
2024-12-08 18:02:30 +00:00
SamuXarickandrubidium42 10e2d1ca36 Codechange: Use Map::Iterate() to iterate tiles 2024-12-06 10:33:11 +10:00
SamuXarickandGitHub d5a13fb9f4 Codechange: Use TileOffsByAxis(...) in more places (#13026) 2024-10-24 15:58:15 -04:00
Rubidiumandrubidium42 c9819f8957 Codechange: split GetRoadDir as bays have DiagDir and drive throughs have Axis 2024-10-24 20:40:32 +02:00
Jonathan G Rennisonandrubidium42 c35a5e5cb1 Change: Add variable ground types for road waypoints 2024-06-24 22:12:08 +02:00
Jonathan G Rennisonandrubidium42 9c84e5df3f Add: Road waypoint functionality 2024-06-24 22:12:08 +02:00
Tyler TrahanandGitHub 4cbaac6dac Fix #10239: Use elevated snow height for roads on flat foundations (#12776) 2024-06-15 17:10:39 -04:00
Koen BussemakerandKuhnovic bef11941c6 Change: Allow rail and road depot overbuilding in current orientation in order to connect to rail or road 2024-04-23 13:11:31 +02:00
Patric StoutandGitHub a3cfd23cf9 Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Rubidiumandrubidium42 27eadc13ec Codechange: rename TILE_ADD(XY) to TileAdd(XY) 2024-03-10 15:50:24 +01:00
rubidium42 e0e0d5f8fb Revert #11606: Don't auto-build past tunnelbridge ends
This reverts commit 59f6c199bf.
2024-03-09 15:54:50 +01:00
Michael Lutz 8b9f59d320 Codechange: Use references for non-optional in/out values of slope functions 2024-03-08 18:08:55 +01:00
Michael Lutz 8dda387f82 Codechange: Use std::tuple for slope functions with two return values 2024-03-08 18:08:55 +01:00
Charles PigottandGitHub 59f6c199bf Fix #11528: Don't auto-build past tunnelbridge ends (#11606) 2024-02-03 11:18:10 +01:00
merni-nsandGitHub 5a88027a19 Feature: Infinite money mode (#11902) 2024-01-30 18:01:02 +00:00
Richard WheelerandGitHub 8770ef6bd9 Change: Make street lights transparent with houses (#11828) 2024-01-27 09:25:13 +00:00
Jonathan G Rennisonandrubidium42 c1b421c0c3 Fix: Clear one way state when removing road from road+tram tile 2024-01-09 20:57:53 +01:00
Rubidiumandrubidium42 e3f49ee7a0 Codechange: coding style fixes 2024-01-04 16:23:54 +01:00
SamuXarickandrubidium42 fddcaef74a Codechange: Use town zone constants instead of magic numbers 2023-12-18 22:12:43 +01:00
Tyler Trahan 1f41e773d6 Codechange: Use consistent name for bay road stops
As of #10494, this is how we describe original dead-end road stops.
2023-11-28 14:24:33 -05:00