Commit Graph

169 Commits (088db62dbaad75b654e0be05a2d6e348009edcee)

Author SHA1 Message Date
frosch b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 9 months ago
Peter Nelson 9d1b131c44 Codechange: Use correct constant for invalid cargo type. 9 months ago
PeterN a3c70ee6fb
Codechange: Pass by reference and use emplace-at-end for CargoSummary. (#11296) 9 months ago
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.
10 months ago
PeterN 4acb68e539
Fix #11162: Get colour map of correct train part. (#11163) 11 months ago
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
11 months ago
Peter Nelson 8931e90302 Cleanup: No need to cound actual cargo to get scroll count. 1 year ago
Peter Nelson f177ce7c9a Codechange: Base CargoArray off std::array.
This avoids needing to define array accessors and allows use of
default value initialization.
1 year ago
Peter Nelson 74e42e39a8 Codechange: Use CargoArray::GetCount() 1 year ago
Peter Nelson 76516d7f70 Codechange: Use IsValidCargoID/IsValidCargoType.
IsValidCargoType() is used only for unmapped IDs.
1 year ago
Peter Nelson 0880616851 Codechange: Remove various STRING strings. 1 year ago
dP c73b88ddca
Fix: Don't send unused tile field over the network (#10507) 1 year ago
Michael Lutz 05ed9f56fd Feature: [NewGRF] Engine name callback. 1 year ago
Rubidium f001e84e5e Codechange: use RAII to automatically restore _cur_dpi after use 1 year ago
Jonathan G Rennison 10e76b2788 Fix #10032: Capacities of articulated vehicles in build window
See also: #9954
1 year ago
PeterN 1131608eb4
Fix #10114: Incorrect drag-highlight position with non-power-of-2 scaling. (#10211) 2 years ago
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.
2 years ago
Peter Nelson 920e588334 Change: Use standard dimensions instead of custom widths. 2 years ago
Peter Nelson ed60c88b0a Change: Use power-of-2 scaling for some dimensions in GUI.
These are related to drawing sprites that are normally drawn on the
landscape, and should therefore still follow power-of-2 scaling to fit
correctly.
2 years ago
Peter Nelson 890b2666d3 Change: Use scaled WidgetDimensions. 2 years ago
Peter Nelson c9a81fd67b Change: Use Rect for drawing vehicle details. 2 years ago
Tyler Trahan ebc76a4200 Change: Use an indent, not a dash, to list train capacity 2 years ago
Michael Lutz 41fa16f325 Codechange: Don't use globals for return values from vehicle command procs. 3 years ago
Michael Lutz 8503854655 Codechange: Pass unpacked command arguments to command callbacks (except Script). 3 years ago
Michael Lutz 21675ec7e2 Codechange: Un-bitstuff vehicle/engine commands. 3 years ago
Michael Lutz eab18f06a4 Codechange: Pass additional data as byte stream to command callbacks. 3 years ago
Michael Lutz 0f64ee5ce1 Codechange: Template DoCommandP to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz 4fc055d6e9 Codechange: Align parameter order of command callbacks to command handlers. 3 years ago
Michael Lutz a38bbefe1b Codechange: Untangle command code, flags and error string for DoCommand*. 3 years ago
Michael Lutz 549caca39c Codechange: Move command arguments to the back of the networked command function calls. 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 4 years ago
glx d8a1be48cd Codechange: Replace vehicle related FOR_ALL with range-based for loops 5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
glx22 b3fd787959 Fix #7188: check the validity of command callback for scripts (#7701) 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 5 years ago
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 5 years ago
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 5 years ago
Henry Wilson 81315939b9 Codechange: Replaced SmallVector::Find() non-const with std::find() 5 years ago
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 5 years ago
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 5 years ago
frosch 6f36c52736 (svn r27936) -Fix: When moving wagons in the depot, the drag highlight did not exactly match the length of the dragged wagon chain. 7 years ago
frosch 149adc9cc1 (svn r27689) -Fix: MSVC warnings. 8 years ago
frosch c175067ed9 (svn r27667) -Codechange: Add VehicleSpriteSeq::GetBounds and Draw. 8 years ago
frosch d2393b4f6c (svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq. 8 years ago
frosch cff2b49365 (svn r27629) -Fix: When dragging multiple vehicles in the depot, make the destination gap as long as the chain instead of just considering the first vehicle. 8 years ago
frosch a8080b6256 (svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ScaleGUITrad(). 10 years ago
peter1138 ce9fab58bc (svn r26951) -Codechange: Do the GUI-scale dance for vehicle, depot, and purchase lists. 10 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
rubidium 7c0f34130c (svn r25454) -Remove/Fix/Cleanup: SETX(Y) does not work at all with other than default fonts, so get rid of it 11 years ago