Commit Graph
499 Commits
Author SHA1 Message Date
Rubidiumandrubidium42 bcd98a6ba5 Codechange: document a number of functions and variables 2026-04-06 21:17:17 +02:00
EmperorJakeandGitHub fed04d0a03 Add: Setting to disable aircraft range limit (#15433) 2026-04-05 10:51:12 -04:00
Jonathan G Rennisonandrubidium42 f1390b9cf8 Fix #15310: Incorrect map tile indices used for aircraft outside the map
When crashing aircraft or finding hangars
2026-02-23 17:13:07 +01:00
Rubidiumandrubidium42 3fc6bbd5bf Codechange: add some missing vehicle related documentation 2026-02-15 12:02:18 +01:00
Rubidiumandrubidium42 4adf494ebc Codechange: enum-class-ify Commands 2026-01-28 23:32:51 +01:00
Rubidiumandrubidium42 d4f0ff927e Codechange: make aircraft vehicle flags enum-class and EnumBitSet 2026-01-16 07:33:13 +01:00
Cyprian Klimaszewskiandrubidium42 322ce224b4 Codechange: Make Price an enum class. 2026-01-14 22:07:02 +01:00
Rubidiumandrubidium42 0500198bea Codechange: some documentation for enumerations 2026-01-13 21:54:24 +01:00
Rubidiumandrubidium42 2fcd4e189a Codechange: replace 'new PoolItem(...' with 'PoolItem::Create(...' 2026-01-03 16:04:32 +01:00
Rito12andrubidium42 859b56a066 Doc: Correct file descriptions to match coding style and doxygen. 2025-12-15 17:31:00 +01:00
Cyprian KlimaszewskiandGitHub 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Peter NelsonandGitHub 046b0c6267 Codechange: Use enum class and EnumBitSet for various order flags. (#14783) 2025-12-06 12:29:11 +00:00
Rubidiumandrubidium42 1445aa9543 Codefix: some coding style improvements 2025-12-06 12:07:53 +01:00
Peter NelsonandPeter 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 NelsonandPeter Nelson fd32d1447e Codechange: Remove StationIDStack and SmallStack.
Use a std::vector or std::span instead.
2025-10-23 21:02:27 +01:00
Peter NelsonandGitHub 5ed8f1203b Codechange: Cleanup unnecessary includes of spritecache.h (#14678) 2025-09-28 17:09:57 +00:00
Peter NelsonandGitHub 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
Rubidiumandrubidium42 7c0f69a8fe Codefix: typos in comments and strings 2025-08-31 10:30:37 +02: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
Ivan PravdinandGitHub 434163aa31 Fix #14277: Aircraft can land when Zeppeliner in the runway (#14317) 2025-07-17 07:26:57 +02:00
froschandGitHub d7ddea4032 Codechange: Turn AnimationTrigger enums into enum classes. (#14067) 2025-04-21 20:53:31 +02:00
froschandfrosch f399b8eb29 Codechange: Unify naming of NewGRF animation callbacks. 2025-04-21 19:06:13 +02:00
froschandGitHub b862d4937f Codechange: Turn custom vehicle spritenums into enum, and use them consistently. (#14022) 2025-04-18 15:19:28 +02:00
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
Rubidiumandrubidium42 ec647975ad Cleanup: remove ancient FIXME comments 2025-03-16 05:42:29 +01:00
Peter NelsonandGitHub 8b39b23d2b Codechange: Use EnumBitSet for VehicleFlags. (#13793) 2025-03-13 08:38:54 +00:00
Jonathan G RennisonandGitHub 61e8dcfca7 Cleanup: Remove unused DepotCommandFlag::LocateHangar flag (#13775) 2025-03-09 18:07:47 +00: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 3fde611012 Codechange: Use EnumBitSet for AirportMovingDataFlags. (#13754) 2025-03-06 19:03:41 +00:00
Peter NelsonandGitHub 6e10584b91 Codechange: Use EncodedStrings for News messages. (#13654) 2025-02-23 20:24:02 +00:00
Rubidiumandrubidium42 fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Rubidiumandrubidium42 380e7b48ce Codechange: use std::variant instead of a custom version for news references 2025-02-16 14:50:15 +01:00
Rubidiumandrubidium42 c3d5e6d2a0 Codechange: Use EnumBitSet for DoCommandFlags 2025-02-14 00:28:57 +01:00
Peter NelsonandPeter Nelson f309b90a1d Codechange: Use EnumBitSet for Airport blocks. 2025-02-13 22:02:02 +00:00
Peter NelsonandPeter Nelson 75387b9e2b Codechange: Use EnumBitSet for StationFacility. 2025-02-13 18:03:13 +00:00
Peter NelsonandGitHub 0d5708ba86 Codechange: Use EnumBitSet for AirportFTAClass::Flags (#13535) 2025-02-11 21:49:18 +00:00
Rubidiumandrubidium42 f90fa2a4d1 Codechange: use C++ constructs over MallocT/free 2025-02-07 22:49:03 +01:00
Peter NelsonandPeter Nelson ca75a8ce19 Codechange: Use enum class for NewsType. 2025-02-07 19:36:52 +00:00
Rubidiumandrubidium42 e937c4dcfd Codechange: change DestinationID into class with conversion helpers
A DestinationID is either a DepotID or StationID, where the aircraft hangar
being conceptually a depot is actually a StationID. When making those types
stronger, a lot of casts would need to be added, but this shows the intent
much better.
2025-02-06 21:03:24 +01:00
Peter NelsonandPeter Nelson f8b1e3033f Codechange: Use EnumBitSet for EngineFlags. 2025-01-31 18:55:31 +00:00
Peter NelsonandPeter Nelson f51627c76f Codechange: Use EnumBitSet for DepotCommand(Flag)s. 2025-01-29 21:46:39 +00:00
Peter NelsonandGitHub afc0745aa2 Codechange: Specify underlying type for all enums excluding those exposed to scripts. (#13383) 2025-01-28 22:17:34 +00:00
Rubidiumandrubidium42 e894a5880c Codechange: rename CargoID to CargoType and amend related variables/comments 2025-01-26 18:07:10 +01:00
Rubidiumandrubidium42 08d84b2f4a Codechange: use AdviceType over StringID to remove vehicle advice news 2025-01-08 02:03:55 +01:00
Peter NelsonandGitHub 810e442203 Codechange: Split GoodsEntry cargo and flows data to unique_ptr. (#13058)
This allows cargo packets and cargo flow data to be empty if not in use, which is the case for the majority of station goods entries, and data is allocated when needed.

This reduces the initial size of a Station from 9192 bytes to 2024 bytes (on 64 bit platforms), although an allocation of 120 bytes is made for each active cargo type at a station.

Based on similar changes in JGRPP.
2025-01-02 20:48:23 +00:00
Rubidiumandrubidium42 c0df898ac5 Codechange: do not implicitly convert during assignment to StrongType 2025-01-01 21:32:51 +01:00
Rubidiumandrubidium42 fd5f6caed4 Codechange: use explicit TileIndex constructor for tile 0 2025-01-01 08:26:54 +01:00
Peter NelsonandGitHub e1697a6ad1 Codechange: Don't use enums for non-enumerated values. (#13031)
In the past we have used enums to hold an arbitrary values. These values
are not enumerated types, so make them constants instead.
2024-10-27 18:02:49 +00:00
Loïc GuillouxandGitHub d67963e616 Add: [Script] Include number of victims in ScriptEventVehicleCrashed (#12861) 2024-07-16 21:28:29 +02:00
Peter NelsonandGitHub 83da886093 Fix: Aircraft crash counter was too low to reach ground. (#12425)
Aircraft can float above the ground when crashed as the counter limit to reach the ground is too low.

Instead reset the counter until the aircraft reaches the ground, then continue the timer.
2024-04-05 19:16:22 +01:00