Skip to content
Permalink
Browse files

Animation box will update when initially loading COF

Animation box will update when initially loading COF
Debug drawing animation will display origin
Created issue #71
  • Loading branch information
collinsmith committed Dec 4, 2019
1 parent ebe6d60 commit 6fed567f387b49676d3a61d8b19289a98eb52646
Showing with 15 additions and 17 deletions.
  1. +14 −17 core/src/com/riiablo/codec/Animation.java
  2. +1 −0 mpqviewer/src/com/riiablo/mpq/MPQViewer.java
@@ -382,12 +382,12 @@ public void drawDebug(ShapeRenderer shapes, float x, float y) {
shapes.set(ShapeRenderer.ShapeType.Line);
}

//shapes.setColor(Color.RED);
//shapes.line(x, y, x + 50, y);
//shapes.setColor(Color.GREEN);
//shapes.line(x, y, x, y + 50);
//shapes.setColor(Color.BLUE);
//shapes.line(x, y, x + 15, y - 20);
shapes.setColor(Color.RED);
shapes.line(x, y, x + 50, y);
shapes.setColor(Color.GREEN);
shapes.line(x, y, x, y + 50);
shapes.setColor(Color.BLUE);
shapes.line(x, y, x + 15, y - 20);
shapes.setColor(Color.GREEN);
shapes.rect(x + box.xMin, y - box.yMax, box.width, box.height);
if (reset) shapes.end();
@@ -648,20 +648,17 @@ protected void drawDebug(ShapeRenderer shapeRenderer, int d, int f, float x, flo
shapeRenderer.set(ShapeRenderer.ShapeType.Line);
}

//shapeRenderer.setColor(Color.RED);
//shapeRenderer.line(x, y, x + 40, y);
//shapeRenderer.setColor(Color.GREEN);
//shapeRenderer.line(x, y, x, y + 20);
//shapeRenderer.setColor(Color.BLUE);
//shapeRenderer.line(x, y, x + 20, y - 10);
shapeRenderer.setColor(Color.RED);
shapeRenderer.line(x, y, x + 40, y);
shapeRenderer.setColor(Color.GREEN);
shapeRenderer.line(x, y, x, y + 20);
shapeRenderer.setColor(Color.BLUE);
shapeRenderer.line(x, y, x + 20, y - 10);

BBox box = dc.getDirection(d).box;
BBox box = dc.getBox(d, f);
shapeRenderer.setColor(DEBUG_COLOR);
shapeRenderer.rect(x + box.xMin, y - box.yMax, box.width, box.height);

if (reset) {
shapeRenderer.end();
}
if (reset) shapeRenderer.end();
}
}

@@ -1741,6 +1741,7 @@ public void draw(Batch batch, float x, float y, float width, float height) {

anim.setLayer(layer, dc, false);
}
anim.updateBox();
setDelegate(anim);
}

0 comments on commit 6fed567

Please sign in to comment.
You can’t perform that action at this time.