More useful debugging information.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2605 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-05-23 19:35:11 +00:00
parent 328f4786ba
commit 3bacbbe803
3 changed files with 29 additions and 10 deletions
@@ -1,5 +1,5 @@
//
// $Id: SceneBlock.java,v 1.15 2003/05/12 02:03:31 mdb Exp $
// $Id: SceneBlock.java,v 1.16 2003/05/23 19:35:11 mdb Exp $
package com.threerings.miso.client;
@@ -52,6 +52,15 @@ public class SceneBlock
// the rest of our resolution will happen in resolve()
}
/**
* Makes a note that this block was considered to be visible at the
* time it was created. This is purely for debugging purposes.
*/
public void setVisiBlock (boolean visi)
{
_visi = visi;
}
/**
* This method is called by the {@link SceneBlockResolver} on the
* block resolution thread to allow us to load up our image data
@@ -337,7 +346,8 @@ public class SceneBlock
int by = MathUtil.floorDiv(_bounds.y, _bounds.height);
return StringUtil.coordsToString(bx, by) + ":" +
StringUtil.toString(_bounds) + ":" +
((_objects == null) ? 0 : _objects.length);
((_objects == null) ? 0 : _objects.length) +
(_visi ? ":v" : ":i");
}
/**
@@ -460,6 +470,9 @@ public class SceneBlock
/** Our neighbors in the eight cardinal directions. */
protected SceneBlock[] _neighbors = new SceneBlock[DX.length];
/** A debug flag indicating whether we were visible at creation. */
protected boolean _visi;
// used to link up to our neighbors
protected static final int[] DX = { -1, -1, 0, 1, 1, 1, 0, -1 };
protected static final int[] DY = { 0, -1, -1, -1, 0, 1, 1, 1 };