Commit Graph
431 Commits
Author SHA1 Message Date
Peter NelsonandPeter Nelson b4d16d319f Codechange: Replace Alignment enum with struct
Alignment struct contains separate horizontal and vertical alignment members.
2026-06-28 20:43:36 +01:00
Peter Nelsonandrubidium42 a55bd4e041 Codechange: make TransportType a scoped enum 2026-06-22 11:59:24 +02:00
Peter NelsonandGitHub f0ce749025 Codechange: make ZoomLevelChange a scoped enum (#15726) 2026-06-15 20:22:01 +01:00
Peter NelsonandGitHub 52793c0e8b Codechange: make SmallMapType a scoped enum (#15721) 2026-06-14 19:35:23 +01:00
Peter NelsonandGitHub 2effec96e8 Codechange: simplify drawing of smallmap legends (#15690)
Replace convoluted cascasing switches with helper function.
2026-06-09 18:16:52 +00:00
Rubidiumandrubidium42 bcda4a72ee Codechange: make WindowClass a scoped enum 2026-05-20 21:39:04 +02:00
Rubidiumandrubidium42 c59d64c132 Codechange: separate TextColour enumeration and flags 2026-05-18 08:37:42 +02:00
Peter NelsonandGitHub 7e624beadc Codechange: make Shade a scoped enum (#15571)
Renamed from `ColourShade` to `Shade` for brevity.
2026-05-03 15:07:29 +01:00
Peter NelsonandPeter Nelson 77403627a8 Codechange: make VehicleType a scoped enum 2026-04-26 07:00:13 +01:00
Rubidiumandrubidium42 99c8a637b4 Codechange: make WindowPosition a scoped enum 2026-04-25 17:15:18 +02:00
Peter NelsonandPeter Nelson c45aa3c9b6 Codechange: use EnumBitSet for CargoTypes 2026-04-21 17:13:31 +01:00
Rubidiumandrubidium42 3b5d46e0bb Codechange: make Colours a scoped enum 2026-04-19 20:53:52 +02:00
Peter NelsonandGitHub a5a60c8615 Codechange: make RoadTramType a scoped enum, and use EnumBitSet (#15477) 2026-04-13 18:15:41 +01:00
Rubidiumandrubidium42 7434052eb6 Codechange: make FontSize a scoped enum 2026-04-12 18:10:34 +02:00
Peter NelsonandGitHub 4db1672611 Codechange: make TropicZone a scoped enum (#15442) 2026-04-07 08:33:16 +01:00
Peter NelsonandPeter Nelson b856899a13 Codechange: use scoped enum for SizingType 2026-03-31 12:21:00 +01:00
Rubidiumandrubidium42 dde097a080 Codechange: document parameters and return types 2026-02-20 16:14:02 +01:00
Peter NelsonandGitHub 10f9f13c64 Codechange: use enum class for TreeGround (#15222) 2026-02-03 08:59:56 +00:00
Peter NelsonandPeter Nelson 092fe307ce Codechange: follow defensive coding for clear ground arrays
Ensure arrays used for clear ground lookups never overflow.
2026-02-02 18:49:20 +00:00
Peter NelsonandPeter Nelson 5c2a37d03e Codechange: use enum class for ClearGround 2026-02-02 18:49:20 +00:00
Rubidiumandrubidium42 c6c06e13eb Codefix: wrong parameter names and partially missing parameters 2026-02-02 16:31:46 +01:00
Rubidiumandrubidium42 c77bbcba9a Codefix: remove unneeded parameter 2026-02-01 15:50:17 +01:00
Cyprian Klimaszewskiandrubidium42 97f3e5b70f Codechange: Make TileType enum an enum class. 2026-01-24 08:34:05 +01:00
Peter NelsonandGitHub f983a74f2e Codechange: Remove CLEAR_SNOW. (#15136)
Remove CLEAR_SNOW which is no longer used on the map and causes confusion.

IsSnowTile() is checked instead.
2026-01-19 23:34:56 +00:00
Tyler TrahanandGitHub 18f2f7eb2d Codechange: Use enum class for setting values (#15074) 2026-01-10 22:40:48 +00:00
Rubidiumandrubidium42 f291e3c68e Codechange: reduce required padding of some structs 2026-01-07 18:26:29 +01:00
JandGitHub 710c78a0bb Add: Make smallmap clear to water instead of black if infinite water enabled. (#15041) 2026-01-05 19:12:31 +00:00
Cyprian KlimaszewskiandGitHub 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Peter NelsonandGitHub 66b6d71e32 Codechange: Use std::initializer_list for NWidgetPart data. (#14749)
Avoids using C/C++ arrays.
2025-11-01 22:33:00 +00:00
Tyler TrahanandGitHub 8c58fb1efd Fix: Missing button beeps (#14470) 2025-08-05 13:57:45 -04:00
Peter NelsonandGitHub 614a01907a Codechange: Make functions for click and confirm beeps. (#14484)
Avoids repetition.
2025-07-27 21:54:32 +01:00
Peter NelsonandGitHub 8e2df7809b Codechange: Add distinct type to hold pixel drawing colour. (#14457)
This is used for individual pixels as well as line drawing.
2025-07-20 22:57:55 +01:00
Jonathan G RennisonandPeter Nelson 63f1c2aa3a Codechange: Use TypedIndexContainer for typed index containers
Instead of ReferenceThroughBaseContainer
2025-06-12 18:50:49 +01:00
Peter NelsonandPeter Nelson 10841ea3fd Codechange: Add constant for common blink interval. 2025-06-07 15:50:25 +01:00
Jonathan G Rennisonandrubidium42 d107b7c8c0 Fix 3cf9b159: Incorrect tile colour in smallmap for snowy MP_CLEAR tiles in vegetation mode
See: #13659
2025-05-12 19:04:43 +02:00
froschandfrosch 0d5b3ebd7f Codechange: Declare all IntervalTimers const, which can be const. 2025-05-06 18:29:41 +02:00
froschandfrosch 61cec33be2 Codechange: Add 'const' to static variables, which are only initialised once. 2025-05-06 18:29:41 +02:00
Peter NelsonandGitHub 3e608b5fe4 Fix: Zoom-scroll extra viewports only if the mouse cursor is over the viewport. (#14209) 2025-05-04 14:16:05 +01:00
Peter NelsonandGitHub 5008568dfc Codechange: Rename CenterBounds to CentreBounds and move to geometry header. (#14002) 2025-04-14 23:55:40 +01:00
Peter NelsonandPeter Nelson 8275bbfb87 Codechange: Pass Viewport by reference.
This means we do not have to care what type of pointer is used.
2025-04-09 22:03:23 +01:00
Rubidiumandrubidium42 2b9c94f55a Fix: don't show owner of non-existent road 2025-03-16 05:42:29 +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 NelsonandPeter Nelson 09806d6f9b Codechange: Move to GetWidgetString for smallmap window. 2025-03-03 21:23:13 +00:00
Peter NelsonandGitHub b92172e3d2 Codechange: Use parameterised GetString() for smallmap window. (#13684) 2025-03-01 18:24:14 +00:00
Rubidiumandrubidium42 b376e2655a Codechange: explicitly initialise member variables of Windows 2025-02-27 20:06:06 +01:00
Rubidiumandrubidium42 5cee804f98 Codechange: remove ZeroedMemoryAllocator from NWidgetBase 2025-02-22 14:38:33 +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
Rubidiumandrubidium42 5401ab1f7b Codechange: use ReferenceThroughBaseContainer for containers that are index by CompanyID 2025-02-16 14:02:18 +01:00
Rubidiumandrubidium42 37c215f1fd Fix #13513, ec492cb267: std::numeric_limits<CompanyMask> not working causes no vehicles to exist
std::numeric_limits<T>::max() returns 0 instead of an error when the type is unknown.
Solve it by implementing and using Set() and All() in BaseBitSet in same way as std::bitset.
2025-02-09 22:50:55 +01:00