Commit Graph

3331 Commits

Author SHA1 Message Date
Ray Greenwell bb83bacdab Rather than keep a reference to an instance of a custom anonymous class
for an error icon, just whip one up on the fly when needed (almost never).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3389 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 23:20:37 +00:00
Ray Greenwell b07d3821fd Use an LRU cache for our config properties files.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3388 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 23:19:01 +00:00
Ray Greenwell fbbaf7c64a Got rid of the "occupant cache" which was used to provide the previous
value to observers when an OccupantInfo was updated or removed. This
functionality is now built-in to the dobj system, so just use
getOldEntry() on those two events.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3387 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 23:15:02 +00:00
Ted V 94bf03ec9d Moved player status tracking and in/out of game status from puzzles to
games.  Updated the PLAYER_KNOCKED_OUT variable name to prevent some
namespace contention issues.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3386 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 22:52:03 +00:00
Ray Greenwell c36ebdc8d4 A-ha, found the further source of the walk-on-water bug, which is that if
you had logged on to one ocean and then moved to another, the previous
ocean's sceneIds are still in the scene cache.

Fix: Clear the scene cache both when we log off and when the scene repo is set.

Also, I made the cache be a LRUHashMap holding a measly 5 scenes.
Why are we filling up memory on the client with scenes that may or may not
ever be revisited?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3385 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 22:06:38 +00:00
Michael Bayne 44502d01e8 We need to do the property file inheritance processing when loading the
sounds.properties lest we lose the needed info specified in the parent
properties files.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3384 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-07 20:06:55 +00:00
Andrzej Kapolka e75e1918b1 Disarm buttons on mouse-release to avoid sticky buttons in spades.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3383 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-04 22:25:27 +00:00
Michael Bayne 924363a8a6 Further refactoring into client, data and server.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3382 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-03 19:55:35 +00:00
Michael Bayne dbbd8e955f Decided to take the pain and refactor the parlor.game and parlor.turn
packages properly into client, data and server subpackages. This
eliminates a bunch of hackery I had to do to properly handle dead code
removal when building the Game Gardens client and games and it simplifies
things and sets a good example to follow the standard procedure as much as
possible.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3381 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-03 19:36:34 +00:00
Michael Bayne c2e2661e66 Further refinement of the permissions system. Eliminated the
CommunicationAuthorizer and rolled that into the BodyObject-based
permissions system. A victory for consolidation and elegance.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3380 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-03 04:47:57 +00:00
Michael Bayne bc837ca289 The plot thickens. The resource manager prepends "rsrc/" to anything it
loads, but the sound manager wants to load things directly from the
classpath, so we need to allow it to use the classpath that the resource
manager was configured with to ensure that it did the right thing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3379 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 04:35:43 +00:00
Michael Bayne 91f936d147 Need to tack the .properties on by hand when we're loading in this manner.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3378 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 04:28:41 +00:00
Michael Bayne f4343be20d Load the sound properties via the ResourceManager which will do the right
classpath magic to work with Game Gardens.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3377 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 04:11:51 +00:00
Ray Greenwell ce0db63b27 Added a constructor to not specify a default sound.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3376 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 04:10:01 +00:00
Michael Bayne 01592d2593 Reorganized basic permissions handling to be more cleanly extensible.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3375 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 03:22:27 +00:00
Michael Bayne 713e76373b Allow the authenticator to slip some authentication data down the line to
the PresentsClient which can then use it to fill in things like access
control information for the user. We could use this to replace the
UserStash mechanism we use on Yohoho, but that works so I doubt I'll do
that. However, this is needed to do things the more elegant way on future
projects, like Game Gardens.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3374 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 03:08:23 +00:00
Ray Greenwell 40eb978a96 Added a simple turn display widget (for game gardens).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3373 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 02:33:46 +00:00
Ray Greenwell a9df96d6dd Fixed a bug with days not having a defined next-highest unit, which caused
day values to incorrectly always display as 0. I'm surprised nobody
else noticed this, it's right there on the blockade panel.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3372 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-01 01:16:01 +00:00
Ray Greenwell 9733fc2303 Added support for looping sounds.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3371 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-28 19:29:44 +00:00
Ray Greenwell a784ce8a79 Comment change so that I can check it in with the right umask.. grr.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3370 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-26 14:30:52 +00:00
Ray Greenwell 008b9ad896 When a new default access controller is set, switch any objects
that were using the old default (usually null) to use the new default.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3369 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-26 14:04:25 +00:00
Ray Greenwell 708431bf86 Allow the SceneFactory to be set after construction.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3368 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-25 00:59:35 +00:00
Ray Greenwell 8491496226 Actually, it was stupid of me to handle a non-RandomAccess list differently,
as they still implement get() and however they do that internally
is bound to be more efficient than doing the same thing through an
Iterator.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3367 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-24 06:52:09 +00:00
Ray Greenwell a107aef489 Added a form of pickRandom that takes a List argument.
I just can't bear to see a useless object created (an Iterator) and
potentially a great many objects iterated past in order to find the
chosen random object when the original List is usually RandomAccess.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3366 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-24 06:45:25 +00:00
Michael Bayne 44f2a29f4f Regenerated with updated copyright information.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3365 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-22 18:56:52 +00:00
Michael Bayne eac29cb3b9 Small documentation addition.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3364 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-22 18:55:09 +00:00
Michael Bayne 53be9a74ca Added more sanity checking to portal traversal to avoid spurious error
messages if repeat requests come in or for some reason the client and
server ever differ in opinion as to which scene the player is in.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3363 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-22 18:54:48 +00:00
Ray Greenwell 7ec0eeca56 Added a bevy of interfaces that Sprites can implement to be recognized
by the MediaPanel as sprites that interact in some standard way with the
mouse.
Modified existing ButtonSprite to work this new way, and it now implements
CommandSprite, ArmingSprite, and DisableableSprite. One method name changed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3362 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-22 04:14:44 +00:00
Michael Bayne 097730e84d Update for 2005.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3361 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-20 00:37:52 +00:00
Michael Bayne 121f6d7e53 Did the refactoring necessary to get the client and server to live happily
together in one JVM and both interoperate with the AWT thread in a manner
so harmonious as to bring a tear to the eye. This was surprisingly much
easier that I expected, thanks to my eminently sensible initial design,
I'm sure. ;)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3360 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-20 00:37:34 +00:00
Michael Bayne 41fb0b1b80 The PuzzleService was superfluous. The ParlorService can handle starting
single player games and indeed should because it's useful outside the
context of puzzles and their ilk.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3359 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-19 22:38:06 +00:00
Michael Bayne 4036d12121 Further test fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3358 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-17 02:14:44 +00:00
Michael Bayne e8705b6137 We need more libraries.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3357 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-17 02:07:10 +00:00
Michael Bayne c0cd2cd3ca Further repairs to the build configuration.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3356 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-17 02:05:35 +00:00
Michael Bayne 2198748dcb Brought the tests back into the land of compilability.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3355 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-17 01:54:54 +00:00
Ted V ebf4d7cfa2 Now throws the proper type of exception when a color name lookup fails.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3354 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-16 22:21:01 +00:00
Ted V 785259a4a8 Quite obviously the parsing should check for integers, not bytes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3353 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 21:44:35 +00:00
Ted V d618c12c93 Added accessor function that handles color name -> id lookups.
Could be made faster with some sort of reverse string lookup table,
but it doesn't seem worth the overhead right now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3352 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 20:53:49 +00:00
Michael Bayne 93794d5a77 Fixed some comment grammar.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3351 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 01:02:17 +00:00
Michael Bayne 877892b4c8 Allow the ZoneManager to veto a body's departure from the zone.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3350 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 00:58:16 +00:00
Michael Bayne 7cf98ba971 Automatically lay out our label if it has not already been.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3349 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-14 03:01:28 +00:00
Michael Bayne 99d382fdbf Updated the constructor.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3348 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-14 03:01:14 +00:00
Michael Bayne 459d677a2f Provide the AbstractMediaManager with a reference to the panel it's
working with rather than just the RegionManager.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3347 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-14 03:00:58 +00:00
Michael Bayne 113ca65f7a We need to know who did the dirty deed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3346 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-10 22:47:56 +00:00
Michael Bayne 8f9af12fdb Use a direct buffer for our overflow queue partial buffer as well because
there will be relatively few of those (at most one per client that is
experiencing lag) and while the client is experiencing lag we will be
trying to write their data once per pass through the sockets (which could
be hundreds of times a second) and we don't want each write attempt to
result in the creation of a temporary direct buffer.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3345 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-10 04:39:23 +00:00
Ray Greenwell 10e84f9471 Gee wally, now that sound is fixed, let's go back to expiring late sounds
at a reasonable time again.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3344 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-10 04:00:12 +00:00
Ray Greenwell 5ff24097a7 Tested and verified: the bug is fixed. Removed extra debugging, found
another instance of append() that needed to be changed to appendLoud().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3343 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-09 23:02:39 +00:00
Ray Greenwell 2ff14aa456 Well then! That last bit of debugging has finally shown me the light!
Queue.append() only does a notify() if the queue was previously empty.
So when the dobj thread was requesting two sounds one after another, it
only woke up one player thread, which played the first sound and then
came back 'round to play the next sound after it was done. The next sound
was usually expired by that time.

Use queue.appendLoud(), which always wakes up a waiter thread.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3342 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-09 22:34:55 +00:00
Ray Greenwell 67521e973d Even more logging, to ensure that two different threads are indeed playing
these two different sounds.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3341 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-09 22:02:22 +00:00
Ray Greenwell 86757cb55e Even more verbose logging to figure out why the sound manager is being so
slow.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3340 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-09 20:59:14 +00:00