1
0
forked from 0ad/0ad
0ad/source/tools
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
..
atlas 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
autolog/SVNLog Fix fileendings of files with mixed fileendings in the public mod (except art, l10n) and in source/ (except for source/third_party/). 2016-07-25 12:58:47 +00:00
cmpgraph Add script for generating mostly-useless component interaction graphs. 2011-01-07 20:31:48 +00:00
dist Exclude a few files from the win32 installer. 2018-04-30 20:09:20 +00:00
entdocs Changes various urls to point to the new website and fixes some broken forum urls. 2012-12-11 23:04:03 +00:00
entgraph Fix line endings of all files in source/ except source/third_party/. 2016-07-25 09:07:45 +00:00
entity Fix checkrefs script following eab4f9fdde (phenotypes), and fix the unit_motion_integration_test map from b637fdbae9. 2019-08-12 08:03:23 +00:00
fontbuilder2 Fix line endings of all files in source/ except source/third_party/. 2016-07-25 09:07:45 +00:00
i18n Simplify the translations maintenance script. 2019-08-18 18:13:04 +00:00
lobbybots The files in this path were not marked as moved in 5dce2f1fb1... 2018-11-07 17:32:21 +00:00
mapcompatibility Fixes A19 map converter script to be compatible with Python 2 (uses struct instead of to_bytes and from_bytes) 2015-06-14 17:53:12 +00:00
openlogsfolder Fix line endings of all files in source/ except source/third_party/. 2016-07-25 09:07:45 +00:00
profiler2 Make all Wildfire Games copyright headers consistent by always ending with a period and using (C) instead of (c). 2017-07-10 14:26:24 +00:00
replayprofile Ease comparison of two replay profile graphs by typing the filename in the browser instead of renaming the data.json files, refs #5116. 2018-04-11 16:07:38 +00:00
selectiontexgen Pretty unit selection overlay rings. Fixes #824. 2012-04-22 04:04:02 +00:00
springimport Make all Wildfire Games copyright headers consistent by always ending with a period and using (C) instead of (c). 2017-07-10 14:26:24 +00:00
templatesanalyzer Update docs. 2018-09-11 16:33:22 +00:00
templatessorter Templates sorting utility. Closes #801. 2011-07-30 20:20:34 +00:00
tracelogger SpiderMonkey 38 upgrade: 02/35 2016-09-02 16:14:11 +00:00
webservices Fix line endings of all files in source/ except source/third_party/. 2016-07-25 09:07:45 +00:00
xmlvalidator Adds a skip for invalid files in the validator 2017-12-12 20:23:26 +00:00
LICENSE.txt Split XpartaMuPP and EcheLOn into separate directories and rename parent folder to "lobbybots" following 5e643ba6be. 2018-11-07 17:23:56 +00:00