3416 Commits

Author SHA1 Message Date
Jens Ayton
629a7dbe97 Fixed bug where setting a SoundSource's repeatCount to 0 or less halted JS execution with no error.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4021 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-06 18:18:21 +00:00
Jens Ayton
0420f964ab Fixed bug causing all sounds to be streamed in 64-bit Mac OS X builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4020 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-06 18:14:47 +00:00
Jens Ayton
7f39d6d436 JS Sound.prototype.name() now always returns file names as documented under Mac OS X.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4019 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-06 18:08:35 +00:00
Jens Ayton
549d873f0b Added constructor callback to all JS pseudoclasses, so that the instanceof operator and constructor property behave sanely.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4018 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-06 18:07:48 +00:00
Jens Ayton
3b16dd9438 Rearranged prefix script to work in oldjs builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4017 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-06 16:28:13 +00:00
Jens Ayton
926b2f81ea Made use of ECMAScript 5 meta-stuff; methods defined in prefix header are now non-enumerable and non-writeable just like native ones.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4016 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-06 12:05:16 +00:00
Jens Ayton
62f35e872c Tweaked console script so console input isn't forced into strict mode.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4015 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-06 01:24:13 +00:00
Jens Ayton
f0aec8a50f Changed JS_STRICT warning label from "Warning (strict mode)" to "Warning (pedantic mode)" to avoid confusion with ECMAScript 5 strict mode.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4014 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-06 01:16:53 +00:00
Jens Ayton
510fc75a01 Made watchdog one thousand times less aggressive under Windows.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4013 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-05 22:19:42 +00:00
Jens Ayton
65e4ec8980 Minor simplification of r4008/r4010.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4012 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-05 22:15:50 +00:00
Jens Ayton
8589c5a13e Optimized JS-to-native string converters to avoid up to three unnecessary class method calls. Informally deprecated stringWithJavaScriptString:, stringWithJavaScriptValue:inContext: and stringOrNilWithJavaScriptValue:inContext: in favour of OOStringFromJSString(), OOStringFromJSValueEvenIfNull() and OOStringFromJSValue() (formerly OOJSValToNSString()).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4011 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-05 22:13:17 +00:00
Nikos Barkas
fa6b634793 Fixed Windows build with Watchdog timer.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4010 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-05 22:12:50 +00:00
Jens Ayton
4f124772c9 Fixed assertion failure (no request) when loading sounds through JS in JS_THREADSAFE builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4009 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-05 21:54:15 +00:00
Jens Ayton
7fd1f70f04 Implemented watchdog timer for newjs.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4008 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-05 21:47:45 +00:00
Jens Ayton
46d125d400 Added JS memory statistics to console.writeMemoryStats().
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4007 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-05 19:04:39 +00:00
Jens Ayton
445b08b3e2 Stomped "Left hand side has no effect" in non-JS_THREADSAFE builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4006 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-05 18:51:15 +00:00
Jens Ayton
124ba843b5 New OOJS_BEGIN_FULL_NATIVE()/OOJS_END_FULL_NATIVE macros bracket potentially-slow blocks of ObjC code called from JS callbacks, mostly replacing OOJSPauseTimeLimiter()/OOJSResumeTimeLimiter(). In addition to frobbing the time limiter, they handle JS request management.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4005 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-05 14:29:30 +00:00
Jens Ayton
6e515e60ed Big renaming of JavaScript helpers for internal consistency and clarity.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4004 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-05 12:58:27 +00:00
Jens Ayton
358c0edd39 Killed an NSLog.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4003 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 20:01:37 +00:00
Jens Ayton
01b4f5a6d7 Fixed Mac deployment build, and some other fiddling with export lists.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4002 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 19:58:03 +00:00
Jens Ayton
d9678aa0dd Output prettification for debug console (and improved :d macro).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4001 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 19:14:47 +00:00
Jens Ayton
7d12bca54f Enabled YARR (regexp) JIT for Mac OS X.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4000 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 17:41:14 +00:00
Jens Ayton
ec371a8511 JS expandDescription() and expandMissionText() override parameters are now stringified the JavaScript way rather than by coercing them to ObjC objects and calling -description.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3999 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 17:40:47 +00:00
Jens Ayton
4a65d98844 Mucking about.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3998 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 16:59:09 +00:00
Jens Ayton
cb0cd2d617 Added hat switch/analogue joystick dpad support for Mac OS X. Button assignments above 16 and hat switch assignments are now saved properly (all platforms).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3996 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 16:42:30 +00:00
Jens Ayton
91514fda1e Make do with one View Forward entry in stick mapper view.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3995 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 16:26:23 +00:00
Jens Ayton
a0bf90b7b4 Non-Mac-debug build fix.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3994 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 15:53:08 +00:00
Jens Ayton
cb8597bc7d JavaScript warnings (but not errors) which are squelched in logcontrol.plist are now hidden from the JS console too.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3993 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 15:24:45 +00:00
Jens Ayton
c64e3cda7f Properly removed some temporary profiling code. Also, forgot to mention a semantic change: arrays in override dictionaries are not handled specially, their description will just be inserted. Callers are required to make their own random selections if they want them. Support for arrays in the JS interface was undocumented and no other callers use overrides.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3992 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 14:51:51 +00:00
Jens Ayton
02bf41b83b Optimized ExpandDescriptionsWithOptions() to reduce temporary objects. Strings with no substitutions now pass through without any objects being created.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3991 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 14:47:41 +00:00
Jens Ayton
70fc522c04 Added PLAYER pseudo-global-variable, like UNIVERSE.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3990 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 13:49:52 +00:00
Jens Ayton
1191e592a1 Fixed expandMissionText() bug.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3989 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 13:38:19 +00:00
Jens Ayton
6a6ab8af5a Backported Array.isArray() for oldjs builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3986 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 12:51:33 +00:00
getafix
05fc6fd088 Switched Linux nightly 32bit build to the new JavaScript engine
for testing purposes:
* A pre-built library is temporarily used at this phase.
* Method JIT (JaegerMonkey) is supported.
* Only deps-release-snapshot Oolite build mode should be affected.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3983 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 21:50:00 +00:00
Jens Ayton
2a920aa63d Fixed Mac-specific crash on game reload.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3982 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 19:26:02 +00:00
Jens Ayton
cb4338981a Added OODebugLog() macro to log only in debug builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3981 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 18:53:42 +00:00
Jens Ayton
103cfa6898 OCD cleanup.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3980 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 18:53:23 +00:00
Jens Ayton
86cfeb2d41 Avoid temporary OOColors in old planet texture generator for moar faster loading.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3979 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 18:17:52 +00:00
Jens Ayton
fd12d6ba21 Unbroke non-Mac builds, I think.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3978 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 17:34:43 +00:00
Jens Ayton
684c6ca904 Improved planet setup performance by avoiding 20,460 temporary NSStrings. (Profiling showed this as 5 % of hot-cache startup time, not counting autorelease pool popping and cache thrashing. Ouch!)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3977 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 17:27:13 +00:00
Jens Ayton
473e4e5c5e Mac startup messages now reflect reality, and are more fine-grained in debug builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3976 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 17:25:11 +00:00
Jens Ayton
27189a4bfd Unbroke build. Fun fact: in C, consts are not constant expressions, so they can't be used to initialize other consts.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3975 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 17:24:59 +00:00
Marc
0b850bb061 undid wrongly committed change.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3974 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 15:42:16 +00:00
Marc
36e064d1ee Minor cleanup:
- changed strings returned by the new playerWillSaveGame event for consistency with the other Oolite specific strings: 'autoSave' is now 'AUTO_SAVE', etc...
- tidier / simpler to read fuel calculation code, made fuel price slightly more variable...
- rewrote a very misleading (wrong as per r3972) comment.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3973 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 15:34:28 +00:00
Jens Ayton
9f8b0d3b1a Player entity now becomes invalid when dying.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3972 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 14:30:40 +00:00
Jens Ayton
187eb26d92 Optimized stale player entity tests.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3971 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 14:27:28 +00:00
Jens Ayton
bb882f1b05 Declaring victory in the campaign against assumed implicit void returns in JS natives. Er, yay?
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3970 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 14:00:20 +00:00
Jens Ayton
7042e70aaf Consistently put OOJS_PROPID_IS_INT test at top of property callbacks to minimize overhead for user properties.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3969 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 13:54:34 +00:00
Jens Ayton
74f9202e4b Rearranged vector/quaternion extractors to hit common cases first.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3968 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 13:50:03 +00:00
Jens Ayton
3e236024a1 Removed dsalt's fuel price calculcation test code from last year (which was generating bogus shader.uniform.unpermittedMethod logs). If reinstating, please use [UNIVERSE newShipWithName:... usePlayerProxy:YES] for making fake player ships.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3967 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 13:37:35 +00:00