Added support for cloning scene models (we love doing multiple inheritance
by hand!). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@754 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: MisoSceneModel.java,v 1.3 2001/11/30 21:54:34 mdb Exp $
|
||||
// $Id: MisoSceneModel.java,v 1.4 2001/12/12 02:47:17 mdb Exp $
|
||||
|
||||
package com.threerings.miso.scene;
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.samskivert.util.StringUtil;
|
||||
* instance of {@link DisplayMisoScene}.
|
||||
*/
|
||||
public class MisoSceneModel
|
||||
implements Cloneable
|
||||
{
|
||||
/** The width of the scene in tile units. */
|
||||
public int width;
|
||||
@@ -91,6 +92,19 @@ public class MisoSceneModel
|
||||
", objectTileIds=" + StringUtil.toString(objectTileIds) + "]";
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a copy of this Miso scene model.
|
||||
*/
|
||||
public Object clone ()
|
||||
throws CloneNotSupportedException
|
||||
{
|
||||
MisoSceneModel model = (MisoSceneModel)super.clone();
|
||||
model.baseTileIds = (int[])baseTileIds.clone();
|
||||
model.fringeTileIds = (int[])fringeTileIds.clone();
|
||||
model.objectTileIds = (int[])objectTileIds.clone();
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and returns a blank scene model (with zero width and
|
||||
* height).
|
||||
|
||||
Reference in New Issue
Block a user