Commit Graph

95 Commits

Author SHA1 Message Date
Michael Bayne 4357c047f3 Trimmed tileset takes care of setting up its name, but the image path must
be set by the caller.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1525 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 18:44:28 +00:00
Michael Bayne c3c08a03b3 Refactored the tileset trimming code so that it can more easily be reused
to trim object tilesets.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1524 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-21 18:09:37 +00:00
Michael Bayne 1f80cf9805 Cleaned up some sprite business: better documented various things, changed
local member names to reflect their actual functionality, flipped the sign
of the origin offset so that it's an offset rather than a negative offset.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1512 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 21:42:53 +00:00
Michael Bayne 29cd8ec051 Sanity check the sources we're passed for compositing.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1511 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-20 18:31:03 +00:00
Michael Bayne 0ddf11ab57 Major revampage to support composited actions that create images that are
exactly big enough to accomodate all of their trimmed components and no
bigger.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1501 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 23:31:57 +00:00
Michael Bayne 5a98d450a1 Cleaned up; don't attempt to edit classes with no components; no need to
use the FrameManager and MediaPanel for displaying sprites since we're not
doing things properly anyway (properly meaning using a sprite manager and
all the associated business).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1497 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 23:24:04 +00:00
Michael Bayne 33158f5e8a Component bundling process now automatically generates trimmed tilesets
and images from the untrimmed source tilesets and images.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1490 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 08:33:14 +00:00
Walter Korman 1f32380f62 Descriptors are inequal if one has colorizations and the other doesn't.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1471 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-18 04:55:44 +00:00
Walter Korman 830364c48d Increased the frame action cache size to 30 for now. We'll likely want to
allow setting this externally in the near future, but we'll iron that out
later when we get around to scrutinizing all of the caching business more
closely.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1462 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-14 21:15:31 +00:00
Ray Greenwell 7ffa3087e1 Don't switch to a rest action if null is returned by getRestingAction()
(used now in YoCharacterSprite)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1444 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-12 07:00:49 +00:00
Michael Bayne ccbc47a7de Separated path code from sprite code so that we can have other things
follow a path (specifically, I want to allow the media panel to be
"scrolled" along a path).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1409 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-31 03:38:03 +00:00
Michael Bayne 7c4f86e63a pathBeginning() and pathCompleted() need to be public so that we can
create paths outside the media.sprite package.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1407 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-29 23:27:14 +00:00
Michael Bayne a52d62d532 Modified ActionFrames because having it implement MultiFrameImage and just
"remember" which orientation it should be doing was not working out
because multiple sprites can share the same action frames and they would
step on one anothers' toes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1360 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-15 23:54:05 +00:00
Michael Bayne 181fa3269d Only update ourselves in halt() if we actually stopped something.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1342 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-06 23:24:15 +00:00
Michael Bayne 99c4330646 The vast and the sweeping. Modified the tile framework such that tiles no
longer provide access to their underlying image (they actually still do,
but not in the normal course of affairs). This will allow us to use
"trimmed" tiles which are trimmed to the smallest rectangle that contains
the non-transparent pixels in a tile image, which will shrink up our
components and other tiles a great deal.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1339 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-06 18:08:32 +00:00
Michael Bayne 37a1167fb5 Revamped component action animation support so that we're not passing
around arrays of multi-frame images but instead pass around one object
that knows how to render any action frame in any orientation. This
apparently fixed some horrible bug that we had introduced in doing JITC
and now the whole thing is super fast, just like I always thought it would
be. Once we introduce trimmed images, it will blaze!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1336 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 19:38:14 +00:00
Michael Bayne 554fb9e249 First pass at just in time compositing (JITC!). Things aren't quite as
fast as I'd have hoped, but I'm optimistic that the image compression
business that Walter and I are embarking upon will solve that handily.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1333 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 06:57:24 +00:00
Michael Bayne 0bde11ee81 Major low-level rendering rethink.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1287 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-23 01:18:17 +00:00
Michael Bayne 4c59b73cdf Added didInit() so that derived classes can do post-initialization stuff
without having to override init() and pointlessly import and pass through
the CharacterDescriptor and CharacterManager.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1265 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-17 15:53:49 +00:00
Michael Bayne 1678b84227 Sanity check our orientation in setOrientation() and complain sensically
if it's bogus (rather than NPEing).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1251 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-15 23:07:14 +00:00
Michael Bayne ccdacd96d5 Add additional method for getting a character using a special character
sprite derived class.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1250 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-15 23:06:49 +00:00
Michael Bayne 06f8a68b56 Moved RandomUtil from media.util to util.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1248 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-15 18:18:20 +00:00
Michael Bayne 9c59b1c1ad Added simple tool for dumping the serialized component map.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1230 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-11 01:34:09 +00:00
Michael Bayne 37a86781f4 Only save the component map if we changed it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1229 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-11 01:33:51 +00:00
Michael Bayne 03a68efe7c Switched to doing serialization by hand because I got tired of Java's
fucking serialization crapping out when the class was recompiled and its
panties got into a bunch.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1216 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-07 23:15:29 +00:00
Michael Bayne 4afaa186eb Track some repackaging in the Jakarta libs.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1168 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-01 16:49:26 +00:00
Michael Bayne 4c43512f3b Define frames per second in floating point.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1163 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-27 21:51:33 +00:00
Michael Bayne 127582ca1c Be more robust about selecting random components.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1158 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-27 21:48:41 +00:00
Michael Bayne 97e04e29d7 Need to specify gender information when generating character.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1157 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-27 20:31:11 +00:00
Walter Korman 76cff072be Split Sprite into Sprite and ImageSprite. Added LabelSprite. Cleaned up
directional constant usage.  Added ability to render sprites in two
distinct layers.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1132 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-16 03:15:06 +00:00
Michael Bayne 987dd60efc Modified the way the following-path and resting actions are fetched so
that we can specialize the character sprite to choose a resting action at
random.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1122 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-15 01:10:25 +00:00
Michael Bayne b7527ae421 Handle null colorization entries.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1116 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-10 22:31:21 +00:00
Michael Bayne 1bc7dfa6fa Made a note that the colorization arrays can contain null elements.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1115 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-10 22:31:06 +00:00
Michael Bayne 1b7f56ca9e Obey new CharacterDescriptor constructor signature. (That's a lot of
syllables).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1113 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-08 22:37:50 +00:00
Michael Bayne c3eb78e520 Restructure component bundle building so that character components can
have class names with slashes in them (for better heirarchicalization,
like male/torso).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1111 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-08 22:36:43 +00:00
Michael Bayne 4b100da3bd Added support for changing a sprite's character descriptor in situ.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1110 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-08 22:35:55 +00:00
Michael Bayne b5f626d868 Dispose of the image graphics when we're done rendering to it.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1107 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-08 18:13:14 +00:00
Michael Bayne f8dbde0096 Use loadImage() rather than createImage() because we want the raw (indexed
color) image rather than one prepped for display.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1105 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-08 09:35:14 +00:00
Michael Bayne 782bd9b7d9 Added support for colorization to the character manager. It is yet
untested.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1102 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-08 07:50:32 +00:00
Michael Bayne 73b01b421c New component classes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1093 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-05 07:15:27 +00:00
Michael Bayne 22d0839b72 Not to freak out if we have no frames.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1083 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-04 22:47:06 +00:00
Michael Bayne 4641d00583 Moved ImageUtil into media.util with the rest of the util classes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1067 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-24 02:20:44 +00:00
Michael Bayne 04f0421e28 Can't generate a random character from all the classes now that we have
non-character classes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1066 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-21 06:01:51 +00:00
Michael Bayne ade0080446 Added support for obtaining character components by class name and
component name, which is handy when you don't want to do compositing, but
just want to load single "component" characters.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1057 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 22:09:50 +00:00
Michael Bayne e7022fcfff Added facilities for specifying the resting and path-following actions
because they won't always be standing and walking.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1056 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-19 22:09:08 +00:00
Michael Bayne 648c1c3c99 Need to use / not File.separator because apparently jar files always want
forward slashes. (Write once, run anywhere!)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1015 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-18 00:06:57 +00:00
Walter Korman 45f32c4622 Added resolveActionSequence() to provide a facility for letting the
character manager know that certain action sequences for a character
descriptor will be needed in the near future.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@984 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-10 00:05:36 +00:00
Walter Korman 2420c9a1a6 Actually reference the action cache when attempting to retrieve action
sequences.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@983 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-09 23:39:17 +00:00
Michael Bayne ed63ea9679 Provided hooks for a disk-based cache for composited action animations.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@956 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-07 03:20:29 +00:00
Walter Korman 45f7d96d70 Include the mapfile path in build exception messages.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@945 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-06 19:33:36 +00:00