This can handle any type of tileset it can get base sizes out of.
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@947 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -34,6 +34,7 @@ import com.samskivert.util.SortableArrayList;
|
|||||||
import com.threerings.util.DirectionCodes;
|
import com.threerings.util.DirectionCodes;
|
||||||
import com.threerings.util.DirectionUtil;
|
import com.threerings.util.DirectionUtil;
|
||||||
|
|
||||||
|
import com.threerings.media.tile.BaseSizableTileSet;
|
||||||
import com.threerings.media.tile.TileManager;
|
import com.threerings.media.tile.TileManager;
|
||||||
import com.threerings.media.tile.TileUtil;
|
import com.threerings.media.tile.TileUtil;
|
||||||
import com.threerings.media.tile.TrimmedObjectTileSet;
|
import com.threerings.media.tile.TrimmedObjectTileSet;
|
||||||
@@ -149,8 +150,7 @@ public class StageSceneUtil
|
|||||||
return new StageLocation(opos.x, opos.y, (byte)orient);
|
return new StageLocation(opos.x, opos.y, (byte)orient);
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warning("Unable to look up object tile for scene object " +
|
log.warning("Unable to look up object tile for scene object", "tileId", tileId, e);
|
||||||
"[tileId=" + tileId + ", error=" + e + "].");
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -201,8 +201,7 @@ public class StageSceneUtil
|
|||||||
try {
|
try {
|
||||||
int tsid = TileUtil.getTileSetId(tileId);
|
int tsid = TileUtil.getTileSetId(tileId);
|
||||||
int tidx = TileUtil.getTileIndex(tileId);
|
int tidx = TileUtil.getTileIndex(tileId);
|
||||||
TrimmedObjectTileSet tset = (TrimmedObjectTileSet)
|
BaseSizableTileSet tset = (BaseSizableTileSet)tilemgr.getTileSet(tsid);
|
||||||
tilemgr.getTileSet(tsid);
|
|
||||||
if (tset == null) {
|
if (tset == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -213,8 +212,7 @@ public class StageSceneUtil
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warning("Unable to look up object tile for scene object " +
|
log.warning("Unable to look up object tile for scene object", "tileId", tileId, e);
|
||||||
"[tileId=" + tileId + ", error=" + e + "].");
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -237,8 +235,7 @@ public class StageSceneUtil
|
|||||||
return tset.getPassability()[tidx];
|
return tset.getPassability()[tidx];
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warning("Unable to look up base tile [tileId=" + tileId +
|
log.warning("Unable to look up base tile", "tileId", tileId, e);
|
||||||
", error=" + e + "].");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user