Updated to reflect some narya repackaging; took out custom image loader
because the media services now provide access to unprepared images. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1073 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: TileGeometryTest.java,v 1.6 2002/12/12 05:51:53 mdb Exp $
|
// $Id: TileGeometryTest.java,v 1.7 2003/03/23 02:22:51 mdb Exp $
|
||||||
|
|
||||||
package com.samskivert.atlanti;
|
package com.samskivert.atlanti;
|
||||||
|
|
||||||
@@ -12,9 +12,9 @@ import javax.swing.JPanel;
|
|||||||
|
|
||||||
import com.samskivert.swing.util.SwingUtil;
|
import com.samskivert.swing.util.SwingUtil;
|
||||||
|
|
||||||
import com.threerings.resource.ResourceManager;
|
import com.threerings.media.image.ImageManager;
|
||||||
import com.threerings.media.ImageManager;
|
|
||||||
import com.threerings.media.tile.TileManager;
|
import com.threerings.media.tile.TileManager;
|
||||||
|
import com.threerings.resource.ResourceManager;
|
||||||
|
|
||||||
import com.samskivert.atlanti.data.AtlantiTile;
|
import com.samskivert.atlanti.data.AtlantiTile;
|
||||||
import com.samskivert.atlanti.data.TileCodes;
|
import com.samskivert.atlanti.data.TileCodes;
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ import com.samskivert.swing.ControllerProvider;
|
|||||||
import com.samskivert.swing.HGroupLayout;
|
import com.samskivert.swing.HGroupLayout;
|
||||||
import com.samskivert.swing.VGroupLayout;
|
import com.samskivert.swing.VGroupLayout;
|
||||||
|
|
||||||
import com.threerings.resource.ResourceManager;
|
import com.threerings.media.image.ImageManager;
|
||||||
import com.threerings.media.ImageManager;
|
|
||||||
import com.threerings.media.tile.TileManager;
|
import com.threerings.media.tile.TileManager;
|
||||||
|
import com.threerings.resource.ResourceManager;
|
||||||
|
|
||||||
import com.threerings.crowd.data.PlaceObject;
|
import com.threerings.crowd.data.PlaceObject;
|
||||||
import com.threerings.crowd.client.PlaceView;
|
import com.threerings.crowd.client.PlaceView;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: AtlantiObject.java,v 1.9 2002/12/12 05:51:54 mdb Exp $
|
// $Id: AtlantiObject.java,v 1.10 2003/03/23 02:22:51 mdb Exp $
|
||||||
|
|
||||||
package com.samskivert.atlanti.data;
|
package com.samskivert.atlanti.data;
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ public class AtlantiObject extends GameObject
|
|||||||
* the <code>tiles</code> set. The set will not change until the
|
* the <code>tiles</code> set. The set will not change until the
|
||||||
* event is actually propagated through the system.
|
* event is actually propagated through the system.
|
||||||
*/
|
*/
|
||||||
public void removeFromTiles (Object key)
|
public void removeFromTiles (Comparable key)
|
||||||
{
|
{
|
||||||
requestEntryRemove(TILES, key);
|
requestEntryRemove(TILES, key);
|
||||||
}
|
}
|
||||||
@@ -154,7 +154,7 @@ public class AtlantiObject extends GameObject
|
|||||||
* the <code>piecens</code> set. The set will not change until the
|
* the <code>piecens</code> set. The set will not change until the
|
||||||
* event is actually propagated through the system.
|
* event is actually propagated through the system.
|
||||||
*/
|
*/
|
||||||
public void removeFromPiecens (Object key)
|
public void removeFromPiecens (Comparable key)
|
||||||
{
|
{
|
||||||
requestEntryRemove(PIECENS, key);
|
requestEntryRemove(PIECENS, key);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: AtlantiTile.java,v 1.16 2002/12/12 19:53:55 mdb Exp $
|
// $Id: AtlantiTile.java,v 1.17 2003/03/23 02:22:51 mdb Exp $
|
||||||
|
|
||||||
package com.samskivert.atlanti.data;
|
package com.samskivert.atlanti.data;
|
||||||
|
|
||||||
@@ -19,8 +19,7 @@ import java.util.List;
|
|||||||
import com.samskivert.util.IntTuple;
|
import com.samskivert.util.IntTuple;
|
||||||
import com.samskivert.util.StringUtil;
|
import com.samskivert.util.StringUtil;
|
||||||
|
|
||||||
import com.threerings.media.ImageManager;
|
import com.threerings.media.image.ImageManager;
|
||||||
import com.threerings.media.tile.ImageProvider;
|
|
||||||
import com.threerings.media.tile.Tile;
|
import com.threerings.media.tile.Tile;
|
||||||
import com.threerings.media.tile.TileManager;
|
import com.threerings.media.tile.TileManager;
|
||||||
import com.threerings.media.tile.UniformTileSet;
|
import com.threerings.media.tile.UniformTileSet;
|
||||||
@@ -467,7 +466,6 @@ public class AtlantiTile
|
|||||||
if (_tset == null) {
|
if (_tset == null) {
|
||||||
_tset = _tmgr.loadTileSet(TILES_IMG_PATH, TILE_TYPES,
|
_tset = _tmgr.loadTileSet(TILES_IMG_PATH, TILE_TYPES,
|
||||||
TILE_WIDTH, TILE_HEIGHT);
|
TILE_WIDTH, TILE_HEIGHT);
|
||||||
_tset.setImageProvider(_imgprov);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// fetch the tile
|
// fetch the tile
|
||||||
@@ -483,7 +481,6 @@ public class AtlantiTile
|
|||||||
if (_stset == null) {
|
if (_stset == null) {
|
||||||
_stset = _tmgr.loadTileSet(SHIELD_IMG_PATH, 1,
|
_stset = _tmgr.loadTileSet(SHIELD_IMG_PATH, 1,
|
||||||
SHIELD_SIZE, SHIELD_SIZE);
|
SHIELD_SIZE, SHIELD_SIZE);
|
||||||
_stset.setImageProvider(_imgprov);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// fetch the tile
|
// fetch the tile
|
||||||
@@ -499,17 +496,6 @@ public class AtlantiTile
|
|||||||
/** Our tile manager. */
|
/** Our tile manager. */
|
||||||
protected static TileManager _tmgr;
|
protected static TileManager _tmgr;
|
||||||
|
|
||||||
/** Used to load tile images. The default image provider (the tile
|
|
||||||
* manager) optimizes the images for display on the screen which seems
|
|
||||||
* to fuck Java's ability to apply rotational transforms to the image
|
|
||||||
* prior to rendering. Yay! */
|
|
||||||
protected static ImageProvider _imgprov = new ImageProvider() {
|
|
||||||
public Image loadImage (String path)
|
|
||||||
throws IOException {
|
|
||||||
return _imgr.loadImage(path);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Our tile image tileset. */
|
/** Our tile image tileset. */
|
||||||
protected static UniformTileSet _tset;
|
protected static UniformTileSet _tset;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: PiecenUtil.java,v 1.3 2002/12/12 05:51:54 mdb Exp $
|
// $Id: PiecenUtil.java,v 1.4 2003/03/23 02:22:51 mdb Exp $
|
||||||
|
|
||||||
package com.samskivert.atlanti.util;
|
package com.samskivert.atlanti.util;
|
||||||
|
|
||||||
@@ -16,15 +16,8 @@ public class PiecenUtil
|
|||||||
*/
|
*/
|
||||||
public static void init (TileManager tmgr)
|
public static void init (TileManager tmgr)
|
||||||
{
|
{
|
||||||
// load up the piecen tiles
|
UniformTileSet piecenSet = tmgr.loadTileSet(
|
||||||
UniformTileSet piecenSet = new UniformTileSet();
|
PIECEN_IMG_PATH, PIECEN_TYPES, PIECEN_WIDTH, PIECEN_HEIGHT);
|
||||||
piecenSet.setTileCount(PIECEN_TYPES);
|
|
||||||
piecenSet.setWidth(PIECEN_WIDTH);
|
|
||||||
piecenSet.setHeight(PIECEN_HEIGHT);
|
|
||||||
piecenSet.setImagePath(PIECEN_IMG_PATH);
|
|
||||||
piecenSet.setImageProvider(tmgr);
|
|
||||||
|
|
||||||
// fetch the tile images
|
|
||||||
_images = new Image[PIECEN_TYPES];
|
_images = new Image[PIECEN_TYPES];
|
||||||
for (int i = 0; i < PIECEN_TYPES; i++) {
|
for (int i = 0; i < PIECEN_TYPES; i++) {
|
||||||
_images[i] = piecenSet.getTileImage(i);
|
_images[i] = piecenSet.getTileImage(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user