Not to freak out if we have no scene.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@760 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: IsoSceneView.java,v 1.75 2001/11/29 23:35:37 mdb Exp $
|
// $Id: IsoSceneView.java,v 1.76 2001/12/12 19:53:11 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.miso.scene;
|
package com.threerings.miso.scene;
|
||||||
|
|
||||||
@@ -568,21 +568,23 @@ public class IsoSceneView implements SceneView
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add any objects impacted by the dirty rectangle
|
// add any objects impacted by the dirty rectangle
|
||||||
ObjectTileLayer tiles = _scene.getObjectLayer();
|
if (_scene != null) {
|
||||||
Iterator iter = _objpolys.keys();
|
ObjectTileLayer tiles = _scene.getObjectLayer();
|
||||||
while (iter.hasNext()) {
|
Iterator iter = _objpolys.keys();
|
||||||
// get the object's coordinates and bounding polygon
|
while (iter.hasNext()) {
|
||||||
int coord = ((Integer)iter.next()).intValue();
|
// get the object's coordinates and bounding polygon
|
||||||
Polygon poly = (Polygon)_objpolys.get(coord);
|
int coord = ((Integer)iter.next()).intValue();
|
||||||
|
Polygon poly = (Polygon)_objpolys.get(coord);
|
||||||
|
|
||||||
if (poly.intersects(r)) {
|
if (poly.intersects(r)) {
|
||||||
// get the dirty portion of the object
|
// get the dirty portion of the object
|
||||||
Rectangle drect = poly.getBounds().intersection(r);
|
Rectangle drect = poly.getBounds().intersection(r);
|
||||||
int tx = coord >> 16, ty = coord & 0x0000FFFF;
|
int tx = coord >> 16, ty = coord & 0x0000FFFF;
|
||||||
_dirtyItems.appendDirtyObject(
|
_dirtyItems.appendDirtyObject(
|
||||||
tiles.getTile(tx, ty), poly, tx, ty, drect);
|
tiles.getTile(tx, ty), poly, tx, ty, drect);
|
||||||
// Log.info("Dirtied item: Object(" + tx + ", " +
|
// Log.info("Dirtied item: Object(" + tx + ", " +
|
||||||
// ty + ")");
|
// ty + ")");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user