Rubidium
bcda4a72ee
Codechange: make WindowClass a scoped enum
2026-05-20 21:39:04 +02:00
Peter Nelson
792f6d99a3
Codechange: make ExpensesType a scoped enum ( #15572 )
2026-05-04 08:20:52 +01:00
Jonathan G Rennison
bbe5dbf230
Cleanup: Correct various spelling errors
2026-04-27 21:05:08 +02: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
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
Rubidium
bcd98a6ba5
Codechange: document a number of functions and variables
2026-04-06 21:17:17 +02:00
Tyler Trahan
fc3b81a313
Codechange: Rename "non-stop" and "go via" order flags for clarity ( #15398 )
2026-03-24 08:52:50 -04:00
Rubidium
90c8dfa03d
Codechange: replace macro and goto with lambda and return
2026-02-19 20:02:07 +01:00
Rubidium
bcaf3eaec2
Codefix: wrong parameter names and partially missing parameters
2026-02-02 18:18:51 +01:00
Rubidium
4adf494ebc
Codechange: enum-class-ify Commands
2026-01-28 23:32:51 +01:00
Jonathan G Rennison
44612d5b59
Fix: Articulated road vehicle following with immediately sequential u-turns ( #15170 )
2026-01-26 18:46:55 +00: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
Rito12
dc663d7b0a
Feature: Allow to build buoys at (0x0).
2026-01-05 21:26:47 +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
Peter Nelson
046b0c6267
Codechange: Use enum class and EnumBitSet for various order flags. ( #14783 )
2025-12-06 12:29:11 +00:00
Peter Nelson
5ed8f1203b
Codechange: Cleanup unnecessary includes of spritecache.h ( #14678 )
2025-09-28 17:09:57 +00: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
Rubidium
7c0f69a8fe
Codefix: typos in comments and strings
2025-08-31 10:30:37 +02: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
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
98ac75e74f
Codechange: Replace FindVehicleOnPosXY/HasVehicleOnPosXY with VehiclesNearTileXY/HasVehicleNearTileXY.
2025-04-26 16:54:56 +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
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
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
b862d4937f
Codechange: Turn custom vehicle spritenums into enum, and use them consistently. ( #14022 )
2025-04-18 15:19:28 +02:00
frosch
301b209b87
Fix: [NewGRF] Roadstop animation/randomisation was not triggered on vehicle arrival. ( #14003 )
2025-04-15 14:53:29 +02:00
Björn Wärmedal
d009bfc47b
Codechange: Add vehicle owner to crash event ( #13878 )
...
Co-authored-by: Björn Wärmedal <bjorn.warmedal@lumera.com >
2025-03-25 22:53:44 +01:00
Peter Nelson
b98a7ff303
Fix f214c81e97: Signed overflow in collision test on large map when road vehicles are at just the right coordinates. ( #13847 )
...
If road vehicles are -32768 subtiles apart, the distance check will break.
2025-03-18 22:53:01 +00:00
Rubidium
f214c81e97
Codechange: simplify some complicated logic
2025-03-16 15:12:02 +01:00
Peter Nelson
8b39b23d2b
Codechange: Use EnumBitSet for VehicleFlags. ( #13793 )
2025-03-13 08:38:54 +00:00
Peter Nelson
91d22f7617
Codechange: Use EnumBitSet for VehStates. ( #13755 )
...
Renamed from VehStatus because pluralising that is weird.
2025-03-08 18:24:21 +00:00
Peter Nelson
6e10584b91
Codechange: Use EncodedStrings for News messages. ( #13654 )
2025-02-23 20:24:02 +00:00
Rubidium
fd4adc55e3
Codechange: replace INVALID_X with XID::Invalid() for PoolIDs
2025-02-16 20:23:00 +01:00
Rubidium
c3d5e6d2a0
Codechange: Use EnumBitSet for DoCommandFlags
2025-02-14 00:28:57 +01:00
Peter Nelson
d61b376998
Codechange: Use EnumBitSet for CargoClasses. ( #13491 )
2025-02-08 08:46:38 +00:00
Peter Nelson
ca75a8ce19
Codechange: Use enum class for NewsType.
2025-02-07 19:36:52 +00:00
Peter Nelson
f8b1e3033f
Codechange: Use EnumBitSet for EngineFlags.
2025-01-31 18:55:31 +00:00
Rubidium
e894a5880c
Codechange: rename CargoID to CargoType and amend related variables/comments
2025-01-26 18:07:10 +01:00
Peter Nelson
5f0e4cd646
Codechange: Make RoadStopType an enum class. ( #13340 )
2025-01-19 21:43:17 +00:00
Rubidium
0aa9faf187
Codechange: use INVALID_TOWN instead of 0 to denote 'not applicable'
2025-01-19 16:54:42 +01:00
Rubidium
fd5f6caed4
Codechange: use explicit TileIndex constructor for tile 0
2025-01-01 08:26:54 +01:00
Peter Nelson
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