Commit Graph

134 Commits

Author SHA1 Message Date
Michael Bayne 41a69ba13f Whoops, that'll need to actually be Streamable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2619 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-28 01:18:41 +00:00
Ray Greenwell d407253540 Iterate over the entries and save the key and value without having to
look up the value.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2618 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-27 23:00:22 +00:00
Ray Greenwell 1176ca526e No need to do hash lookups in writeObject().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2617 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-27 22:54:36 +00:00
Michael Bayne 5c9a0246d9 A streamable hash map.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2616 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-27 22:48:31 +00:00
Michael Bayne 8e820811bc No reason that embedded translation strings can't also be qualified (it's
quite necessary in fact).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2594 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-20 20:58:31 +00:00
Ray Greenwell 2f166d2bb1 Added getInt(high, low).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2583 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-16 02:21:37 +00:00
Michael Bayne 98e3e530da Remove verbose logging.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2563 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-09 18:40:07 +00:00
Michael Bayne cde14e4bfa Ignore the generated .def files.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2560 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-09 03:22:39 +00:00
Michael Bayne 9a5bea62fd Possibly working code to cross-compile Windows native DLL. Whee!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2559 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-09 03:22:16 +00:00
Michael Bayne ff691ca88c There's no two ways about it. This shit is definitely not safe.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2556 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-08 21:25:20 +00:00
Ray Greenwell 1387c9f08b Clarified documentation somewhat. It's too hot today.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2552 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-07 19:47:02 +00:00
Ray Greenwell b545d1ff05 Added moveDirection() which can move a point in the specified
screen direction.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2551 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-07 19:41:57 +00:00
Michael Bayne 7457e46374 MacOS safety project, phase 1.1.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2537 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-05-03 00:12:12 +00:00
Eric Lundberg 3d290efb21 A streamable intint map, it's amazing!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2446 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-04-22 23:36:56 +00:00
Michael Bayne b9f4c24a7a Allow 10 milliseconds to elapse before we'll register another ctrl-c
rather than just 1.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2363 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-31 04:10:03 +00:00
Michael Bayne 5f160cbd3a Whipped up some native code to allow signals to be caught and handled from
within Java (on Linux anyway). We dig it the most baby!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2360 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-31 02:10:04 +00:00
Ray Greenwell 6eb6289a48 return -1 rather than puke if invalid weights are specified for
getWeightedIndex.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2310 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-18 19:38:30 +00:00
Michael Bayne 7295ef9f87 Add support for handling plurality more simply.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2300 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-05 23:27:39 +00:00
Ray Greenwell 15792c5928 added getWeightedIndex().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2298 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-03-05 02:50:28 +00:00
Ray Greenwell 7bde1b3b4b Use JAVA_HOME rather than hardcoding the path.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2286 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-18 23:06:54 +00:00
Michael Bayne f0628cfeac A streamable hash int map; whee!
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2283 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-18 03:01:16 +00:00
Michael Bayne a54b3e279c Added getOpposite().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2273 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-12 07:22:04 +00:00
Ray Greenwell 1a3699b39c Changed the default initial keyrepeat delay to 500ms from 150ms.
It should at least be higher than the repeat rate (200ms), and I think 500ms
is about right. That's what X defaults to, I believe.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2251 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-02-10 18:48:16 +00:00
Michael Bayne cc680cbd17 Give the native keyboard library a chance to initialize itself and
determine whether or not all is well. Use that opportunity in the Linux
keyboard library to determine whether or not we can open a connection to
the X server, and if not, disable the library rather than throwing a
RuntimeException the first time we are called and generally sticking a
fork in the whole program.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2213 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-23 19:00:44 +00:00
Walter Korman a5c348a775 Added support for specifying the delay in milliseconds before a pressed
key begins to auto-repeat.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2170 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-17 01:33:34 +00:00
Walter Korman fbb5fb841a Don't post the key press command when the repeat interval fires if the key
has been released.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2165 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-16 21:18:02 +00:00
Walter Korman 0a5104a70c Allow specifying the rate at which individual key presses are to be
repeated.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2133 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-14 00:53:38 +00:00
Walter Korman 7953fb0b24 Oops; use the install target as the main target so that we only rebuild
things when it's actually necessary to do so.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2112 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-12 02:06:10 +00:00
Walter Korman 786f6f8a63 Build the native linux keyboard library as part of the normal compilation
task and place it in dist/lib/i686-Linux.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2111 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-12 02:04:19 +00:00
Walter Korman 494fc1a620 Ignore the dll.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2108 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-12 01:19:05 +00:00
Walter Korman de6c4371b9 Initial version of linux (working) and Windows (not yet working) native
libraries for enabling and disabling keyboard auto-repeat.  Restored
auto-repeating in our own KeyboardManager, and disabled the interval used
to differentiate between a "real" and "fake" key repeat since we believe
we can now do without it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2107 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-12 00:26:39 +00:00
Walter Korman 3d2e98f7da Fixed typo in comments. Tried to resist due to negligibility of typo, but
the perfectionist in me got the better of, me.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2061 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 22:27:25 +00:00
Michael Bayne d6f5a4da4d Added support for fully qualified translation messages which will be
fetched from the message bundle embedded in the fully qualified key even
if they are being translated within the context of another message bundle.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2060 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 22:24:51 +00:00
Michael Bayne 58d728aa91 Log a stack trace if we're missing a translation message so that it's easy
to track down the offender.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1933 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-12 08:18:03 +00:00
Michael Bayne 80b97158d2 Don't attempt further translation on tainted arguments in compound
translation keys. They might contain | which would cause xlate() to think
that they were another compound key.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1931 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-10 03:14:45 +00:00
Ray Greenwell 800a3e8a80 Don't swallow keys unless we dispatched them to a puzzle.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1928 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-08 08:17:35 +00:00
Walter Korman dea46e4cc0 Assume the keyboard focus, or relinquish it, when we're enabled or
disabled respectively.  Sanity-check before adding ourselves as a window
focus listener when enabled to make sure we don't add ourselves more than
once.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1890 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-04 22:28:58 +00:00
Walter Korman 7b9f0332f1 Cleaned things up so that a single keyboard manager is to be constructed
and used throughout an application that cares to make use of its
functionality.  Allow registering key observers that are notified of all
key presses while the keyboard manager is active.  Clear things out
properly when the keyboard manager is disabled or reset.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1884 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-02 00:59:00 +00:00
Michael Bayne b07fef8396 Added support for a global message bundle to which other bundles fall back
if they can't find a message in their own list of strings.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1876 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-01 00:01:37 +00:00
Ray Greenwell 316634eb58 report idle / disconnected times when whispering.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1865 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-30 01:47:12 +00:00
Michael Bayne 4bababc95e Removed smoothing for the time being. Now a key up registers immediately,
but we are saddled with the key repeat delay for rapid sideways movement.
This will eventually all change when we have native libraries for turning
off key repeat.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1797 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-09 08:17:02 +00:00
Michael Bayne e8c7ba6084 Not to freak out if some unruly caller sends us null arguments.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1648 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-16 19:31:39 +00:00
Michael Bayne eb0f92fcef Brought things into line with new streaming world order.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1607 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-23 05:54:53 +00:00
Walter Korman 627ee5a1db Javadoc fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1557 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-02 23:15:53 +00:00
Michael Bayne e75ae89f22 Various and sundry modifications to clean up orientation handling and add
support for 16 orientations in situations where it is merited.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1548 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 23:53:07 +00:00
Michael Bayne c3bbaa3e40 Modified getDirection() to use arc tangent so that it maps angles smoothly
to their nearest compass direction instead of the wacky way it did before.
Also added getFineDirection() along with rotateCW() and rotateCCW() to
rotate through (fine) directions (though coarse directions can be rotated
as well, simply by always requesting two ticks of rotation). Also wrote
some test code to make sure everything works.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1545 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 02:54:56 +00:00
Michael Bayne 5124b68339 Added fine compass directions (NNW, ENE, etc.).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1544 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 02:37:18 +00:00
Michael Bayne b07fbe123b Added mechanism for fetching resource strings that doesn't complain when
they don't exist.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1390 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-24 20:33:30 +00:00
Michael Bayne 9bb8f1b524 Moved routines to calculate orientation from point a toward point b into
DirectionUtil.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1373 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-17 21:12:14 +00:00
Walter Korman f0ebe247e4 Fixed javadoc typo.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1349 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-08 21:15:26 +00:00