diff --git a/src/java/com/threerings/media/sprite/AnimationManager.java b/src/java/com/threerings/media/sprite/AnimationManager.java index 6ed1b7960..2856d8bdf 100644 --- a/src/java/com/threerings/media/sprite/AnimationManager.java +++ b/src/java/com/threerings/media/sprite/AnimationManager.java @@ -1,5 +1,5 @@ // -// $Id: AnimationManager.java,v 1.3 2001/08/02 00:42:02 shaper Exp $ +// $Id: AnimationManager.java,v 1.4 2001/08/02 18:59:00 shaper Exp $ package com.threerings.miso.sprite; @@ -57,7 +57,7 @@ public class AnimationManager implements Interval, PerformanceObserver public void checkpoint (String name, int ticks) { - Log.info(name + "[ticks=" + ticks + "]."); + Log.info(name + " [ticks=" + ticks + "]."); } /** The desired number of refresh operations per second. */ diff --git a/src/java/com/threerings/media/sprite/Sprite.java b/src/java/com/threerings/media/sprite/Sprite.java index 491b1abe2..5a0cbf5e4 100644 --- a/src/java/com/threerings/media/sprite/Sprite.java +++ b/src/java/com/threerings/media/sprite/Sprite.java @@ -1,5 +1,5 @@ // -// $Id: Sprite.java,v 1.4 2001/08/02 00:42:02 shaper Exp $ +// $Id: Sprite.java,v 1.5 2001/08/02 18:59:00 shaper Exp $ package com.threerings.miso.sprite; @@ -59,6 +59,8 @@ public class Sprite this.x = x; this.y = y; + updateDrawPosition(); + _curFrame = 0; _animDelay = -1; _numTicks = 0; @@ -73,44 +75,26 @@ public class Sprite /** * Paint the sprite to the specified graphics context. + * + * @param gfx the graphics context. */ public void paint (Graphics2D gfx) { - int xpos = x - (_curTile.width / 2); - int ypos = y - _curTile.height; - gfx.drawImage(_curTile.img, xpos, ypos, null); -// Log.info("Sprite painting image [x=" + xpos + ", y=" + ypos + "]."); + gfx.drawImage(_curTile.img, _drawx, _drawy, null); +// Log.info("Sprite painting image [sprite=" + this + "]."); } /** - * Returns whether the sprite is inside the given rectangle in + * Returns whether the sprite is inside the given polygon in * pixel coordinates. * - * @param x the rectangle x coordinate. - * @param y the rectangle y coordinate. - * @param width the rectangle width. - * @param height the rectangle height. + * @param bounds the bounding polygon. * - * @return true if the sprite is inside the rectangle, false if not. + * @return whether the sprite is inside the polygon. */ - public boolean inside (int x, int y, int width, int height) + public boolean inside (Polygon bounds) { - // note that we consider the current tile for sprite - // width/height, and since the tile may change we're at the - // mercy of the tile creators to make sure all tiles for a - // given sprite are the same width. - - // we might want to check this when tiles are set for the - // sprite, or require that the sprite width/height be - // specified separately when the sprite is created. or - // perhaps we'd like to be able to have sprites with variable - // width? i can't think why. - - return (this.x >= x && this.x < (x + width) && - this.y >= y && this.y < (y + height)); - -// return (this.x >= x && this.x + _curTile.width < (x + width) && -// this.y >= y && this.y + _curTile.height < (y + height)); + return bounds.contains(this.x, this.y); } /** @@ -131,11 +115,12 @@ public class Sprite */ public void setTiles (Tile[] tiles) { + if (tiles == null) return; + _tiles = tiles; - if (_tiles != null) { - _curTile = _tiles[_curFrame]; - invalidate(); - } + _curTile = _tiles[_curFrame]; + updateDrawPosition(); + invalidate(); } /** @@ -215,14 +200,44 @@ public class Sprite // invalidate the sprite in its new location invalidate(); - // and note our stoppage + // note our stoppage _animDelay = -1; _state = STATE_NONE; } + + updateDrawPosition(); break; } } + /** + * Update the coordinates at which the sprite image is drawn to + * reflect the sprite's current position. + */ + protected void updateDrawPosition () + { + if (_curTile == null) { + _drawx = x; + _drawy = y; + return; + } + + _drawx = x - (_curTile.width / 2); + _drawy = y - _curTile.height; + } + + /** + * Return a string representation of the sprite. + */ + public String toString () + { + StringBuffer buf = new StringBuffer(); + buf.append("[x=").append(x); + buf.append(", y=").append(y); + buf.append(", curframe=").append(_curFrame); + return buf.append("]").toString(); + } + /** State constants. */ protected static final int STATE_NONE = 0; protected static final int STATE_MOVING = 1; @@ -236,19 +251,22 @@ public class Sprite /** The current tile index to render. */ protected int _curFrame; - /** The sprite's destination coordinates. */ - protected Point _dest; + /** The coordinates at which the tile image is drawn. */ + protected int _drawx, _drawy; /** The sprite's current state. */ protected int _state; - /** The sprite position with fractional pixels while moving. */ + /** When moving, the sprite's destination coordinates. */ + protected Point _dest; + + /** When moving, the sprite position including fractional pixels. */ protected float _movex, _movey; - /** The distance to move the sprite per tick in fractional pixels. */ + /** When moving, the distance to move per tick in fractional pixels. */ protected float _incx, _incy; - /** The number of ticks to wait before proceeding to the next tile. */ + /** The number of ticks to wait before rendering with the next tile. */ protected int _animDelay; /** The number of ticks since the last tile animation. */ diff --git a/src/java/com/threerings/media/sprite/SpriteManager.java b/src/java/com/threerings/media/sprite/SpriteManager.java index 87e8f7a49..a6f233205 100644 --- a/src/java/com/threerings/media/sprite/SpriteManager.java +++ b/src/java/com/threerings/media/sprite/SpriteManager.java @@ -1,10 +1,9 @@ // -// $Id: SpriteManager.java,v 1.4 2001/08/02 00:42:02 shaper Exp $ +// $Id: SpriteManager.java,v 1.5 2001/08/02 18:59:00 shaper Exp $ package com.threerings.miso.sprite; -import java.awt.Graphics2D; -import java.awt.Rectangle; +import java.awt.*; import java.util.ArrayList; import com.threerings.miso.Log; @@ -76,17 +75,13 @@ public class SpriteManager } /** - * Render the sprites residing within the specified pixel bounds - * to the given graphics context. + * Render the sprites residing within the given polygon to the + * given graphics context. * * @param gfx the graphics context. - * @param x the bounds x-position. - * @param y the bounds y-position. - * @param width the bounds width. - * @param height the bounds height. + * @param bounds the bounding polygon. */ - public void renderSprites ( - Graphics2D gfx, int x, int y, int width, int height) + public void renderSprites (Graphics2D gfx, Polygon bounds) { // TODO: optimize to store sprites based on quadrants they're // in (or somesuch), and sorted, so that we can more quickly @@ -95,7 +90,7 @@ public class SpriteManager int size = _sprites.size(); for (int ii = 0; ii < size; ii++) { Sprite sprite = (Sprite)_sprites.get(ii); - if (sprite.inside(x, y, width, height)) { + if (sprite.inside(bounds)) { sprite.paint(gfx); } } diff --git a/src/java/com/threerings/miso/client/DisplayMisoSceneImpl.java b/src/java/com/threerings/miso/client/DisplayMisoSceneImpl.java index f9bfdfbf3..5f1200b7c 100644 --- a/src/java/com/threerings/miso/client/DisplayMisoSceneImpl.java +++ b/src/java/com/threerings/miso/client/DisplayMisoSceneImpl.java @@ -1,5 +1,5 @@ // -// $Id: DisplayMisoSceneImpl.java,v 1.15 2001/08/02 01:19:47 shaper Exp $ +// $Id: DisplayMisoSceneImpl.java,v 1.16 2001/08/02 18:58:59 shaper Exp $ package com.threerings.miso.scene; @@ -31,10 +31,10 @@ public class Scene public static final short VERSION = 1; /** The scene width in tiles. */ - public static final int TILE_WIDTH = 55; + public static final int TILE_WIDTH = 22; /** The scene height in tiles. */ - public static final int TILE_HEIGHT = 55; + public static final int TILE_HEIGHT = 22; /** String translations of each tile layer name. */ public static final String[] XLATE_LAYERS = { "Base", "Object" }; diff --git a/src/java/com/threerings/miso/client/IsoSceneView.java b/src/java/com/threerings/miso/client/IsoSceneView.java index 0e440bcf8..e5c4cc0f4 100644 --- a/src/java/com/threerings/miso/client/IsoSceneView.java +++ b/src/java/com/threerings/miso/client/IsoSceneView.java @@ -1,5 +1,5 @@ // -// $Id: IsoSceneView.java,v 1.21 2001/08/02 05:08:23 shaper Exp $ +// $Id: IsoSceneView.java,v 1.22 2001/08/02 18:58:59 shaper Exp $ package com.threerings.miso.scene; @@ -80,32 +80,61 @@ public class IsoSceneView implements EditableSceneView */ protected void renderSceneInvalid (Graphics2D gfx) { - Point spos = new Point(); - Log.info("renderSceneInvalid."); int size = _dirty.size(); for (int ii = 0; ii < size; ii++) { + + // retrieve the next dirty tile coordinates int[] dinfo = (int[])_dirty.remove(0); + int tx = dinfo[0], ty = dinfo[1]; - tileToScreen(dinfo[0], dinfo[1], spos); + // draw all layers at this tile position + for (int kk = 0; kk < Scene.NUM_LAYERS; kk++) { - Log.info("renderSceneInvalid [tx=" + dinfo[0] + - ", ty=" + dinfo[1] + ", x=" + spos.x + - ", y=" + spos.y + "]."); + // get the tile's screen position + Polygon poly = getTilePolygon(tx, ty); - Tile tile = _scene.tiles[dinfo[0]][dinfo[1]][0]; - if (tile == null) continue; + // get the tile at these coordinates and layer + Tile tile = _scene.tiles[tx][ty][kk]; + if (tile == null) continue; - int ypos = spos.y - (tile.height - _model.tilehei); - gfx.drawImage(tile.img, spos.x, ypos, null); + // offset the image y-position by the tile-specific height + int ypos = poly.ypoints[0] - _model.tilehhei - + (tile.height - _model.tilehei); + + // draw the tile image + gfx.drawImage(tile.img, poly.xpoints[0], ypos, null); + } // draw all sprites residing in the current tile - _spritemgr.renderSprites( - gfx, spos.x, spos.y, _model.tilewid, _model.tilehei); + _spritemgr.renderSprites(gfx, getTilePolygon(tx, ty)); } } + /** + * Return a polygon framing the specified tile. + * + * @param x the tile x-position coordinate. + * @param y the tile y-position coordinate. + */ + protected Polygon getTilePolygon (int x, int y) + { + // get the top-left screen coordinate for the tile + Point spos = new Point(); + tileToScreen(x, y, spos); + + // create a polygon framing the tile + Polygon poly = new Polygon(); + poly.addPoint(spos.x, spos.y + _model.tilehhei); + poly.addPoint(spos.x + _model.tilehwid, spos.y); + poly.addPoint(spos.x + _model.tilewid, spos.y + _model.tilehhei); + poly.addPoint(spos.x + _model.tilehwid, spos.y + _model.tilehei); + poly.addPoint(spos.x, spos.y + _model.tilehhei); + + return poly; + } + /** * Render the scene to the given graphics context. * @@ -142,12 +171,11 @@ public class IsoSceneView implements EditableSceneView // draw the tile image at the appropriate screen position gfx.drawImage(tile.img, screenX, ypos, null); - } - // draw all sprites residing in the current line of tiles - _spritemgr.renderSprites( - gfx, screenX, screenY, (length * _model.tilewid), - _model.tilehei); + // draw all sprites residing in the current tile + // TODO: simplify other tile positioning here to use poly + _spritemgr.renderSprites(gfx, getTilePolygon(tx, ty)); + } // draw tile coordinates in each tile if (_model.showCoords) { @@ -226,8 +254,7 @@ public class IsoSceneView implements EditableSceneView } /** - * Paint a highlight around the tile at screen pixel coordinates - * (sx, sy). + * Paint a highlight around the specified tile. * * @param gfx the graphics context. * @param x the tile x-position coordinate. @@ -235,35 +262,18 @@ public class IsoSceneView implements EditableSceneView */ protected void paintHighlightedTile (Graphics2D gfx, int x, int y) { - Point spos = new Point(); - tileToScreen(x, y, spos); - // set the desired stroke and color Stroke ostroke = gfx.getStroke(); gfx.setStroke(HLT_STROKE); gfx.setColor(HLT_COLOR); // draw the tile outline - gfx.drawLine(spos.x, spos.y + _model.tilehhei, - spos.x + _model.tilehwid, spos.y); - gfx.drawLine(spos.x + _model.tilehwid, spos.y, - spos.x + _model.tilewid, spos.y + _model.tilehhei); - gfx.drawLine(spos.x + _model.tilewid, spos.y + _model.tilehhei, - spos.x + _model.tilehwid, spos.y + _model.tilehei); - gfx.drawLine(spos.x + _model.tilehwid, spos.y + _model.tilehei, - spos.x, spos.y + _model.tilehhei); + gfx.draw(getTilePolygon(x, y)); // restore the original stroke gfx.setStroke(ostroke); } - /** - * Highlight the tile at the specified pixel coordinates the next - * time the scene is re-rendered. - * - * @param sx the screen x-position pixel coordinate. - * @param sy the screen y-position pixel coordinate. - */ public void setHighlightedTile (int sx, int sy) { screenToTile(sx, sy, _htile); diff --git a/src/java/com/threerings/miso/tools/xml/XMLSceneRepository.java b/src/java/com/threerings/miso/tools/xml/XMLSceneRepository.java index 342b88afd..f4cde1cf2 100644 --- a/src/java/com/threerings/miso/tools/xml/XMLSceneRepository.java +++ b/src/java/com/threerings/miso/tools/xml/XMLSceneRepository.java @@ -1,5 +1,5 @@ // -// $Id: XMLSceneRepository.java,v 1.3 2001/07/24 22:52:02 shaper Exp $ +// $Id: XMLSceneRepository.java,v 1.4 2001/08/02 18:59:00 shaper Exp $ package com.threerings.miso.scene.xml; @@ -30,7 +30,7 @@ public class XMLFileSceneRepository extends SceneRepositoryImpl public void init (Config config, TileManager tilemgr) { super.init(config, tilemgr); - _root = _config.getValue(CONFIG_ROOT, DEF_ROOT); + _root = _config.getValue(CFG_ROOT, DEF_ROOT); _parser = new XMLSceneParser(_tilemgr); _writer = new XMLSceneWriter(); } @@ -60,7 +60,7 @@ public class XMLFileSceneRepository extends SceneRepositoryImpl } /** The config key for the root scene directory. */ - protected static final String CONFIG_ROOT = "miso.sceneroot"; + protected static final String CFG_ROOT = "miso.sceneroot"; /** The default root scene directory path. */ protected static final String DEF_ROOT = "rsrc/scenes"; diff --git a/tests/rsrc/scenes/default.xml b/tests/rsrc/scenes/default.xml index 03c58af8f..e50c5578c 100644 --- a/tests/rsrc/scenes/default.xml +++ b/tests/rsrc/scenes/default.xml @@ -7,66 +7,30 @@ - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,7,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,14,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,14,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,14,1000,14,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,14,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,14,1000,14,1000,14,1000,1,1000,14,1000,12,1000,12,1000,12,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,7,1000,7,1000,1,1000,1,1000,14,1000,14,1000,1,1000,14,1000,14,1000,14,1000,12,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,7,1000,7,1000,14,1000,1,1000,1,1000,14,1000,14,1000,14,1000,14,1000,14,1000,14,1000,14,1000,3,1000,7,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,14,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,14,1000,1,1000,1,1000,7,1000,14,1000,1,1000,1,1000,14,1000,1,1000,1,1000,1,1000,3,1000,14,1000,3,1000,3,1000,7,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,14,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,7,1000,14,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,7,1000,3,1000,3,1000,7,1000,7,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,14,1000,14,1000,1,1000,14,1000,14,1000,14,1000,14,1000,1,1000,1,1000,1,1000,1,1000,14,1000,14,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,7,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,14,1000,14,1000,14,1000,1,1000,14,1000,14,1000,14,1000,14,1000,12,1000,12,1000,1,1000,1,1000,1,1000,14,1000,14,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,14,1000,14,1000,14,1000,14,1000,14,1000,14,1000,14,1000,14,1000,12,1000,1,1000,1,1000,1,1000,1,1000,1,1000,12,1000,1,1000,12,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,14,1000,14,1000,14,1000,14,1000,14,1000,14,1000,14,1000,14,1000,14,1000,14,1000,14,1000,14,1000,14,1000,12,1000,12,1000,1,1000,1,1000,3,1000,3,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,14,1000,14,1000,14,1000,12,1000,12,1000,12,1000,12,1000,12,1000,3,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,12,1000,3,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,12,1000,3,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,3,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - 1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1,1000,1 - - - 1001,5,1001,5 - 1001,2 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,8,1004,6,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,8,1004,6,1004,6,1004,6,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,6,1004,6,1004,10,1004,8,1004,3,1004,6,1004,6,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,6,1004,6,1004,10,1004,8,1004,3,1004,6,1004,6,1004,6,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,6,1004,10,1004,8,1004,3,1004,6,1004,6,1004,6,1004,6,1004,6,1004,6,1004,6,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,8,1004,6,1004,12,1004,12,1004,12,1004,12,1004,12,1004,12,1004,12,1004,6,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,8,1004,3,1004,6,1004,6,1004,6,1004,12,1004,11,1004,13,1004,12,1004,6,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,8,1004,6,1004,6,1004,6,1004,6,1004,6,1004,3,1004,12,1004,11,1004,13,1004,12,1004,6,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,8,1004,6,1004,6,1004,6,1004,6,1004,10,1004,8,1004,6,1004,3,1004,6,1004,6,1004,6,1004,6,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,9,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,8,1004,3,1004,6,1004,6,1004,6,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,8,1004,3,1004,6,1004,6,1004,6,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,8,1004,6,1004,6,1004,6,1004,6,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + 1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10,1004,10 + diff --git a/tests/src/java/com/threerings/miso/viewer/SceneViewPanel.java b/tests/src/java/com/threerings/miso/viewer/SceneViewPanel.java index 5c4bf596a..4d45af2db 100644 --- a/tests/src/java/com/threerings/miso/viewer/SceneViewPanel.java +++ b/tests/src/java/com/threerings/miso/viewer/SceneViewPanel.java @@ -1,5 +1,5 @@ // -// $Id: SceneViewPanel.java,v 1.5 2001/08/02 00:42:02 shaper Exp $ +// $Id: SceneViewPanel.java,v 1.6 2001/08/02 18:59:00 shaper Exp $ package com.threerings.miso.viewer; @@ -35,8 +35,12 @@ public class SceneViewPanel extends JPanel _sprite = sprite; // construct the view object - _view = new IsoSceneView(_ctx.getTileManager(), spritemgr, - new IsoSceneModel()); + IsoSceneModel smodel = new IsoSceneModel(); + smodel.setTileDimensions(64, 48); + smodel.setBounds((10 * 64), (12 * 48)); + smodel.setOrigin(320, -(5 * 48)); + + _view = new IsoSceneView(_ctx.getTileManager(), spritemgr, smodel); // create an animation manager for this panel AnimationManager animmgr = @@ -65,7 +69,7 @@ public class SceneViewPanel extends JPanel // get the starting scene filename Config config = _ctx.getConfig(); - String fname = config.getValue(CONF_SCENE, (String)DEF_SCENE); + String fname = config.getValue(CFG_SCENE, DEF_SCENE); try { // load and set up the scene @@ -104,7 +108,7 @@ public class SceneViewPanel extends JPanel public void checkpoint (String name, int ticks) { - Log.info(name + "[ticks=" + ticks + "]."); + Log.info(name + " [ticks=" + ticks + "]."); } /** MouseListener interface methods */ @@ -139,7 +143,7 @@ public class SceneViewPanel extends JPanel } /** The config key to obtain the default scene filename. */ - protected static final String CONF_SCENE = "miso-viewer.default_scene"; + protected static final String CFG_SCENE = "miso-viewer.default_scene"; /** The default scene to load and display. */ protected static final String DEF_SCENE = "rsrc/scenes/default.xml";