Commented out verbose logging. Minor clean-up.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@850 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2002-01-11 16:53:34 +00:00
parent aa574a8182
commit e78607da60
3 changed files with 12 additions and 19 deletions
@@ -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; package com.threerings.media.animation;
@@ -217,7 +217,7 @@ public class AnimationManager
removeFinishedAnimations(); removeFinishedAnimations();
// update refresh-rate information // update refresh-rate information
PerformanceMonitor.tick(AnimationManager.this, "refresh"); // PerformanceMonitor.tick(AnimationManager.this, "refresh");
if (finishedTick()) { if (finishedTick()) {
// finishedTick returning true means there's been a // finishedTick returning true means there's been a
@@ -237,9 +237,6 @@ public class AnimationManager
int size = _anims.size(); int size = _anims.size();
for (int ii = 0; ii < size; ii++) { for (int ii = 0; ii < size; ii++) {
((Animation)_anims.get(ii)).tick(timestamp); ((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)); anim.notifyObservers(new AnimationCompletedEvent(anim));
// un-register the animation // un-register the animation
unregisterAnimation(anim); unregisterAnimation(anim);
Log.info("Removed finished animation [anim=" + anim + "]."); // Log.info("Removed finished animation [anim=" + anim + "].");
} }
} }
} }
@@ -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; package com.threerings.media.animation;
@@ -42,10 +42,6 @@ public class BobbleAnimation extends Animation
// calculate animation ending time // calculate animation ending time
_end = System.currentTimeMillis() + length; _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 // documentation inherited
@@ -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; package com.threerings.media.animation;
@@ -13,9 +13,9 @@ import java.awt.Rectangle;
import com.threerings.media.Log; import com.threerings.media.Log;
/** /**
* An animation that displays an image fading from invisibility to full * An animation that displays an image fading from one alpha level to
* opacity, or vice-versa. The animation is finished when the target * another in specified increments over time. The animation is finished
* opacity is reached. * when the specified target alpha is reached.
*/ */
public class FadeAnimation extends Animation public class FadeAnimation extends Animation
{ {
@@ -57,12 +57,12 @@ public class FadeAnimation extends Animation
_alpha = Math.min(_startAlpha + (msecs * _step), 1.0f); _alpha = Math.min(_startAlpha + (msecs * _step), 1.0f);
_comp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, _alpha); _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) : _finished = ((_startAlpha < _target) ? (_alpha >= _target) :
(_alpha <= _target)); (_alpha <= _target));
invalidate();
// Log.info("Ticked fade [anim=" + this + "]."); // dirty ourselves
invalidate();
} }
// documentation inherited // documentation inherited
@@ -91,7 +91,7 @@ public class FadeAnimation extends Animation
buf.append(", target=").append(_target); 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; protected Composite _comp;
/** The current alpha of the image. */ /** The current alpha of the image. */