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:
Michael Bayne
2001-12-12 19:53:11 +00:00
parent 563100559f
commit 54b02ad1ff
@@ -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;
@@ -568,21 +568,23 @@ public class IsoSceneView implements SceneView
}
// add any objects impacted by the dirty rectangle
ObjectTileLayer tiles = _scene.getObjectLayer();
Iterator iter = _objpolys.keys();
while (iter.hasNext()) {
// get the object's coordinates and bounding polygon
int coord = ((Integer)iter.next()).intValue();
Polygon poly = (Polygon)_objpolys.get(coord);
if (_scene != null) {
ObjectTileLayer tiles = _scene.getObjectLayer();
Iterator iter = _objpolys.keys();
while (iter.hasNext()) {
// get the object's coordinates and bounding polygon
int coord = ((Integer)iter.next()).intValue();
Polygon poly = (Polygon)_objpolys.get(coord);
if (poly.intersects(r)) {
// get the dirty portion of the object
Rectangle drect = poly.getBounds().intersection(r);
int tx = coord >> 16, ty = coord & 0x0000FFFF;
_dirtyItems.appendDirtyObject(
tiles.getTile(tx, ty), poly, tx, ty, drect);
// Log.info("Dirtied item: Object(" + tx + ", " +
// ty + ")");
if (poly.intersects(r)) {
// get the dirty portion of the object
Rectangle drect = poly.getBounds().intersection(r);
int tx = coord >> 16, ty = coord & 0x0000FFFF;
_dirtyItems.appendDirtyObject(
tiles.getTile(tx, ty), poly, tx, ty, drect);
// Log.info("Dirtied item: Object(" + tx + ", " +
// ty + ")");
}
}
}
}