897 Commits

Author SHA1 Message Date
Jens Ayton
77c4cbc6ce Fixed bug with OOTrumble not retaining texture, leading to crash.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1162 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-06 21:04:48 +00:00
Nikos Barkas
5b4f34de0b Updated the Windows versions of js32.dll and libjs32.a to 1.70. Replaced older libjs32 headers required for the Win32 build with the new ones. Added OOJSOolite.m to the GNUstep project.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1161 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-06 15:24:58 +00:00
Jens Ayton
1228bf1bc4 Fixed release build under OS X -- although it still produces annoying error messages due to not being able to copy Debug.oxp. Duplicated OOJavaScriptConsoleController in preparation for splitting it into a client/server design, as a step towards enabling JS consoles for other platforms.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1160 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-05 15:10:23 +00:00
Jens Ayton
51afdc0a40 Fixes for minor build problems.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1159 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-05 14:43:53 +00:00
Jens Ayton
a265c06344 * Work on generic-ish JavaScript object bridging.
* Fixed potential crashing bug in JS memory management (OOJSScript was not releasing its JS GC root).
* Fixed bug with several shipdata.plist settings being ignored in StationEntitys (bug #11684).
* Added JS Oolite object for app and JS version number checking; may add other facilities.
* Require latest version of SpiderMonkey (Gecko 1.8/FireFox 2 version) with JavaScript 1.7 support, built with JS_C_STRINGS_ARE_UTF8. 
*Made SpiderMonkey build as a subproject in Xcode for ease of debugging.
* Further fiddling with Mac debug console.
* Added has_npc_traffic attribute to StationEntity.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1157 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-04 23:04:09 +00:00
Jens Ayton
09ae998842 Converted shipdata.plist to OpenStep format and merged in Commander McLane's tweaks to views, external views and laser positions.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1156 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-02 18:45:44 +00:00
Jens Ayton
2df17375b1 Missing files from r1153.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1154 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-01 12:07:02 +00:00
Nikos Barkas
1afa377d76 Fixed a bug where planetinfo overrides would be loaded from a dictionary named local_planetinfo_overrides, but would be subsequently saved under localPlanetInfoOverrides, thus becoming unusable at next load. Also fixed usage of escape pod not clearing the player's legal status.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1152 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-31 06:11:22 +00:00
Jens Ayton
803aa63c67 Mac JS console: implemented history (option-up/down arrow).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1150 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-28 16:55:52 +00:00
Nikos Barkas
5dbd357ac1 Fix ship zooming past screen during intro (not exactly the way Ahruman has proposed, but it seems to work and should be OK until we can come up with something more proper). Fix a bug where fuel would refuse to appear in the equipment items list.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1149 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-28 06:22:40 +00:00
Jens Ayton
6980e1d9d6 Various JS scripting fixes. Threw out all Convert ops and replaced them with toString methods, which is simpler and actually works.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1148 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-28 00:22:12 +00:00
Jens Ayton
699e5f5ff6 Fixed bug where player's dockedStation was nil at startup (due to circular dependencies). Added Build All target to Xcode project to avoid circular dependency between Oolite and Debug.oxp. (The Oolite target now no longer builds Debug.oxp. Build All builds Oolite, then builds Debug.oxp, then copies Debug.oxp into AddOns.)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1147 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-27 13:17:43 +00:00
Jens Ayton
b455b2b8fd Interactive JS console working, with some bugs (failure to convert certain types to string, bugs in Oolite NSArray <-> JS array bridge). Basic macro system (implemented in JavaScript) works. A few debugging functions.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1146 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-25 18:15:41 +00:00
Jens Ayton
3cb87b1aab Fixed Mac breakage due to previous fix for non-Mac breakage.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1145 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-25 02:21:31 +00:00
Jens Ayton
fc14be32a3 Fixed probable breakage in non-Mac builds, part 2 of 2.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1144 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-25 02:17:30 +00:00
Jens Ayton
9a2dbbc6ae Fixed memory leak in debug OXP, probable breakage in non-Mac builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1143 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-25 02:17:01 +00:00
Jens Ayton
a1451d4a3e Dicking around with Mac-specific debug stuff instead of doing real work. Added JavaScript console window (intended to be interactive, but isn't yet; shows errors, warnings and JS-generated log messages a bit more prettily than the standard log). Added F-Script support (F-Script is not yet another OXP scripting language, it's an interactive language integrated with the ObjC runtime, making a useful debug tool for poking around).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1141 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-25 01:15:40 +00:00
Nikos Barkas
f71bd524ed Replaced bcopy calls in PlanetEntity.m with memmove ones for portability reasons (linking on Windows was failing with unresolved references to bcopy).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1140 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-24 15:36:05 +00:00
Jens Ayton
f5e3b4894e Made Mac debug OXP a loadable module instead of including code in Oolite itself.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1139 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-23 20:18:22 +00:00
Jens Ayton
ba7cf39b2d Fix for NPCs being able to launch escape pods even when there's no main station (bug #11693). Submitted by Cmdr James.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1138 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-22 21:26:01 +00:00
Jens Ayton
79e5a218e3 New planetinfo.plist keys: percent_cloud, cloud_alpha, clear_sky_color, cloud_color, polar_clear_scky_color, polar_cloud_colour, atmosphere_rotational_velocity.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1137 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-22 15:08:08 +00:00
Jens Ayton
0ffb248771 For the past two weeks I've been procrastinating from fixing a double-free bug in the JS accessor for Ship.escorts (or, more precisely, in the code constructing a JS array). The bug was in r1129, so not checking stuff in doesn't really make much sense.
Fixes in that time:
* Clean, integrated model for JS ship scripts and world scripts.
* Player ships support JS ship scripts (but not ones synthesized from legacy actions).
* Subentity shader uniform bindings bind to owning ship as intended.
* Fixed like_ship recursion limiter in -[Universe getDictionaryForShip:].
* Fixed a bug in material configuration parsing.
* Fixed a material bug where a shader material with textures, followed by a shader material with no textures, followed by a basic material with no textures would leave a texture bound.
* Cleaned up NSArray -> JS array conversion, without fixing aforementioned bug.
* Made JS Ship property "target" read/write, and made property setting work.
* Added JS Quaternion.random() static method.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1136 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-19 23:05:48 +00:00
Nikos Barkas
abe8cea08f Fix showShipModel not displaying the ship model.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1135 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-16 17:41:21 +00:00
Nikos Barkas
3d8cc4cd7d Same comments as revision 1133, only this time I will hopefully be able to commit something that actually works.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1134 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-14 16:16:39 +00:00
Nikos Barkas
16f4ed9afb Maintain compatibility with older saved games (see previous commit) by keeping the old local_planetinfo_overrides name for the dictionary that contains these overrides.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1133 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-14 15:57:30 +00:00
Nikos Barkas
159b9e0522 Maintain compatibility with pre-SVN 1112 saved games that contain local planetinfo overrides.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1132 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-14 08:30:23 +00:00
Nikos Barkas
e557dbb6ec Fix for scripts not running.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1131 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-10 06:31:21 +00:00
Nikos Barkas
8d036b1000 Fix for beacons not showing up on the Advanced Compass.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1130 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-08 05:50:58 +00:00
Jens Ayton
892c271501 Split JS system into separate file. Started on support for ship scripts (incomplete).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1129 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-05 11:47:09 +00:00
Dylan Smith
368444d9c2 fix sigfpe in ship destruction cargo spew routine
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1128 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-05 11:41:59 +00:00
Dylan Smith
89b47c1af1 fix ranrot_rand linkage break in linux build
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1127 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-05 11:22:05 +00:00
Nikos Barkas
2a81d2caa1 Added jsarray.h and jsprvtd.h to Windows include dependencies. Fixed commander's name input on save screen overwriting the saved game timestamp. Fixed an unsigned comparison against 0 in Universe.m, getContainersOfGoods, that was leading to a crash within a few minutes of game time. Replaced js_NewArrayObject call with JS_NewArrayObject to avoid linking error.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1126 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-05 08:54:24 +00:00
Jens Ayton
8dcd9b0056 Unbroke demo screen 2.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1125 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-04 12:53:49 +00:00
Jens Ayton
7194812ae8 Added JS Ship properties: entityPersonality, isBeacon, beaconCode, isFrangible, isCloaked, isJamming, groupID, potentialCollider, hasHostileTarget, weaponRange, scannerRange, reportAIMessages, withinStationAegis, maxCargo, speed, maxSpeed.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1124 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-04 11:07:51 +00:00
Jens Ayton
30b800a829 JavaScript: new Entity properties isValid, isShip, isStation, isPlayer, isPlanet. Deprecated Entity.valid() in favour of Entity.isValid. Added Ship.subEntities. Player.dockedStation is now null rather than undefined when not docked. Fixed bugs including crash when attempting to compare JS Entity subclass instances.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1123 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-03 16:31:17 +00:00
Jens Ayton
31744b7903 Fix for legacy script engine local variables in set: and [] substitution. Unbroke equipment.plist.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1122 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-03 14:53:02 +00:00
Jens Ayton
ef9a6751d3 JS: replaced Player.legalStatus with Ship.bounty. Tweaks.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1121 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-02 20:46:46 +00:00
Jens Ayton
6fe5f8347f Register JS Station class at set-up time.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1120 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-02 16:52:56 +00:00
Jens Ayton
5c6e674fa2 Made OOJavaScriptConversion an informal protocol with a default implementation (returning JSVAL_NULL) for NSObject. Work on rewriting JS player proxy, moving properties up into Ship and Entity as appropriate. Reimplemented player.call(), allowing it to return values, and applying to entities in general. Ensured correct and consistent type conversion in JavaScript property getters/setters. Fixed bug where script-awarded missiles/mines would use two slots. Made blowUpStation actually blow up the station.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1119 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-02 16:41:55 +00:00
Jens Ayton
15255d19c0 JavaScript: entity class hierarchy now reflected in JS object prototype relationships (player is a Player is a Ship is an Entity). Fix for enery units being unbuyable; moved some hardcoded equipment requirements into equipment.plist; made -[PlayerEntity hasExtraEquipment:] accept arrays and sets of strings as well as individual strings.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1118 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-02 00:31:44 +00:00
Jens Ayton
dd0cc653f8 Case sensitivity issue.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1117 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-01 21:34:07 +00:00
Jens Ayton
532e8cee01 Fix for OpenGL version check (now requires at least OpenGL 1.1 as sort-of-documented, not more than 1.1) in response to failure report for GeForce 2 MX hardware under OS X.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1116 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-01 21:24:13 +00:00
Jens Ayton
337bee02d1 Infrastructure for better error reporting for oneOf rules in plist schema validator. Added Vector.interpolate() scripting method.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1115 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-31 22:44:16 +00:00
Jens Ayton
c82db84119 Fix for positioning of image legends in HUDs. Generalized registration of 'well-known' files in file scanner OXP verifier stage.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1114 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-29 22:12:52 +00:00
Jens Ayton
33588e1dfa Moved schema schema to Schemata folder.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1113 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-29 14:18:05 +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
069571302d Wrote a tool for testing plist schemata.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1111 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-28 18:53:04 +00:00
Jens Ayton
1b66670b7d Added performHyperSpaceExitWithoutReplacing AI method.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1110 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-28 12:40:27 +00:00
Nikos Barkas
4df82ff604 Hopefully fixed the setSpecificPlanetInfo problem that prevented planet data from being updated by scripts.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1109 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-28 10:23:28 +00:00
Jens Ayton
8a6252398d Redesigned plist verifier to allow recursive definitions. As a bonus, this simplified the code by removing the -normalize... methods. Shipdata.plist entry schema and schema schema now conform to working schema schema. Schema.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1108 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-27 16:33:28 +00:00