git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@917 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Dave Hoover
2010-05-14 18:57:51 +00:00
parent 209fbfceaf
commit 251da6cb22
2 changed files with 11 additions and 18 deletions
@@ -113,7 +113,7 @@ public class MetaMediaManager
{ {
// sanity check // sanity check
if ((paused && (_pauseTime != 0)) || (!paused && (_pauseTime == 0))) { if ((paused && (_pauseTime != 0)) || (!paused && (_pauseTime == 0))) {
log.warning("Requested to pause when paused or vice-versa [paused=" + paused + "]."); log.warning("Requested to pause when paused or vice-versa", "paused", paused);
return; return;
} }
@@ -95,7 +95,7 @@ public class DirtyItemList
int size = size(); int size = size();
if (DEBUG_SORT) { if (DEBUG_SORT) {
log.info("Sorting dirty item list [size=" + size + "]."); log.info("Sorting dirty item list", "size", size);
} }
// if we've only got one item, we need to do no sorting // if we've only got one item, we need to do no sorting
@@ -104,24 +104,21 @@ public class DirtyItemList
_xitems.addAll(_items); _xitems.addAll(_items);
_xitems.sort(ORIGIN_X_COMP); _xitems.sort(ORIGIN_X_COMP);
if (DEBUG_SORT) { if (DEBUG_SORT) {
log.info("Sorted by x-origin " + log.info("Sorted by x-origin", "items", toString(_xitems));
"[items=" + toString(_xitems) + "].");
} }
// get items sorted by increasing origin y-coordinate // get items sorted by increasing origin y-coordinate
_yitems.addAll(_items); _yitems.addAll(_items);
_yitems.sort(ORIGIN_Y_COMP); _yitems.sort(ORIGIN_Y_COMP);
if (DEBUG_SORT) { if (DEBUG_SORT) {
log.info("Sorted by y-origin " + log.info("Sorted by y-origin", "items", toString(_yitems));
"[items=" + toString(_yitems) + "].");
} }
// sort the items according to the depth of the rear-most tile // sort the items according to the depth of the rear-most tile
_ditems.addAll(_items); _ditems.addAll(_items);
_ditems.sort(REAR_DEPTH_COMP); _ditems.sort(REAR_DEPTH_COMP);
if (DEBUG_SORT) { if (DEBUG_SORT) {
log.info("Sorted by rear-depth " + log.info("Sorted by rear-depth", "items", toString(_ditems));
"[items=" + toString(_ditems) + "].");
} }
// now insertion sort the items from back to front into the // now insertion sort the items from back to front into the
@@ -151,12 +148,12 @@ public class DirtyItemList
} }
if (DEBUG_SORT) { if (DEBUG_SORT) {
log.info("Sorted for render [items=" + toString(_items) + "]."); log.info("Sorted for render", "items", toString(_items));
for (int ii = 0, ll = _items.size()-1; ii < ll; ii++) { for (int ii = 0, ll = _items.size()-1; ii < ll; ii++) {
DirtyItem a = _items.get(ii); DirtyItem a = _items.get(ii);
DirtyItem b = _items.get(ii+1); DirtyItem b = _items.get(ii+1);
if (_rcomp.compare(a, b) > 0) { if (_rcomp.compare(a, b) > 0) {
log.warning("Invalid ordering [a=" + a + ", b=" + b + "]."); log.warning("Invalid ordering", "a", a, "b", b);
} }
} }
} }
@@ -445,8 +442,7 @@ public class DirtyItemList
int result = soa.getPriority() - sob.getPriority(); int result = soa.getPriority() - sob.getPriority();
if (DEBUG_COMPARE) { if (DEBUG_COMPARE) {
String items = DirtyItemList.toString(da, db); String items = DirtyItemList.toString(da, db);
log.info("compare: overlapping [result=" + result + log.info("compare: overlapping", "result", result, "items", items);
", items=" + items + "].");
} }
return result; return result;
} }
@@ -457,8 +453,7 @@ public class DirtyItemList
if (result != 0) { if (result != 0) {
if (DEBUG_COMPARE) { if (DEBUG_COMPARE) {
String items = DirtyItemList.toString(da, db); String items = DirtyItemList.toString(da, db);
log.info("compare: Y-partitioned " + log.info("compare: Y-partitioned", "result", result, "items", items);
"[result=" + result + ", items=" + items + "].");
} }
return result; return result;
} }
@@ -468,8 +463,7 @@ public class DirtyItemList
if (result != 0) { if (result != 0) {
if (DEBUG_COMPARE) { if (DEBUG_COMPARE) {
String items = DirtyItemList.toString(da, db); String items = DirtyItemList.toString(da, db);
log.info("compare: X-partitioned " + log.info("compare: X-partitioned", "result", result, "items", items);
"[result=" + result + ", items=" + items + "].");
} }
return result; return result;
} }
@@ -478,8 +472,7 @@ public class DirtyItemList
result = compareNonPartitioned(da, db); result = compareNonPartitioned(da, db);
if (DEBUG_COMPARE) { if (DEBUG_COMPARE) {
String items = DirtyItemList.toString(da, db); String items = DirtyItemList.toString(da, db);
log.info("compare: non-partitioned " + log.info("compare: non-partitioned", "result", result, "items", items);
"[result=" + result + ", items=" + items + "].");
} }
return result; return result;