112 Commits

Author SHA1 Message Date
Nikos Barkas
baf76050ff Small correction in the GNUmakefile.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1671 127b21dd-08f5-0310-b4b7-95ae10353056
2008-06-03 10:58:23 +00:00
Jens Ayton
db1a95e102 Makefile update for r1668.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1669 127b21dd-08f5-0310-b4b7-95ae10353056
2008-06-03 10:19:19 +00:00
Jens Ayton
30bce0b115 Great big lump o' stuff to deal with ship types and related things more cleanly.
OOShipRegistry parses shipdata.plist, shipyard.plist, demoships.plist and new shipdata-overrides.plist and shipyard-overrides.plist, resolves like_ship inheritance, does some sanity checking, filters out various sorts of invalid shipdata and shipyard entries and manages role->ship key mapping with probability weighting.

The latter is managed by OOProbabilitySet, which should probably be used by OORoleSet and OOProbabilisticTextureManager too. OOProbabilitySet is O(log n) for random selection instead of O(n) like the current linear-search code.

The next step is to start using OOShipRegistry everywhere.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1607 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-03 00:58:21 +00:00
Jens Ayton
8f14df9fb3 Applied Adam Sampson's patch to makefile for Linux. Look forward to reports of it working, or not.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1582 127b21dd-08f5-0310-b4b7-95ae10353056
2008-04-23 18:10:07 +00:00
Jens Ayton
f68d550d8e Added JS Ship methods dumpCargo(), ejectItem() and ejectSpecificItem(). Spotlight indexer now indexes required.plist max_version for display in More Info. Fix for internal consistency in default fragment shader's handling of specular exponents.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1471 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-09 15:27:06 +00:00
Jens Ayton
3f74d1b923 Got Instruments working and fixed several small leaks. Currently mostly seeing occasional leaks of OOWeakReferences to ships (but the ships themselves aren't leaked and OOWeakReferences are only 8 bytes.) Cobbled together a class for handling groups of sources for related sounds, so that e.g. the number of simultanous scrape sounds is limited. Moved bits of player launching logic from pollDockedControls: to leaveDock: (which is also called from other places).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1465 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-08 17:16:10 +00:00
Jens Ayton
e2a2be7f46 Started looking at laser drawing bug, ended up doing lots of cleanup of subentity handling instead.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1456 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-05 00:06:05 +00:00
Jens Ayton
7c242079fc New skies even for gnusteppy people.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1453 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-04 01:43:42 +00:00
Jens Ayton
9fb7456e20 (Woops, thought I did this last night.) Implemented stack for temporary local variables for non-world legacy scripts. (Previous approach was quite thoroughly broken, as it didn't allow reentrancy and broke locals for world scripts.) Moved -descriptionComponents and such into new OOCocoa.m, and added -shortDescription.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1433 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-29 15:48:00 +00:00
Nikos Barkas
0d0681de10 Fixed typo in GNUstep makefile.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1421 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-25 17:44:44 +00:00
Jens Ayton
cc056a6a75 Legacy foo_actions can now have local variables, which are cleared when the _actions completes. Marked DebugConsole.py executable for unices. Fixed bugs in vector randomization code, and added a third randomizer which provides an even distribution of lengths (but uneven distribution in space).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1420 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-25 16:22:15 +00:00
Jens Ayton
a420a4dbe6 Global JavaScript methods (which aren't constructors) now have names starting with lowercase letters, in accordance with JavaScript norms. There are compatibility aliases for the old forms. Log() and LogWithClass() merged into single log(). All JavaScript compatibility aliases for deprecated forms are now implemented in JavaScript, in the new oolite-global-prefix.js script. Changed all copyright notices regarding the project as a whole from 2004-2007 to 2004-2008.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1414 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-24 21:07:20 +00:00
Jens Ayton
0a1cd36e8d Made previously Mac-specific log header cross-platform (mostly; more information is included under OS X).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1386 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-17 15:37:12 +00:00
Jens Ayton
cba45c8e05 Broke music control out into a separate controller in preparation for JavaScript music interface. As a side effect, mission music should work on SDL builds, and the theme music should loop. I hope. To do: add music Off/On/iTunes control to config menu.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1343 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-03 15:44:24 +00:00
Jens Ayton
d552b1bb33 Told makefile about JS sound stuff.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1341 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-03 02:37:45 +00:00
Nikos Barkas
2d0f47c98d Updated GNUmakefile with new source file. Fixed warning in HeadUpDisplay.m
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1326 127b21dd-08f5-0310-b4b7-95ae10353056
2008-01-28 08:42:34 +00:00
Jens Ayton
f2f194ee49 Fixed a bunch of warnings under Windows, some of which even made sense.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1294 127b21dd-08f5-0310-b4b7-95ae10353056
2008-01-02 14:35:54 +00:00
Dylan Smith
0e79b1426b use our own libjs tree during a build
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1255 127b21dd-08f5-0310-b4b7-95ae10353056
2007-12-03 15:19:11 +00:00
Dylan Smith
22350f1ba2 fix build breaks
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1254 127b21dd-08f5-0310-b4b7-95ae10353056
2007-12-03 11:50:23 +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
8dac1d08cd Split JS Planet into Planet and Sun in anticipation of splitting PlanetEntity in same way.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1214 127b21dd-08f5-0310-b4b7-95ae10353056
2007-10-15 13:20:27 +00:00
Jens Ayton
6a8c7976dd Added scriptInfo dictionary to ships, and global JS objects worldScripts and worldScriptNames. Fiddled with messages on both sides of debug console. Fiddled with flags on JavaScript classes, hopefully for the better.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1211 127b21dd-08f5-0310-b4b7-95ae10353056
2007-10-13 15:10:16 +00:00
Nikos Barkas
992c731fd1 Updated GNUmakefile with newly added files. Eliminated an [interface] may not respond to [method] warning.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1201 127b21dd-08f5-0310-b4b7-95ae10353056
2007-10-08 13:23:56 +00:00
Nikos Barkas
f6e4fc2d18 Made the new Oolite debug console code compilable under Windows, hopefully without breaking anything. Updated gnustep-base.dll to version 1.13.0, as the previous one did not have support for NSStream objects. Fixed a couple of problems with the updated GNUmakefile.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1197 127b21dd-08f5-0310-b4b7-95ae10353056
2007-10-07 17:39:30 +00:00
Jens Ayton
8904c39401 Oolite should now build with external debug console support on all platforms. Mac debug OXP is broken.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1191 127b21dd-08f5-0310-b4b7-95ae10353056
2007-10-06 11:03:01 +00:00
Jens Ayton
7e4b1b0880 Implemented JS clock global object, unbroke makefile.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1175 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-15 15:09:19 +00:00
Jens Ayton
0da77044e5 Implemented JS Timer object. Updated priority queue test case.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1173 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-15 13:53:30 +00:00
Jens Ayton
7b061ad0f7 Work on script timers.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1172 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-14 15:21:06 +00:00
Jens Ayton
77df587d1a Split out remaining JS classes from OOJavaScriptEngine.* into new files. Added expandable pirate-victim recognition via pirate-victim-roles.plist. Added a number of AI methods for searching for entities by role and scan class.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1169 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-12 17:00:59 +00:00
Jens Ayton
693c27e2c2 Added OORoleSet to manage sets of ship roles and probabilities. Now used in -[Universe newShipWithRole:]. Next step: replace ShipEntity.roles with an OORoleSet. Future step: store role sets -- and other attributes -- in 'ship type' objects instead of parsing on the fly.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1165 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-07 10:14:30 +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
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
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
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
97211c9285 * Fixed backing up of log (OS X only).
* Only release plist parsing error messages under OS X (this is a documented requirement that doesn't follow normal usage, and isn't the right thing under GNUstep.)
* Work on shipdata.plist and model verifier stages.
* equipment_price_factor fixes: exploit when low equipment_price_factor doesn't affect refund prices, minimum equipment_price_factor of 0.5.
* Made fuel unsigned.
* Implemented property list schema verifier to simplify implementation of plist checkers.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1104 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-25 16:43:29 +00:00
Jens Ayton
9c66ca113c Added some verifier stages that don't actually do anything yet but make my auto-generated Graphviz file of the dependency graph look much cooler.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1102 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-20 22:44:37 +00:00
Jens Ayton
66797761f4 Fixed makefile, hopefully.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1100 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-20 20:02:48 +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
ad1b7f8204 Updated GNUmakefile for OXP verifier stuff.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1098 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-19 12:11:38 +00:00
Jens Ayton
9aa1e3947e Removed lingering bits of OOS code.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1093 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-18 21:21:06 +00:00
Jens Ayton
83c614dce2 Fix for makefile and OXPVerifier.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1092 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-18 21:20:06 +00:00
Jens Ayton
e7c18ce0e8 Beginings of -verify-oxp support. Fix for freeze when like_ships refers to unknown ship. Ship set-up now fails if subentity set-up fails.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1091 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-18 15:42:58 +00:00
Jens Ayton
693bf7ac0d Removed OOS script support.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1089 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-17 10:48:43 +00:00
Nikos Barkas
43cb23d54d Fixed loadgame screen changing current galaxy seed. Fixed damaged equipment not appearing orange and half priced on the equipment purchase screen. Eliminated warning in ParticleEntity.m. Added TextureStore.m in the compile list, because of linker errors if it is missing.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1073 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-11 15:09:47 +00:00
Jens Ayton
2c03f45ffb Attempted fix to crash in CollisionRegion led to cascade of other dangling-pointer crashes. Reverted, and brute-forced it by ensuring entities do not die until the end of an update cycle.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1072 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-11 13:13:01 +00:00
Jens Ayton
bfc5cae918 Broke queue mechanism out of OOTextureLoader into separate class, partly for neatness and partly because I need it for something else.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1065 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-08 09:04:43 +00:00
Jens Ayton
59a5b197e0 Disabled extra bug checking in SkyEntity. Disabled build of OOSkyDrawable (both for Xcode and GNUmakefile).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1048 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-28 10:33:19 +00:00
Jens Ayton
45122c2250 Fix for shader uniform bindings under GNU Objective-C runtime.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1046 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-27 17:43:37 +00:00
Nikos Barkas
c8650adb03 Make debug functionality a build option under Windows. Fix compilation error under GNUstep. Get Oolite to compile even when CHECK_ERROR_AT_EACH_STEP is not set to 1.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1044 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-26 21:43:42 +00:00
Dylan Smith
070b7057e7 fix Linux build breaks
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1035 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-20 22:01:35 +00:00