0ad/source/ps/scripting
elexis a84e2e57df Use ScriptInterface::CreateObject for ToJSVal<CColor>, and for ToJSVal<Grid<u8> >, ToJSVal<Grid<u16> > used by the AIManager obtaining the pathfinder grid.
Make that function static, so that it can be used for these functions
without slowly having to obtain the ScriptInterface instance using
GetScriptInterfaceAndCBData just to get the JSContext again.
Remove few redundant conversions for CreateObject arguments.

Differential Revision: https://code.wildfiregames.com/D2128
Tested on: gcc 9.1.0, clang 8.0.1, Jenkins
Tedious performance testing in: D2128, D2127

This was SVN commit r22894.
2019-09-13 00:56:51 +00:00
..
JSInterface_ConfigDB.cpp redo 2d57478781, Create a ConfigDB_CreateAndWriteValueToFile function to absorb some duplication in the gui 2019-08-05 14:12:55 +00:00
JSInterface_ConfigDB.h redo 2d57478781, Create a ConfigDB_CreateAndWriteValueToFile function to absorb some duplication in the gui 2019-08-05 14:12:55 +00:00
JSInterface_Console.cpp Remove some unused Profiler.h and CLogger.h includes. 2019-09-07 13:35:45 +00:00
JSInterface_Console.h Add missing ScriptInterface includes to 2018-04-27 16:48:44 +00:00
JSInterface_Debug.cpp Refactor build information getters and remove the useless code. 2019-01-06 14:32:54 +00:00
JSInterface_Debug.h Refactor build information getters and remove the useless code. 2019-01-06 14:32:54 +00:00
JSInterface_Game.cpp 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
JSInterface_Game.h Add missing ScriptInterface includes to 2018-04-27 16:48:44 +00:00
JSInterface_Main.cpp Unify duplicate u8* to hex string functions in a new Hexify function variant, similar to bb1f86f515, used by Tests, CacheLoader, Terms and Conditions, Lobby and mod.io. 2018-08-08 12:59:05 +00:00
JSInterface_Main.h Persist the lobby Terms Of Use and Terms Of Service checkbox if the logged in user and the accepted versions of the pages didn't change since last login, refs #5218. 2018-06-21 16:38:08 +00:00
JSInterface_Mod.cpp Main.cpp cleanup. 2018-05-08 09:45:54 +00:00
JSInterface_Mod.h Clean some forward declarations. 2018-04-27 16:06:42 +00:00
JSInterface_ModIo.cpp Use ScriptInterface::CreateObject for ToJSVal<CColor>, and for ToJSVal<Grid<u8> >, ToJSVal<Grid<u16> > used by the AIManager obtaining the pathfinder grid. 2019-09-13 00:56:51 +00:00
JSInterface_ModIo.h Clean some forward declarations. 2018-04-27 16:06:42 +00:00
JSInterface_SavedGame.cpp 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
JSInterface_SavedGame.h Add missing ScriptInterface includes to 2018-04-27 16:48:44 +00:00
JSInterface_UserReport.cpp New UserReporter Terms and Conditions, hopefully GDPR compliant, refs #5257. 2018-10-05 22:19:28 +00:00
JSInterface_UserReport.h New UserReporter Terms and Conditions, hopefully GDPR compliant, refs #5257. 2018-10-05 22:19:28 +00:00
JSInterface_VFS.cpp Use ScriptInterface::CreateObject for ToJSVal<CColor>, and for ToJSVal<Grid<u8> >, ToJSVal<Grid<u16> > used by the AIManager obtaining the pathfinder grid. 2019-09-13 00:56:51 +00:00
JSInterface_VFS.h Add missing ScriptInterface includes to 2018-04-27 16:48:44 +00:00
JSInterface_VisualReplay.cpp Remove some unused Profiler.h and CLogger.h includes. 2019-09-07 13:35:45 +00:00
JSInterface_VisualReplay.h Add missing ScriptInterface includes to 2018-04-27 16:48:44 +00:00