Type safety, redundant case removal, other cleanup.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@490 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Michael Bayne
2008-05-09 11:39:45 +00:00
parent 95400b6050
commit 51c01493f2
9 changed files with 63 additions and 78 deletions
@@ -238,8 +238,7 @@ public class ModelMesh extends TriMesh
((ModelController)controller).putClone(null, properties)); ((ModelController)controller).putClone(null, properties));
} }
} }
TriangleBatch batch = (TriangleBatch)getBatch(0), TriangleBatch batch = getBatch(0), mbatch = mstore.getBatch(0);
mbatch = (TriangleBatch)mstore.getBatch(0);
mbatch.setVertexBuffer(properties.isSet("vertices") ? mbatch.setVertexBuffer(properties.isSet("vertices") ?
batch.getVertexBuffer() : batch.getVertexBuffer() :
BufferUtils.clone(batch.getVertexBuffer())); BufferUtils.clone(batch.getVertexBuffer()));
@@ -317,7 +316,7 @@ public class ModelMesh extends TriMesh
"localRotation", null)); "localRotation", null));
setLocalScale((Vector3f)capsule.readSavable( setLocalScale((Vector3f)capsule.readSavable(
"localScale", null)); "localScale", null));
TriangleBatch batch = (TriangleBatch)getBatch(0); TriangleBatch batch = getBatch(0);
batch.setModelBound((BoundingVolume)capsule.readSavable( batch.setModelBound((BoundingVolume)capsule.readSavable(
"modelBound", null)); "modelBound", null));
_textureKey = capsule.readString("textureKey", null); _textureKey = capsule.readString("textureKey", null);
@@ -344,8 +344,7 @@ public class SkinMesh extends ModelMesh
@Override // documentation inherited @Override // documentation inherited
public void expandModelBounds () public void expandModelBounds ()
{ {
BoundingVolume obound = BoundingVolume obound = getBatch(0).getModelBound().clone(null);
(BoundingVolume)getBatch(0).getModelBound().clone(null);
updateModelBound(); updateModelBound();
getBatch(0).getModelBound().mergeLocal(obound); getBatch(0).getModelBound().mergeLocal(obound);
} }
@@ -538,8 +537,7 @@ public class SkinMesh extends ModelMesh
protected void storeFrame () protected void storeFrame ()
{ {
if (_storeBlend) { if (_storeBlend) {
_frames.put(_storeFrameId, new BlendFrame( _frames.put(_storeFrameId, new BlendFrame(_vbuf.clone(), _nbuf.clone()));
(float[])_vbuf.clone(), (float[])_nbuf.clone()));
} else { } else {
TriangleBatch batch = getBatch(0), tbatch = new TriangleBatch(); TriangleBatch batch = getBatch(0), tbatch = new TriangleBatch();
tbatch.setParentGeom(DUMMY_MESH); tbatch.setParentGeom(DUMMY_MESH);
@@ -789,7 +789,7 @@ public class ModelViewer extends JmeCanvasApp
TextureKey.setLocationOverride(new TextureKey.LocationOverride() { TextureKey.setLocationOverride(new TextureKey.LocationOverride() {
public URL getLocation (String name) public URL getLocation (String name)
throws MalformedURLException { throws MalformedURLException {
return new URL(parent.toURL(), name); return new URL(parent.toURI().toURL(), name);
} }
}); });
try { try {
@@ -1107,7 +1107,7 @@ public class ModelViewer extends JmeCanvasApp
{ {
Vector3f target = new Vector3f(); Vector3f target = new Vector3f();
if (_model != null) { if (_model != null) {
BoundingVolume bound = (BoundingVolume)_model.getWorldBound(); BoundingVolume bound = _model.getWorldBound();
if (bound != null) { if (bound != null) {
bound.getCenter(target); bound.getCenter(target);
} }
@@ -99,13 +99,13 @@ public abstract class ShaderConfig
other._state.uniforms.put(uniform.name, (ShaderUniform)uniform.clone()); other._state.uniforms.put(uniform.name, (ShaderUniform)uniform.clone());
} }
if (_lights != null) { if (_lights != null) {
other._lights = (LightConfig[])_lights.clone(); other._lights = _lights.clone();
for (int ii = 0; ii < _lights.length; ii++) { for (int ii = 0; ii < _lights.length; ii++) {
other._lights[ii] = (LightConfig)_lights[ii].clone(); other._lights[ii] = (LightConfig)_lights[ii].clone();
} }
} }
if (_textures != null) { if (_textures != null) {
other._textures = (TextureConfig[])_textures.clone(); other._textures = _textures.clone();
for (int ii = 0; ii < _textures.length; ii++) { for (int ii = 0; ii < _textures.length; ii++) {
other._textures[ii] = (TextureConfig)_textures[ii].clone(); other._textures[ii] = (TextureConfig)_textures[ii].clone();
} }
@@ -40,17 +40,19 @@ import java.awt.event.ActionListener;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener; import java.awt.event.MouseMotionListener;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Set;
import javax.swing.Icon; import javax.swing.Icon;
import javax.swing.JFrame; import javax.swing.JFrame;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.samskivert.swing.Controller; import com.samskivert.swing.Controller;
import com.samskivert.swing.RadialMenu; import com.samskivert.swing.RadialMenu;
import com.samskivert.swing.RuntimeAdjust; import com.samskivert.swing.RuntimeAdjust;
@@ -60,6 +62,7 @@ import com.samskivert.util.StringUtil;
import com.threerings.media.VirtualMediaPanel; import com.threerings.media.VirtualMediaPanel;
import com.threerings.media.sprite.Sprite; import com.threerings.media.sprite.Sprite;
import com.threerings.media.tile.ObjectTile;
import com.threerings.media.tile.Tile; import com.threerings.media.tile.Tile;
import com.threerings.media.tile.TileManager; import com.threerings.media.tile.TileManager;
import com.threerings.media.tile.TileSet; import com.threerings.media.tile.TileSet;
@@ -352,9 +355,9 @@ public class MisoScenePanel extends VirtualMediaPanel
*/ */
public void reportMemoryUsage () public void reportMemoryUsage ()
{ {
HashMap base = new HashMap(); Map<Tile.Key,BaseTile> base = Maps.newHashMap();
HashSet fringe = new HashSet(); Set<BaseTile> fringe = Sets.newHashSet();
HashMap object = new HashMap(); Map<Tile.Key,ObjectTile> object = Maps.newHashMap();
long[] usage = new long[3]; long[] usage = new long[3];
for (SceneBlock block : _blocks.values()) { for (SceneBlock block : _blocks.values()) {
block.computeMemoryUsage(base, fringe, object, usage); block.computeMemoryUsage(base, fringe, object, usage);
@@ -594,7 +597,7 @@ public class MisoScenePanel extends VirtualMediaPanel
_spritemgr.getHitSprites(_hitSprites, x, y); _spritemgr.getHitSprites(_hitSprites, x, y);
int hslen = _hitSprites.size(); int hslen = _hitSprites.size();
for (int i = 0; i < hslen; i++) { for (int i = 0; i < hslen; i++) {
Sprite sprite = (Sprite)_hitSprites.get(i); Sprite sprite = _hitSprites.get(i);
appendDirtySprite(_hitList, sprite); appendDirtySprite(_hitList, sprite);
} }
@@ -824,10 +827,8 @@ public class MisoScenePanel extends VirtualMediaPanel
int bkey = compose(bx, by); int bkey = compose(bx, by);
if (!_blocks.containsKey(bkey)) { if (!_blocks.containsKey(bkey)) {
SceneBlock block = new SceneBlock( SceneBlock block = new SceneBlock(
this, origin.x, origin.y, this, origin.x, origin.y, _metrics.blockwid, _metrics.blockhei);
_metrics.blockwid, _metrics.blockhei); boolean visible = block.getFootprint().getBounds().intersects(_vibounds);
boolean visible =
block.getFootprint().getBounds().intersects(_vibounds);
block.setVisiBlock(visible); block.setVisiBlock(visible);
_blocks.put(bkey, block); _blocks.put(bkey, block);
@@ -847,8 +848,7 @@ public class MisoScenePanel extends VirtualMediaPanel
// recompute our visible object set // recompute our visible object set
recomputeVisible(); recomputeVisible();
Log.debug("Rethunk [pending=" + _pendingBlocks + Log.debug("Rethunk [pending=" + _pendingBlocks + ", visible=" + _visiBlocks.size() + "].");
", visible=" + _visiBlocks.size() + "].");
return _visiBlocks.size(); return _visiBlocks.size();
} }
@@ -1026,8 +1026,7 @@ public class MisoScenePanel extends VirtualMediaPanel
*/ */
public void computeIndicators () public void computeIndicators ()
{ {
Map<SceneObject, SceneObjectIndicator> _unupdated = new HashMap<SceneObject, SceneObjectIndicator>( Map<SceneObject, SceneObjectIndicator> _unupdated = Maps.newHashMap(_indicators);
_indicators);
for (int ii = 0, nn = _vizobjs.size(); ii < nn; ii++) { for (int ii = 0, nn = _vizobjs.size(); ii < nn; ii++) {
SceneObject scobj = _vizobjs.get(ii); SceneObject scobj = _vizobjs.get(ii);
String action = scobj.info.action; String action = scobj.info.action;
@@ -1276,7 +1275,7 @@ public class MisoScenePanel extends VirtualMediaPanel
_spritemgr.getIntersectingSprites(_dirtySprites, clip); _spritemgr.getIntersectingSprites(_dirtySprites, clip);
int size = _dirtySprites.size(); int size = _dirtySprites.size();
for (int ii = 0; ii < size; ii++) { for (int ii = 0; ii < size; ii++) {
Sprite sprite = (Sprite)_dirtySprites.get(ii); Sprite sprite = _dirtySprites.get(ii);
Rectangle bounds = sprite.getBounds(); Rectangle bounds = sprite.getBounds();
if (!bounds.intersects(clip)) { if (!bounds.intersects(clip)) {
continue; continue;
@@ -1319,8 +1318,8 @@ public class MisoScenePanel extends VirtualMediaPanel
{ {
// make sure the indicators are ready // make sure the indicators are ready
if (!_indicatorsLaidOut) { if (!_indicatorsLaidOut) {
List<Rectangle> boundaries = new ArrayList<Rectangle>(); List<Rectangle> boundaries = Lists.newArrayList();
for (Entry<SceneObject, SceneObjectIndicator> entry : _indicators.entrySet()) { for (Map.Entry<SceneObject, SceneObjectIndicator> entry : _indicators.entrySet()) {
entry.getValue().layout(gfx, entry.getKey(), _vbounds, boundaries); entry.getValue().layout(gfx, entry.getKey(), _vbounds, boundaries);
dirtyIndicator(entry.getValue()); dirtyIndicator(entry.getValue());
boundaries.add(entry.getValue().getBounds()); boundaries.add(entry.getValue().getBounds());
@@ -1596,7 +1595,7 @@ public class MisoScenePanel extends VirtualMediaPanel
/** Used by {@link #rethink}. */ /** Used by {@link #rethink}. */
protected class RethinkOp implements TileOp protected class RethinkOp implements TileOp
{ {
public HashSet blocks = new HashSet(); public Set blocks = Sets.newHashSet();
public void apply (int tx, int ty, Rectangle tbounds) { public void apply (int tx, int ty, Rectangle tbounds) {
_key.x = MathUtil.floorDiv(tx, _metrics.blockwid) * _key.x = MathUtil.floorDiv(tx, _metrics.blockwid) *
@@ -1643,23 +1642,23 @@ public class MisoScenePanel extends VirtualMediaPanel
protected int _pendingBlocks; protected int _pendingBlocks;
/** Used to track visible blocks that are waiting to be resolved. */ /** Used to track visible blocks that are waiting to be resolved. */
protected HashSet _visiBlocks = new HashSet(); protected Set<SceneBlock> _visiBlocks = Sets.newHashSet();
/** Used to avoid repaints while we don't yet have resolved all the /** Used to avoid repaints while we don't yet have resolved all the
* blocks needed to render the visible view. */ * blocks needed to render the visible view. */
protected boolean _delayRepaint = false; protected boolean _delayRepaint = false;
/** A list of the potentially visible objects in the scene. */ /** A list of the potentially visible objects in the scene. */
protected ArrayList<SceneObject> _vizobjs = new ArrayList<SceneObject>(); protected List<SceneObject> _vizobjs = Lists.newArrayList();
/** For computing fringe tiles. */ /** For computing fringe tiles. */
protected HashMap _masks = new HashMap(); protected Map _masks = Maps.newHashMap();
/** The dirty sprites and objects that need to be re-painted. */ /** The dirty sprites and objects that need to be re-painted. */
protected DirtyItemList _dirtyItems = new DirtyItemList(); protected DirtyItemList _dirtyItems = new DirtyItemList();
/** The working sprites list used when calculating dirty regions. */ /** The working sprites list used when calculating dirty regions. */
protected ArrayList _dirtySprites = new ArrayList(); protected List<Sprite> _dirtySprites = Lists.newArrayList();
/** Used when rendering tiles. */ /** Used when rendering tiles. */
protected Rectangle _tbounds; protected Rectangle _tbounds;
@@ -1672,7 +1671,7 @@ public class MisoScenePanel extends VirtualMediaPanel
/** Used to collect the list of sprites "hit" by a particular mouse /** Used to collect the list of sprites "hit" by a particular mouse
* location. */ * location. */
protected List _hitSprites = new ArrayList(); protected List<Sprite> _hitSprites = Lists.newArrayList();
/** The list that we use to track and sort the items over which the /** The list that we use to track and sort the items over which the
* mouse is hovering. */ * mouse is hovering. */
@@ -1691,8 +1690,7 @@ public class MisoScenePanel extends VirtualMediaPanel
protected Point _hcoords = new Point(); protected Point _hcoords = new Point();
/** Our object indicators, indexed by the object that they indicate. */ /** Our object indicators, indexed by the object that they indicate. */
protected HashMap<SceneObject, SceneObjectIndicator> _indicators = protected Map<SceneObject, SceneObjectIndicator> _indicators = Maps.newHashMap();
new HashMap<SceneObject, SceneObjectIndicator>();
/** Have the indicators been laid out? */ /** Have the indicators been laid out? */
protected boolean _indicatorsLaidOut = false; protected boolean _indicatorsLaidOut = false;
@@ -25,16 +25,17 @@ import java.awt.Polygon;
import java.awt.Rectangle; import java.awt.Rectangle;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.Map;
import java.util.HashSet; import java.util.Set;
import com.samskivert.util.ArrayUtil; import com.samskivert.util.ArrayUtil;
import com.samskivert.util.HashIntMap; import com.samskivert.util.IntMap;
import com.samskivert.util.StringUtil; import com.samskivert.util.StringUtil;
import com.threerings.geom.GeomUtil; import com.threerings.geom.GeomUtil;
import com.threerings.media.tile.NoSuchTileSetException; import com.threerings.media.tile.NoSuchTileSetException;
import com.threerings.media.tile.ObjectTile; import com.threerings.media.tile.ObjectTile;
import com.threerings.media.tile.Tile;
import com.threerings.media.tile.TileSet; import com.threerings.media.tile.TileSet;
import com.threerings.media.tile.TileUtil; import com.threerings.media.tile.TileUtil;
import com.threerings.media.util.MathUtil; import com.threerings.media.util.MathUtil;
@@ -401,8 +402,8 @@ public class SceneBlock
* is placed into the zeroth array element, fringe tile usage into the * is placed into the zeroth array element, fringe tile usage into the
* first and object tile usage into the second. * first and object tile usage into the second.
*/ */
public void computeMemoryUsage ( public void computeMemoryUsage (Map<Tile.Key,BaseTile> bases, Set<BaseTile> fringes,
HashMap bases, HashSet fringes, HashMap objects, long[] usage) Map<Tile.Key,ObjectTile> objects, long[] usage)
{ {
// account for our base tiles // account for our base tiles
MisoSceneModel model = _panel.getSceneModel(); MisoSceneModel model = _panel.getSceneModel();
@@ -415,7 +416,7 @@ public class SceneBlock
continue; continue;
} }
BaseTile sbase = (BaseTile)bases.get(base.key); BaseTile sbase = bases.get(base.key);
if (sbase == null) { if (sbase == null) {
bases.put(base.key, base); bases.put(base.key, base);
usage[0] += base.getEstimatedMemoryUsage(); usage[0] += base.getEstimatedMemoryUsage();
@@ -440,7 +441,7 @@ public class SceneBlock
int ocount = (_objects == null) ? 0 : _objects.length; int ocount = (_objects == null) ? 0 : _objects.length;
for (int ii = 0; ii < ocount; ii++) { for (int ii = 0; ii < ocount; ii++) {
SceneObject scobj = _objects[ii]; SceneObject scobj = _objects[ii];
ObjectTile tile = (ObjectTile)objects.get(scobj.tile.key); ObjectTile tile = objects.get(scobj.tile.key);
if (tile == null) { if (tile == null) {
objects.put(scobj.tile.key, scobj.tile); objects.put(scobj.tile.key, scobj.tile);
usage[2] += scobj.tile.getEstimatedMemoryUsage(); usage[2] += scobj.tile.getEstimatedMemoryUsage();
@@ -482,7 +483,7 @@ public class SceneBlock
* Links this block to its neighbors; informs neighboring blocks of * Links this block to its neighbors; informs neighboring blocks of
* object coverage. * object coverage.
*/ */
protected void update (HashIntMap blocks) protected void update (IntMap blocks)
{ {
boolean recover = false; boolean recover = false;
@@ -527,7 +528,7 @@ public class SceneBlock
/** /**
* Sets the footprint of this object tile * Sets the footprint of this object tile
*/ */
protected void setCovered (HashIntMap blocks, SceneObject scobj) protected void setCovered (IntMap blocks, SceneObject scobj)
{ {
int endx = scobj.info.x - scobj.tile.getBaseWidth() + 1; int endx = scobj.info.x - scobj.tile.getBaseWidth() + 1;
int endy = scobj.info.y - scobj.tile.getBaseHeight() + 1; int endy = scobj.info.y - scobj.tile.getBaseHeight() + 1;
@@ -25,7 +25,7 @@ import java.awt.Graphics2D;
import java.awt.Transparency; import java.awt.Transparency;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.Map;
import com.samskivert.util.CheapIntMap; import com.samskivert.util.CheapIntMap;
import com.samskivert.util.QuickSort; import com.samskivert.util.QuickSort;
@@ -44,8 +44,7 @@ import com.threerings.miso.Log;
import com.threerings.miso.data.MisoSceneModel; import com.threerings.miso.data.MisoSceneModel;
/** /**
* Automatically fringes a scene according to the rules in the supplied * Automatically fringes a scene according to the rules in the supplied fringe configuration.
* fringe configuration.
*/ */
public class AutoFringer public class AutoFringer
{ {
@@ -72,8 +71,7 @@ public class AutoFringer
* Compute and return the fringe tile to be inserted at the specified * Compute and return the fringe tile to be inserted at the specified
* location. * location.
*/ */
public BaseTile getFringeTile (MisoSceneModel scene, int col, int row, public BaseTile getFringeTile (MisoSceneModel scene, int col, int row, Map masks)
HashMap masks)
{ {
// get the tileset id of the base tile we are considering // get the tileset id of the base tile we are considering
int underset = adjustTileSetId(scene.getBaseTileId(col, row) >> 16); int underset = adjustTileSetId(scene.getBaseTileId(col, row) >> 16);
@@ -150,8 +148,7 @@ public class AutoFringer
/** /**
* Compose a FringeTile out of the various fringe images needed. * Compose a FringeTile out of the various fringe images needed.
*/ */
protected void composeFringeTile ( protected void composeFringeTile (Tile frTile, FringerRec[] fringers, Map masks, int hashValue)
Tile frTile, FringerRec[] fringers, HashMap masks, int hashValue)
{ {
// sort the array so that higher priority fringers get drawn first // sort the array so that higher priority fringers get drawn first
QuickSort.sort(fringers); QuickSort.sort(fringers);
@@ -161,11 +158,9 @@ public class AutoFringer
int[] indexes = getFringeIndexes(fringers[ii].bits); int[] indexes = getFringeIndexes(fringers[ii].bits);
for (int jj = 0; jj < indexes.length; jj++) { for (int jj = 0; jj < indexes.length; jj++) {
try { try {
ftimg = getTileImage(ftimg, fringers[ii].baseset, ftimg = getTileImage(ftimg, fringers[ii].baseset, indexes[jj], masks, hashValue);
indexes[jj], masks, hashValue);
} catch (NoSuchTileSetException nstse) { } catch (NoSuchTileSetException nstse) {
Log.warning("Autofringer couldn't find a needed tileset " + Log.warning("Autofringer couldn't find a needed tileset [error=" + nstse + "].");
"[error=" + nstse + "].");
} }
} }
} }
@@ -176,26 +171,22 @@ public class AutoFringer
/** /**
* Retrieve or compose an image for the specified fringe. * Retrieve or compose an image for the specified fringe.
*/ */
protected BufferedImage getTileImage ( protected BufferedImage getTileImage (BufferedImage ftimg, int baseset, int index,
BufferedImage ftimg, int baseset, int index, Map masks, int hashValue)
HashMap masks, int hashValue)
throws NoSuchTileSetException throws NoSuchTileSetException
{ {
FringeConfiguration.FringeTileSetRecord tsr = FringeConfiguration.FringeTileSetRecord tsr = _fringeconf.getFringe(baseset, hashValue);
_fringeconf.getFringe(baseset, hashValue);
int fringeset = tsr.fringe_tsid; int fringeset = tsr.fringe_tsid;
TileSet fset = _tmgr.getTileSet(fringeset); TileSet fset = _tmgr.getTileSet(fringeset);
if (!tsr.mask) { if (!tsr.mask) {
// oh good, this is easy // oh good, this is easy
Tile stamp = fset.getTile(index); Tile stamp = fset.getTile(index);
return stampTileImage(stamp, ftimg, stamp.getWidth(), return stampTileImage(stamp, ftimg, stamp.getWidth(), stamp.getHeight());
stamp.getHeight());
} }
// otherwise, it's a mask.. look for it in the cache.. // otherwise, it's a mask.. look for it in the cache..
Long maskkey = Long.valueOf((((long) baseset) << 32) + Long maskkey = Long.valueOf((((long) baseset) << 32) + (fringeset << 16) + index);
(fringeset << 16) + index);
BufferedImage img = (BufferedImage)masks.get(maskkey); BufferedImage img = (BufferedImage)masks.get(maskkey);
if (img == null) { if (img == null) {
BufferedImage fsrc = fset.getRawTileImage(index); BufferedImage fsrc = fset.getRawTileImage(index);
@@ -203,15 +194,13 @@ public class AutoFringer
img = ImageUtil.composeMaskedImage(_imgr, fsrc, bsrc); img = ImageUtil.composeMaskedImage(_imgr, fsrc, bsrc);
masks.put(maskkey, img); masks.put(maskkey, img);
} }
ftimg = stampTileImage(img, ftimg, img.getWidth(null), ftimg = stampTileImage(img, ftimg, img.getWidth(null), img.getHeight(null));
img.getHeight(null));
return ftimg; return ftimg;
} }
/** Helper function for {@link #getTileImage}. */ /** Helper function for {@link #getTileImage}. */
protected BufferedImage stampTileImage (Object stamp, BufferedImage ftimg, protected BufferedImage stampTileImage (Object stamp, BufferedImage ftimg, int width, int height)
int width, int height)
{ {
// create the target image if necessary // create the target image if necessary
if (ftimg == null) { if (ftimg == null) {
@@ -231,9 +220,8 @@ public class AutoFringer
} }
/** /**
* Get the fringe index specified by the fringebits. If no index * Get the fringe index specified by the fringebits. If no index is available, try breaking
* is available, try breaking down the bits into contiguous regions of * down the bits into contiguous regions of bits and look for indexes for those.
* bits and look for indexes for those.
*/ */
protected int[] getFringeIndexes (int bits) protected int[] getFringeIndexes (int bits)
{ {
@@ -3,6 +3,7 @@
package com.threerings.jme.data; package com.threerings.jme.data;
import com.threerings.crowd.client.PlaceController;
import com.threerings.crowd.data.PlaceConfig; import com.threerings.crowd.data.PlaceConfig;
import com.threerings.jme.client.JabberController; import com.threerings.jme.client.JabberController;
@@ -12,9 +13,9 @@ import com.threerings.jme.client.JabberController;
public class JabberConfig extends PlaceConfig public class JabberConfig extends PlaceConfig
{ {
// documentation inherited // documentation inherited
public Class getControllerClass () public PlaceController createController ()
{ {
return JabberController.class; return new JabberController();
} }
// documentation inherited // documentation inherited
@@ -63,10 +63,10 @@ public class TestSoundManager
} }
while (true) { while (true) {
Runnable r = (Runnable)_queue.get(); Runnable r = _queue.get();
r.run(); r.run();
} }
} }
protected static Queue _queue = new Queue(); protected static Queue<Runnable> _queue = new Queue<Runnable>();
} }