1
0
forked from 0ad/0ad
Commit Graph

16 Commits

Author SHA1 Message Date
b18f74da44 Remove trailing whitespace and whitespace in empty lines of source/ except source/third_party/.
This was SVN commit r18987.
2016-11-23 11:18:37 +00:00
1a66f510d0 Use const T& for parameters of some types in script-exposed native functions
Using references matches the C++ coding style better and should improve
performance a bit in theory. It avoids 2 copies of T in case of the
functions registered with RegisterFunction (mainy used in the GUI). It
should also avoid one or two copies in case of
DEFINE_INTERFACE_METHOD_X, which is used in the simulation, but I
haven't bothered to count it there exactly.
It is now predefined which types have to be passed by const reference
and which are passed by value. Note that references can't be used as
out-parameters (to return multiple values to JS). This hasn't worked
before either and probably never will.

This was SVN commit r17696.
2016-01-23 15:17:56 +00:00
495aa7bec5 Expose TemplateExists() to RM scripts.
This was SVN commit r16804.
2015-06-21 20:22:34 +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
567917bf41 Give RMS access to the simulation templates. Fixes #1589. Patch by Itms.
This was SVN commit r15306.
2014-06-07 12:12:53 +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
94c57085e9 Makes some classes NONCOPYABLE, based on patch by Markus, refs #1852
This was SVN commit r13419.
2013-05-22 21:40:56 +00:00
813fed5b9e Adds GetCivData to map generator API (to replace the hardcoded starting entities in rmgen).
Adds some starting entities to unfinished civs.

This was SVN commit r9901.
2011-07-24 03:28:18 +00:00
f4b55a9acf Fix non-PCH build
This was SVN commit r9523.
2011-05-15 19:51:33 +00:00
fffcdbbf21 Balances random map resources.
Attempts to avoid "invalid argument" errors in typed arrays by forcing
them to integer (see #658).
Removes script preloading from map generator (VFS is thread-safe now)
Removes thread checking from ScriptInterface file loading functions.
Adjusts starting entities in civ data.

This was SVN commit r9435.
2011-05-04 21:24:25 +00:00
9733affb05 Fix non-PCH build
This was SVN commit r9419.
2011-05-04 01:17:09 +00:00
cccd6849a7 cleanup (requires update-workspaces)
lib_errors.cpp: replace with status.cpp, adapt to needs at work
wutil: fix runtime warning reported via feedback box
config: merge CONFIG_PARANOIA and !CONFIG_FINAL into
CONFIG_ENABLE_CHECKS
add openmp, pointer_typedefs.h

This was SVN commit r9410.
2011-05-03 12:38:42 +00:00
481f570a0e CMapGeneratorWorker thread safety issue. Fixes #783.
VFS access moved to main thread, where random map scripts are preloaded
and stored prior to use by the worker thread.
Adds LoadGlobalScript to ScriptInterface, for evaluating script content
in the global scope.

This was SVN commit r9261.
2011-04-15 05:23:51 +00:00
942a45372c Random maps generated in their own thread, loading GUI is updated with progress.
Fixes some bugs in game loader error handling.

This was SVN commit r9220.
2011-04-10 05:31:18 +00:00
f618605477 Changes default random map sizes.
Tweaks random map resources.
Adds support for circular maps to rmgen library.
Various fixes in map generator.
On Miletus map, change player 2 civ, as Romans are not fully implemented
(fixes #758)

This was SVN commit r9104.
2011-03-23 08:12:04 +00:00
0e0ed94926 Implements random map system, fixes #6.
Includes default library "rmgen" w/ API based on rmgen tool.
Modifies rmgen scripts Cantabrian Highlands, Neareastern Badlands, and
Latium.
Old map support dropped from MapReader.
Fixes a few bugs in existing game setup and initialization scripts.

This was SVN commit r9096.
2011-03-22 01:34:45 +00:00