When two sprites occupy the same tile, their screen y coordinate is used
instead of their fine coordinates. It achieves the same effect and alleviates the need to track fine coordinates in the MisoCharacterSprite. Additionally, IsoSceneView and friends were modified to allow any sprites to wander their crooked realms, MisoCharacterSprite instances are simply more efficient because they maintain cached copies of their tile coordinates whereas other sprites must have their tile location computed from their screen location whenever they are to be repainted. At some point in the future, the tile coordinate tracking facilities of MisoCharacterSprite should be accessed through an interface so that other spritely entities can cache their tile coordinates if they so desire. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1560 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: TilePath.java,v 1.9 2002/06/22 00:59:02 ray Exp $
|
||||
// $Id: TilePath.java,v 1.10 2002/07/08 21:41:30 mdb Exp $
|
||||
|
||||
package com.threerings.miso.scene;
|
||||
|
||||
@@ -72,14 +72,6 @@ public class TilePath extends LineSegmentPath
|
||||
}
|
||||
}
|
||||
|
||||
// get the sprite's latest fine coordinates
|
||||
IsoUtil.tileToScreen(_model, mcs.getTileX(), mcs.getTileY(), pos);
|
||||
Point fpos = new Point();
|
||||
IsoUtil.pixelToFine(_model, sx - pos.x, sy - pos.y, fpos);
|
||||
|
||||
// inform the sprite
|
||||
mcs.setFineLocation(fpos.x, fpos.y);
|
||||
|
||||
// Log.info("Sprite moved [s=" + mcs + "].");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user