Behold, Nenya, Ring of Water and repository for our media and animation related

goodies, both Java 2D and LWJGL/JME 3D.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@1 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Michael Bayne
2006-06-23 18:07:28 +00:00
commit c2117ee86d
570 changed files with 61913 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
`dirname $0`/runjava com.threerings.miso.viewer.ViewerApp $*
+108
View File
@@ -0,0 +1,108 @@
#!/usr/bin/perl -w
use Getopt::Std;
my $usage = "Usage: $0 [-p pid_file] args\n";
# locations of stuff
chomp($location = `dirname $0`);
# get the server root by popping the /bin off of our parent directory
@parts = split(/\//, $location);
pop(@parts);
my $root = join("/", @parts);
# but we're in the test directory, so we want up one
$realroot = $root;
$root = "$root/..";
# make sure JAVA_HOME is set
my $jhome = $ENV{"JAVA_HOME"};
if (!defined $jhome) {
warn "$0: Error: No JAVA_HOME specified!\n";
warn "\n";
warn "You must set your JAVA_HOME environment variable to the\n";
warn "the absolute path of your JDK installation. For example:\n";
warn "\n";
warn " % JAVA_HOME=/usr/local/jdk1.2\n";
warn " % export JAVA_HOME\n";
die "\n";
}
# make sure it's set to a directory
if (! -d $jhome) {
die "$0: Can't find a java interpreter in '$jhome'.\n";
}
my $java = "$jhome/bin/java";
my $jlib = "$jhome/lib/classes.zip";
# determine our machine architecture
my $ostype = `uname -s`;
my $machtype = `uname -m`;
chomp($ostype);
chomp($machtype);
my $arch = "$machtype-$ostype";
# add our native libraries to the runtime library path
my $libs = "$root/lib/$arch";
my $libpath = $ENV{"LD_LIBRARY_PATH"};
if (defined $libpath) {
$ENV{"LD_LIBRARY_PATH"} = "$libs:$libpath";
} else {
$ENV{"LD_LIBRARY_PATH"} = $libs;
}
# put everything in our class path
my $classpath = "-classpath $root/tests/dist/classes:$root/dist/classes";
# add zip and jar files from our lib/ directory and the global Java
# libraries directory
my @dirs = ( "$root/lib" );
foreach $dir (@dirs) {
next unless (defined $dir);
if (opendir(DIR, $dir)) {
foreach $lib (grep { /.(zip|jar)/ && -f "$dir/$_" } readdir(DIR)) {
# skip nenya-*.jar because we have the nenya build directory
# in our classpath
$classpath .= ":$dir/$lib" unless $lib =~ /nenya/;
}
closedir DIR;
}
}
# finally add the standard classes
$classpath = "$classpath:$jlib";
# specify our server root (this is for server code)
my $rootarg = "-Dresource_dir=$realroot/rsrc -Dtest_dir=$realroot";
my $pid_file = undef;
my $i = 0;
# strip out the -p args (we'd use getopt() but the damned thing provides
# no way of escaping arguments so that we can pass args to runjava that
# get passed down to the JVM)
for ($i = 0; $i < @ARGV; $i++) {
my $arg = $ARGV[$i];
# stop when we see -- (and strip it out because Java don't dig --)
if ($arg eq "--") {
splice(@ARGV, $i, 1);
last;
}
if ($arg eq "-p") {
$pid_file = $ARGV[$i+1];
splice(@ARGV, $i, 2);
$i -= 1; # decrement i so that things stay in sync
}
}
# log the pid file if requested to do so
print `echo $$ > $pid_file` if (defined $pid_file);
my $cmd = "$java -mx256M $classpath $rootarg " . join(" ", @ARGV);
# print "$cmd\n";
exec($cmd);
+196
View File
@@ -0,0 +1,196 @@
<!-- build configuration -->
<project name="narya tests" default="compile" basedir=".">
<!-- things you may want to change -->
<property name="junit.fork" value="true"/>
<!-- things you probably don't want to change -->
<property name="test.dir" value="."/>
<property name="src.dir" value="src/java"/>
<property name="deploy.dir" value="dist"/>
<property name="cbundle.dir" value="rsrc/bundles/components"/>
<property name="tbundle.dir" value="rsrc/bundles/tiles"/>
<!-- declare our classpath -->
<property name="classes.dir" value="${deploy.dir}/classes"/>
<property name="narya.classes.dir" value="../${deploy.dir}/classes"/>
<path id="classpath">
<pathelement location="${classes.dir}"/>
<pathelement location="${narya.classes.dir}"/>
<fileset dir="../lib" includes="**/*.jar"/>
</path>
<!-- checks the availability of certain libraries -->
<target name="check-available">
<available property="lwjgl.present"
classname="org.lwjgl.LWJGLException" classpathref="classpath"/>
<available property="jme.present"
classname="com.jme.scene.Node" classpathref="classpath"/>
<available property="jme-bui.present"
classname="com.jme.bui.BWindow" classpathref="classpath"/>
<condition property="build.jme">
<and>
<isset property="jme.present"/>
<isset property="jme-bui.present"/>
</and>
</condition>
<condition property="build.openal">
<and>
<isset property="lwjgl.present"/>
</and>
</condition>
</target>
<!-- generates additional methods for distributed object classes -->
<target name="gendobj" depends="prepare">
<taskdef name="dobj"
classname="com.threerings.presents.tools.GenDObjectTask"
classpathref="classpath"/>
<!-- make sure the dobject class files are all compiled -->
<javac srcdir="src/java" destdir="${classes.dir}"
debug="on" optimize="${build.optimize}" deprecation="on"
source="1.4" target="1.4">
<classpath refid="classpath"/>
<include name="**/*Object.java"/>
</javac>
<!-- now generate the associated files -->
<dobj classpathref="classpath">
<fileset dir="src/java" includes="**/*Object.java"/>
</dobj>
</target>
<!-- generates marshaller and dispatcher classes for all invocation
service declarations -->
<target name="genservice">
<apply executable="../bin/genservice" failonerror="true" parallel="true">
<arg value="--classpath"/>
<arg value="${classes.dir}:${narya.classes.dir}"/>
<arg value="--sourcedir"/>
<arg value="src/java"/>
<fileset dir="src/java" includes="**/*Service.java"
excludes="**/InvocationService.java"/>
</apply>
</target>
<!-- generates sender and decoder classes for all invocation
receiver declarations -->
<target name="genreceiver">
<apply executable="../bin/genreceiver" failonerror="true" parallel="true">
<arg value="--classpath"/>
<arg value="${classes.dir}:${narya.classes.dir}"/>
<arg value="--sourcedir"/>
<arg value="src/java"/>
<fileset dir="src/java" includes="**/*Receiver.java"
excludes="**/InvocationReceiver.java"/>
</apply>
</target>
<!-- prepares the application directories -->
<target name="prepare">
<mkdir dir="${deploy.dir}"/>
<mkdir dir="${classes.dir}"/>
<copy todir="${classes.dir}">
<fileset dir="${src.dir}" includes="**/*.properties"/>
</copy>
<copy todir="${classes.dir}/rsrc">
<fileset dir="rsrc" includes="**/*"/>
</copy>
</target>
<!-- cleans out the installed application -->
<target name="clean">
<delete dir="${deploy.dir}"/>
</target>
<!-- build the java class files -->
<target name="compile" depends="check-available,prepare">
<javac srcdir="${src.dir}" destdir="${classes.dir}"
debug="on" optimize="off" deprecation="off">
<classpath refid="classpath"/>
<exclude name="com/threerings/jme/**" unless="build.jme"/>
<exclude name="com/threerings/openal/**" unless="build.openal"/>
</javac>
</target>
<!-- test the component metadata bundling process -->
<target name="cbundles" description="Build component bundles.">
<!-- define our tasks -->
<taskdef name="metabundle"
classname="com.threerings.cast.bundle.tools.MetadataBundlerTask"
classpathref="classpath"/>
<taskdef name="cbundle"
classname="com.threerings.cast.bundle.tools.ComponentBundlerTask"
classpathref="classpath"/>
<!-- build the metadata bundles -->
<metabundle actiondef="${cbundle.dir}/actions.xml"
classdef="${cbundle.dir}/classes.xml"
target="${cbundle.dir}/metadata.jar"/>
<!-- blow away the components map file so that we get a consistent -->
<!-- mapping every time-->
<delete file="${cbundle.dir}/components.map"/>
<!-- build the component bundles -->
<cbundle actiondef="${cbundle.dir}/actions.xml"
target="${cbundle.dir}/pirate/components.jar"
mapfile="${cbundle.dir}/components.map"
root="${cbundle.dir}/pirate">
<fileset dir="${cbundle.dir}/pirate" includes="**/*.png"
excludes="components/**"/>
</cbundle>
<cbundle actiondef="${cbundle.dir}/actions.xml"
target="${cbundle.dir}/vessel/components.jar"
mapfile="${cbundle.dir}/components.map"
root="${cbundle.dir}/vessel">
<fileset dir="${cbundle.dir}/vessel" includes="**/*.png"
excludes="components/**"/>
</cbundle>
</target>
<!-- test the tileset bundling process -->
<target name="tsbundles" description="Build tileset bundles.">
<!-- blow away the tilesetid map file so that we get a consistent -->
<!-- mapping every time-->
<delete file="${tbundle.dir}/tilesets.map"/>
<!-- build the tileset bundles -->
<taskdef name="tilebundle"
classname="com.threerings.media.tile.bundle.tools.TileSetBundlerTask"
classpathref="classpath"/>
<tilebundle config="${tbundle.dir}/bundler-config.xml"
mapfile="${tbundle.dir}/tilesets.map">
<fileset dir="${tbundle.dir}/ground" includes="**/*.xml"/>
</tilebundle>
<tilebundle config="${tbundle.dir}/bundler-config.xml"
mapfile="${tbundle.dir}/tilesets.map">
<fileset dir="${tbundle.dir}/objects" includes="**/*.xml"/>
</tilebundle>
<!-- build the fringe configurations -->
<taskdef name="conffringe"
classname="com.threerings.miso.tile.tools.CompileFringeConfigurationTask"
classpathref="classpath"/>
<conffringe
tilesetmap="${tbundle.dir}/tilesets.map"
fringedef="rsrc/config/miso/tile/fringeconf.xml"
target="rsrc/config/miso/tile/fringeconf.dat"/>
</target>
<!-- run the tests -->
<target name="test" depends="compile,cbundles,tsbundles"
description="Run the tests.">
<junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
<classpath refid="classpath"/>
<sysproperty key="test_dir" value="${test.dir}"/>
<sysproperty key="resource_dir" value="${test.dir}/rsrc"/>
<formatter type="brief" usefile="false"/>
<batchtest>
<fileset dir="${src.dir}">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
</project>
+2
View File
@@ -0,0 +1,2 @@
*.jar
*.map
+76
View File
@@ -0,0 +1,76 @@
<?xml version="1.0" standalone="yes"?>
<!-- $Id: actions.xml 1548 2002-06-26 23:53:07Z mdb $ -->
<!-- test component action definitions -->
<actions>
<!-- these are isometrically offset (SOUTH became SOUTHWEST, etc.) -->
<action name="standing">
<framesPerSecond>5</framesPerSecond>
<origin>50,112</origin>
<orients>SW, W, NW, N, NE, E, SE, S</orients>
<tileset>
<heights>160, 160, 160, 160, 160, 160, 160, 160</heights>
<widths>100, 100, 100, 100, 100, 100, 100, 100</widths>
<tileCounts>1, 1, 1, 1, 1, 1, 1, 1</tileCounts>
<offsetPos>0, 0</offsetPos>
<gapSize>0, 0</gapSize>
</tileset>
</action>
<action name="walking">
<framesPerSecond>7.3</framesPerSecond>
<origin>50,112</origin>
<orients>SW, W, NW, N, NE, E, SE, S</orients>
<tileset>
<heights>160, 160, 160, 160, 160, 160, 160, 160</heights>
<widths>100, 100, 100, 100, 100, 100, 100, 100</widths>
<tileCounts>6, 6, 6, 6, 6, 6, 6, 6</tileCounts>
<offsetPos>0, 0</offsetPos>
<gapSize>0, 0</gapSize>
</tileset>
</action>
<action name="behind_back">
<framesPerSecond>5</framesPerSecond>
<origin>50,112</origin>
<orients>SW, W, NW, N, NE, E, SE, S</orients>
<tileset>
<heights>160, 160, 160, 160, 160, 160, 160, 160</heights>
<widths>100, 100, 100, 100, 100, 100, 100, 100</widths>
<tileCounts>1, 1, 1, 1, 1, 1, 1, 1</tileCounts>
<offsetPos>0, 0</offsetPos>
<gapSize>0, 0</gapSize>
</tileset>
</action>
<!-- these are not isometrically offset -->
<action name="sailing">
<framesPerSecond>8</framesPerSecond>
<origin>87,80</origin>
<orients>
S, SSW, SW, WSW, W, WNW, NW, NNW, N, NNE, NE, ENE, E, ESE, SE, SSE
</orients>
<tileset>
<widths>168, 168, 168, 168, 168, 168, 168, 168</widths>
<heights>128, 128, 128, 128, 128, 128, 128, 128</heights>
<tileCounts>12, 12, 12, 12, 12, 12, 12, 12</tileCounts>
<offsetPos>0, 0</offsetPos>
<gapSize>0, 0</gapSize>
</tileset>
</action>
<action name="sailing_small">
<framesPerSecond>8</framesPerSecond>
<origin>42,34</origin>
<orients>
S, SSW, SW, WSW, W, WNW, NW, NNW, N, NNE, NE, ENE, E, ESE, SE, SSE
</orients>
<tileset>
<widths>84, 84, 84, 84, 84, 84, 84, 84</widths>
<heights>64, 64, 64, 64, 64, 64, 64, 64</heights>
<tileCounts>2, 2, 2, 2, 2, 2, 2, 2</tileCounts>
<offsetPos>0, 0</offsetPos>
<gapSize>0, 0</gapSize>
</tileset>
</action>
</actions>
+32
View File
@@ -0,0 +1,32 @@
<?xml version="1.0" standalone="yes"?>
<!-- $Id: classes.xml 1160 2002-03-27 21:49:40Z mdb $ -->
<!-- test component class definitions -->
<classes>
<!-- male character component classes -->
<class name="male/feet" renderPriority="0"/>
<class name="male/legs" renderPriority="1"/>
<class name="male/hand_left" renderPriority="2"/>
<class name="male/hand_right" renderPriority="2"/>
<class name="male/torso" renderPriority="3"/>
<class name="male/head" renderPriority="4"/>
<class name="male/eyepatch" renderPriority="5"/>
<class name="male/hair" renderPriority="6"/>
<class name="male/hat" renderPriority="7"/>
<class name="male/familiars" renderPriority="8"/>
<!-- female character component classes -->
<class name="female/feet" renderPriority="0"/>
<class name="female/legs" renderPriority="1"/>
<class name="female/hand_left" renderPriority="2"/>
<class name="female/hand_right" renderPriority="2"/>
<class name="female/torso" renderPriority="3"/>
<class name="female/head" renderPriority="4"/>
<class name="female/eyepatch" renderPriority="5"/>
<class name="female/hair" renderPriority="6"/>
<class name="female/hat" renderPriority="7"/>
<class name="female/familiars" renderPriority="8"/>
<!-- vessel classes -->
<class name="navsail" renderPriority="0"/>
</classes>
@@ -0,0 +1 @@
*.jar
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Some files were not shown because too many files have changed in this diff Show More