Commit Graph

209 Commits

Author SHA1 Message Date
Peter Nelson
32b92a6594 Codechange: Use Rect WithX/WithY in some places. 2025-12-08 16:50:21 +05:00
dP
8404c2a7cc Merge remote-tracking branch 'upstream/master' 2025-09-28 02:33:49 +05:00
dP
0fe7c3635c Fix compilation errors after the merge 2025-06-27 18:03:03 +05:00
dP
f0f93c68ca Merge remote-tracking branch 'upstream/master' 2025-06-14 17:01:17 +05:00
SamuXarick
893a75f2c0 Codechange: Iterate with VehiclesOnTile when attaching a just bought wagon to a locomotive (#14284) 2025-06-08 16:45:58 -04:00
dP
df3a6e321f Merge remote-tracking branch 'upstream/master' 2025-05-14 18:41:13 +05:00
Peter Nelson
5008568dfc Codechange: Rename CenterBounds to CentreBounds and move to geometry header. (#14002) 2025-04-14 23:55:40 +01: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
24d327a30b Codechange: Use parameterised-GetString for vehicle related windows. 2025-02-22 10:33:22 +00:00
Rubidium
fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Rubidium
04d53ed6f5 Codechange: remove operator!=s that are synthesized 2025-02-08 06:37:36 +01:00
Peter Nelson
56b1e9df1f Codechange: Use EnumBitSet for FrameFlags. 2025-01-30 08:40:42 +00:00
Rubidium
e894a5880c Codechange: rename CargoID to CargoType and amend related variables/comments 2025-01-26 18:07:10 +01:00
dP
a86fd7c621 Update to 15.0-beta1 2024-12-25 20:34:06 +05:00
Peter Nelson
3be0166801 Codechange: Use std::ranges::find where possible.
Replace `std::find(range.begin(), range.end(), ...)` with `std::ranges::find(range, ...)`.
2024-11-24 10:36:03 +00:00
Peter Nelson
e45e8a39c8 Add: Overlay cargo icon in vehicle/depot list when holding shift+ctrl. (#12938) 2024-09-22 10:33:44 +01:00
Peter Nelson
912d7bd80e Codechange: Give ColourShade values names instead of numbers. 2024-02-25 12:38:07 +00:00
Peter Nelson
ae3390fe48 Codechange: Add ColourShade enum. 2024-02-25 12:38:07 +00:00
Peter Nelson
0463d4c198 Codechange: Remove direct access to _colour_gradient.
Access is now through GetColourGradient, which ensures parameters are in range.
2024-02-25 12:38:07 +00:00
dP
645bfaffbd Merge remote-tracking branch 'upstream/master' 2024-02-04 22:50:08 +05:30
dP
33ef333b57 Update to 14.0-beta1 2024-02-04 02:18:17 +05:30
Peter Nelson
952d111b94 Codechange: Split CT_INVALID into CT_INVALID and INVALID_CARGO.
INVALID_CARGO is a CargoID and should be used for most purposes in game.
CT_INVALID is a CargoType used for defining default properties.
2024-01-09 18:56:05 +00:00
Peter Nelson
313ee13e5f Codechange: Add Rect version of FillDrawPixelInfo().
This simplifies most callers as they longer have to split out a rect.
2023-12-20 09:29:28 +00:00
Peter Nelson
c18a1494b7 Codechange: Remove FONT_HEIGHT_... macros. (#11481)
These make it look like we're dealing with a constant, but actually each is a call to `GetCharacterHeight(...)`.
2023-11-21 19:04:24 +00:00
Peter Nelson
bb6fa9bf3b Change: Display cargo lists in sorted cargo order. (#11383) 2023-10-20 17:32:17 +01:00
frosch
b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 2023-09-19 22:49:59 +02:00
Peter Nelson
9d1b131c44 Codechange: Use correct constant for invalid cargo type. 2023-09-17 16:56:07 +01:00
PeterN
a3c70ee6fb Codechange: Pass by reference and use emplace-at-end for CargoSummary. (#11296) 2023-09-14 08:41:33 +00:00
Patric Stout
30172fc037 Codechange: cleanup CargoPacket in terms of variable/function names (#11278)
Over the years, things got reused and changed, making the current
names somewhat unclear in what they actually mean and do.
2023-09-09 23:21:21 +02:00
PeterN
4acb68e539 Fix #11162: Get colour map of correct train part. (#11163) 2023-08-01 15:05:42 +01:00
Rubidium
eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Peter Nelson
8931e90302 Cleanup: No need to cound actual cargo to get scroll count. 2023-05-23 19:07:36 +01:00
Peter Nelson
f177ce7c9a Codechange: Base CargoArray off std::array.
This avoids needing to define array accessors and allows use of
default value initialization.
2023-05-23 19:07:36 +01:00
Peter Nelson
74e42e39a8 Codechange: Use CargoArray::GetCount() 2023-05-23 19:07:36 +01:00
Peter Nelson
76516d7f70 Codechange: Use IsValidCargoID/IsValidCargoType.
IsValidCargoType() is used only for unmapped IDs.
2023-05-22 20:43:40 +01:00
Peter Nelson
0880616851 Codechange: Remove various STRING strings. 2023-05-05 07:07:54 +01:00
dP
bc6b2a1c90 Merge remote-tracking branch 'upstream/master' 2023-04-11 00:02:31 +04:00
dP
9743ba7d99 Update to 13.1 (github source package) 2023-04-10 23:55:14 +04:00
dP
28639d3b10 Reorganize CityMania additional language strings 2023-03-17 02:16:22 +04:00
dP
c73b88ddca Fix: Don't send unused tile field over the network (#10507) 2023-02-24 22:50:11 +01:00
dP
2b3c725384 Merge remote-tracking branch 'upstream/master' into 13.0 2023-02-03 15:56:10 +04:00
dP
ebf0794b1c Update to 13.0-RC2 2023-02-03 15:05:53 +04:00
Michael Lutz
05ed9f56fd Feature: [NewGRF] Engine name callback. 2023-01-30 22:00:56 +01:00
Rubidium
f001e84e5e Codechange: use RAII to automatically restore _cur_dpi after use 2023-01-28 20:33:02 +01:00
dP
35cf190d5e Merge remote-tracking branch 'upstream/master' into 13.0 2023-01-19 04:08:55 +04:00
Jonathan G Rennison
10e76b2788 Fix #10032: Capacities of articulated vehicles in build window
See also: #9954
2023-01-14 18:52:01 +01:00
Pavel Stupnikov
59c991fa52 Update to 13.0-RC1 2023-01-03 15:58:14 +04:00
PeterN
1131608eb4 Fix #10114: Incorrect drag-highlight position with non-power-of-2 scaling. (#10211) 2022-12-03 09:31:52 +00:00
Pavel Stupnikov
f3ecdf6f7f Merge remote-tracking branch 'upstream/master' into 13.0 2022-11-26 22:16:25 +04:00
PeterN
53682b4b6b Fix #10114: Wonky depot layout. (#10191)
Depot lists internal layout was not handled well. This is improved by
throwing more Rects at it:
- Vehicle images are now be vertically centred in the rect.
- Image clipping is relaxed to cover the rect, improving larger sprites.
- Outline highlight is now aware of bevel thickness.
2022-11-23 21:01:09 +00:00