Commit Graph

898 Commits

Author SHA1 Message Date
Michael Bayne 65900ecefa Added getHitSprites() which populates a list with the sprites that are
"hit" by a particular pixel as determined by Sprite.hitTest().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@898 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-31 01:04:13 +00:00
Michael Bayne c80ddcee22 Added hit test which checks first to see if a pixel is in a sprite's
bounding box and then checks to see that the pixel in question is occupied
by a non-transparent pixel in the sprite's image.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@897 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-31 01:03:45 +00:00
Michael Bayne cf598ed396 render() takes a Graphics2D now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@896 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-31 01:02:37 +00:00
Michael Bayne 80c9550a57 Added some debugging, but commented it out.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@895 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-30 18:30:43 +00:00
Michael Bayne a07282b2d2 Added support for associating an action with any of the object tiles in
the scene. This will eventually be interpreted by the scene rendering code
to allow objects to be clickable.

Also rewrote scene serialization code using new Java buffer services which
are much more efficient at reading and writing arrays of integers.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@894 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-30 18:28:32 +00:00
Michael Bayne 617d0e8cb0 Initial revision of localization support classes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@893 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-29 20:44:35 +00:00
Michael Bayne 93d36a81ef Moved ZoneUtil from whirled.zone.server.util to whirled.zone.util because
we need to use it on the client. This will necessitate some CVS jockeying
because the server/util directory no longer exists in the repository.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@892 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-29 02:05:49 +00:00
Michael Bayne 61730287ca Added code for marshalling arrays of streamables.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@891 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-23 18:01:19 +00:00
Walter Korman 5510400f45 Pass a Graphics2D to AnimatedPanel.render() so that sub-classes needn't
explicitly typecast it on their own, as they are almost invariably wont to
do.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@890 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-23 17:10:41 +00:00
Walter Korman d6b17cd36c Reduced the specificity of the object detailing the bounds within which to
render sprites to a Shape rather than a Polygon.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@889 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-22 20:09:02 +00:00
Walter Korman 651ff37b66 Javadoc edits.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@888 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-22 18:58:52 +00:00
Walter Korman 606fe42305 Updated to reflect keyboard manager modifications.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@887 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-22 18:11:33 +00:00
Michael Bayne 6a5e8cd82b Added standard ACCESS_DENIED code.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@886 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-22 02:50:36 +00:00
Michael Bayne ec192b88d3 Added back overridden update() because Canvas.update() clears its whole
self when update is called which is seriously undesirable.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@885 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 07:09:55 +00:00
Michael Bayne bcd203d045 No longer need to create our animation manager.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@884 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 07:04:46 +00:00
Michael Bayne c03126153d Automatically create an animation manager for the animated panel; modified
the code that interacts with AWT repaint mechanisms to play nicely and
communicate AWT's repaint desires to the animation manager to be queued up
with our normal repainting.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@883 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 07:04:28 +00:00
Michael Bayne 408b3b6cb4 Make sure we have a sprite manager before talking to it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@882 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 07:01:19 +00:00
Michael Bayne df0ec942bd Added ability to construct animation manager without sprite manager and
then provide the reference later.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@881 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 07:00:40 +00:00
Walter Korman 4653b0b0a7 Absorb key-typed events and be more cautious about when to dispatch key
events.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@880 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 06:07:20 +00:00
Walter Korman 5366ae4ca3 Allow rendering explosion chunks with either image portions or rectangles
of a specified color.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@879 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 06:06:05 +00:00
Michael Bayne a0a1a48057 Have to separately alloc and init now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@878 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 04:16:02 +00:00
Michael Bayne c6b0638e9e Apparently, we need an explicit protected constructor in the client
context impl inner class.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@877 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 04:15:25 +00:00
Michael Bayne ef9c12672e Restructured MiCasaClient such that it could be extended for games that
need a custom (extended) client context.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@876 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 04:02:11 +00:00
Walter Korman e2fbfdf38c Reworked focus handling so that the keyboard manager only loses focus when
(a) the target component is removed, or (b) the window containing the
target component loses focus.  Moreover, the keyboard manager now steals
keys from any other components (explicitly irrespective of the AWT or
Swing notion of keyboard focus) via the KeyboardFocusManager as long as
it's enabled and has the focus as previously defined.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@875 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 01:19:56 +00:00
Walter Korman 2f4ef45546 Initial version.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@874 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-18 23:58:27 +00:00
Walter Korman 0f27719f0e Repackaged keyboard manager related classes for their new location in
com.threerings.util.  Moved RobotPlayer into util package from yohoho.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@873 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-18 23:32:15 +00:00
Walter Korman bbce846874 Whitespace changes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@872 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-18 23:12:09 +00:00
Walter Korman 8393055218 Changed default transparency of blank images to BITMASK rather than
TRANSLUCENT since that's what we prefer.  Made ImageManager use ImageUtil
to create blank images.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@871 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-18 17:55:43 +00:00
Walter Korman d6aa41396b Added ImageUtil.createImage() to create blank images that are compatible
with the destination screen device.  Updated existing code that previously
created buffered images directly to reference ImageUtil.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@870 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-18 17:48:11 +00:00
Walter Korman ea88a4dd68 Simple animation that renders rain drops for a specified period of time.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@869 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-18 16:22:23 +00:00
Michael Bayne c6e4b73851 Added comments to some code that needs to be fixed later.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@868 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-17 23:43:14 +00:00
Michael Bayne 31fce734b7 Notes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@867 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-16 04:15:45 +00:00
Michael Bayne b9f77beded Construct resource manager according to new method.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@866 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-16 03:01:45 +00:00
Michael Bayne 18e5f823ba Resource manager needs be constructed differently now that it loads
resources via a URL.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@865 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-16 03:01:24 +00:00
Michael Bayne 3562e9271b Use resource_url instead of application.root.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@864 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-16 03:00:51 +00:00
Michael Bayne dc00808761 Get shared java libraries from JAVA_LIBS; use resource_url instead of
application.root.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@863 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-16 03:00:37 +00:00
Michael Bayne d4e2058ea6 Modified the resource manager to load resource sets not from the file
system but from a URL into a local cache. It presently loads all of the
resources every time the application starts. This will eventually be made
to be more sophisticated.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@862 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-16 03:00:06 +00:00
Michael Bayne b88b5c61e5 Modified the simulator stuff to allow it to be extended with the intent of
providing a specially configured client context for use by the code that
runs in the simulator.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@861 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-16 02:59:08 +00:00
Michael Bayne 30dab8586f Use the JAVA_LIBS environment variable to determine where our common java
libraries are to be found.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@860 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-16 02:57:19 +00:00
Michael Bayne 990c8cf1c4 We specify resource_url rather than application.root now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@859 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-16 02:56:45 +00:00
Michael Bayne 40013948c2 Look in JAVA_LIBS for the system-wide java libraries rather than hard
coding the path to /usr/share/java. This allows us to set JAVA_LIBS to the
path to yolibs when building and running Narya code.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@858 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-16 00:41:52 +00:00
Michael Bayne 17b7dac87a These moved into yolibs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@857 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-15 18:22:03 +00:00
Walter Korman f70fc3aa60 Each image chunk has its own velocity and follows a trajectory path
impacted by a specifiable y-axis acceleration.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@856 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-15 18:10:25 +00:00
Walter Korman 5deda8b1f8 Added getFloat().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@855 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-15 18:05:01 +00:00
Walter Korman c25c66493e Pass the starting time for the animation in the constructor to allow
application code to make sure all animations are in sync, and to avoid
repeated calls to System.currentTimeMillis().


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@854 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-15 02:20:02 +00:00
Walter Korman 4e3d7d9ece Properly handle a key press followed by seemingly-impossibly-fast,
night-instant key release.  Added optional debug logging of key events at
the KeyboardFocusManager level for good measure.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@853 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-12 02:37:57 +00:00
Walter Korman 3fc64a8066 Simple test applications for examining keyboard events and testing the
keyboard manager functionality.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@852 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-12 02:31:16 +00:00
Walter Korman 70ac159095 Rotate the image chunks as they fly away. Made chunk count configurable.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@851 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-11 19:37:49 +00:00
Walter Korman e78607da60 Commented out verbose logging. Minor clean-up.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@850 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-11 16:53:34 +00:00
Walter Korman aa574a8182 Added support for animations to the animation manager. Moved animation
classes into their own package.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@849 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-11 16:17:34 +00:00