From e78607da60063423b2193e772a9293e552c8cfa1 Mon Sep 17 00:00:00 2001 From: Walter Korman Date: Fri, 11 Jan 2002 16:53:34 +0000 Subject: [PATCH] Commented out verbose logging. Minor clean-up. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@850 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../media/animation/AnimationManager.java | 9 +++------ .../media/animation/BobbleAnimation.java | 6 +----- .../media/animation/FadeAnimation.java | 16 ++++++++-------- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/java/com/threerings/media/animation/AnimationManager.java b/src/java/com/threerings/media/animation/AnimationManager.java index abd13c8e7..a3faf0666 100644 --- a/src/java/com/threerings/media/animation/AnimationManager.java +++ b/src/java/com/threerings/media/animation/AnimationManager.java @@ -1,5 +1,5 @@ // -// $Id: AnimationManager.java,v 1.1 2002/01/11 16:17:33 shaper Exp $ +// $Id: AnimationManager.java,v 1.2 2002/01/11 16:53:34 shaper Exp $ package com.threerings.media.animation; @@ -217,7 +217,7 @@ public class AnimationManager removeFinishedAnimations(); // update refresh-rate information - PerformanceMonitor.tick(AnimationManager.this, "refresh"); + // PerformanceMonitor.tick(AnimationManager.this, "refresh"); if (finishedTick()) { // finishedTick returning true means there's been a @@ -237,9 +237,6 @@ public class AnimationManager int size = _anims.size(); for (int ii = 0; ii < size; ii++) { ((Animation)_anims.get(ii)).tick(timestamp); -// if (anim.isFinished()) { -// anim.notifyObservers(new AnimationWillCompleteEvent(anim)); -// } } } @@ -257,7 +254,7 @@ public class AnimationManager anim.notifyObservers(new AnimationCompletedEvent(anim)); // un-register the animation unregisterAnimation(anim); - Log.info("Removed finished animation [anim=" + anim + "]."); + // Log.info("Removed finished animation [anim=" + anim + "]."); } } } diff --git a/src/java/com/threerings/media/animation/BobbleAnimation.java b/src/java/com/threerings/media/animation/BobbleAnimation.java index 5cb673123..0fadaadc8 100644 --- a/src/java/com/threerings/media/animation/BobbleAnimation.java +++ b/src/java/com/threerings/media/animation/BobbleAnimation.java @@ -1,5 +1,5 @@ // -// $Id: BobbleAnimation.java,v 1.1 2002/01/11 16:17:33 shaper Exp $ +// $Id: BobbleAnimation.java,v 1.2 2002/01/11 16:53:34 shaper Exp $ package com.threerings.media.animation; @@ -42,10 +42,6 @@ public class BobbleAnimation extends Animation // calculate animation ending time _end = System.currentTimeMillis() + length; - - // calculate the dirty rectangle bounds - int wid = image.getWidth(null), hei = image.getHeight(null); - // _bounds = new Rectangle(sx - rx, sy - ry, sx + wid + rx, sy + hei + ry); } // documentation inherited diff --git a/src/java/com/threerings/media/animation/FadeAnimation.java b/src/java/com/threerings/media/animation/FadeAnimation.java index 198b20361..9dbc182e3 100644 --- a/src/java/com/threerings/media/animation/FadeAnimation.java +++ b/src/java/com/threerings/media/animation/FadeAnimation.java @@ -1,5 +1,5 @@ // -// $Id: FadeAnimation.java,v 1.1 2002/01/11 16:17:33 shaper Exp $ +// $Id: FadeAnimation.java,v 1.2 2002/01/11 16:53:34 shaper Exp $ package com.threerings.media.animation; @@ -13,9 +13,9 @@ import java.awt.Rectangle; import com.threerings.media.Log; /** - * An animation that displays an image fading from invisibility to full - * opacity, or vice-versa. The animation is finished when the target - * opacity is reached. + * An animation that displays an image fading from one alpha level to + * another in specified increments over time. The animation is finished + * when the specified target alpha is reached. */ public class FadeAnimation extends Animation { @@ -57,12 +57,12 @@ public class FadeAnimation extends Animation _alpha = Math.min(_startAlpha + (msecs * _step), 1.0f); _comp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, _alpha); - // check whether we're done and dirty ourselves + // check whether we're done _finished = ((_startAlpha < _target) ? (_alpha >= _target) : (_alpha <= _target)); - invalidate(); - // Log.info("Ticked fade [anim=" + this + "]."); + // dirty ourselves + invalidate(); } // documentation inherited @@ -91,7 +91,7 @@ public class FadeAnimation extends Animation buf.append(", target=").append(_target); } - /** The composite object used to render the image with desired opacity. */ + /** The composite used to render the image with the current alpha. */ protected Composite _comp; /** The current alpha of the image. */