1
0
forked from 0ad/0ad
Commit Graph

61 Commits

Author SHA1 Message Date
d805ef356e FileExists -> VfsFileExists (see next commit)
scriptInterface: fix bool cast warning

This was SVN commit r8984.
2011-02-25 16:30:55 +00:00
f6c1d98c9a Fix #739 (test failures).
Use JSON in debug serializer output unless it fails due to e.g. cyclic
values, in which case use toSource.
Disable file stats code by default, since its output isn't used.

This was SVN commit r8975.
2011-02-24 00:32:38 +00:00
6b783aebd6 Try to fix build errors
This was SVN commit r8973.
2011-02-22 21:50:26 +00:00
8f59d52697 sync with work; fix compile error due to lack of boost/serialization in 0ad svn
This was SVN commit r8965.
2011-02-21 09:23:51 +00:00
d75d9c3b75 Make the script profiler more useful, by giving the filename/line for anonymous functions.
Fix the turn-based profiler a bit.

This was SVN commit r8964.
2011-02-21 02:16:12 +00:00
c29f2d26b3 Add some more stuff to hwdetect, because there can never be too much
This was SVN commit r8951.
2011-02-20 00:54:36 +00:00
1c7e33b528 Remove a load of implicit CStr type conversions, since they're error-prone and can cause silent data loss.
Handle most CStr8/CStrW conversions via UTF-8 instead of effectively
assuming Latin-1.
Return UTF-8 strings from Xeromyces API.

This was SVN commit r8929.
2011-02-17 20:08:20 +00:00
0da7e822ff # Add opt-in automatic feedback system.
Add GL implementation limits to hwdetect.
Make the in-game manual support multiple text files.
Remove unnecessary instruction on how to close the manual window.
Make guitextobject.caption return the original value without stripping
formatting tags.
Remove unused non-VFS support from config system.
Support writing config files back to their original path.
Remove unnecessary user profile directory; use normal config directory.

This was SVN commit r8925.
2011-02-16 20:40:15 +00:00
b8925fbbc9 # Support AI construction of buildings.
Pass terrain passability data to AI scripts.
Expand pathfinder passability data to 16 bits per tile, to allow more
classes.
Support 16-bit ints in serializer.
Partially support JS typed arrays.
Allow foundations to be placed on top of units (fixes #499).
Stop farms and fishes blocking movement (fixes #534).
Add obstruction flags to allow finer control over what they block.
Associate entity IDs with obstruction shapes, to allow finding colliding
entities.
Support moving to the edge of a target entity with inactive obstruction.
Support foundation entities in AI.
Support playing as non-hele civs.

This was SVN commit r8899.
2011-02-10 16:06:28 +00:00
6af877a1cb Fix Windows crash caused by calling js_free (which calls free from the wrong CRT).
Fix some warnings.

This was SVN commit r8873.
2011-01-29 17:50:42 +00:00
f39f279132 Add AI script code to provide a cleaner API around the engine interface.
Handle AIProxy entirely through scripts.
Support structured clones of script values.
Improve performance.
Support multiple script contexts sharing a runtime.
Use a separate context per AI player.

This was SVN commit r8866.
2011-01-15 23:35:20 +00:00
dd501b2a5a # Add initial basic player AI framework.
Support direct access to serializer streams, so serializers can be
nested.
Make component script "this.template" read-only.
Stop globally-subscribed component scripts receiving messages posted to
local components, to reduce out-of-sync risks.
Move pathfinder data out of entity template directory.
Fix GuiInterface deserialization.

This was SVN commit r8865.
2011-01-12 12:29:00 +00:00
f0476b61fb Fix #476 (Use JS_New for ScriptInterface::CallConstructor)
This was SVN commit r8638.
2010-11-17 16:56:11 +00:00
404456ee8e Fix int8_t redefinition errors in VC2010
This was SVN commit r8635.
2010-11-17 03:02:04 +00:00
bd3bd084c0 Support new SpiderMonkey API.
wposix: Define int8_t compatibly with SpiderMonkey.
Remove unused camera, lightenv JS interfaces.
Remove most of vector JS interface.
Remove some of the redundant JS string conversion functions.
Remove unneeded vmem, _lodBias functions.
Clean up some formatting.

This was SVN commit r8629.
2010-11-16 23:00:52 +00:00
13d2e44ff5 Run GC frequently in the simulation script context, to keep memory usage down
This was SVN commit r8622.
2010-11-15 15:03:40 +00:00
5d764f1435 Run network server in a separate thread, to minimise latency.
Make some parts of logger and console thread-safe.
Simplify console: remove special commands; remove prefix for script
commands.
Remove LOG_ONCE, to simplify logger.
Change some code to use the new logger interface.
Fix OOS when revealing map.
Clean up some formatting.

This was SVN commit r8511.
2010-10-31 22:00:28 +00:00
c0a7a36f7a Use JSFastNative API in more places, for improved compatibility with future SpiderMonkey versions.
Remove some unnecessary script-exposed functions, and move some more
into the Engine namespace.

This was SVN commit r8428.
2010-10-21 19:54:59 +00:00
db047e5bee Cache message JS conversions, to make broadcasts faster
This was SVN commit r8120.
2010-09-17 17:49:39 +00:00
624e8490a2 Increase script memory limit more
This was SVN commit r8117.
2010-09-17 17:40:44 +00:00
2e7436434d warning fixes: mostly size_t vs. specialized API type and other type conversion.
added player_id_t typedef and INVALID_PLAYER, use that instead of -1.
also added sanity checks to cpu.cpp to ensure ARCH_* is correct (see
http://www.wildfiregames.com/forum/index.php?showtopic=13327&hl=)
and further predefined macros to arch.h just to be sure.

This was SVN commit r8079.
2010-09-05 09:38:30 +00:00
5e15a0279e Print JS stack trace when reporting exceptions.
Increase maximum logger message size.
Fix GC bug.

This was SVN commit r8063.
2010-09-03 20:06:17 +00:00
2b57f4f998 # Initial support for formation movement.
Support asynchronous path queries.
Allow escaping when stuck in impassable terrain tiles.
Split Update message in multiple phases, to cope with ordering
requirements.
Support automatic walk/run animation switching.

This was SVN commit r8058.
2010-09-03 09:55:14 +00:00
5fbbc27dfd Fix crash when calling JSFastNatives with too few arguments (they don't guarantee to give the number requested in the definition)
This was SVN commit r8028.
2010-08-23 14:30:13 +00:00
91cd032827 Add basic replay recorder/player to help debugging and performance testing.
This was SVN commit r7863.
2010-08-06 22:16:05 +00:00
65bcedb9fc Load map descriptions from their XML file.
Add basic hold-fire stance, and use it for some test maps.
Add JSON data container to map XML files, to simplify the interaction
between scripts and maps.
Fix fixed-point printing so it roundtrips safely through map files.
Fix camera startup positions in old-format maps.

This was SVN commit r7844.
2010-08-04 21:15:41 +00:00
b292a32505 Add JS memory usage to profiler.
Add dumpHeaps() console function for debugging JS memory usage.
Increase default JS heap size.
Make call-time profile table appear first when toggling.
Remove some unused script functions.

This was SVN commit r7842.
2010-08-02 19:23:58 +00:00
0cd0a1f584 # Add auto-attacking of nearby enemies.
Add general range-detection code.
Avoid unnecessarily computing 3D entity positions.

This was SVN commit r7817.
2010-07-29 20:39:23 +00:00
c4350d86de Avoid unnecessary dynamic allocation when calling script functions.
Use tracer instead of rooting in ValueCloner, to avoid memory
allocations.

This was SVN commit r7770.
2010-07-19 23:03:33 +00:00
5d5cb02b21 Disable visible logging of network messages
This was SVN commit r7708.
2010-07-06 20:31:05 +00:00
586ba51e4a Fix lossy fixed<->jsval conversion.
(Hopefully this will really fix the OOS errors.)

This was SVN commit r7692.
2010-07-04 19:47:31 +00:00
1c0536bf08 # Refactored the networking code, and redesigned the game setup screen.
Major updates to most network classes.
Simplify CNetServer so it doesn't duplicate any client behaviour; all
players now run CNetClient.
Remove most player/slot management from networking code.
Wait for all players to finish loading before starting the simulation.
Remove CGameAttributes; attributes are now just a JS object.
Remove CPlayer; they are now just simulation entities.
Handle player colours via simulation system.
Add a default map for Atlas, so it always has something to load.
Move network documentation to Doxygen.
Remove lots of now-unused code.

This was SVN commit r7653.
2010-06-30 21:41:04 +00:00
c5d204c7ff Enable latest JS language features.
Load GUI scripts as UTF-8.

This was SVN commit r7650.
2010-06-30 21:23:41 +00:00
65cf204423 Display warnings and errors on screen for a short time (fixes #119).
Add warn(), error() functions for simulation scripts.

This was SVN commit r7600.
2010-05-31 22:44:59 +00:00
5ce9acc263 MSVC warning fixes
This was SVN commit r7580.
2010-05-25 18:44:33 +00:00
47a03c3397 Replace JS_Enumerate with manual enumeration, to avoid its memory allocations.
Use LookupProperty to avoid having to check for getters.
Add a quicker method of rooting many script values.

This was SVN commit r7579.
2010-05-25 18:24:12 +00:00
f902803af2 Windows build fixes
This was SVN commit r7566.
2010-05-22 14:27:53 +00:00
386f322b1c Make Math.random() more deterministic
This was SVN commit r7563.
2010-05-22 00:38:33 +00:00
c684c211a2 # Basic experimental multiplayer integration with new simulation system.
Add new turn manager that should be more correct and potentially more
efficient.
Remove evil CNetServer/CNetClient multiple inheritance of CTurnManager.
Add multiplayer autostart.
Various minor cleanups.

This was SVN commit r7551.
2010-05-20 00:59:01 +00:00
f95eb6ca85 Fix accidental include
This was SVN commit r7540.
2010-05-12 13:09:11 +00:00
434248167b Fix warnings in tests
This was SVN commit r7535.
2010-05-10 09:52:35 +00:00
037770a2a3 Fix use of 'undefined' sound group on death.
Warn about implicit script/native type conversions.

This was SVN commit r7527.
2010-05-09 13:56:06 +00:00
e144ef03a2 Windows build warning fix
This was SVN commit r7510.
2010-05-07 19:33:14 +00:00
d0599f4c7a Share component template scripts to save some memory.
This was SVN commit r7504.
2010-05-07 00:24:22 +00:00
fe53bce3b1 Rewrite the clone-object-between-JS-contexts code (for GUI<->simulation interface) to be more efficient.
Delete unnecessary unused incomplete profiler scripting support.
Clean up some JSAPI code to use newer features.
Display simulation script functions in the profiler.

This was SVN commit r7503.
2010-05-05 22:36:35 +00:00
f33706bf8b Switch everything to 15.16-bit precision fixeds, to allow more accurate unit vectors and angles.
This was SVN commit r7497.
2010-05-02 20:32:37 +00:00
4fe991074f Expose Footprint::GetShape and TemplateManager::FindAllTemplates to scripts.
Make CSimContext accessible to all component code, so they don't all
have to save their own copies of it.

This was SVN commit r7490.
2010-05-01 09:48:39 +00:00
3a1abb5d8f # Compile gameplay scripts in strict mode.
Fixes #487.

This was SVN commit r7456.
2010-04-14 18:57:50 +00:00
cf48ff0588 Expose JS_HasProperty
This was SVN commit r7449.
2010-04-09 18:45:28 +00:00
45fa351feb Revert unnecessary bcb462ad87
This was SVN commit r7422.
2010-04-01 08:18:16 +00:00