*** empty log message ***

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@639 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-11-27 08:06:57 +00:00
parent d733a429a9
commit be313f8922
13 changed files with 132 additions and 11 deletions
Executable
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
#
# Invokes ant with the necessary class to build the component bundles.
BINDIR=`dirname $0`
# add all JAR files in /usr/share/ant/lib/ to CLASSPATH
SYSTEMCP=`echo /usr/share/java/*.jar | tr ' ' ':'`
# add all JAR files in /usr/share/ant/lib/ to CLASSPATH
PROJECTCP=`echo $BINDIR/../../lib/*.jar | tr ' ' ':'`
# also add narya.jar
export CLASSPATH=$BINDIR/../../dist/narya.jar:$PROJECTCP:$SYSTEMCP
# and invoke ant with the proper target
ant "$@" cbundles
+23 -1
View File
@@ -11,6 +11,9 @@
<property name="src.dir" value="src/java"/>
<property name="deploy.dir" value="dist"/>
<property name="cbundle.dir" value="rsrc/bundles/components/pirate"/>
<property name="tbundle.dir" value="rsrc/bundles/tiles"/>
<!-- declare our classpath -->
<path id="classpath">
<pathelement location="../${deploy.dir}/classes"/>
@@ -39,7 +42,8 @@
<!-- build the java class files -->
<target name="compile" depends="prepare">
<javac srcdir="${src.dir}" destdir="${deploy.dir}/classes"
debug="on" optimize="off" deprecation="off">
debug="on" optimize="off" deprecation="off"
excludes="com/threerings/cast/builder/**">
<classpath refid="classpath"/>
</javac>
</target>
@@ -59,4 +63,22 @@
</junit>
</target>
<!-- test the component metadata bundling process -->
<target name="cbundles" description="Build component bundles.">
<!-- first build the metadata bundle -->
<taskdef name="metabundle"
classname="com.threerings.cast.tools.bundle.MetadataBundlerTask"/>
<metabundle actiondef="${cbundle.dir}/actions.xml"
classdef="${cbundle.dir}/classes.xml"
target="${cbundle.dir}/metadata.jar"/>
<!-- then a component bundle -->
<taskdef name="cbundle"
classname="com.threerings.cast.tools.bundle.ComponentBundlerTask"/>
<cbundle target="${cbundle.dir}/components.jar"
mapfile="${cbundle.dir}/components.map">
<fileset dir="${cbundle.dir}" includes="**/*.png"/>
</cbundle>
</target>
</project>
+29
View File
@@ -0,0 +1,29 @@
<?xml version="1.0" standalone="yes"?>
<!-- $Id: actions.xml,v 1.1 2001/11/27 08:06:57 mdb Exp $ -->
<!-- test component action definitions -->
<actions>
<action name="standing">
<framesPerSecond>5</framesPerSecond>
<origin>47,80</origin>
<tileset>
<heights>94, 94, 94, 94, 94, 94, 94, 94</heights>
<widths>94, 94, 94, 94, 94, 94, 94, 94</widths>
<tileCounts>1, 1, 1, 1, 1, 1, 1, 1</tileCounts>
<offsetPos>1, 1</offsetPos>
<gapDist>39, 18</gapDist>
</tileset>
</action>
<action name="walking">
<framesPerSecond>5</framesPerSecond>
<origin>47,80</origin>
<tileset>
<heights>94, 94, 94, 94, 94, 94, 94, 94</heights>
<widths>94, 94, 94, 94, 94, 94, 94, 94</widths>
<tileCounts>6, 6, 6, 6, 6, 6, 6, 6</tileCounts>
<offsetPos>1, 1</offsetPos>
<gapDist>39, 18</gapDist>
</tileset>
</action>
</actions>
@@ -0,0 +1,8 @@
<?xml version="1.0" standalone="yes"?>
<!-- $Id: classes.xml,v 1.1 2001/11/27 08:06:57 mdb Exp $ -->
<!-- test component class definitions -->
<classes>
<class name="hat" renderPriority="1"/>
<class name="torso" renderPriority="0"/>
</classes>
@@ -0,0 +1,2 @@
*.jar
*.map
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

@@ -1,7 +1,11 @@
#
# $Id: manager.properties,v 1.1 2001/11/21 02:42:16 mdb Exp $
# $Id: manager.properties,v 1.2 2001/11/27 08:06:57 mdb Exp $
#
# Test resource manager configuration
# used to test the BundledTileSetRepository
resource.set.bundle_test = rsrc/media/tools/tile/bundle.jar
# used to test the BundledComponentRepository
resource.set.components = rsrc/bundles/components/pirate/metadata.jar:\
rsrc/bundles/components/pirate/components.jar
@@ -0,0 +1,41 @@
//
// $Id: BundledComponentRepositoryTest.java,v 1.1 2001/11/27 08:06:57 mdb Exp $
package com.threerings.cast.bundle;
import java.util.Iterator;
import com.samskivert.util.StringUtil;
import com.threerings.resource.ResourceManager;
import com.threerings.cast.ComponentClass;
public class BundledComponentRepositoryTest
{
public static void main (String[] args)
{
try {
ResourceManager rmgr = new ResourceManager(null, "rsrc");
BundledComponentRepository repo =
new BundledComponentRepository(rmgr, "components");
System.out.println("Classes: " + StringUtil.toString(
repo.enumerateComponentClasses()));
System.out.println("Actions: " + StringUtil.toString(
repo.enumerateActionSequences()));
System.out.println("Action sets: " + StringUtil.toString(
repo._actionSets.values().iterator()));
Iterator iter = repo.enumerateComponentClasses();
while (iter.hasNext()) {
ComponentClass cclass = (ComponentClass)iter.next();
System.out.println("IDs [" + cclass + "]: " +
StringUtil.toString(
repo.enumerateComponentIds(cclass)));
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
@@ -1,5 +1,5 @@
//
// $Id: ViewerSceneViewPanel.java,v 1.31 2001/11/18 04:09:21 mdb Exp $
// $Id: ViewerSceneViewPanel.java,v 1.32 2001/11/27 08:06:57 mdb Exp $
package com.threerings.miso.viewer;
@@ -47,9 +47,9 @@ public class ViewerSceneViewPanel extends SceneViewPanel
// configure the character manager from which we obtain sprites
charmgr.setCharacterClass(MisoCharacterSprite.class);
// create the character descriptors
_descUser = CastUtil.getRandomDescriptor(charmgr);
_descDecoy = CastUtil.getRandomDescriptor(charmgr);
// create the character descriptors FIXME
_descUser = CastUtil.getRandomDescriptor(null);
_descDecoy = CastUtil.getRandomDescriptor(null);
// create the manipulable sprite
_sprite = createSprite(spritemgr, charmgr, _descUser);