e6796b2d55
- Reworked colorization repository such that we now have arbitrary named "colorization classes" which can be used by various and sundry entities to colorize themselves. - Added support for individual object colorizations as well as "spots" that go along with objects (will be used to automatically create portals into buildings and automatically position users properly when at a "station"). - Repackaged things in miso to more closely mimic what we do everywhere else (no more miso.scene, now we have miso.data and miso.client). - Fixed up miso scene XML representation so that objects can more easily be expanded to have yet more stuff if we think of more stuff that they might aught to have in the future. Structured the miso scene model so that "uninteresting" objects (those that simply sit somewhere and don't do anything) take up a lot less memory than "interesting" objects (those that have action strings, "spots", colorizations and the works). I may want to roll colorizations into the "uninteresting" realm, but that remains to be seen. - Made it possible for object tilesets to specify default render priorities for objects in that tileset. This will hopefully allow us to get by without any "custom" render priorities that are specified on scene objects, instead relying on the default priorities to resolve common conflicts. There are surely other cleanups in there, but I think that was the major thrust of it. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2228 542714f4-19e9-0310-aa3c-eee0fc999fb1
98 lines
3.0 KiB
Java
98 lines
3.0 KiB
Java
//
|
|
// $Id: EditableMisoScene.java,v 1.19 2003/01/31 23:10:45 mdb Exp $
|
|
|
|
package com.threerings.miso.tools;
|
|
|
|
import java.awt.Rectangle;
|
|
|
|
import com.threerings.media.tile.ObjectTile;
|
|
import com.threerings.media.tile.Tile;
|
|
import com.threerings.media.tile.TileUtil;
|
|
|
|
import com.threerings.miso.client.DisplayMisoScene;
|
|
import com.threerings.miso.client.DisplayObjectInfo;
|
|
import com.threerings.miso.data.MisoSceneModel;
|
|
import com.threerings.miso.tile.BaseTile;
|
|
import com.threerings.miso.tile.BaseTileSet;
|
|
|
|
/**
|
|
* The editable Miso scene interface is used in the offline scene building
|
|
* tools as well as by the tools that load those prototype scenes into the
|
|
* runtime database. Accordingly, it provides a means for modifying scene
|
|
* values and for obtaining access to the underlying scene models that
|
|
* represent the underlying scene information.
|
|
*
|
|
* @see DisplayMisoScene
|
|
*/
|
|
public interface EditableMisoScene
|
|
extends DisplayMisoScene
|
|
{
|
|
/**
|
|
* Returns the default base tile.
|
|
*/
|
|
public BaseTileSet getDefaultBaseTileSet ();
|
|
|
|
/**
|
|
* Sets the default base tile.
|
|
*
|
|
* @param defaultBaseTile the new default base tile.
|
|
* @param fqTileId the fully-qualified tile id (@see
|
|
* TileUtil#getFQTileId}) of the new default base tile.
|
|
*/
|
|
public void setDefaultBaseTileSet (BaseTileSet defaultBaseTileSet,
|
|
int setId);
|
|
|
|
/**
|
|
* Updates the tile at the specified location in the base layer.
|
|
*
|
|
* @param x the x-coordinate of the tile to set.
|
|
* @param y the y-coordinate of the tile to set.
|
|
* @param tile the tile to set.
|
|
* @param fqTileId the fully-qualified tile id (@see
|
|
* TileUtil#getFQTileId}) of the new default base tile.
|
|
*/
|
|
public void setBaseTile (int x, int y, BaseTile tile, int fqTileId);
|
|
|
|
/**
|
|
* Fill a rectangular area with random tiles from
|
|
* the specified base tileset.
|
|
*/
|
|
public void setBaseTiles (Rectangle r, BaseTileSet set, int setId);
|
|
|
|
/**
|
|
* Adds an object to this scene.
|
|
*
|
|
* @param x the object's origin x-coordinate.
|
|
* @param y the object's origin y-coordinate.
|
|
* @param tile the tile to set.
|
|
* @param fqTileId the fully-qualified tile id (@see
|
|
* TileUtil#getFQTileId}) of the new default base tile.
|
|
*
|
|
* @return the new scene object instance.
|
|
*/
|
|
public DisplayObjectInfo addObject (
|
|
ObjectTile tile, int x, int y, int fqTileId);
|
|
|
|
/**
|
|
* Clears out the tile at the specified location in the base layer.
|
|
*/
|
|
public void clearBaseTile (int x, int y);
|
|
|
|
/**
|
|
* Removes the specified object from the scene.
|
|
*/
|
|
public boolean removeObject (DisplayObjectInfo scobj);
|
|
|
|
/**
|
|
* Returns a reference to the miso scene model that reflects the
|
|
* changes that have been made to this editable miso scene.
|
|
*/
|
|
public MisoSceneModel getMisoSceneModel ();
|
|
|
|
/**
|
|
* Replaces the model in use by this editable miso scene with the
|
|
* specified model.
|
|
*/
|
|
public void setMisoSceneModel (MisoSceneModel model);
|
|
}
|