Made note of and implemented clearing of fringes when a base tile is set.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2287 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: SimpleDisplayMisoSceneImpl.java,v 1.1 2003/02/12 07:21:15 mdb Exp $
|
// $Id: SimpleDisplayMisoSceneImpl.java,v 1.2 2003/02/20 00:40:13 ray Exp $
|
||||||
|
|
||||||
package com.threerings.miso.client;
|
package com.threerings.miso.client;
|
||||||
|
|
||||||
@@ -74,6 +74,16 @@ public class SimpleDisplayMisoSceneImpl extends SimpleMisoSceneImpl
|
|||||||
{
|
{
|
||||||
super.setBaseTile(fqTileId, x, y);
|
super.setBaseTile(fqTileId, x, y);
|
||||||
populateBaseTile(fqTileId, x, y);
|
populateBaseTile(fqTileId, x, y);
|
||||||
|
|
||||||
|
// setting a base tile has the side-effect of clearing out the
|
||||||
|
// surrounding fringe tiles.
|
||||||
|
for (int xx=Math.max(x - 1, 0),
|
||||||
|
xn=Math.min(x + 1, _model.width - 1); xx <= xn; xx++) {
|
||||||
|
for (int yy=Math.max(y - 1, 0),
|
||||||
|
yn=Math.min(y + 1, _model.height - 1); yy <= yn; yy++) {
|
||||||
|
_fringe[yy * _model.width + xx] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// documentation inherited from interface
|
// documentation inherited from interface
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: MisoScene.java,v 1.1 2003/02/12 05:39:15 mdb Exp $
|
// $Id: MisoScene.java,v 1.2 2003/02/20 00:40:13 ray Exp $
|
||||||
|
|
||||||
package com.threerings.miso.data;
|
package com.threerings.miso.data;
|
||||||
|
|
||||||
@@ -32,6 +32,11 @@ public interface MisoScene
|
|||||||
* TileUtil#getFQTileId}) of the tile to set.
|
* TileUtil#getFQTileId}) of the tile to set.
|
||||||
* @param x the x-coordinate of the tile to set.
|
* @param x the x-coordinate of the tile to set.
|
||||||
* @param y the y-coordinate of the tile to set.
|
* @param y the y-coordinate of the tile to set.
|
||||||
|
*
|
||||||
|
* Note that if there are fringe tiles associated with this scene,
|
||||||
|
* calling this method may result in the surrounding fringe tiles being
|
||||||
|
* cleared and subsequently recalculated. This should not be called
|
||||||
|
* on a displaying scene unless you know what you are doing.
|
||||||
*/
|
*/
|
||||||
public void setBaseTile (int fqTileId, int x, int y);
|
public void setBaseTile (int fqTileId, int x, int y);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user