797 Commits

Author SHA1 Message Date
Jens Ayton
b7ee70e8da Added ability to load uniforms from shipdata's shader definition dictionary.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@892 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-02 21:02:30 +00:00
Jens Ayton
d327cb7b38 Fiddled with JavaScript loading and error reporting: unicode savvy, should load on all platforms.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@891 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-02 19:59:43 +00:00
Jens Ayton
8af2c8892c No particular reason to make that change GNUstep-only as far as I can see.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@890 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-02 06:07:35 +00:00
dajt
98bbda198b Fixing compilation errors for GNUstep build.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@889 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 23:44:13 +00:00
Jens Ayton
1a18ca735e More scripting tweaks. Moved all of universe into system, and removed universe.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@888 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 18:41:47 +00:00
Jens Ayton
7db1aebda6 Added some missingg JS methods; added systemEconomy_string; implemented willLaunch() event.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@887 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 16:56:17 +00:00
Jens Ayton
2cb2c23019 Deleted obsolete files.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@886 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 15:15:00 +00:00
Jens Ayton
5c9352dab4 Moving and renaming scripting files, step 4 of 3 (was in wrong directory).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@885 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 15:11:22 +00:00
Jens Ayton
9fcc4326b3 Moving and renaming scripting files, step 3 of 3.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@884 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 15:10:50 +00:00
Jens Ayton
d1ef0aa3b6 Moving and renaming scripting files, step 2
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@883 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 14:59:09 +00:00
Jens Ayton
494d4c497b Moving and renaming scripting files, step 1
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@882 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 14:58:12 +00:00
Jens Ayton
d701707e13 Cache result of -[Universe generateSystemData] -- very high hit rate, significant speed-up in set-up. Optimization hints in legacy_random.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@881 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 14:07:10 +00:00
Jens Ayton
cd9d2260de Experimenting with additive blending in particleEntity.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@880 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 13:25:02 +00:00
Jens Ayton
ce7270caa3 Unbroke universe (accidentally broke station set-up).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@879 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 12:41:15 +00:00
Jens Ayton
81a8ed0f57 Added src/Core/Scripting to search paths in makefile.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@878 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 11:44:08 +00:00
Jens Ayton
3fe9c74267 Lots of changes, mostly JavaScript-related. Bumped version number to 1.68.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@877 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 11:26:35 +00:00
Jens Ayton
05e5a0282f Hack to change Apple plist DTD to GNUstep plist DTD at runtime for XML plists. Added license clarification to OOFastArithmetic.m. Updated year in startup copyright message.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@876 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-30 12:19:21 +00:00
Jens Ayton
33c4052af8 Shader tweaks, builds without warning on Windows.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@875 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-28 18:24:31 +00:00
Jens Ayton
4a3acfe57d Synchronized logcontrol.plist.xml.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@874 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-28 06:05:02 +00:00
dajt
8abed6fe8c Fixed GNUstep resource paths, and ensuring XML logcontrol.plist is used for GNUstep installations.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@873 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-28 02:16:03 +00:00
Jens Ayton
6345c35592 This week's monster submit:
* Changed required.plist version parsing to treat version strings as series of integers separated by points. This allows:
  - correct parsing of bug-fix versions like 1.67.1
  - correctly sorting 1.100 after 1.99.
* Deleted just about all commented-out NSLog()s (several hundred), and some other commented-out code. (commented-out or #ifdefed-out code with no indication of when you might want to reinstate it is worse than useless.)
* Ensured that most NSLog()s will at least include their class/module in their message class.
* Renamed Universe's -recycledOrNew:, -getShipWithRole: and -getShip: to -allocRecycledOrNewEntity:, -newShipWithRole: and -newShipWithName: to better match Objective-C coding conventions. (Methods whose result needs releasing should always be called alloc*, copy*, retain* or new*.)
* Replaced -[Universe generateSystemDescription] with DescriptionForSystem().
* Replaced -[Universe getRandomDigrams] with RandomDigrams().
* Replaced +[Universe systemSeedString] with StringFromRandomSeed().
* Replaced [Universe entityZero] with [PlayerEntity sharedPlayer].
* Replaced scriptedUniverse in ScriptEngine with [Universe sharedUniverse].
* Removed HAVE_SOUND. If you're porting to a platform without sound, use a no-op implementation of OOSound.
* Removed all (commented-out) NSBeep()s.
* Made settings caching in OOLog actually work. Doing complete message class setting resolution every time OOLog() was called was around 2% of our per-frame cost. (With this fixed, cache hit rate is well over 99% after a few seconds of play.) *headdesk*  (It may also be worth moving the settings-check into the macro, to avoid evaluating parameters for log messages that are never seen, but this might cause obscure bugs due to the parameters having side effects.)

Stuff that should have been in revision 859:
* Replaced all occurrences of -[Universe expandDescription:forSystem:]  with ExpandDescriptionForSeed() and ExpandDescriptionForCurrentSystem().
* Replaced  -[Universe expandDescriptionWithLocals:forSystem:withLocalVariables:] with ExpandDescriptionsWithLocalsForSystemSeed() and ExpandDescriptionsWithLocalsForCurrentSystem().


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@872 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-26 01:24:50 +00:00
Jens Ayton
0cdc0f3a35 Changed OOCacheManager's endian tag mechanism to actually do something useful - serious brain fart there.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@870 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-25 18:56:29 +00:00
Jens Ayton
074ba280ab Tweaks to shader handling.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@869 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-25 01:56:12 +00:00
Jens Ayton
c7341ac09a Made extension-guessing fallback in shader loading guess correctly for vertex shaders.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@868 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-22 22:35:43 +00:00
Jens Ayton
b30d3692cf Support loading of shaders from external file. New uniform variable, hull_heat_level. Fixed leak when shader loading fails.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@867 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-22 20:33:04 +00:00
Jens Ayton
ce75bbe608 Fix for lots of file-not-found errors in GNUstep (probably).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@866 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-22 11:46:11 +00:00
dajt
70c685c02d Added code to initialise OpenGL extension function pointers for GNUstep build
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@865 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-22 02:20:56 +00:00
Jens Ayton
0ddae7d767 Split texture scaling into separate file, mostly to be able to apply optimization flags. Added some maths functions I had lying around.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@864 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-21 19:32:27 +00:00
Jens Ayton
93374ac533 Resurrected homebrew XML parser (now in OOPListParsing.m rather than ResourceManager.m).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@863 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-21 11:40:43 +00:00
Jens Ayton
d2914c3afb Moved property list reading (with error checking) into OOPListParsing.h/m. Build without warnings under Windows.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@862 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-20 17:12:39 +00:00
Jens Ayton
946ef40873 Fixed some problems with Windows build. Will probably have more of those tomorrow. Someone buy me an Intel Mac!
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@860 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-20 02:06:40 +00:00
Jens Ayton
45aa08c6c8 Start of bottom-up merge of changes made as a result of script refactoring
(mostly knock-on effects):
* Split vector.h/c into OOMaths.h and several implementation files.
  Moved more of the functionality into inlines.
  Use GCC attributes for better optimization.
* Moved various string parsing methods into functions (in
  OOStringParsing.h/m).
* Deleted custom XML plist parser which dajt said we no longer need. Turns
  out several OXPS depend on its more lenient parsing. Will re-integrate
  as separate module rather than as methods on ResourceManager.
* Reduced header file interdependencies. entities.h is now deprecated.
* Various minor clean-ups.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@859 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-20 01:40:09 +00:00
Jens Ayton
d98e3db026 Changed caching behaviour: prunes down to pruneThreshold on write, doesn't prune dynamically.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@858 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-14 15:19:54 +00:00
Jens Ayton
75aa789b65 Fixed port_radius-does-nothing bug, I hope.,
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@857 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-12 14:41:01 +00:00
Jens Ayton
1345bf6dff Added (non-squared) magnitude() and distance() functions, and 'fast' variants (which aren\'t actually faster as FastInvSqrt() is disabled).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@856 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-12 13:55:55 +00:00
Jens Ayton
a0f6153086 Added OOCollectionExtractors, a cleaner alternative to all those if ([dict objectForKey:key]) foo = [dict objectForKey:key]; else foo = someDefault; cases (and array equivalents).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@855 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-12 13:26:41 +00:00
dajt
910685fa52 Fixed GNUmakefile so JS stuff compiles in the trunk on Win32.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@854 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-12 10:05:33 +00:00
Jens Ayton
5965e2265a Added Windows JS libraries to trunk. Added JS files to the makefile. Won't build on Linux, might build on Windows as-is.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@853 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-11 20:14:51 +00:00
Jens Ayton
64f80b08cb Merged in JavaScript branch, but haven't got it to do anything yet.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@852 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-11 17:41:38 +00:00
Jens Ayton
31c5de5763 Bumped version number.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@850 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-11 14:07:34 +00:00
Jens Ayton
eda894e7dc Possibly fixed mouse control bug under OS X. Or not.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@849 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-11 13:09:28 +00:00
Jens Ayton
b00b0c8162 Fixed sound glitch (similar to streaming sound one, but smaller).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@848 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-11 13:00:14 +00:00
Jens Ayton
1bd331c79f Fixed redundant log message when there's no cache.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@847 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-11 11:17:57 +00:00
Jens Ayton
d55d020000 Made OS X deployment build build with no warnings. Fixed problem with previous bug fix to streaming audio. Stayed up way too late.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@845 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-11 02:14:12 +00:00
Jens Ayton
f506dbe08c Changed boolean preference force_streaming_sound to integer preference max_buffered_sound.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@844 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-10 16:26:50 +00:00
Jens Ayton
34aa44d687 Mac-only sound fixes: hopefully fixed streaming sound stop crash -- the conditions for it don't seem to manifest on my single-processor system. Removed last instances of Objective-C method calls in real-time sound rendering thread \(mmm, crunchy IMP caching\). Added force_streaming_sound preference for debugging purposes. Fixed buffer size calculation and tweaked threshold for using streaming sound -- sounds larger than 1 MB \(uncompressed\) will now be streamed, rather than 16 MB for stereo and 8 MB for mono.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@843 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-10 16:08:37 +00:00
Jens Ayton
e03b0918fb Cache is now rebuilt if search paths or modification dates have changed.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@842 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-09 18:41:57 +00:00
Jens Ayton
dfb2cafe63 Added high-level documentation of OOCache. Disabled cache integrity checking (OOCACHE_PERFORM_INTEGRITY_CHECKS macro). Avoid re-writing unmodified cache.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@841 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-09 17:07:46 +00:00
Jens Ayton
4d788e7122 Real implementation of OOCache. Prunes old entries as necessary -- currently when going above 128 entries, to 80%, i.e. 102; it also prunes before saving (which is done every time the player docks) to reduce the chance of a prune during combat, although the cost of that shouldn't be noticable. To do: proper testing, verification of splay tree self-optimization, documentation.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@840 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-09 01:35:38 +00:00
Jens Ayton
96f6f3983a Re-implemented simple dictionary-based OOCache which I wrote yesterday but forgot to svn add before checking in. I'm working on another implementation with efficient support for pruning old entries.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@838 127b21dd-08f5-0310-b4b7-95ae10353056
2007-03-08 11:29:16 +00:00