The abs caused a compiler error in that environment, because wchar_t is
unsigned on armhf, subtracting signed from unsigned results in unsigned
and std::abs does not define an unsigned variant.
Differential Revision: https://code.wildfiregames.com/D1122
Patch By: Peter Michael Green
Uploaded By: Ludovic
This was SVN commit r20869.
Removes the serialization of JSON files, shrinking savegame files and
rejoin states sent across the network, refs #3834, #4239, #3909,
f24523dc8f.
Removes the AI C++ code to read JSON files from e33d4a52e9 since the AI
can now use the globalscript.
Allows the AI to read Aura templates and removal of GUIInterface code to
improve performance.
Serialization of the JSON objects in other simulation components was
removed in 9c0e37f2c0 / D1109, a6f14f5631 / D1130.
Serialization removal planned by sanderd17
AI part proofread by mimo
Simulation part proofread by bb
Discussed with Itms on irc
Differential Revision: https://code.wildfiregames.com/D1108
This was SVN commit r20737.
It is unneeded because we won't add backwards compatibility for previous
formats and
because the engine version check from 94302a4149 is sufficient and more
accurate in testing compatibility of savegames of different releases.
The simpler code allows unifying the savegame version check with the
check used by the replay menu (to be used in multiplayer gamesetups).
Differential Revision: https://code.wildfiregames.com/D1131
Reviewed By: wraitii
Agreed with: Imarok
Discussed with: Philip
This was SVN commit r20729.
This addresses the Simulation2 warning about a gamesetup mechanism not
having decided explicitly about the RNG.
Differential Revision: https://code.wildfiregames.com/D1187
Reviewed By: mimo
Refs #4917, 7e05d7edc9 / D1178
This was SVN commit r20726.
This will enable us in the future to have technologies that change
projectiles.
This is also somewhat of a refactoring.
Patch By: Mate-86
Reviewed By: wraitii
Trac Tickets: #1909
Differential Revision: https://code.wildfiregames.com/D945
This was SVN commit r20676.
Original patch from Sandarac, reworked by elexis and finalized by mimo
Discussed with elexis
Differential Revision: https://code.wildfiregames.com/D1159
This was SVN commit r20671.
Remove ACCEPT_DIAGONAL_GAPS as it was unused and will not be used in the
future.
Use PASSABLE macro everywhere.
Simplify considerable OnTheWay as MakeGoalReachable returns a point
goal.
This doubles as a very slight optimisation, on the order of microseconds
per call.
Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D80
This was SVN commit r20634.
By adding a custom function in Grid, the code gets vectorised on both
gcc and clang, resulting in much faster code and faster update times,
sometimes substantially (on giant maps or when few chunks must be
updated).
Reviewed By: mimo
Differential Revision: https://code.wildfiregames.com/D73
This was SVN commit r20630.
This also allows non-selectable entities like building previews to cast
range visualizations.
Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D555
Refs #3915, #4349, ee5bb1fd61 / D238.
Comments By: Vladislav
This was SVN commit r20622.
This abstraction allows calling that code again from other simulation
components, like the RangeOverlayRenderer in D555.
Differential Revision: https://code.wildfiregames.com/D1139
Refs #3915, D555
Comments By: Vladislav, echotangoecho
This was SVN commit r20621.
Removes the workaround copy of the resources JSON each turn in
GetSimulationState.
Refs #3934, #4868
Differential Revision: https://code.wildfiregames.com/D1119
Reviewed By: mimo
This was SVN commit r20600.
Removes the workaround and limitations of globalscripts Resources
(52f311da2b) and loadCivFiles (89055ef858), allowing them to actually
become actually global.
Rename to ListDirectoryFiles as proposed by wraitii.
Differential Revision: https://code.wildfiregames.com/D1103
Reviewed By: s0600204
Proofread by: echotangoecho
Comments by: wraitii
Relevant discussions with leper in #4868, D1062
This was SVN commit r20586.
This way globalscripts/ can use the same code in all contexts, all paths
are absolute and only one function name is needed.
Remove ReadCivJSONFile which is redundant with this function as well.
Restrict read access of rmgen/ to rmgen/ and simulation/, refs
4275a8a33c, 89055ef858.
Refs #4868
Differential Revision: https://code.wildfiregames.com/D1085
Reviewed By: wraitii
Partial agreement with leper
This was SVN commit r20576.
Optimizing the memory footprint requires likely different functions
following the new SM versions and a lot of testing,
so having these doesn't lower the effort to achieve optimization while
confusing the reader.
Differential Revision: https://code.wildfiregames.com/D1073
Reviewed By: Yves
This was SVN commit r20572.
This change ahead of D965, where fauna become silhouette casters, and
several fauna animals are transparent models.
Reviewed By: wraitii
Patch By: temple
This was SVN commit r20569.
This change drops MBCS encoding (which was the default for premake4)
except in the Collada project which is entirely written assuming MBCS.
Tested By: wraitii
Differential Revision: https://code.wildfiregames.com/D1069
This was SVN commit r20561.
A check for OSX version that seemed useless broke compilation on Xcode
9.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D986
This was SVN commit r20530.
Unify civ file loading from gui/common/functions_civinfo.js and
rmgen/library.js in globalscripts/Templates.js.
Delete the two forgotton headers in 4275a8a33c.
Refs #4868, #4804, D900.
Differential Revision: https://code.wildfiregames.com/D1062
Discussed with: leper
This was SVN commit r20528.
The bug came from inlining the copy constructor of Grid, which ended up
reading from un-initialized variables.
Discussed with leper who had a similar fix for a test failure locally.
Fixes#4859
Differential Revision: https://code.wildfiregames.com/D1048
This was SVN commit r20520.
It was only triggered if a civ wasn't set in Atlas.
Because civs are expected to be well-defined everywhere, alwas set the
property in Atlas too, fixing the non-GUI part of #4869.
Use the existing player defaults value then instead of hardcoding a
fallback civ string.
This was SVN commit r20512.
Revert the introduction of the exact copies of FileExists ReadJSONFile
functions in MapGenerator.cpp introduced by 871ed04521.
Include JSInterface_VFS.cpp from MapGenerator.cpp to remove that code
while gaining the other missing VFS file loading functions in rmgen/.
Split RegisterScriptFunctions of JSInterface_VFS.cpp from eb4e66aab3
into RegisterReadOnlyScriptFunctions and RegisterWriteScriptFunctions to
prevent unintentional write access.
This was SVN commit r20507.