Rename initMain to initGUIObjects to clarify what the function does.
While init() sets globals without touching the GUI, initGUIObjects
updates all GUI controls after the first tick.
Rename loadGameAttributes to loadPersistMatchSettings as that's more
specific as to where the attributes are loaded from.
Add some JSDoc comments and a TODO for an annoying old bug.
Simplifiy to-boolean conversions by negating twice (!!)
This was SVN commit r17433.
Don't define variables inside switch-statements.
Move chat-font to global.
Rename host and an i to guid, newPlayer to newGUID to be more coherent.
Do early continues when finding joinings/leavings and swapping players.
This was SVN commit r17432.
Doing so follows the principle of least exposure and means those
variables will be destroyed when leaving the block (i.e. memory being
freed up earlier).
The blocks affected by this commit are short (mostly 3-5 lines).
The variables are not referenced before or after the block, nor in their
temporal dead zones.
This was SVN commit r17424.
No effort was done to prevent players from accessing it since it's
impossible to prevent them from doing so anyway.
Fixes#3387 .
This was SVN commit r17423.
Do not focus the maplist when entering the singleplayer gamesetup as
that actually doesn't have an effect (you can't scroll the maplist with
arrow-keys).
This was SVN commit r17422.
This autodetection has a higer priority than default.cfg, but lower
priority than local changes.
Note that after enabling these features some get disabled later on on
some drivers (Intel, software renderers).
Also note that mesa drivers only expose core profile OpenGL, and 0 A.D.
reads compatibility profile, so that on mesa drivers OpenGL4 is never
detected and these features are never enabled by default.
This was SVN commit r17412.
Actually define these variables and revert to sorting by state for
gamelists by default (despite not having a column to sort for that).
This was SVN commit r17387.
The previous selection is saved globally so that we don't lose it in
case of no element being selected.
Also remove an unused variable.
This was SVN commit r17383.
Don't even load non-playable civs in the gamesetup and add sanity checks
to sanitizePlayerData() and loadCivData() so that we can remove later
checks.
Remove some blatantly wrong code from launchGame().
Move hardcoded romanNumbers to a global.
This was SVN commit r17381.