Helped the scene manager to depart from the scene. The viewer and editor
applications really need to deal directly with the scene repository. The display part of the MISO code doesn't need a scene manager, per se, because it is simply told to visualize a particular scene and scene management happens entirely externally. This is in preparation for making the MISO code work and place nicely with the Whirled code. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@246 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
//
|
||||
// $Id: SceneManager.java,v 1.7 2001/07/24 16:10:19 shaper Exp $
|
||||
|
||||
package com.threerings.miso.scene;
|
||||
|
||||
import com.samskivert.util.IntMap;
|
||||
|
||||
/**
|
||||
* The SceneManager provides a single access point for retrieving and
|
||||
* caching the various scenes that make up a game.
|
||||
*/
|
||||
public class SceneManager
|
||||
{
|
||||
/**
|
||||
* Initialize the SceneManager with the given scene repository.
|
||||
*
|
||||
* @param repo the scene repository.
|
||||
*/
|
||||
public SceneManager (SceneRepository repo)
|
||||
{
|
||||
_repo = repo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the Scene object for the specified scene id.
|
||||
*
|
||||
* @param sid the scene id.
|
||||
* @return the Scene object.
|
||||
*/
|
||||
public Scene getScene (int sid)
|
||||
{
|
||||
// TBD
|
||||
return null;
|
||||
}
|
||||
|
||||
public SceneRepository getSceneRepository ()
|
||||
{
|
||||
return _repo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a String array of all scene layer names ordered by
|
||||
* ascending layer id.
|
||||
*
|
||||
* @return the layer names.
|
||||
*/
|
||||
public String[] getLayerNames ()
|
||||
{
|
||||
return Scene.XLATE_LAYERS;
|
||||
}
|
||||
|
||||
/** The repository used to read and write scenes. */
|
||||
protected SceneRepository _repo;
|
||||
|
||||
/** The currently cached scenes. */
|
||||
protected IntMap _scenes = new IntMap();
|
||||
}
|
||||
@@ -1,12 +1,21 @@
|
||||
//
|
||||
// $Id: SceneRepository.java,v 1.1 2001/07/24 16:10:19 shaper Exp $
|
||||
// $Id: SceneRepository.java,v 1.2 2001/08/15 00:00:51 mdb Exp $
|
||||
|
||||
package com.threerings.miso.scene;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* The SceneRepository interface manages persistent scene storage.
|
||||
*/
|
||||
public interface SceneRepository
|
||||
{
|
||||
// TBD
|
||||
/**
|
||||
* Loads and returns the scene object with the specified id.
|
||||
*
|
||||
* @param fname the full pathname to the file.
|
||||
*
|
||||
* @return the scene object.
|
||||
*/
|
||||
public Scene loadScene (String fname) throws IOException;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user