Tabs -> spaces
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@268 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
@@ -28,29 +28,29 @@ package com.threerings.miso;
|
||||
public class Log
|
||||
{
|
||||
public static com.samskivert.util.Log log =
|
||||
new com.samskivert.util.Log("miso");
|
||||
new com.samskivert.util.Log("miso");
|
||||
|
||||
/** Convenience function. */
|
||||
public static void debug (String message)
|
||||
{
|
||||
log.debug(message);
|
||||
log.debug(message);
|
||||
}
|
||||
|
||||
/** Convenience function. */
|
||||
public static void info (String message)
|
||||
{
|
||||
log.info(message);
|
||||
log.info(message);
|
||||
}
|
||||
|
||||
/** Convenience function. */
|
||||
public static void warning (String message)
|
||||
{
|
||||
log.warning(message);
|
||||
log.warning(message);
|
||||
}
|
||||
|
||||
/** Convenience function. */
|
||||
public static void logStackTrace (Throwable t)
|
||||
{
|
||||
log.logStackTrace(com.samskivert.util.Log.WARNING, t);
|
||||
log.logStackTrace(com.samskivert.util.Log.WARNING, t);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,17 +57,17 @@ public class TilePath extends LineSegmentPath
|
||||
public TilePath (MisoSceneMetrics metrics, Sprite sprite,
|
||||
List tiles, int destx, int desty)
|
||||
{
|
||||
// constrain destination pixels to fine coordinates
|
||||
Point fpos = new Point();
|
||||
MisoUtil.screenToFull(metrics, destx, desty, fpos);
|
||||
// constrain destination pixels to fine coordinates
|
||||
Point fpos = new Point();
|
||||
MisoUtil.screenToFull(metrics, destx, desty, fpos);
|
||||
|
||||
// add the starting path node
|
||||
int sx = sprite.getX(), sy = sprite.getY();
|
||||
Point ipos = MisoUtil.screenToTile(metrics, sx, sy, new Point());
|
||||
addNode(sx, sy, NORTH);
|
||||
|
||||
// TODO: make more visually appealing path segments from start to
|
||||
// second tile, and penultimate to ultimate tile
|
||||
// TODO: make more visually appealing path segments from start to
|
||||
// second tile, and penultimate to ultimate tile
|
||||
|
||||
// add all remaining path nodes excepting the last one
|
||||
Point prev = new Point(ipos.x, ipos.y);
|
||||
@@ -111,8 +111,8 @@ public class TilePath extends LineSegmentPath
|
||||
dir = MisoUtil.getIsoDirection(prev.x, prev.y, tdestx, tdesty);
|
||||
}
|
||||
|
||||
// add the final destination path node
|
||||
addNode(spos.x, spos.y, dir);
|
||||
// add the final destination path node
|
||||
addNode(spos.x, spos.y, dir);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -69,7 +69,7 @@ public class BaseTileSet extends SwissArmyTileSet
|
||||
protected void toString (StringBuilder buf)
|
||||
{
|
||||
super.toString(buf);
|
||||
buf.append(", passable=").append(StringUtil.toString(_passable));
|
||||
buf.append(", passable=").append(StringUtil.toString(_passable));
|
||||
}
|
||||
|
||||
/** Whether each tile is passable. */
|
||||
|
||||
@@ -86,16 +86,16 @@ public class MisoSceneMetrics
|
||||
slopeX = (float)tilehei / (float)tilewid;
|
||||
slopeY = -slopeX;
|
||||
|
||||
// calculate the edge length separating each fine coordinate
|
||||
finelen = tilelen / (float)finegran;
|
||||
// calculate the edge length separating each fine coordinate
|
||||
finelen = tilelen / (float)finegran;
|
||||
|
||||
// calculate the fine-coordinate x-axis line
|
||||
fineSlopeX = (float)tilehei / (float)tilewid;
|
||||
fineBX = -(fineSlopeX * (float)tilehwid);
|
||||
fineSlopeY = -fineSlopeX;
|
||||
// calculate the fine-coordinate x-axis line
|
||||
fineSlopeX = (float)tilehei / (float)tilewid;
|
||||
fineBX = -(fineSlopeX * (float)tilehwid);
|
||||
fineSlopeY = -fineSlopeX;
|
||||
|
||||
// calculate the fine coordinate dimensions
|
||||
finehwid = (int)((float)tilehwid / (float)finegran);
|
||||
finehhei = (int)((float)tilehhei / (float)finegran);
|
||||
// calculate the fine coordinate dimensions
|
||||
finehwid = (int)((float)tilehwid / (float)finegran);
|
||||
finehhei = (int)((float)tilehhei / (float)finegran);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user