Commit Graph

620 Commits

Author SHA1 Message Date
Charlie Groves e678d36262 Look at the big smart programmer using the library code instead of rolling his own, hacked-up shit
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@623 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-13 22:12:25 +00:00
Charlie Groves e4801b954f Pull the generic sound playing api from SoundManager up into
AbstractSoundManager and implement the actual sound playing with Java sound in
SoundManager and with OpenAL in OpenALSoundManager.  I left the SoundManager
name alone so nothing using it will need to change, but if nothing besides
yohoho is using it, I can refactor it to a more sane naming scheme.

Rip out all the music and alternative format stuff since it didn't work anyway.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@622 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-13 21:47:42 +00:00
Ray Greenwell 1ac283e675 Provide access to the send button.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@621 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-12 05:15:45 +00:00
Charlie Groves 7266e22085 Widening, modernization
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@620 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-11 04:34:50 +00:00
Ray Greenwell d657cf9f3b Convenience.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@619 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-08 23:30:43 +00:00
Ray Greenwell ce7a1c9cb8 Added getCellCount() and getCellAt(), inspired by SimpleGrid.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@618 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-08 23:11:40 +00:00
Ray Greenwell 5de8a3acf7 Added this, since we do it lots of places and it often looks like an error.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@617 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-08 23:11:16 +00:00
Ray Greenwell 51cf6b65be Make this optional, and not the default.
Turns out a bunch of shit makes the wrapper size a little bigger,
and some things seem to freak out when the wrapper has a size,
even when includeInLayout=false.
Flex you very much.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@616 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-08 03:46:11 +00:00
Ray Greenwell b08f508349 Oh, fuck that. Let's just set the explicit width/height, because if
something's never measured then it never gets these set.
This might break something.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@615 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-08 03:32:57 +00:00
Ray Greenwell 2e9282a3e5 Make our measured size the size of the thing we're wrapping.
Half the places we use FlexWrapper we do something like this anyway.
Note that you can still override this by setting the width and height
(which sets the explicitWidth, explicitHeight).


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@614 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-08 02:17:33 +00:00
Mike Thomas 05da95bbb4 Stop eclipse copying .svn dirs to output dir.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@613 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-07 23:09:00 +00:00
Michael Bayne 2cd65a9e76 Oops, tests output should go in tests/dist/classes.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@612 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-07 23:07:27 +00:00
Charlie Groves 1949014c76 Exploratory house cleaning
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@611 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-07 18:11:31 +00:00
Dave Hoover 3122ae7e65 Checking if (foo = bar) is begging for disaster.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@610 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-05 21:13:41 +00:00
Charlie Groves 7386c62a68 Calculate the drain time using a long as a decent sized clip can overflow an int
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@609 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-05 20:28:15 +00:00
Charlie Groves db0e6f93e1 Document the return on play
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@608 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-05 18:49:33 +00:00
Charlie Groves 2e25cb021f Add a music sound type
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@607 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-05 18:46:01 +00:00
Charlie Groves e8103138e5 Add a run queue to dispatch the various key processing runnables on to keep them off the spooler threads
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@606 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-05 18:45:45 +00:00
Charlie Groves 66d476dcb3 Allow play, loop and unlock to pass in a Runnable to be called when they're processed to match lock
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@605 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-05 01:13:21 +00:00
Charlie Groves 2b5a96b147 A for effort on the auto-naming Eclipse, but there's no need to drag the underscore along. Too bad you can't make generic arrays not suck.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@601 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-04 23:51:07 +00:00
Charlie Groves 5567dcf2a1 Only dirty regions in the MediaOverlay corresponding to its actual media.
Since its dirty regions propagate out to the repaint manager, a big update
there would lead to dirty calls ping-ponging back and forth for a few cycles.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@600 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-04 23:38:12 +00:00
Michael Bayne 78cab07b78 More output fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@599 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-04 17:47:39 +00:00
Charlie Groves ee6bf4a5b9 Whoops, that was supposed to be a regular loop. Caught by the Raydar.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@598 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-02 00:06:51 +00:00
Charlie Groves 4432a9d6f8 Add a second looping mode, LOOP_TO_COMPLETION, that finishes playing its
current run through the sound when stop is called before actually stopping.

Add a runnable to the lock method that will be called on the spooler thread
when locking is complete.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@597 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 23:46:17 +00:00
Mike Thomas d1de5f411d Rollback the sound manager change - it's causing significant slowdown.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@596 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 20:49:10 +00:00
Mike Thomas 8fd2dffd13 And, don't need this import either.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@595 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-01 17:23:12 +00:00
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