Altered persistent storage of scenes to be handled by the

SceneRepository.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@117 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2001-07-24 16:10:19 +00:00
parent 3e5060c7c5
commit 05f3a6aa25
15 changed files with 283 additions and 411 deletions
@@ -1,5 +1,5 @@
//
// $Id: MisoUtil.java,v 1.3 2001/07/23 22:31:48 shaper Exp $
// $Id: MisoUtil.java,v 1.4 2001/07/24 16:10:19 shaper Exp $
package com.threerings.miso.util;
@@ -12,6 +12,7 @@ import com.samskivert.util.*;
import com.threerings.media.ImageManager;
import com.threerings.miso.Log;
import com.threerings.miso.scene.*;
import com.threerings.miso.scene.xml.XMLFileSceneRepository;
import com.threerings.miso.tile.*;
import com.threerings.resource.ResourceManager;
@@ -43,11 +44,14 @@ public class MisoUtil
createSceneManager (Config config, TileManager tilemgr)
{
try {
SceneManagerImpl scenemgr = (SceneManagerImpl)
config.instantiateValue("miso.scenemgr", DEF_SCENEMGR);
scenemgr.init(tilemgr);
SceneRepositoryImpl scenerepo = (SceneRepositoryImpl)
config.instantiateValue("miso.scenerepo", DEF_SCENEREPO);
scenerepo.init(config, tilemgr);
SceneManager scenemgr = new SceneManager(scenerepo);
return scenemgr;
} catch (Exception e) {
Log.warning("Failed to instantiate scene manager [e=" + e + "].");
return null;
@@ -119,8 +123,8 @@ public class MisoUtil
}
/** The default SceneManager class name. */
protected static final String DEF_SCENEMGR =
CompiledSceneManager.class.getName();
protected static final String DEF_SCENEREPO =
XMLFileSceneRepository.class.getName();
/** The default TileSetManager class name. */
protected static final String DEF_TILESETMGR =