Commit Graph

63 Commits

Author SHA1 Message Date
Charlie Groves 8d5fc6c6ea Rolling back r292 with great sadness in my heart. The non-repainting doesn't happen very often, but sure enough it does and sure enough it's awful.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@294 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-09-03 22:45:29 +00:00
Charlie Groves 1e55b4ed7e Haven't been able to see any non-repainting without this on my mac, and this was causing the whole screen to be dirtied once a second when the countdown timer in a seamonster battle ticked.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@292 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-08-31 17:18:35 +00:00
Charlie Groves 65b8cdbc3a Factor in the percentage of the databuffer a BufferedMirage is using to
estimate its memory if its BufferedImage is a subimage of another
BufferedImage.

Include the amount of memory used by colorizations in ImageManager's cache
usage calculations.

Crank ImageManager's cache size up to 32 megs since a) it's actually seeing the
memory used by colorizations and b) the new seamonsters are pretty sizable.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@291 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-08-30 22:50:24 +00:00
Charlie Groves 11322269c2 Redraw seems to work correctly on the Mac now, so only invalidate the shifted region like on other platforms.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@288 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-08-28 17:07:39 +00:00
Mike Thomas 9d73fe0587 This needs to respect sprite offset.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@285 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-08-22 22:22:59 +00:00
Charlie Groves e003d97535 Break the code for completing a fade into a method so subclasses can override it and do what they will when it finishes.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@284 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-08-10 22:00:50 +00:00
Michael Bayne 069fe85c70 A whole lot of widening, refactoring, thinking, rethinking and fiddling around
for what ultimately boils down adding this method to BundledComponentRepository:

    @Override // from IMImageProvider
    public Mirage getTileImage (String path, Rectangle bounds, Colorization[] zations)
    {
        // we don't need our images prepared for screen rendering
        BufferedImage src = _imgr.getImage(getImageKey(path), zations);
        if (bounds != null) {
            src = src.getSubimage(bounds.x, bounds.y, bounds.width, bounds.height);
        }
        return new BufferedMirage(src);
    }

So much fun to revisit code I wrote six years ago.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@283 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-08-03 22:04:04 +00:00
Charlie Groves 205d57a7fe Allow TileSetRuleSets to specify a custom tileset tag name, and use that to allow UniformTileSets as <uniformTileset> in addition to the existing SwissArmyTileSets as <tileset> in the bundle tasks.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@281 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-08-02 23:18:16 +00:00
Dave Hoover 81dcd90c1a Simplify and combine fading out for both moving and stationary sprites.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@276 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-07-18 18:47:37 +00:00
Dave Hoover f57c408d7f If something goes wrong adding our tileset to the bundle, throw an exception so that
things fail & attract attentino, rather than trying to work around it and printing 
a stack trace that will likely go unnoticed amidst a slew of other build messages.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@273 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-07-13 18:07:29 +00:00
Charlie Groves 7fdd8fee17 Add the ability to fade the sprite out without a path and fix fading out with a path so that it's actually fading out instead of fading in
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@272 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-07-11 23:49:04 +00:00
Charlie Groves 7efd53a76c Use _minAlpha to figure out when to stop moving alpha down, don't readd the sprite in tick since shutdown is taking care of it also
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@271 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-07-09 22:49:48 +00:00
Charlie Groves 640b6fe1f6 Reset the up and down timers in reset and allow the maximum level of gleam and update frequency to be specified
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@269 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-06-29 22:41:52 +00:00
Dave Hoover 717dc79c02 Tabs -> spaces
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@268 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-06-26 00:07:47 +00:00
Dave Hoover 7ca448a91e Let us optionally not auto-reposition TransformedMirages; it was being smart
for things like scales and rotates so 0,0 still meant the same place, but that 
meant I couldn't just reposition something, since it would promptly undo the
transform I passed in.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@256 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-06-01 18:08:34 +00:00
Michael Bayne 97f6eb7c85 Switch to Java's logging facilities.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@254 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-30 01:18:06 +00:00
Michael Bayne 91c45db381 Let's do this in a way that allows more than a single value to be used in the
natural comparison.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@249 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-15 17:50:16 +00:00
Michael Bayne acea29604d Make AbstractMedia implement Comparable instead of using a comparator. Added
naturalOrder() which allows media to use a more consistent "same render order"
order resolution value than Object.hashCode().


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@248 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-15 17:45:18 +00:00
Michael Bayne f7dfe51a9c Oh yeah, we need to call that method.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@247 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-15 17:05:04 +00:00
Michael Bayne 9a30debf42 Type safety and widening.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@246 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-15 16:59:58 +00:00
Michael Bayne 12e17a9e33 Remove debug logging.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@242 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-11 23:28:00 +00:00
Michael Bayne 2e0678877b Use the hacky PerfTimer if available and fall back to the NanoTimer if we're
running in a sandbox.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@234 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-09 21:53:42 +00:00
Michael Bayne 0024a02067 Wow, the media framework gets into a bad way if it's forced to use the
inaccurate System.currentTimeMillis() timer. Fortuately Sun introduced
System.nanoTime() in 1.5 which provides civilized timing information, so we can
use that instead of sun.misc.Perf which is unavailable in an applet sandbox. We
will need to go in and try to cope as best we can with currentTimeMillis() if
we want to support unsigned play in JDK 1.4 or earlier. We'll do that later.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@231 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-09 19:22:10 +00:00
Mike Thomas 8a2e67831e Also need to cope with non-component _root in BackFrameManager
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@228 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-04 23:14:26 +00:00
Michael Bayne 2c6fdf5d94 Cope if our ManagedRoot is not a component.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@227 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-04 23:08:08 +00:00
Michael Bayne 095c718244 Render to the applet instead of its parent window since that doesn't work.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@223 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-03 22:56:29 +00:00
Michael Bayne ab6252cee7 Widened. Added getMirage(String).
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@222 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-05-03 21:13:32 +00:00
Mike Thomas 3320ab34cd We specify an Arcing path in terms of a start position and various parameters. It's useful to be able to ask the resulting path where that path ended, especially if we want to create another path starting from that new end point.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@185 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-04-05 20:24:47 +00:00
Mike Thomas 7bfc08c0b8 Tweak recolor tool to sort recolored images by color IDs.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@167 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-03-13 04:54:33 +00:00
Michael Bayne b6f5317ad2 More header patrol.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@158 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-24 00:38:17 +00:00
Mike Thomas 9006af28b9 Some convenience functions for getting color information entirely by name.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@145 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-02-03 00:22:14 +00:00
Michael Bayne 12f8cabd90 Config -> PrefsConfig where appropriate.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@125 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-31 00:49:05 +00:00
Mike Thomas 186327b3d1 CopyUtils has been deprecated, using IOUtils instead.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@124 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-24 21:36:24 +00:00
Dave Hoover 8bff333dd8 Fix dirty coords for our overlay so it all lines up and works. Yay!
And some tabs -> spaces while I was there.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@123 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-24 21:34:51 +00:00
Dave Hoover 120e9c0db9 Actually substitute keywords (these files are chock full of stale $Id$ tags)
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@119 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-24 00:22:12 +00:00
Michael Bayne 283fd15f19 Some fixes but components are still not getting properly repainted in all cases
for some reason.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@117 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-20 03:58:18 +00:00
Michael Bayne fb91fd8770 Let's have all the same convenience methods as MediaPanel.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@116 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-20 02:55:16 +00:00
Michael Bayne 81a3dd4dd9 In theory this should work (modulo some particularly fiddly bits that I'm going
to have to think about), but it's totally untested. That comes next!


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@115 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-20 02:35:56 +00:00
Michael Bayne 088bc4b88b Fix initialization ordering problems in MetaMediaManager ->
Sprite/AnimationManager -> AbstractMediaManager.

A smidgen more progress on MediaOverlay, but we need to get these bits checked
in ASAP.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@114 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-20 02:10:30 +00:00
Michael Bayne 031b51419f Widened, reordered methods, removed some old debugging cruft in preparation for
adding the MediaOverlay stuff.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@113 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-20 01:21:05 +00:00
Michael Bayne a8de5bb789 A whole bunch of refactoring to support a MediaOverlay which will allow us to
render sprites and animations anywhere in the frame for those times when you
just need to draw outside the lines.

The actual MediaOverlay isn't done yet, but all the refactoring to support it
is done, so the rest should be easy. In theory this shouldn't break anything
(like the Yohoho build), but we're about to find out.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@112 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-20 01:09:53 +00:00
Mike Thomas 0a5a13302c Allow the clearing of the tile manager's cache.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@110 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-01-18 23:01:47 +00:00
Mike Thomas 71259f2ceb Protect from an NPE if we find no graphics yet at sprite initialization time.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@106 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-12-20 20:05:09 +00:00
Michael Bayne b44864c506 Some fiddling to support a potential wacky project.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@104 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-12-19 21:45:43 +00:00
Mike Thomas 493e1f1a8b New type of sprite that wraps an animation. This is useful for moving animations. It's also useful, thanks to some wackiness in the MediaPanel for making animations appear in appropriate places in the render order compared to sprites.
I'd really prefer to put this in the sprite package, but putting it here means I don't have to publicize the willStart/willFinish/didFinish functions on Animation.  I'm open to suggestions for better solutions to that one...


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@96 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-12-16 00:51:03 +00:00
Michael Bayne 23f305aa81 Make the first sentence not overlong so as to play nicely with javadoc.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@92 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-12-05 07:00:42 +00:00
Michael Bayne 20021d7eab Fixed typo.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@91 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-12-05 06:59:48 +00:00
Michael Bayne 4ae22890bf Use our surprisingly handy new method.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@90 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-12-05 06:58:04 +00:00
Michael Bayne cd97adf00b Track bounds changes for our underlying sprite in such a way that we dirty
things properly if they do. Simply stealing our target sprite's _bounds will
not result in the necessary calls to addDirtyRegion() if they change due to
calls to setLocation() on our (now unmanaged) target sprite.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@89 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-12-05 06:52:54 +00:00
Michael Bayne 7850123988 Factored some duplicated code into a shared method that can be used to easily
and efficiently dirty old and new bounds when our bounds change.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@88 ed5b42cb-e716-0410-a449-f6a68f950b19
2006-12-05 06:51:41 +00:00