Modifications now that things once again take an image manager in addition
to a resource manager. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@719 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TestApp.java,v 1.8 2001/11/29 22:01:59 mdb Exp $
|
||||
// $Id: TestApp.java,v 1.9 2001/11/30 02:35:37 mdb Exp $
|
||||
|
||||
package com.threerings.cast.builder;
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.samskivert.util.Config;
|
||||
import com.samskivert.swing.util.SwingUtil;
|
||||
|
||||
import com.threerings.resource.ResourceManager;
|
||||
import com.threerings.media.ImageManager;
|
||||
|
||||
import com.threerings.cast.Log;
|
||||
import com.threerings.cast.CharacterManager;
|
||||
@@ -33,8 +34,10 @@ public class TestApp
|
||||
MisoUtil.bindProperties(_config);
|
||||
|
||||
ResourceManager rmgr = new ResourceManager(null, "rsrc");
|
||||
ImageManager imgr = new ImageManager(rmgr);
|
||||
|
||||
ComponentRepository crepo =
|
||||
new BundledComponentRepository(rmgr, "components");
|
||||
new BundledComponentRepository(rmgr, imgr, "components");
|
||||
CharacterManager charmgr = new CharacterManager(crepo);
|
||||
charmgr.setCharacterClass(MisoCharacterSprite.class);
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
//
|
||||
// $Id: BundledComponentRepositoryTest.java,v 1.2 2001/11/29 21:55:25 mdb Exp $
|
||||
// $Id: BundledComponentRepositoryTest.java,v 1.3 2001/11/30 02:35:37 mdb Exp $
|
||||
|
||||
package com.threerings.cast.bundle;
|
||||
|
||||
import java.util.Iterator;
|
||||
import com.samskivert.util.StringUtil;
|
||||
import com.threerings.resource.ResourceManager;
|
||||
import com.threerings.media.ImageManager;
|
||||
import com.threerings.cast.ComponentClass;
|
||||
|
||||
import junit.framework.Test;
|
||||
@@ -22,8 +23,9 @@ public class BundledComponentRepositoryTest extends TestCase
|
||||
{
|
||||
try {
|
||||
ResourceManager rmgr = new ResourceManager(null, "rsrc");
|
||||
ImageManager imgr = new ImageManager(rmgr);
|
||||
BundledComponentRepository repo =
|
||||
new BundledComponentRepository(rmgr, "components");
|
||||
new BundledComponentRepository(rmgr, imgr, "components");
|
||||
|
||||
System.out.println("Classes: " + StringUtil.toString(
|
||||
repo.enumerateComponentClasses()));
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
//
|
||||
// $Id: BundledTileSetRepositoryTest.java,v 1.2 2001/11/29 21:55:40 mdb Exp $
|
||||
// $Id: BundledTileSetRepositoryTest.java,v 1.3 2001/11/30 02:35:37 mdb Exp $
|
||||
|
||||
package com.threerings.media.tile.bundle;
|
||||
|
||||
import java.util.Iterator;
|
||||
import com.threerings.resource.ResourceManager;
|
||||
import com.threerings.media.ImageManager;
|
||||
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
@@ -20,8 +21,9 @@ public class BundledTileSetRepositoryTest extends TestCase
|
||||
{
|
||||
try {
|
||||
ResourceManager rmgr = new ResourceManager(null, "rsrc");
|
||||
ImageManager imgr = new ImageManager(rmgr);
|
||||
BundledTileSetRepository repo =
|
||||
new BundledTileSetRepository(rmgr, "tilesets");
|
||||
new BundledTileSetRepository(rmgr, imgr, "tilesets");
|
||||
Iterator sets = repo.enumerateTileSets();
|
||||
while (sets.hasNext()) {
|
||||
System.out.println(sets.next());
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ViewerApp.java,v 1.18 2001/11/29 20:31:53 mdb Exp $
|
||||
// $Id: ViewerApp.java,v 1.19 2001/11/30 02:35:37 mdb Exp $
|
||||
|
||||
package com.threerings.miso.viewer;
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.samskivert.swing.util.SwingUtil;
|
||||
import com.samskivert.util.Config;
|
||||
|
||||
import com.threerings.resource.ResourceManager;
|
||||
import com.threerings.media.ImageManager;
|
||||
|
||||
import com.threerings.media.sprite.SpriteManager;
|
||||
import com.threerings.media.tile.TileManager;
|
||||
@@ -43,10 +44,11 @@ public class ViewerApp
|
||||
|
||||
// we don't need to configure anything
|
||||
_config = new Config();
|
||||
_rsrcmgr = new ResourceManager(null, "rsrc");
|
||||
_tilemgr = new TileManager(_rsrcmgr);
|
||||
ResourceManager rmgr = new ResourceManager(null, "rsrc");
|
||||
ImageManager imgr = new ImageManager(rmgr);
|
||||
_tilemgr = new TileManager(imgr);
|
||||
_tilemgr.setTileSetRepository(
|
||||
new BundledTileSetRepository(_rsrcmgr, "tilesets"));
|
||||
new BundledTileSetRepository(rmgr, imgr, "tilesets"));
|
||||
|
||||
// bind our miso properties
|
||||
MisoUtil.bindProperties(_config);
|
||||
@@ -57,7 +59,7 @@ public class ViewerApp
|
||||
// create the various managers
|
||||
SpriteManager spritemgr = new SpriteManager();
|
||||
BundledComponentRepository crepo =
|
||||
new BundledComponentRepository(_rsrcmgr, "components");
|
||||
new BundledComponentRepository(rmgr, imgr, "components");
|
||||
CharacterManager charmgr = new CharacterManager(crepo);
|
||||
|
||||
// create and size the main application frame
|
||||
@@ -130,9 +132,6 @@ public class ViewerApp
|
||||
/** The config object. */
|
||||
protected Config _config;
|
||||
|
||||
/** The resource manager. */
|
||||
protected ResourceManager _rsrcmgr;
|
||||
|
||||
/** The tile manager object. */
|
||||
protected TileManager _tilemgr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user