Commit Graph

30 Commits

Author SHA1 Message Date
Rubidium 4f2412a272 Codechange: range based for loops instead of C-style for loops 2024-04-11 07:05:04 +02:00
Tyler Trahan 735abfe111
Codechange: Split dates and timers into Economy and Calendar time (#10700) 2024-01-22 09:04:34 -05:00
Peter Nelson ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
2023-11-06 20:29:35 +00:00
Tyler Trahan 77173a6a10 Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes 2023-09-10 08:40:25 -04:00
Patric Stout 299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed (#10761) 2023-08-12 18:14:21 +00:00
Patric Stout a9ed590ca7
Codechange: use TimerGameCalendar::Date for variables in linkgraph that are dates (#11187) 2023-08-12 16:02:38 +02:00
Peter Nelson e6740046ee Codechange: Use range-for iteration. 2023-05-11 07:58:55 +01:00
Tyler Trahan 930f0a16d8 Codechange: Define Date/Year/Month/Day within TimerGameCalendar class 2023-04-26 07:14:03 -04:00
Patric Stout 7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 2023-04-24 15:56:01 +00:00
Tyler Trahan 646a7e625b
Change: Use seconds for Linkgraph update settings (#10610) 2023-04-14 22:49:12 +02:00
Michael Lutz 13528bfcd0 Codechange: Un-bitstuff all remaining commands. 2021-12-16 22:28:32 +01:00
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.
2021-12-16 22:28:32 +01:00
Michael Lutz 549caca39c Codechange: Move command arguments to the back of the networked command function calls. 2021-12-16 22:28:32 +01:00
Jonathan G Rennison 94d629d79b
Change: [Linkgraph] Allow job threads to be aborted early when clearing schedule (#8416)
When link graph jobs are cleared due to abandoning the game or exiting,
flag the job as aborted.
The link graph job running in a separate thread checks the aborted flag
periodically and terminates processing early if set.
This reduces the delay at game abandon or exit if a long-running job
would otherwise still be running.
2020-12-25 00:36:36 +01:00
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.
2020-12-22 15:17:57 +01:00
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.
2020-12-22 15:17:57 +01:00
glx 09fa39c5b5 Codechange: Replace linkgraph related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
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.
2019-04-06 11:27:39 +02:00
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.
2018-07-19 21:17:07 +02:00
frosch 780e595933 (svn r27178) -Fix [FS#5969]: Data race due to lazy initialisation of objects. 2015-03-07 18:27:01 +00:00
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 2014-04-23 20:13:33 +00:00
fonsinchen cc77d40336 (svn r26347) -Fix [FS#5898]: Make sure link graph jobs can delete themselves after SLA_NULL. 2014-02-16 18:42:59 +00:00
fonsinchen 95354136be (svn r26276) -Fix [FS#5874]: Don't spawn link graph jobs for link graphs with only one node 2014-01-24 21:39:07 +00:00
fonsinchen ec492bfb77 (svn r26166) -Fix: Scale flows only after mapping to avoid rounding errors. 2013-12-20 14:57:44 +00:00
fonsinchen 5ab204c8a1 (svn r25867) -Fix [FS#5764]: Shift dates on link graphs when using scenario editor date tool. 2013-10-15 17:32:31 +00:00
fonsinchen 575cabe90a (svn r25357) -Add: flow mapper for link graph 2013-06-09 13:01:23 +00:00
fonsinchen 9824d53d6a (svn r25356) -Add: Multi-Commodity-Flow solver for link graph 2013-06-09 13:00:41 +00:00
fonsinchen 6a46b5262f (svn r25355) -Add: demand handler for link graph 2013-06-09 12:59:51 +00:00
fonsinchen c32eea02dd (svn r25354) -Add: link graph schedule and typedefs for LinkGraph and related classes 2013-06-09 12:58:37 +00:00