Cyprian Klimaszewski
add6521abd
Doc: Update information for receiving a copy of GPL. ( #14869 )
2025-12-08 22:26:18 +05:00
Peter Nelson
c2d92433c6
Codechange: Use std::initializer_list for NWidgetPart data. ( #14749 )
...
Avoids using C/C++ arrays.
2025-12-08 20:20:01 +05:00
Peter Nelson
e2e01eabb5
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-12-08 16:39:52 +05:00
Michael Lutz
81c5823b62
Add: Show all railtypes in the build vehicle and engine preview dialogs.
2025-12-08 15:44:49 +05:00
Michael Lutz
4bcb58cf52
Codechange: Store the rail type of rail engines as a RailTypes bitmask.
2025-12-08 15:42:35 +05:00
Michael Lutz
715b1fb405
Codechange: Use an enum for vehicle acceleration model.
2025-12-08 15:40:58 +05:00
dP
8404c2a7cc
Merge remote-tracking branch 'upstream/master'
2025-09-28 02:33:49 +05:00
Jonathan G Rennison
03672ed8eb
Fix: EngineImageType mismatch between sizing and drawing in preview window ( #14455 )
2025-07-18 07:02:46 -04:00
dP
f0f93c68ca
Merge remote-tracking branch 'upstream/master'
2025-06-14 17:01:17 +05:00
dP
df3a6e321f
Merge remote-tracking branch 'upstream/master'
2025-05-14 18:41:13 +05:00
Rubidium
7805c1c189
Codechange: use std::string_view for ini_key
2025-05-01 23:24:43 +02:00
Rubidium
0afae7c546
Codechange: explicitly initialise member variables of Windows
2025-02-23 14:53:42 +01:00
Peter Nelson
24d327a30b
Codechange: Use parameterised-GetString for vehicle related windows.
2025-02-22 10:33:22 +00:00
Peter Nelson
d13b0e0813
Codechange: Build engine preview strings from separate strings. ( #13579 )
...
This replaces stuffing substrings and parameters in various global parameters and uses local parameters instead.
2025-02-16 19:02:02 +00:00
Rubidium
9015c3651f
Codechange: make EngineID an enum
2025-02-16 14:50:15 +01:00
Peter Nelson
28eb5e05c8
Codechange: Use EnumBitSet for NWidContainerFlags.
2025-02-06 19:43:35 +00:00
Peter Nelson
d30e8dd1c1
Codechange: Use EnumBitSet for WindowDefaultFlags.
2025-01-30 08:40:42 +00:00
Peter Nelson
efb05396a7
Codechange: Use EnumBitSet for WindowFlags.
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
Rubidium
ef87acc1ff
Codechange: make STR_NULL the default for all widget construction functions
2025-01-03 23:25:27 +01:00
Rubidium
4bf36e3fa6
Codechange: replace SetDataTip(STR_ with SetStringTip(STR_
2025-01-02 23:28:43 +01:00
dP
a86fd7c621
Update to 15.0-beta1
2024-12-25 20:34:06 +05:00
Peter Nelson
55314513ce
Codechange: Pass NWidgetParts as span instead of begin/end pointers. ( #12779 )
2024-06-12 23:08:35 +01:00
Peter Nelson
4cf6d1dd79
Codechange: Pass WindowDesc by reference instead of pointer. ( #12771 )
...
WindowDesc as passed to Windows is not optional so don't allow to it to be nullptr.
2024-06-11 08:58:03 +01:00
dP
6a2d656354
Merge remote-tracking branch 'upstream/master'
2024-04-11 13:24:33 +07:00
dP
872e715374
Update to 14.0-RC3
2024-04-11 11:07:23 +07:00
Peter Nelson
de4e00c93f
Codechange: Pass by reference to UpdateWidgetSize. ( #12457 )
...
These parameters are always provided and not optional.
2024-04-09 08:34:45 +01:00
Jonathan G Rennison
e42aec5a89
Fix #12305 : Crash with large positive sprite x offset in engine preview window
2024-03-21 21:05:27 +01:00
Rubidium
86cb184eb4
Codechange: use std::source_location over __FILE__ and __LINE__ for WindowDesc
2024-03-10 10:14:20 +01:00
dP
ee0718e08a
Merge remote-tracking branch 'upstream/master'
2024-02-07 15:20:07 +05:30
dP
910fa762b9
Update to 14.0-beta3
2024-02-07 13:59:10 +05:30
dP
645bfaffbd
Merge remote-tracking branch 'upstream/master'
2024-02-04 22:50:08 +05:30
Peter Nelson
2fd9096070
Change: Decouple and remove landscape-dependent cargo types. ( #11719 )
...
Cargo types of default engines, industries and houses are now specified in terms of label.
2024-02-04 10:16:08 +00:00
dP
33ef333b57
Update to 14.0-beta1
2024-02-04 02:18:17 +05:30
frosch
b1718478c8
Codechange: Replace old non-standard attributes with C++17/20 standard attributes.
2024-02-02 22:29:28 +01:00
frosch
abfeeea849
Codechange: Compose engine preview text from multiple strings.
2024-01-28 14:44:24 +01:00
Peter Nelson
7737aa6640
Codechange: Make all NWidgetPart arrays constexpr.
...
This ensures that the arrays are not created at runtime and prevents using non-constexpr values.
2024-01-16 21:57:05 +00:00
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
a0dfb76e34
Codechange: Replace mishmash of types for widget index with WidgetID.
...
Indices were stored as int, but often passed around as uint/uint8_t and casts.
Now they should all use WidgetID.
2023-12-30 00:23:57 +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
18fb8e153f
Codechange: Add __FILE__/__LINE__ of WindowDesc to WindowDesc.
...
This is to allow unit-tests to produce more useful output.
2023-11-02 22:25:01 +00:00
Peter Nelson
616fb48e25
Change: Use modalpopup spacing for engine preview window.
2023-10-26 12:43:20 +01:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Peter Nelson
e8015e497d
Codechange: Use begin/end of nwidget parts of begin/length.
...
This simplifies processing nwidget parts as, unlike the remaining length, the pointer to the end of the list never changes. This is the same principle as we use(d) for tracking end instead of length for C-style strings.
And this removes 160~ instances of the lengthof() macro.
2023-09-04 10:20:45 +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
glx22
46b504a700
Fix: ini_key issues reported by the script
2023-07-14 14:32:46 +02:00
PeterN
64930c343a
Codechange: Pass reference instead of pointer to GUI*Lists. ( #10822 )
...
Pointer-avoidance.
2023-05-14 09:17:44 +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
PeterN
f1144de509
Feature: Separate rail/road and sea/air velocity units, and add knots. ( #10594 )
...
This is achieved by packing vehicle type along with the velocity so that
the string system can decode and pick the appropriate unit.
2023-04-08 12:26:13 -04:00