Commit Graph

594 Commits

Author SHA1 Message Date
Mike Thomas a2324b526e Add a clarifying comment, and remove unnecessary assignment. I don't honestly recall if this was even intentionally included or a copy-paste error, but it does seem like knowing your image is busted at compile time is much better than not knowing til runtime.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@594 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 17:18:37 +00:00
Michael Bayne 659f5bc5e2 Code hygiene. Not as pedantic as I'd like, but I couldn't resist the huge time
saver that is Eclipse's "Infer generic types" which leaves HashMap and
ArrayList as the declared type where I would normally prefer to change those to
Map and List and use Maps and Lists to instantiate them.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@593 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 15:56:37 +00:00
Michael Bayne 60622c3590 Some code hygiene.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@592 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 14:39:57 +00:00
Michael Bayne 786dd4f7ff Type our result listener.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@591 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 13:27:14 +00:00
Charlie Groves 1255109f57 Pump up the size of our line buffer to get longer sounds to play less
skiptacularly and try going back to using line.drain since our sleep until we
figure the sound will be done method wasn't working so well with the larger
buffer.  Hopefully drain has been fixed in the 4 years since it was commented
out.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@590 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 01:23:04 +00:00
Dave Hoover e6e5e82c83 Fix this up so the keyTyped-based keyboard stuff actually does work, now;
I had a bug that managed to essentially let me function thanks to a hybrid
of the two modes. Unfortunately, it means things are as jerky as I had
originally feared for stuff like swordfighting and sailing, but I just played
a bunch of those, and while it's certainly not great, it's not TOO terrible.
But I definitely wouldn't want to be in a SF tournament in this mode...

Also, rip out ancient subinterval keyboard business since the seas of comments
there were getting in my way and confusing my text editor all through this 
work.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@589 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-31 20:47:33 +00:00
Dave Hoover 4041883798 My nightmares have come true, and keyTyped behavior appears to be different
on windows, so add a whole buttload of debugging I can turn on and cry while
sifting through.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@588 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-30 22:33:30 +00:00
Michael Bayne 39c7cf1419 Unwrapped long lines.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@587 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-30 19:00:28 +00:00
Robin Barooah 0c7a95a8d0 Add a background jpeg encoder which uses the JPGEncoder to spread out encoding over a series of frames.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@586 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-30 01:46:22 +00:00
Robin Barooah 84be5a1da6 Hide the little helper class that came over with the JPGEncoder inside the JPGEncoder file.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@585 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-30 00:13:31 +00:00
Robin Barooah 5dd60e0d45 Refactor the JPG encoder to process in time slices rather than all at once.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@584 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-29 23:57:13 +00:00
Robin Barooah 13f7a78932 Fork the as3corelib JPEG Encoder into nenya.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@583 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-29 23:56:11 +00:00
Ray Greenwell f2d6194a97 Symlink to Mac OS X, maybe this'll fix building for Robin.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@582 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-29 20:17:05 +00:00
Matt Jensen ea05382aa9 Local variable never read.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@581 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-29 18:23:27 +00:00
Dave Hoover 719f63577b In japan, people will frequently run with keyboards in a mode
that generate wide versions of the latin characters, which has
the nasty side effect of sending keyTyped events instead of 
keyPressed and keyReleased events.

This extends the KeyboardManager to be able to cope with such
situations, doing sane things in that case. Unfortunately, since
you only get one event for the character, we don't really know
when it went down and when it came up, so we fake it by turning
native keyboard repeat on and pretending the key was held down
for one repeat's worth of time. While extreme values on the 
system's key repeat or the desired KeyTranslator's repeat rate
could give unfortunate behavior, with sane values like people
typically should be using, it should all work. Swordfighting
and sailing (the two big users of keyPressed & keyReleased events
in yohoho) seem to be completely playable for me when running like
this.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@580 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-29 00:13:22 +00:00
Michael Bayne 3fad5fb569 Nixed unused variable references.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@579 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-26 22:04:15 +00:00
Nathan Curtis be7dc2dd21 MDB would prefer that we ignore these via .subversion/config, rather than svn:ignore.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@578 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-25 17:28:41 +00:00
Nathan Curtis c0fa2c56f4 Lets go ahead and svn:ignore the Flex Builder property files
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@577 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-24 21:55:19 +00:00
Nathan Curtis 32ff74a223 Well, shit. MDB points out something I completely missed: these Flex Library Project files contain
an enumerated list of every class in the library.  Since there are (as far as I know) only two 
people currently using Flex Builder, and since these project files are easy to create and maintain
locally, lets not deal with keeping a versioned copy up to date every time a file is created, 
removed or renamed.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@576 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-24 16:26:03 +00:00
Nathan Curtis 9f83be6589 Flex Builder project files for nenya as a Flex Library project. Depends on Narya's Flex Builder
project.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@575 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-23 20:42:46 +00:00
Micah 3adb554d40 Add UP and DOWN direction codes.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@574 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-23 17:38:48 +00:00
Ray Greenwell 9cdc1dd3d2 Omigosh, let's capture any errors thrown while unloading media.
I was pretty sure the event handlers did this, but Annie sent me a trace
that would seem to indicate otherwise.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@573 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-14 19:17:43 +00:00
Dave Hoover 5f1eed7b94 Add in @Overrides across the board, clean up the comments around them some, and remove
unneeded imports.
I've got partially completed patches for narya & vilya, too, but nenya was the 
only one that wound up in a decent state after a friday evening puttering at it,
killing time waiting on other things to finish.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@572 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-14 18:19:23 +00:00
Dave Hoover 1df0737bf7 Widening + generics + new logging api.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@571 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-14 17:42:06 +00:00
Tom Conkling d2c253af72 DisplayUtil.positionBounds()
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@570 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-11 22:00:19 +00:00
Tom Conkling 5a0b164c3f These functions aren't actually used by sortDisplayChildren
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@569 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-11 21:40:25 +00:00
Mike Thomas 3ab8bde582 Add the ability to add "Obscurers" or components that will be drawing on top of a MediaPanel - these then force additional redrawing of the Media Panel, so should be used with extreme caution. I suspect there may be cleaner ways to do this, so there may be further changes to this in the near future, but this seems good enough for my current needs.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@568 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-08 22:48:36 +00:00
Michael Bayne eb959e4930 If we're not able to use Arrays.hashCode(), let's not add a whole separate
method and bloat up the code a bunch, let's just do the brief, inline thing we
were doing in the first place.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@567 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-08 10:49:57 +00:00
Michael Bayne 45edaccf6d The plot, she is thick. The Nenya framework supports a MediaOverlay that can
render sprites and animations over the top of everything in the frame:
JComponents, MediaPanels anything we like. To support this, we have the
MediaOverlay tell the ActiveRepaintManager when it has dirtied an area of the
screen and it will mark that component as needing repainting. Peachy.

However, if a component decides on its own that it needs repainting, we need to
propagate that now dirty region up to the MediaOverlay so that it can repaint
anything that's above the just-repainted component on the same frame tick.
This also fixes a potential problem if a changed sprite dirties a component
which then repaints itself but the bounds of that component overlapped some
other sprite which was not going to be repainted on this tick.

There were also potential problems if components were put in the JLayeredPane
layers (which are "above" the normal components and MediaPanels but "below" the
MediaOverlay). They too should now properly dirty regions in the overlay.

It occurs to me though that if a MediaOverlay sprite is on top of a MediaPanel,
the MediaPanel will probably not properly propagate its dirty region to the
overlay because the MediaPanel is a frame participant, not a JComponent and its
repainting is handled by the FrameManager not the ActiveRepaintManager. I may
just use the sledgehammer approach and dirty in the media overlay the entire
bounds of a frame participant if it paints anything on a frame rather than try
to translated and propagate its underlying dirty regions up to the overlay.

Oh the twisty maze of passages we've created in trying to create an active
rendering system that works magically with Swing.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@566 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-07 19:24:26 +00:00
Michael Bayne 83a7c58017 Move this getter up with his friends.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@565 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-07 19:00:31 +00:00
Michael Bayne f69a3d550e More generics.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@564 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-07 18:57:51 +00:00
Michael Bayne d5b1c1faf5 Generics.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@563 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-07 18:53:18 +00:00
Michael Bayne 1b7832dd8a Fixed the comment.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@562 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-07 18:44:16 +00:00
Charlie Groves 616049971b Touch of modernization
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@561 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-03 00:58:23 +00:00
Charlie Groves e7bf315b1b Share scene block resolvers across a context instead of statically across all scene panels. Exiting an applet sometimes kills the resolver thread making it worthless to scene panels coming along in a new applet
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@560 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-03 00:56:42 +00:00
Tom Conkling 6776b83ce6 Account for kerning by always measuring the width of the truncated text field with the truncation string
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@559 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-02 00:50:51 +00:00
Tom Conkling 5d6ef34d2b TextFieldUtil.setMaximumTextWidth()
So that Robert stops breaking the UI with his ridiculously long names...


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@558 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-01 23:14:08 +00:00
Charlie Groves ae04712b2b Toggle visibility when delaying repainting to keep child components from painting while we aren't
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@557 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-01 04:39:27 +00:00
Michael Bayne 375f7fe977 Don't unpack resource bundles when running tests.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@556 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-29 13:47:13 +00:00
Micah adb7f3adce Style changes.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@555 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-27 00:29:53 +00:00
Micah 4b77902162 Replaced a Java 1.5 method call with a 1.4 method call.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@554 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-27 00:19:54 +00:00
Ray Greenwell ec93c75cc2 Added setMediaBytes().
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@553 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-25 22:55:16 +00:00
Charlie Groves 550c360df6 Allow image preparation to be turned off on a run by run basis
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@552 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-24 23:44:50 +00:00
Ray Greenwell 25d74475d9 I saved this checkin until I was feeling destructive, and that time is now.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@551 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-24 01:27:52 +00:00
Charlie Groves 7b7131bf7c Need to weak reference the values too if they're going to be collectable. Use Arrays.hashCode to calculate the hash code of a long[] thanks to Ray.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@550 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-23 23:50:57 +00:00
Charlie Groves cd30b42cd8 Allow the size of the sound cache to be set in the sound manager's constructor.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@549 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-23 22:00:22 +00:00
Charlie Groves 7ace9ac320 * Add a fringe tile cache
Fringe tiles are added to a WeakHashMap used across the scene panel as they're
created and then held with hard references by the scene blocks they're in.
Whenever the last scene block referencing a fringe tile goes out of the
influential radius, the fringe can be collected from the cache.  In fringe
heavy scenes this reduces the memory for fringe by a third.

* Remove the mask cache

The fringe cache reduced the number of times a mask needs to be generated, so
eliminate the mask cache in the hopes of reclaiming a little more memory.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@548 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-23 21:59:16 +00:00
Tom Conkling d426b70e58 This is probably not such a good idea after all
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@547 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-19 20:18:24 +00:00
Tom Conkling 8168128b0f small optimization for the DisplayUtil.sortDisplayChildren common case
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@546 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-19 20:10:06 +00:00
Andrzej Kapolka f6b35f8217 Added a method to get the resource path of a file within the
resource directory.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@545 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-19 01:45:11 +00:00