0ad/source/network
elexis 719f2d7967 Remove default CGame constructor values to make the code less error-prone, use CRenderer::IsInitialised() to test if the CGame should be rendered to remove indirection/proxies, making the code easier to read.
1c0536bf08 introduced a disableGraphics bool with a default value and
relied on the default being reasonable except for the few needed cases.
be93b31411 introduced the replayLog argument with a default value and
relied on the default being reasonable except for the few needed cases.
5747619c39 fixed a bug in that commit because the default value hadn't
actually been considered to be correct for all CGame constructor calls
and was wrong for two.

By requiring callers to specify the value, authors are forced to
establish thought which value is the correct one, as opposed to hoping
that a default value will be good by default.
As you can see in the diff, it also makes it easier to compare what
values changed if they are always defined in the caller.

Use CRenderer::IsInitialised() to determine if this is a non-visual
CGame,
for the purpose of removing less transparent proxy functions that are
unneeded as long as there are about 30 other calls testing for
CRenderer::IsInitialised() to determine if the Game should be rendered.

Supersedes:
* CGame constructor argument bool disableGraphics from 1c0536bf08.
* CGame::IsGraphicsDisabled() proxy from a533fff883 to the proxy from
1c0536bf08 and two local nonVisual = args.Has("autostart-nonvisual")
variables in GameSetup.cpp from a533fff883.

Call the Renderer destructor instead of calling delete on the
non-pointer (SAFE_DELETE would not be supported for instance).

Started as a preparation for D2197, but actually independent.

Differential Revision: https://code.wildfiregames.com/D2211
This was SVN commit r22785.
2019-08-25 11:02:55 +00:00
..
scripting Remove default CGame constructor values to make the code less error-prone, use CRenderer::IsInitialised() to test if the CGame should be rendered to remove indirection/proxies, making the code easier to read. 2019-08-25 11:02:55 +00:00
tests Remove default CGame constructor values to make the code less error-prone, use CRenderer::IsInitialised() to test if the CGame should be rendered to remove indirection/proxies, making the code easier to read. 2019-08-25 11:02:55 +00:00
fsm.cpp Strip trailing whitespace from network code. 2015-12-21 13:58:32 +00:00
fsm.h Strip trailing whitespace from network code. 2015-12-21 13:58:32 +00:00
NetClient.cpp Provide ScriptInterface CreateObject and CreateArray functions to replace Eval calls following 7c2e9027c2, 1c0536bf08 and later. 2019-07-22 19:35:14 +00:00
NetClient.h Fix unreported glooxwrapper leaks following 61261d14fc, refs #2305. 2019-08-17 00:12:19 +00:00
NetClientTurnManager.cpp Remove unused GUIUtil functions, unused GUI includes and some tails in GUIUtil. 2019-08-25 08:57:36 +00:00
NetClientTurnManager.h Split TurnManager classes into individual files per class. Patch by echotangoecho, fixes #4095. 2017-01-24 02:04:50 +00:00
NetFileTransfer.cpp Cleanup of the network code (range-based for, remove spaces between angle brackets, and other little things). 2016-04-24 20:48:53 +00:00
NetFileTransfer.h Cleanup of the network code (range-based for, remove spaces between angle brackets, and other little things). 2016-04-24 20:48:53 +00:00
NetHost.cpp Automatically replace %hs/%ls with %s in CLogger format strings. 2015-01-22 20:36:24 +00:00
NetHost.h Prevent hosts that didn't modify C++ code from starting the game without all assigned online players being ready (launchGame(); cheat), refs #4463. 2018-07-21 11:58:35 +00:00
NetMessage.cpp Pass ScriptInterface as a const ref where possible. 2017-08-24 00:32:42 +00:00
NetMessage.h Fix few typos found with the Debian lintian tool. 2017-10-28 22:34:57 +00:00
NetMessages.h Don't print lobby buddies to mainlog.html, refs D209 / dcf12abe8c. 2018-06-06 22:37:20 +00:00
NetMessageSim.cpp Pass ScriptInterface as a const ref where possible. 2017-08-24 00:32:42 +00:00
NetServer.cpp Fix unreported glooxwrapper leaks following 61261d14fc, refs #2305. 2019-08-17 00:12:19 +00:00
NetServer.h pthread -> std::thread (4/7) - Replace pthread in remaining files 2019-08-15 09:07:16 +00:00
NetServerTurnManager.cpp Don't trigger a NetServerTurnManager debug breakpoint if a modified or unmodified client sends a non-sequential turnnumber. 2018-01-26 23:02:13 +00:00
NetServerTurnManager.h Don't trigger a NetServerTurnManager debug breakpoint if a modified or unmodified client sends a non-sequential turnnumber. 2018-01-26 23:02:13 +00:00
NetSession.cpp Prevent players from disconnecting during the loading screen by increasing the timeout tolerance to 60 seconds for that period, fixes #5163. 2018-06-06 22:09:38 +00:00
NetSession.h Prevent players from disconnecting during the loading screen by increasing the timeout tolerance to 60 seconds for that period, fixes #5163. 2018-06-06 22:09:38 +00:00
NetStats.cpp Clean up ThreadUtil, use standard C++11 constructs instead of custom ones. 2019-06-06 19:30:48 +00:00
NetStats.h Clean up ThreadUtil, use standard C++11 constructs instead of custom ones. 2019-06-06 19:30:48 +00:00
NMTCreator.h Strip trailing whitespace from network code. 2015-12-21 13:58:32 +00:00
Serialization.h Strip trailing whitespace from network code. 2015-12-21 13:58:32 +00:00
StringConverters.h Provide JSON-compatible string escaping 2011-11-04 01:18:34 +00:00
StunClient.cpp Fix unreported glooxwrapper leaks following 61261d14fc, refs #2305. 2019-08-17 00:12:19 +00:00
StunClient.h Fix unreported glooxwrapper leaks following 61261d14fc, refs #2305. 2019-08-17 00:12:19 +00:00