Repackage classes from com.threerings.cocktail.miso to

com.threerings.miso.  Moved ImageManager to com.threerings.media.
Removed unused StripImage.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@62 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2001-07-18 21:45:42 +00:00
parent 9abae9810b
commit c4654e2a11
22 changed files with 59 additions and 113 deletions
@@ -1,7 +1,7 @@
//
// $Id: ImageManager.java,v 1.5 2001/07/18 21:19:00 shaper Exp $
// $Id: ImageManager.java,v 1.1 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.media;
package com.threerings.media;
import com.threerings.cocktail.miso.Log;
+4 -4
View File
@@ -1,7 +1,7 @@
//
// $Id: Tile.java,v 1.3 2001/07/16 00:45:07 shaper Exp $
// $Id: Tile.java,v 1.4 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.tile;
package com.threerings.miso.tile;
import java.awt.Image;
import java.awt.image.BufferedImage;
@@ -31,7 +31,7 @@ public class Tile
* Construct a new tile with the specified identifiers. Intended
* only for use by the TileManager. Do not use this method.
*
* @see com.threerings.cocktail.miso.TileManager#getTile
* @see com.threerings.miso.TileManager#getTile
*/
public Tile (short tsid, short tid)
{
@@ -43,7 +43,7 @@ public class Tile
* Construct a new tile with the specified identifiers. Intended
* only for use by the TileManager. Do not use this method.
*
* @see com.threerings.cocktail.miso.TileManager#getTile
* @see com.threerings.miso.TileManager#getTile
*/
public Tile (int tsid, int tid)
{
@@ -1,9 +1,9 @@
//
// $Id: TileManager.java,v 1.5 2001/07/17 17:21:33 shaper Exp $
// $Id: TileManager.java,v 1.6 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.tile;
package com.threerings.miso.tile;
import com.threerings.cocktail.miso.Log;
import com.threerings.miso.Log;
import com.samskivert.util.ConfigUtil;
import com.samskivert.util.IntMap;
@@ -1,10 +1,10 @@
//
// $Id: TileSet.java,v 1.6 2001/07/17 17:21:33 shaper Exp $
// $Id: TileSet.java,v 1.7 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.tile;
package com.threerings.miso.tile;
import com.threerings.cocktail.miso.Log;
import com.threerings.cocktail.miso.media.ImageManager;
import com.threerings.miso.Log;
import com.threerings.media.ImageManager;
import java.awt.Image;
import java.awt.Graphics2D;
@@ -25,7 +25,7 @@ import java.awt.image.*;
* the tile at the top-left of the image is tile id 0 and tiles are
* numbered left to right, top to bottom, in ascending order.
*
* @see com.threerings.cocktail.miso.TileManager
* @see com.threerings.miso.TileManager
*/
public class TileSet
{
@@ -1,7 +1,7 @@
//
// $Id: TileSetManager.java,v 1.3 2001/07/17 17:21:33 shaper Exp $
// $Id: TileSetManager.java,v 1.4 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.tile;
package com.threerings.miso.tile;
import java.io.InputStream;
import java.io.IOException;
@@ -1,7 +1,7 @@
//
// $Id: TileSetManagerImpl.java,v 1.2 2001/07/17 17:21:33 shaper Exp $
// $Id: TileSetManagerImpl.java,v 1.3 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.tile;
package com.threerings.miso.tile;
import com.samskivert.util.IntMap;
@@ -1,7 +1,7 @@
//
// $Id: TileSetParser.java,v 1.1 2001/07/17 17:21:33 shaper Exp $
// $Id: TileSetParser.java,v 1.2 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.tile;
package com.threerings.miso.tile;
import java.io.InputStream;
import java.io.IOException;
@@ -1,9 +1,9 @@
//
// $Id: XMLTileSetParser.java,v 1.1 2001/07/17 17:21:33 shaper Exp $
// $Id: XMLTileSetParser.java,v 1.2 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.tile;
package com.threerings.miso.tile;
import com.threerings.cocktail.miso.Log;
import com.threerings.miso.Log;
import com.samskivert.util.StringUtil;
@@ -1,9 +1,9 @@
//
// $Id: MathUtil.java,v 1.1 2001/07/16 00:45:07 shaper Exp $
// $Id: MathUtil.java,v 1.2 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.util;
package com.threerings.miso.util;
import com.threerings.cocktail.miso.Log;
import com.threerings.miso.Log;
import java.awt.Point;
+2 -2
View File
@@ -1,7 +1,7 @@
//
// $Id: Log.java,v 1.1 2001/07/12 22:38:03 shaper Exp $
// $Id: Log.java,v 1.2 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso;
package com.threerings.miso;
/**
* A placeholder class that contains a reference to the log object used by
@@ -1,7 +1,7 @@
//
// $Id: CompiledSceneManager.java,v 1.2 2001/07/16 22:12:01 shaper Exp $
// $Id: CompiledSceneManager.java,v 1.3 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.scene;
package com.threerings.miso.scene;
public class CompiledSceneManager extends SceneManagerImpl
{
@@ -1,10 +1,10 @@
//
// $Id: DisplayMisoSceneImpl.java,v 1.5 2001/07/17 17:21:33 shaper Exp $
// $Id: DisplayMisoSceneImpl.java,v 1.6 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.scene;
package com.threerings.miso.scene;
import com.threerings.cocktail.miso.tile.Tile;
import com.threerings.cocktail.miso.tile.TileManager;
import com.threerings.miso.tile.Tile;
import com.threerings.miso.tile.TileManager;
import java.awt.Point;
import java.io.*;
@@ -1,7 +1,7 @@
//
// $Id: EditableSceneManager.java,v 1.2 2001/07/16 22:12:01 shaper Exp $
// $Id: EditableSceneManager.java,v 1.3 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.scene;
package com.threerings.miso.scene;
public class EditableSceneManager extends SceneManagerImpl
{
@@ -1,7 +1,7 @@
//
// $Id: ExitPoint.java,v 1.1 2001/07/12 22:38:03 shaper Exp $
// $Id: ExitPoint.java,v 1.2 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.scene;
package com.threerings.miso.scene;
/**
* Represents a point in a scene that leads to a different scene.
@@ -1,13 +1,13 @@
//
// $Id: IsoSceneView.java,v 1.5 2001/07/18 21:19:00 shaper Exp $
// $Id: IsoSceneView.java,v 1.6 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.scene;
package com.threerings.miso.scene;
import com.threerings.cocktail.miso.Log;
import com.threerings.cocktail.miso.media.ImageManager;
import com.threerings.cocktail.miso.tile.Tile;
import com.threerings.cocktail.miso.tile.TileManager;
import com.threerings.cocktail.miso.util.MathUtil;
import com.threerings.miso.Log;
import com.threerings.miso.tile.Tile;
import com.threerings.miso.tile.TileManager;
import com.threerings.miso.util.MathUtil;
import com.threerings.media.ImageManager;
import java.awt.*;
import java.awt.image.*;
@@ -1,7 +1,7 @@
//
// $Id: SceneManager.java,v 1.2 2001/07/16 22:12:01 shaper Exp $
// $Id: SceneManager.java,v 1.3 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.scene;
package com.threerings.miso.scene;
/**
* Manages the various scenes that are displayed during the game and
@@ -1,7 +1,7 @@
//
// $Id: SceneManagerImpl.java,v 1.2 2001/07/17 17:21:33 shaper Exp $
// $Id: SceneManagerImpl.java,v 1.3 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.scene;
package com.threerings.miso.scene;
public abstract class SceneManagerImpl implements SceneManager
{
@@ -1,9 +1,9 @@
//
// $Id: SceneView.java,v 1.3 2001/07/16 22:12:01 shaper Exp $
// $Id: SceneView.java,v 1.4 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.scene;
package com.threerings.miso.scene;
import com.threerings.cocktail.miso.tile.Tile;
import com.threerings.miso.tile.Tile;
import java.awt.Component;
import java.awt.Graphics;
@@ -1,54 +0,0 @@
//
// $Id: StripImage.java,v 1.1 2001/07/12 22:38:03 shaper Exp $
package com.threerings.cocktail.miso.media;
import java.awt.*;
import java.awt.image.*;
/**
* StripImage facilitates cutting an image up into individual frames.
*/
public class StripImage
{
public StripImage (Image img, int frameWidth, int frameHeight,
int framesPerRow, int numFrames)
{
_img = img;
_frameWidth = frameWidth;
_frameHeight = frameHeight;
_framesPerRow = framesPerRow;
_numFrames = numFrames;
}
public Image getFrame (int idx, ImageObserver obs)
{
int frameX = (idx % _framesPerRow) * _frameWidth;
int frameY = (idx / _framesPerRow) * _frameHeight;
CropImageFilter crop =
new CropImageFilter(frameX, frameY, _frameWidth, _frameHeight);
FilteredImageSource prod =
new FilteredImageSource(_img.getSource(), crop);
Image img = ImageManager.tk.createImage(prod);
ImageManager.tk.prepareImage(img, -1, -1, obs);
return img;
}
public Image[] getAllFrames (ImageObserver obs)
{
Image allImgs[] = new Image[_numFrames];
for (int ii = 0; ii < _numFrames; ii++) {
allImgs[ii] = getFrame(ii, obs);
}
return allImgs;
}
protected Image _img;
protected int _frameWidth, _frameHeight;
protected int _framesPerRow, _numFrames;
}
@@ -1,7 +1,7 @@
//
// $Id: CompiledTileSetManager.java,v 1.3 2001/07/17 17:21:33 shaper Exp $
// $Id: CompiledTileSetManager.java,v 1.4 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.tile;
package com.threerings.miso.tile;
import java.io.InputStream;
import java.io.IOException;
@@ -1,9 +1,9 @@
//
// $Id: EditableTileSetManager.java,v 1.3 2001/07/17 17:21:33 shaper Exp $
// $Id: EditableTileSetManager.java,v 1.4 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.tile;
package com.threerings.miso.tile;
import com.threerings.cocktail.miso.Log;
import com.threerings.miso.Log;
import java.io.IOException;
import java.io.InputStream;
@@ -1,7 +1,7 @@
//
// $Id: SwingUtil.java,v 1.1 2001/07/12 22:38:03 shaper Exp $
// $Id: SwingUtil.java,v 1.2 2001/07/18 21:45:42 shaper Exp $
package com.threerings.cocktail.miso.util;
package com.threerings.miso.util;
import java.awt.*;