33 Commits

Author SHA1 Message Date
Jens Ayton
4546eb0baa Fix for OXP verifier turning of log message classes. Exterminated all uses of NSLog that turn up in Mac builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1257 127b21dd-08f5-0310-b4b7-95ae10353056
2007-12-03 17:53:37 +00:00
Jens Ayton
3fbc24887d * All ships now have a JavaScript script attached, allowing JS scripts to
add behaviours to any ship.
* Legacy script_actions, setup_actions, launch_actions and death_actions
  handled through default JavaScript script.
* In order to implement the above, JS Ship now has a runLegacyScriptActions
  method. This is not to be exposed as an "official" method, though, since
  we might want to change the mechanism -- for instance, to "compile"
  legacy scripts into JS. Handling dynamically-generated legacy scripts in
  that case would be a significant complication.
* Updates for Mac OS X 10.5 "Leopard".
  - Errors on reading/writing plist will not cause a crash if building
    against the Leopard SDK. (I have no intention of requiring Leopard any
    time soon, but future-proofing is good.)
  - OOWeakReference is now more efficient when running under Leopard, by
    implementing the new "fast forwarding" mechanism.
  - Threads now have names set under Leopard, which may provide debugging
    advantages.
  - Fixed some new build warnings for new version of apple-gcc.
  - Updated type declarations to identify Oolite saved games as property
    lists.
* Cleaned up PlayerEntityControls.m somewhat. Moved method declarations
  into files, fixed indentation, broke up monster giant method of doom.
* Script-generated asteroids now behave like system populator-generated
  asteroids (As Seen on BB[TM]).
* Minor optimizations and simplifications of legacy script engine.
* JS System.filteredEntities() now has sensible behaviour if predicate
  throws an exception: the predicate is not called again, and null is
  returned. The exception is reported and not rethrown.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1240 127b21dd-08f5-0310-b4b7-95ae10353056
2007-11-23 15:04:14 +00:00
Jens Ayton
4a776c4193 Implemented recursion limiter in AI method reactToMessage: in response to SCR crash report.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1236 127b21dd-08f5-0310-b4b7-95ae10353056
2007-11-19 18:34:28 +00:00
Nikos Barkas
39f1fd30fb Bypass two harmless, log cluttering OpenGL error reports, at the same time gaining on performance, by setting rendering.opengl.error to no in logcontrol.plist.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1235 127b21dd-08f5-0310-b4b7-95ae10353056
2007-11-17 21:34:05 +00:00
Jens Ayton
9d9128bcb1 * Got Game Options submenu working under OS X.
* Save reduced detail, wireframe and shader settings in preferences.
* Implemented variable shader complexity support.
Added default shader, used for all otherwise-unshaded ships with full shaders on, and for smooth ships or ships with effect maps specified in material dictionary with simple shaders.
* All ships now drawn with slight specular highlight by default (shininess = 10, intensity = 0.2) except in reduced detail mode.
* (JS) Made Ship.shipDescription read-write (except for the player).
* (JS) Added global function ExpandDescription(string : String), to perform substitutions like %H, [commander_name] and so forth. 
* (JS) Added global function RandomName(), intended to be like %R substitution. In so doing, I discovered that %R is broken, but left it as-is so it will generate the same name for existing descriptions. Added %X to do the same thing, but without the bugs. RandomName() is different from either in that it doesn't use the "predictable" PRNG, so it will provide a new name each time. To use the "predictable" variant in JavaScript, use ExpandDescription("%X"). 
* Ships that hyperspace out are no longer replenished in interstellar space.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1228 127b21dd-08f5-0310-b4b7-95ae10353056
2007-10-22 12:18:18 +00:00
Jens Ayton
122102af4f Cleanup; merged some very similar methods; made most HUD parameter reading use OOCollectionExtractors; made most of Universe use OOCollectionExtractors; added some schemata; moved schemata to separate folder. GNUmakefile.postamble has been updated to copy this folder into Resources/, but note that it isn't needed in final builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1112 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-29 14:17:30 +00:00
Jens Ayton
8898364de2 OXP verifier: architectural changes, added design note, generate Graphviz file instead of text dump to debug dependency graph.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1099 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-20 16:29:40 +00:00
Jens Ayton
675f2918e5 OXP verifier now checks requires.plist; added infrastructure to handle plists in verifier and fixed dependency management.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1095 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-19 10:44:52 +00:00
Jens Ayton
7780ef63bb OXP verifier can now identify bad case in standard folder names and config file names. Infrastructure is in place for general case mismatch detection. Fixed Windows build warnings reported by Sotho Tal Ker in forum.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1094 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-18 23:53:51 +00:00
Jens Ayton
a3cee138b8 Bumped version number to 1.69.2. Removed support for deprecated shader features. Added caching of GL texture names to avoid expensive glGenTextures()/glDeleteTextures() call. Set texture cache size to something sensible (50 at the moment), but textures are being leaked. Fixed loss-of-precision bug in OOCollectionExtractors' double methods. Added collection extractor methods for vectors, quaternions, and non-negative floats/doubles. Switched on -Werror for OS X build.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1088 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-17 10:42:36 +00:00
Jens Ayton
b3b04859ab Enabled more warning flags (-Wextra -Wno-unused-parameter -Wno-missing-field-initializers) in OS X build, and fixed several hundred resulting warnings (mostly by using more appropriate types). Bumped version number to 1.69.1. Fixed unable-to-buy-in-shipyard bug. Attempt to fix dockEscorts crash bugs (needs testing). Sundry cleanup, especially of AI and GuiDisplayGen; all exception throws now in standard form. Removed some dead code. Use correct key for Advanced Nav Array if no keyconfig.plist found. Changed OOCollectionExtractors to always clamp integer values to the requested type's range rather than truncating like NSNumber. Removed inconsistently-used and apparently-unneeded NSLock from AI.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1063 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-07 15:44:50 +00:00
Jens Ayton
71d7a25468 Removed debug code from OOSkyDrawable, and made it use OOMacroOpenGL. Added code to help catch occasional drawing glitch with sun. Disabled pruning of on-disk cache completely; as we now clear the cache when OXP search paths change, its size is bounded by the total size of installed OXPs.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1032 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-16 18:01:41 +00:00
Jens Ayton
9a450d5f10 Cleaned up GameController, putting most platform-specific stuff in two major blocks. Mac-specific: Help window contents now loaded from (copy of) ReadMe.rtfd to ensure it's up-to-date; added log message format prefs window to Debug menu.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1014 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-09 10:38:16 +00:00
Jens Ayton
f746a728e6 Unbroke last revision.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1004 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-06 09:12:35 +00:00
Jens Ayton
5572ddab50 Cache path should now be created properly under GNUstep, and XML should be used for cache (should change to GNUstep binary format once bugs are resolved). Added lots of debug messages to cache.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@995 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-03 09:32:06 +00:00
Jens Ayton
0382795518 Added support for flushing data cache by holding down shift at startup (needs testing under SDL!). Also, a question mark is now shown as a placeholder model on the Load screen if a saved game uses an unknown ship class.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@994 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-02 20:58:41 +00:00
Jens Ayton
8ed1b9af6e Fiddled with Mac debug menu (added in previous commit).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@985 127b21dd-08f5-0310-b4b7-95ae10353056
2007-05-23 14:24:12 +00:00
Jens Ayton
786e73fcbb Work on reimplementing texture reloading -- works for shipentities and text, not sky and particles.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@984 127b21dd-08f5-0310-b4b7-95ae10353056
2007-05-23 13:12:13 +00:00
Jens Ayton
17e40ba6c7 Lots of fiddling around, most of it reverted. Meh. New shinier (and simpler) sky.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@968 127b21dd-08f5-0310-b4b7-95ae10353056
2007-05-19 15:09:05 +00:00
Jens Ayton
076bf6c4fa Lots of stuff I've been working on over the last few weeks - mainly moving ShipEntity rendering into new class (OOMesh); also work on robustness of plist handling and stuff. Texture caching management is currently buggy.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@954 127b21dd-08f5-0310-b4b7-95ae10353056
2007-05-08 15:24:13 +00:00
Jens Ayton
5eacc5ba35 New attempt at cross-platform threaded texture loading. Also work on OOMesh implementation based on old Entity drawing code (fancy optimized version having stalled) and fixed problem that was causing synchronization of logcontrol.plist.xml to not happen.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@946 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-29 14:55:48 +00:00
Jens Ayton
bdbe1b72ff New texture code (for models with shaders only). Somewhat buggy (notably, player ship is untextured after dying and respawning) but seems stable. Also removed a spurious assert from sound code.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@929 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-14 00:07:32 +00:00
Jens Ayton
9ead245895 Fixed code using for (i = 0; i != [[foo allKeys] count]; i++) antipattern. Cleanup of player saving: uses proper way of getting an XML property list (which is cross-platform), better error messages, less code duplication. Added Edit menu to OS X version, for use in dialog boxes. Bits of new texture model, but they're not used yet.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@925 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-13 10:38:08 +00:00
Jens Ayton
73aafb43e1 Rewrite of shader code.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@923 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-11 20:29:30 +00:00
Jens Ayton
a86bb97788 Subentities now share properties with parent for purposes of shaders.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@913 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-07 20:49:06 +00:00
Jens Ayton
ca593a0a1e Error reporting for JS Vector and Entity methods.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@911 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-06 17:35:42 +00:00
Jens Ayton
a2f6fea6a3 Removed a spurious error message. Removed debugOn/debugOff pairs from shipdata.plist and PlayerEntity.m.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@900 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-03 18:43:53 +00:00
Jens Ayton
8a55bc63a2 Xcode project tweak. Moved script out into Scripts folder (preparation for JavaScript translations).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@898 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-03 17:37:40 +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
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
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
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