Rubidium
836541b41c
Codechange: use SetDParam and CopyOutDParam for tooltips
1 year ago
Rubidium
820fe8c621
Codechange: use std::string and concatenation when combining multiple formatted strings
1 year ago
Patric Stout
9eda419f9b
Fix 646a7e62: recalc_time was not scaled properly ( #10901 )
...
This caused "runtime" to underflow or, if you are lucky, hit an
assert in ScaleToMonthly when it hits zero. But mostly underflow.
1 year ago
PeterN
702194cfef
Change: Cargo flow legend only shows defined cargo. ( #10872 )
...
This removes the large mostly-empty grid of cargo buttons when not using a complex industry set.
1 year ago
Peter Nelson
c38df2d589
Codechange: Use std::map instead of custom SmallMap.
1 year ago
Peter Nelson
56085be9bd
Codechange: Move includes for common STL headers to stdafx.
1 year ago
Patric Stout
199e41c762
Codechange: use default dtor instead of empty ( #10826 )
1 year ago
Peter Nelson
e6740046ee
Codechange: Use range-for iteration.
1 year ago
Rubidium
68ff3fd062
Change: include fmt.h C++ headers in stdafx.h
...
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
1 year ago
Peter Nelson
0880616851
Codechange: Remove various STRING strings.
1 year ago
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar ( #10753 )
1 year ago
Peter Nelson
6be6703498
Fix: Linkgraph legend assumes strings are small.
...
Ensure all linkgraph legend strings are drawn with FS_SMALL forced, so
that it does not rely on NewGRF authors.
1 year ago
PeterN
57f2d70fef
Change: Use cstdint instead of rolling our own types. ( #10651 )
1 year ago
Tyler Trahan
930f0a16d8
Codechange: Define Date/Year/Month/Day within TimerGameCalendar class
1 year ago
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
1 year ago
PeterN
9910240f0e
Cleanup: Remove obsolete (Make)EnumPropsT. ( #10697 )
...
This was used by the command system to help extract p1/p2 parameters, which no longer happens.
1 year ago
Tyler Trahan
646a7e625b
Change: Use seconds for Linkgraph update settings ( #10610 )
1 year ago
Peter Nelson
5199881a8d
Codechange: Use correct type for linkgraph company mask.
2 years ago
PeterN
c1077212d7
Codechange: Use a shared_ptr for viewport overlay. ( #10586 )
2 years ago
Jonathan G Rennison
87f4d37de3
Fix #10522 : Link graph line tooltip test for vertical lines ( #10524 )
2 years ago
Michael Lutz
aab580e0ac
Codechange: [Linkgraph] Drop node/edge wrappers from LinkGraph.
2 years ago
Michael Lutz
4d3da0cf14
Codechange: [Linkgraph] Drop node/edge wrappers from LinkGraphJob.
2 years ago
Michael Lutz
7352f812e6
Codechange: [Linkgraph] Only store present link graph edges and not all possible edges.
2 years ago
Michael Lutz
8f851ead70
Codechange: [Linkgraph] Split annotation for demand between nodes from the edge annotations.
2 years ago
Michael Lutz
fe27db3dfd
Codechange: [Linkgraph] Store edges in each node and not in a global matrix.
2 years ago
Rubidium
00721787e1
Fix: wrong type for INVALID_LINK_GRAPH_JOB
2 years ago
Rubidium
fe2bcd2a58
Codechange: migrate size related functions to Map structure
2 years ago
Rubidium
bcfe0fb076
Codechange: introduce GetMainWindow() to properly account for nullptr checks
...
Some nullptr checks have been removed as they were not triggered with nullptr
with the null video driver and in dedicated server mode.
2 years ago
Patric Stout
1fb101eabb
Codechange: address CodeQL issue "Multiplication result converted to larger type" ( #10306 )
...
Most are very unlikely to ever be triggered in our codebase; two
stand out: linkgraph and money cheat. Those, potentially, could
wrap earlier than expected.
2 years ago
Peter Nelson
890b2666d3
Change: Use scaled WidgetDimensions.
2 years ago
Peter Nelson
b6ed595176
Codechange: Prefer suggested widget padding.
2 years ago
Peter Nelson
6f95e04005
Change: Use Rect helpers for widget drawing.
...
This replaces repetitive and sometimes unwieldy use of constants.
2 years ago
Peter Nelson
eb4ba1991b
Change: Use CenterBounds function in more places.
...
CenterBounds may have a 1 pixel difference so the result is not exactly
the same.
2 years ago
Jonathan G Rennison
e931f3061f
Fix: Dereference of past-the-end iterator in linkgraph overlay tooltip ( #10145 )
2 years ago
Nicolas Chappe
8bf56f39f2
Fix #9708 : [Linkgraph] Don't assume vehicles have a non-zero max speed
2 years ago
Nicolas Chappe
c5369caa45
Fix: [Linkgraph] possible rounding errors for travel times of low-capacity links
2 years ago
Nicolas Chappe
25b3ff6423
Cleanup: simplify LinkRefresher::RefreshStats
2 years ago
Nicolas Chappe
864771ca09
Feature: [Linkgraph] Show a tooltip with statistics when hovering a link
2 years ago
Bouke Haarsma
c7f55a058b
Fix: link overlay line width on HiDPI displays ( #10064 )
2 years ago
Tyler Trahan
e79724ea22
Feature: Alternative linkgraph colour schemes ( #9866 )
2 years ago
Niels Martin Hansen
e68bf58989
Codechange: Use anonymous union for vehicle orders/old orders list
3 years ago
Michael Lutz
13528bfcd0
Codechange: Un-bitstuff all remaining commands.
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
549caca39c
Codechange: Move command arguments to the back of the networked command function calls.
3 years ago
Nicolas Chappe
b83820e723
Change: [Linkgraph] Delete links only served by vehicles stopped in depot
...
A stale link is not deleted if the link refresher finds a vehicle that still serves it.
This commit excludes vehicles stopped in depot for a very long time from the link refresher,
so that their stale links can be deleted.
3 years ago
Nicolas Chappe
de28817d9f
Fix 977604ef: [Linkgraph] Add a special case for unknown travel times on link update
3 years ago
Nicolas Chappe
977604ef08
Feature: [Linkgraph] Prioritize faster routes for passengers, mail and express cargo
...
Passengers usually prefer fast paths to short paths.
Average travel times of links are updated in real-time for use in Dijkstra's algorithm,
and newer travel times weigh more, just like capacities.
3 years ago
glx22
a543a4b7bb
Codechange: Remove FOR_EACH_SET_CARGO_ID
3 years ago
Patric Stout
7b135a8269
Codechange: use SLE_STRUCT(LIST) for Linkgraph chunks
3 years ago
Patric Stout
9fff00ba20
Codechange: C++-ify lists for SaveLoad ( #9323 )
...
Basically, this changes "SaveLoad *" to either:
1) "SaveLoadTable" if a list of SaveLoads was meant
2) "SaveLoad &" if a single entry was meant
As added bonus, this removes SL_END / SLE_END / SLEG_END. This
also adds core/span.hpp, a "std::span"-lite.
3 years ago