Jonathan G Rennison
7f0fefddcf
Change: [Linkgraph] Only acquire thread join performance measurements on network clients
...
Network servers and single player clients do not block on thread joins
due to instead pausing shortly before the join is due.
4 years ago
Jonathan G Rennison
0c5dc5d41e
Change: [Linkgraph] Pause the game when linkgraph jobs lag ( #6470 )
...
Check if the job is still running two date fract ticks before it is due
to join, and if so pause the game until its done.
When loading a game, check if the game would block immediately due to
a job which is scheduled to be joined within two date fract ticks,
and if so pause the game until its done.
This avoids the main thread being blocked on a thread join, which appears
to the user as if the game is unresponsive, as the UI does not repaint
and cannot be interacted with.
Show if pause is due to link graph job in status bar, update network
messages.
This does not apply for network clients.
4 years ago
Patric Stout
56d54cf60e
Add: introduce CMake for project management
...
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.
Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.
This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.
Addtiionally, this heavily improves our detection of libraries, etc.
4 years ago
Michael Lutz
f2b40f40aa
Codechange: Replace SmallPair with std::pair.
...
std::pair is already the smallest possible pair, and it already handles non-POD types correctly.
4 years ago
Jonathan G Rennison
6e7117e04c
Codechange: [Linkgraph] Skip MCF source node Dijkstra when all demand satisfied
...
MCF Dijkstra iterations are executed for all source nodes in a round-robin order.
Source nodes typically require different numbers of MCF Dijkstra iterations
to satisfy all of their demand.
This change is to avoid performing MCF Dijkstra iterations on source nodes which
have already been fully satisfied.
5 years ago
glx
09fa39c5b5
Codechange: Replace linkgraph related FOR_ALL with range-based for loops
5 years ago
glx
ddabfed1cd
Codechange: Replace station related FOR_ALL with range-based for loops
5 years ago
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
5 years ago
JMcKiern
04f659e768
Fix: Some typos found using codespell
5 years ago
Charles Pigott
bd87f11355
Codechange: Remove DistributionTypeByte
6 years ago
Henry Wilson
7c8e7c6b6e
Codechange: Use null pointer literal instead of the NULL macro
6 years ago
Michael Lutz
05bc2ed7cb
Codechange: Replace custom thread code with C++11 thread objects.
...
We assume a conforming C++11 compiler environment that has a valid <thread>-header.
Failure to run a real thread is handled gracefully.
6 years ago
PeterN
32fda83d39
Fix aa7ca7fe6: Linkgraph node index order must be maintained due to other references. ( #7431 )
...
Linkgraph nodes require a specific order that was maintained by swapping just the last
element for the node to be removed. std::vector::erase() changed this to removing the
node is then shuffling the remain items down, which upsets other references to this
indices.
This is fixed by switching back to the original swap & pop method.
6 years ago
glx22
66dd7c3879
Fix: MSVC warnings ( #7423 )
6 years ago
Henry Wilson
c01a2e2a81
Codechange: Removed SmallVector completely
6 years ago
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
6 years ago
Henry Wilson
aa7ca7fe64
Codechange: Replaced SmallVector::Get(n) non-const with std::vector::data() + n
6 years ago
Henry Wilson
bad2c2154b
Codechange: Replaced SmallVector::Resize() with std::vector::resize()
6 years ago
Henry Wilson
a690936ed7
Codechange: Replace SmallVector::Length() with std::vector::size()
6 years ago
peter1138
317f69c152
Codechange: Use override specifier in Window-derived classes.
6 years ago
peter1138
f5f33da126
Codechange: Implement OnTooltip event for custom window tooltips.
...
This avoids windows from needing to know or care about tooltip delay settings.
6 years ago
PeterN
87ebfe1227
Fix #7004 : Mark linkgraph dirty to be rebuilt on next draw call. ( #7265 )
...
Previously the linkgraph was rebuilt before the viewport extents were finalized.
6 years ago
Jonathan G Rennison
64f1847bec
Codechange: [Linkgraph GUI] Replace line visibility detection algorithm
...
Use an implementation of the Cohen-Sutherland line-clipping algorithm.
The previous algorithm had an excessive false-positive rate.
Line-rendering is sufficiently expensive that using a line-clipping
algorithm with a much lower false-positive rate is a net performance
benefit.
6 years ago
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
6 years ago
Niels Martin Hansen
2a868b9f3b
Feature: Framerate display window ( #6822 )
...
Frame rate and various game loop/graphics timing measurements and graphs. Accessible via the Help menu, and can print some stats in the console via the fps command.
6 years ago
Jonathan G Rennison
dc8fff2c4d
Add: Hover tool-tips to cargo dest flow legend window.
...
This is to improve the usability of the window.
The two-letter abbreviations are not always clear, in particular
when using a large number of cargoes.
The company colours can be ambiguous when there are a large
number of companies.
6 years ago
Jonathan G Rennison
458bc90678
Fix: Poor contrast in cargo dest flow legend window cargo labels.
...
Select foreground colour depending on the brightness of the background.
Previously all cargo labels were rendered using black text, even
the background cargo colour was dark/black.
As an example: FIRS coal was black text on a black background.
6 years ago
PeterN
4cebebcf68
Change: Add CargoTypes type for cargo masks. ( #6790 )
6 years ago
frosch
3eae9aba79
(svn r27887) -Cleanup: Remove unused/unimplemented prototype (adf88)
7 years ago
frosch
31f046bd9b
(svn r27670) -Add: [FS#6471] Assign descriptive names to (GNU pthread) threads. (JGR)
8 years ago
fonsinchen
f769305d7d
(svn r27614) -Codechange: Use a fixed array instead of a map for link refresher cargo capacities. (JGR)
8 years ago
fonsinchen
022b284064
(svn r27613) -Codechange: Use a flat vector instead of a map in FlowEdgeIterator. (JGR)
8 years ago
fonsinchen
e2426b22fa
(svn r27612) -Codechange: Replace three uses of std::list with std::queue/vector. (JGR)
8 years ago
fonsinchen
bcdae9a093
(svn r27611) -Codechange: Cache the calculated value of CapacityAnnotation
8 years ago
frosch
780e595933
(svn r27178) -Fix [FS#5969]: Data race due to lazy initialisation of objects.
10 years ago
rubidium
d534c80e94
(svn r27020) -Cleanup: some coding style consistency improvements (mostly spaces)
10 years ago
rubidium
fddeeb5e49
(svn r27002) -Fix-ish: replace some non-ASCII characters with ASCII characters, e.g. @þaram to @param
10 years ago
fonsinchen
9fdb88962f
(svn r26891) -Codechange: Add methods to retrieve flows from a FlowStatMap
10 years ago
fonsinchen
831fb254f6
(svn r26889) -Feature: Predict links for station-autorefitting vehicles
10 years ago
fonsinchen
957f5ca117
(svn r26646) -Fix [FS#6041]: Save locations instead of distances in link graphs to reduce size.
10 years ago
rubidium
89c25b955e
(svn r26580) -Codechange: s/GES_PICKUP/GES_RATING/ (it has nothing to do with actual pickup), s/acceptance_pickup/status/ (the enum isn't called GoodEntryStatus for a reason; it's not only acceptance and pickup anymore)
11 years ago
fonsinchen
11d98f043e
(svn r26549) -Change: better estimation for link capacities during full load
11 years ago
fonsinchen
56e8ea6dde
(svn r26484) -Change: Remove demand calculation based on tiles.
11 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
11 years ago
fonsinchen
bef953a32c
(svn r26448) -Fix [FS#5970]: Avoid division by 0 when scaling flow values.
11 years ago
fonsinchen
782b9f01cb
(svn r26445) -Change [FS#5961]: Draw links to match _settings_game.vehicle.road_side (M3Henry)
11 years ago
fonsinchen
afd1263ce1
(svn r26411) -Change [FS#5941]: Use better distance metric for link graph (MildaIV)
11 years ago
fonsinchen
5d3fcce725
(svn r26393) -Fix: Update distances between link graph nodes when station sign is moved
11 years ago
fonsinchen
cc77d40336
(svn r26347) -Fix [FS#5898]: Make sure link graph jobs can delete themselves after SLA_NULL.
11 years ago
fonsinchen
2945e76269
(svn r26341) -Fix [FS#5902]: Reroute cargo when automatic distribution is switched off.
11 years ago
fonsinchen
e37656f2e5
(svn r26331) -Fix: some inconsistencies regarding link graph (job) IDs.
11 years ago
fonsinchen
91407b924e
(svn r26286) -Fix: Thoroughly erase dead flows.
11 years ago
fonsinchen
b12bf124c7
(svn r26283) -Fix [FS#5878]: Prevent infinite recursion also in RefreshLinks.
11 years ago
fonsinchen
95354136be
(svn r26276) -Fix [FS#5874]: Don't spawn link graph jobs for link graphs with only one node
11 years ago
fonsinchen
b158c7d0fa
(svn r26266) -Fix [FS#5860]: Update smallmap overlay if player joins different company and make sure company masks are valid
11 years ago
fonsinchen
ec492bfb77
(svn r26166) -Fix: Scale flows only after mapping to avoid rounding errors.
11 years ago
fonsinchen
962d6d7e48
(svn r25963) -Fix [FS#5758]: Mixtures of old and new flows could create cycles.
11 years ago
fonsinchen
f6fd21e8e6
(svn r25948) -Fix [FS#5796]: Make sure LinkRefresher doesn't delete the LinkGraph DeleteStaleLinks() is examining.
11 years ago
frosch
2a16d139a2
(svn r25934) -Fix [FS#5793]: Do not access items from other pools in pool item destructors during pool cleaning.
11 years ago
fonsinchen
1237e3c48c
(svn r25912) -Fix [FS#5676]: Draw 'shared' links (involving neutral stations) as dashed lines and show them in every company's link graph overlay.
11 years ago
fonsinchen
b5dd83e84f
(svn r25909) -Fix (r25906): That simplification was a bit too much.
11 years ago
fonsinchen
6c4e7ab51d
(svn r25908) -Fix: Some documentation for constructors of LinkRefresher::Hop.
11 years ago
fonsinchen
fb7ad743d2
(svn r25906) -Fix: Simplify condition logic in link refresher.
11 years ago
fonsinchen
a9f6a1eeb7
(svn r25905) -Codechange: A more robust way of detecting loops during order prediction.
11 years ago
fonsinchen
d3fa322087
(svn r25904) -Fix: add forgotten files
11 years ago
fonsinchen
2f9c48b859
(svn r25901) -Fix [FS#5675]: Check if any vehicles are still serving a link before deleting it.
11 years ago
fonsinchen
6524849386
(svn r25899) -Change: Restrict flows if links are restricted and don't normally pick them anymore.
11 years ago
fonsinchen
29e987f3fc
(svn r25898) -Codechange: Add second timestamp for 'restricted links' to all edges.
11 years ago
fonsinchen
b3b460cae2
(svn r25885) -Codechange: Keep paths sorted so that the ones with flow == 0 are in the back and don't have to be iterated over so often.
11 years ago
fonsinchen
5ab204c8a1
(svn r25867) -Fix [FS#5764]: Shift dates on link graphs when using scenario editor date tool.
11 years ago
frosch
27a77d2c09
(svn r25861) -Fix [FS#5760]: Scale linkgraph legend according to text dimensions.
11 years ago
fonsinchen
bcbaa92485
(svn r25741) -Fix: shift join dates of link graph jobs when using the date cheat
11 years ago
frosch
f89375aa44
(svn r25731) -Fix [FS#5692]: Minor RTL alignment issues. (sbr)
11 years ago
fonsinchen
ca1c792144
(svn r25637) -Fix: don't keep minimal routing information if automatic distribution has been disabled
11 years ago
fonsinchen
f0119308f6
(svn r25424) -Fix: keep old flows around in an invalidated state to continue routing cargo if necessary
11 years ago
fonsinchen
b923eb31a8
(svn r25423) -Fix: integer overflows in MCF solver
11 years ago
fonsinchen
d9985c3331
(svn r25422) -Fix: properly initialize base capacity for paths
11 years ago
rubidium
b860353a66
(svn r25387) -Fix: "typos" in @file filename
11 years ago
fonsinchen
b4ab43be5f
(svn r25364) -Add: support for flow stats to linkgraph overlay
11 years ago
fonsinchen
575cabe90a
(svn r25357) -Add: flow mapper for link graph
11 years ago
fonsinchen
9824d53d6a
(svn r25356) -Add: Multi-Commodity-Flow solver for link graph
11 years ago
fonsinchen
6a46b5262f
(svn r25355) -Add: demand handler for link graph
11 years ago
fonsinchen
c32eea02dd
(svn r25354) -Add: link graph schedule and typedefs for LinkGraph and related classes
11 years ago
fonsinchen
22f56ffdd7
(svn r25353) -Add: link graph job implementation
11 years ago
fonsinchen
fdf04f60e0
(svn r25350) -Add: basic definitions for link graph
11 years ago
frosch
d79b2b03d0
(svn r25334) -Fix: Position the linkgraph legend window automatically like most windows.
11 years ago
rubidium
0fbc7140c5
(svn r25320) -Fix [FS#5577]: link graph start time was not accounted for when cheating dates
11 years ago
frosch
8157a8afd8
(svn r25290) -Add: Assign string names to notable windows.
12 years ago
frosch
56e4a8c4d6
(svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction.
12 years ago
rubidium
ef7befdbd8
(svn r25264) -Feature: linkgraph overlay over main viewport (fonsinchen)
12 years ago
rubidium
50ae992b47
(svn r25263) -Add: legend for linkgraph overlay (fonsinchen)
12 years ago
rubidium
163dfdd34a
(svn r25262) -Feature: linkgraph overlay for smallmap
12 years ago
rubidium
5bca50c466
(svn r25261) -Add: abstract implementation of linkgraph overlay for GUI (fonsinchen)
12 years ago
rubidium
06313e4981
(svn r25257) -Add: basic link graph (fonsinchen)
12 years ago