Commit Graph

43 Commits

Author SHA1 Message Date
Michael Bayne 1311dafb1f Don't let freaky derived classes ruffle our feathers.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3096 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-08-24 22:37:47 +00:00
Michael Bayne 1dc8070910 Checking these in for Ray so that things will compile.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2990 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-04-06 03:53:26 +00:00
Michael Bayne d618d3c771 Eclipse suggested cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2971 542714f4-19e9-0310-aa3c-eee0fc999fb1
2004-02-25 14:50:28 +00:00
Michael Bayne 6cf90dcddd Not so fast, we need to jigger this differently.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2753 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-08 21:43:05 +00:00
Michael Bayne cfe7f19669 Was clearing out the wrong business.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2749 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-08-08 21:39:29 +00:00
Michael Bayne fac7c3cb75 The frame manager may decide not to paint us if needsPaint() returns
false, but we still need to call willPaint() after *every* tick, so we
have to do that in needsPaint() where we can be sure it will get called.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2554 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-08 05:46:45 +00:00
Michael Bayne baf4873fa6 Not to freak out if we can't get a graphics to lay out our FPS label.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2542 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-04 23:28:18 +00:00
Michael Bayne 9454a1e35a Commented out avg. dirty regions per tick display and modified FPS display
to facilitate efficient checking of whether it's activated or not.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2520 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-02 15:11:12 +00:00
Michael Bayne 357e17d7c7 Because we cleverly do nothing in paint() if there are no dirty regions,
we have to go out of our way to let the abstract media managers know when
tick() is all done and paint() *may* be called. This way they can properly
clear out their tick stamps because they know that no more media fooling
around will happen between the call to willPaint() and the call to paint()
(which used to be called renderMedia() but is now paint() to remain in
line with all the other places were we tick() and then paint()).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2508 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-30 20:48:38 +00:00
Michael Bayne 9372df6ff0 Render the additional performance metrics when such are activated.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2506 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-30 06:34:55 +00:00
Michael Bayne b2cbd63be2 Display FPS in the media panel where we have tight control over dirtying
and repainting.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2501 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-29 18:15:10 +00:00
Michael Bayne 7aeae0d4c3 Change removeAnimation() to abortAnimation(); that's what is happening.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2410 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-15 00:39:20 +00:00
Michael Bayne cb6d73e98c needsPaint() will only be called by the FrameManager *after* it has just
called tick(), therefore we don't need to incorporate _tickPaintPending
into our determinations. Additionally, we need to clear _tickPaintPending
if we return false from this method because we won't get painted in that
case and won't clear it in paint().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2369 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-01 03:38:03 +00:00
Michael Bayne 0b0757b98c Fixed up the goddamned repaint fuckola. Fucking pain in the ass, all this
Swing, AWT and frame manager interaction.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2325 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-25 23:05:58 +00:00
Michael Bayne b66e0d2584 Keep track of whether or not anything was painted each frame and avoid the
extra effort of copying the back buffer to the screen if nothing actually
changed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2322 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-25 19:06:54 +00:00
Michael Bayne 998e4cada4 IntListUtil.sum() replaced total().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2233 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-04 03:11:43 +00:00
Walter Korman 3807953a55 Added MediaPanel.clearAnimations(), fixed up comments and removed
unnecessary SpriteManager.clearSprites().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2069 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-15 23:12:37 +00:00
Michael Bayne 5e81502af3 Track and report our average number of dirty regions per tick.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2042 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-08 02:49:53 +00:00
Walter Korman fc14518506 Removed verbose logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2022 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 03:01:12 +00:00
Walter Korman 6552b5bd8b Include the timestamp associated with sprite events in the event.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2020 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-04 02:45:09 +00:00
Michael Bayne 10523980c6 Provide ability to get timestamps from a media panel.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1973 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-20 03:11:43 +00:00
Michael Bayne c4591a92ef System.currentTimeMillis() begone! We use our own pluggable timer system
now (which uses System.currentTimeMillis() at the moment but eventually
won't).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1968 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-20 02:18:49 +00:00
Walter Korman 6334b6d690 Sanity-check dirty rectangles when painting the media panel.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1858 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-29 20:33:51 +00:00
Michael Bayne 286892639e Removed the vestigal return as it confused the comment.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1829 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-25 21:15:27 +00:00
Michael Bayne a8e6c46f70 No more flashy flashy.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1795 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-09 06:33:00 +00:00
Ray Greenwell a0730067ec Pulled out gobs of Sprite/Animation functionality into AbstractMedia.
Pulled out gobs of SpriteManager/AnimationManager functionality into
  AbstractMediaManager.
The big change: sprites can have their render order fine-tuned like
animations.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1787 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-08 21:03:37 +00:00
Michael Bayne a930ae0f0c Added clearSprites() for clearing all sprites in one fell swoop.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1542 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-25 17:31:17 +00:00
Michael Bayne 5d7decd03b Whoops, invalidate() means mark the component as needing to be relaid out.
We don't want to do that when we mean simply to repaint the whole
component.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1536 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-25 01:00:22 +00:00
Michael Bayne 8ca5fc3857 We need to ensure that dirty regions are constrained to the bounds of the
component in MediaPanel as well as VirtualMediaPanel.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1482 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 07:41:37 +00:00
Michael Bayne 7253a68c7c Death, taxes and refactoring: seriously revamped the low-level media code
to handle scrolling in a much cleaner and happier way. There's now a
VirtualMediaPanel which operates in virtual coordinates and can be made to
"view" any location in those virtual coordinates. By changing the view,
the view can be scrolled and the view can be made to center on a pathable
(generally a sprite) which will cause it to scroll around as the pathable
moves around in the virtual coordinate space.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1475 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-18 22:25:33 +00:00
Michael Bayne cfb8c77d2f If we're using a path to drive the view, we need to let it know when we
scroll.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1442 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-12 00:51:24 +00:00
Michael Bayne 1a3ad13d6e Various and sundry revampage to make life easier when scrolling the media
panel to follow a path.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1440 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-11 21:40:52 +00:00
Michael Bayne c1ccaac10d Javadoc fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1437 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-11 00:52:37 +00:00
Michael Bayne 916513f306 Modified code that makes view follow path to not require an origin point
which was a wacky hack in the first place.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1436 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-11 00:05:31 +00:00
Michael Bayne 823de4a1a0 Added means by which a view can be scrolled to follow a path.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1411 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-31 07:33:52 +00:00
Walter Korman 3bc46992bf Set a flag to note whether we're paused and check the flag to avoid
ticking when paused rather than un-registering and re-registering
ourselves as a frame participant to effect same.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1383 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-22 01:56:25 +00:00
Michael Bayne ee9ff7d46b Enhanced debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1372 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-17 21:11:34 +00:00
Michael Bayne ac31caa28b Added support for centering the media panel on a region of interest when
it is displaying in a space smaller than its desired view size.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1345 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-07 00:53:56 +00:00
Michael Bayne b68d34e4e8 Use the width and height that we so handily obtained earlier.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1307 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 22:40:09 +00:00
Michael Bayne 3fa39d06ff Fixed up borked translated dirty region handling.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1298 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-27 04:57:05 +00:00
Michael Bayne 23d170c83e Added support for pausing a media panel which pauses all sprites and
animations currently operating therein. (It doesn't pause scrolling which
I suppose I'll have to fix at some point if we ever need it.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1292 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-25 16:23:31 +00:00
Michael Bayne 47c94068ec Need to restrict the clipping rectangle, not replace it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1289 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-23 03:10:39 +00:00
Michael Bayne cc6a9d00ef Major low-level rendering rethink. There will be much follow-on cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1286 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-23 01:16:28 +00:00