1
0
forked from 0ad/0ad
Commit Graph

19 Commits

Author SHA1 Message Date
a5c82a4ef6 Removes unused forward declarations of class and struct.
This was SVN commit r25903.
2021-09-08 19:43:01 +00:00
4ad78018f9 Fix no-pch build. Potentially fixes bb49fbe793, 0198942a79, 34b1920e7b, 8b08f4ae7a 0dbf417171, 3af1fc64d2, 5fbdbaa3bc, 6fbf036ae4.
Comments by: @vladislavbelov, @wraitii.
Differential Revision: https://code.wildfiregames.com/D3948
This was SVN commit r25423.
2021-05-12 13:48:55 +00:00
6fbf036ae4 Split off StructuredClone from ScriptInterface
Follows 34b1920e7b.

This separates StructuredClone & DeepCopy logic into its own header,
reducing the size of the monolithic ScriptInterface header.

Differential Revision: https://code.wildfiregames.com/D3922
This was SVN commit r25419.
2021-05-10 11:51:32 +00:00
fd8f5abd2e [SM52 2/2] Update to Spidermonkey 52 APIs.
No particularly noteworthy changes, as most complex API changes were
already supported in SM45 and done.
The addition of JSStructuredCloneData allows to remove our custom class.

Changes:
- InformalValueTypeName is back in the API, so remove our
implementation.
- Stop using JSRuntime entirely in favour of JSContext*
- JSPropertyDescriptor is renamed.
- CompartmentOptions are tweaked slightly (no functional changes)
- JS::Construct - API update.
- JSClass split - API update.
- A js.msg error message was removed, so we had to use a different one.
- Tests fix: fix comparison of union instances
- Disable warning in spidermonkey Vector.h
- Update error reporting to SM52 (minor API updates)
- Ignore warnings about unused return values (would come from OOM, which
isn't recoverable)

Most of the patching was done by Itms.

Tested by: Stan, Freagarach
Fixes #4893

Differential Revision: https://code.wildfiregames.com/D3095
This was SVN commit r24203.
2020-11-18 14:39:04 +00:00
e497672a9c Bump copyright header year numbers.
This was SVN commit r21305.
2018-02-21 18:44:52 +00:00
01f581e813 Move GetEngineInfo to Mod.[h|cpp]
Suggested by: elexis
refs d5807cd59f

This was SVN commit r21242.
2018-02-17 17:36:43 +00:00
9defd11440 Pass ScriptInterface as a const ref where possible.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D739
This was SVN commit r20028.
2017-08-24 00:32:42 +00:00
31decd6274 Messed up variable name in 9dc66a27d8.
This was SVN commit r18368.
2016-06-12 15:29:43 +00:00
9dc66a27d8 Pass pointer by ref.
This was SVN commit r18366.
2016-06-12 14:37:13 +00:00
c94cd66a57 Savegame cleanup.
Remove the player assignments altogether (506350d6fa) as the C++ part
already saves the playerID.
Grab the playerID directly from the game instead of passing it around
needlessly.

This was SVN commit r18357.
2016-06-10 19:04:57 +00:00
c02a7e1a7b SpiderMonkey 31 upgrade
This upgrade also introduces exact stack rooting (see to the wiki:
JSRootingGuide) and fixes problems with moving GC. This allows us to
enable generational garbage collection (GGC).
Measurements a few months ago have shown a performance improvement of a
non-visual replay of around 13.5%. This probably varies quite a bit, but
it should be somewhere between 5-20%. Memory usage has also been
improved. Check the forum thread for details.

Thanks to everyone from the team who helped with this directly or
indirectly (review, finding and fixing issues, the required C++11
upgrade, the new autobuilder etc.)! Also thanks to the SpiderMonkey
developers who helped on the #jsapi channel or elsewhere!

Fixes #2462, #2415, #2428, #2684, #1374
Refs #2973, #2669

This was SVN commit r16214.
2015-01-24 14:46:52 +00:00
523d220ac5 Add engine support to load mods from config and restart into mods.
Restructure mod mounting code a bit to make it reusable, and use it for
replays. Fixes #2703.

This was SVN commit r15676.
2014-08-25 16:02:40 +00:00
2ae74221c7 Fixes saving/loading problems introduced in 28bdd8540f.
* CGameLoader created a new JS::Value when assigning to m_Metadata.
This means it didn't actually update metadata in SavedGames::Load. The
new approach solves this problem and should work well if
CScriptValRooted gets replaced in the future.
 * The cloning in ScriptFunctions.cpp was required. Removing it caused
compartment mismatches.
 * Now CGameLoader loads the metadata unconditinally because we didn't
actually use the option to not load load it.

Ref #2415

This was SVN commit r15589.
2014-07-31 14:44:51 +00:00
41d3366f6a check version and mods before loading a file, fixes #2361 and #2385.
This was SVN commit r14630.
2014-01-21 22:49:42 +00:00
4b1297b328 Removes g_ScriptingHost and implements global to compartment 1 to 1 relation.
Each GUI Page gets its own compartment and all ScriptInterfaces in the
same thread should now use the same JS Runtime.
This is required for the SpiderMonkey upgrade.
Check the ticket for details.

Closes #2241
Refs #1886
Refs #1966

This was SVN commit r14496.
2014-01-04 10:14:53 +00:00
e0ea53a8ee Adds saved game descriptions and in-game save dialog, based on patch by Crynux, fixes #2030
This was SVN commit r13579.
2013-07-21 00:23:57 +00:00
d60df4b127 Adds saved game deletion. Refs #1090
Documents a few things related to saved games.

This was SVN commit r11233.
2012-03-04 05:27:17 +00:00
41e3bad341 More build fixes for FreeBSD.
Adds BSD sysdep.
Adds support for MAKE variable, overriding make command in our build
scripts.
Fixes more files not ending with newline.

This was SVN commit r10994.
2012-01-31 00:06:56 +00:00
7064565ff6 # Allow saving and loading single-player games.
Support writing zip files based on in-memory data.
Fix menu sliding animations to be framerate independent.

This was SVN commit r10454.
2011-10-30 00:07:28 +00:00