Commit Graph

17 Commits

Author SHA1 Message Date
Michael Bayne 100aa3ace3 Major media subsystem revamp:
- All images are loaded through the image manager
- Architected to allow the use of prepared or unprepared images (and
  volatile images when the day comes that they support alpha)
- Tunable caches for images and tiles
- Resource manager caches unpacked resources on the filesystem
- Various and sundry other cleanups


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2116 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-13 22:49:47 +00:00
Michael Bayne c8502d212c Have to initialize our path on the first call to tick() now.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1976 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-20 05:33:20 +00:00
Ray Greenwell a0730067ec Pulled out gobs of Sprite/Animation functionality into AbstractMedia.
Pulled out gobs of SpriteManager/AnimationManager functionality into
  AbstractMediaManager.
The big change: sprites can have their render order fine-tuned like
animations.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1787 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-08 21:03:37 +00:00
Michael Bayne 369900bf1a Formatting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1697 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-17 20:21:19 +00:00
Michael Bayne c08067ac1f Added convenience constructor for simple single frame image sprite.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1693 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-17 19:14:59 +00:00
Michael Bayne 380fa50610 Moved MultiFrameImage and friends from media.sprite into media.util
because they'll be used for both sprites and animations.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1692 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-17 19:11:13 +00:00
Ray Greenwell 5e286e5bab added TIME_SEQUENTIAL animation mode which shows frame 0 first, and
for the full duration.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1687 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-09-17 02:34:05 +00:00
Michael Bayne db0c1b59b8 It's not kosher to set a sprite's location until after it is fully
constructed. The reason being that derived classes want to override things
like updateRenderOrigin() which should be called every time the sprite's
location is set, but if we do it in the base class constructor, a derived
class's updateRenderOrigin() will be called before the derived class's
constructor has been called. This is not good. Neither was the existing
code which simply half-assed a location change by updating the sprite's
origin position but not calling updateRenderOrigin(), leaving things
generally confuzzled.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1559 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-08 21:15:35 +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 330767e193 Cleaned up a few things related to render origin. If a derived class wants
the render origin to be other than (_x, _y) it can update (_rxoff, _ryoff)
when it is appropriate to do so, but we don't really need an overridden
method to do that.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1500 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-19 23:30:06 +00:00
Ray Greenwell b9ba9b3d66 bugfix: ImageSprites constructed with their frames were hosed and never
got drawn.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1425 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-05 23:38:18 +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 47e38b4fa8 Changed MultiFrameImage around so that it retains total control over its
internal images and doesn't necessarily need to decode them into multiple
images or even have actual images at all. This cleans things up and paves
the way for our "trimmed" image support which is forthcoming.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1335 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-04 19:35:31 +00:00
Michael Bayne cc6a9d00ef Major low-level rendering rethink. There will be much follow-on cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1286 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-23 01:16:28 +00:00
Michael Bayne 42dc17a474 Started refactoring code to allow derived classes to expand the bounds of
the sprite to contain more than just the image. I didn't go all the way
though because I started looking at the stuff to handle render origin and
render offset and couldn't bring myself to add another offset into the mix
so it'll have to wait until I can give it some more serious thought and
perhaps simplify what we've got.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1264 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-17 15:52:49 +00:00
Michael Bayne be1ef2c1a2 Allow specification of fps in floating point.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1162 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-27 21:51:15 +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