Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

Rt2dAnim
[Rt2dAnim (inc. Maestro)]


Data Structures

struct   Rt2dAnim
struct   Rt2dAnimObjectUpdate
struct   Rt2dAnimProps
struct   Rt2dKeyFrame
struct   Rt2dKeyFrameColor
struct   Rt2dKeyFrameList
struct   Rt2dKeyFrameMorph
struct   Rt2dKeyFrameSet
struct   Rt2dKeyFrameShow
struct   Rt2dKeyFrameTransform

Typedefs

typedef Rt2dKeyFrameList *(  Rt2dKeyFrameListCallBack )(Rt2dAnim *anim, Rt2dAnimProps *props, Rt2dKeyFrameList *keyframeList, RwReal keyframeListTime, void *data)
typedef Rt2dAnim *(*  Rt2dAnimOnEndReachedCallBack )(Rt2dAnim *anim, Rt2dAnimProps *props, RwReal remainingDeltaTime)

Functions

Rt2dAnim Rt2dAnimCreate (void)
RwBool  Rt2dAnimDestroy (Rt2dAnim *anim, Rt2dAnimProps *props)
Rt2dAnim Rt2dAnimLock (Rt2dAnim *anim, Rt2dAnimProps *props)
Rt2dAnim Rt2dAnimUnlock (Rt2dAnim *anim, Rt2dAnimProps *props)
Rt2dAnim Rt2dAnimAddKeyFrameList (Rt2dAnim *anim, Rt2dKeyFrameList *keyframeList, RwReal time)
RwUInt32  Rt2dAnimStreamGetSize (Rt2dAnim *anim, Rt2dAnimProps *props)
Rt2dAnim Rt2dAnimStreamRead (RwStream *stream, Rt2dAnimProps *props)
Rt2dAnim Rt2dAnimStreamWrite (Rt2dAnim *anim, RwStream *stream, Rt2dAnimProps *data)
Rt2dAnim Rt2dAnimReset (Rt2dAnim *anim, Rt2dAnimProps *props)
Rt2dAnim Rt2dAnimSetDeltaTimeScale (Rt2dAnim *anim, RwReal timeScale)
Rt2dAnim Rt2dAnimAddDeltaTime (Rt2dAnim *anim, Rt2dAnimProps *props, RwReal deltaTime)
Rt2dAnim Rt2dAnimAddDeltaFrameIndex (Rt2dAnim *anim, Rt2dAnimProps *props, RwInt32 deltaFrame)
Rt2dAnim Rt2dAnimTimeUpdate (Rt2dAnim *anim, Rt2dAnimProps *props)
Rt2dAnim Rt2dAnimGotoKeyFrameListByTime (Rt2dAnim *anim, Rt2dAnimProps *props, RwReal time)
Rt2dAnim Rt2dAnimGotoKeyFrameListByIndex (Rt2dAnim *anim, Rt2dAnimProps *props, RwInt32 frameIndex)
Rt2dAnim Rt2dAnimForAllKeyFrameLists (Rt2dAnim *anim, Rt2dKeyFrameListCallBack callBack, Rt2dAnimProps *props, void *data)
RwInt32  Rt2dAnimGetNumberOfKeyFrames (Rt2dAnim *anim)
Rt2dKeyFrameList Rt2dAnimGetKeyFrameListByIndex (Rt2dAnim *anim, RwUInt32 frameIndex)
RwReal  Rt2dAnimGetCurrentTime (Rt2dAnim *anim)
RwReal  Rt2dAnimGetFinalKeyFrameListTime (Rt2dAnim *anim)
RwInt32  Rt2dAnimGetPrevFrameIndex (Rt2dAnim *anim)
RwReal  Rt2dAnimGetPrevFrameTime (Rt2dAnim *anim)
RwInt32  Rt2dAnimGetNextFrameIndex (Rt2dAnim *anim)
RwReal  Rt2dAnimGetNextFrameTime (Rt2dAnim *anim)
RwBool  Rt2dAnimIsInterpolated (Rt2dAnim *anim)
Rt2dAnim Rt2dAnimSetInterpolate (Rt2dAnim *anim, RwBool interpolate)
Rt2dAnim Rt2dAnimCopy (Rt2dAnim *srcAnim, Rt2dAnimProps *srcProps)
Rt2dAnimObjectUpdate Rt2dAnimObjectUpdateCreate (Rt2dObject *object)
RwBool  Rt2dAnimObjectUpdateDestroy (Rt2dAnimObjectUpdate *update)
Rt2dAnimObjectUpdate Rt2dAnimObjectUpdateClear (Rt2dAnimObjectUpdate *update)
Rt2dAnimObjectUpdate Rt2dAnimObjectUpdateSetTransform (Rt2dAnimObjectUpdate *update, Rt2dKeyFrameTransform *transform)
Rt2dAnimObjectUpdate Rt2dAnimObjectUpdateSetColorOffs (Rt2dAnimObjectUpdate *update, Rt2dKeyFrameColor *colorOffs)
Rt2dAnimObjectUpdate Rt2dAnimObjectUpdateSetColorMult (Rt2dAnimObjectUpdate *update, Rt2dKeyFrameColor *colorMult)
Rt2dAnimObjectUpdate Rt2dAnimObjectUpdateSetShow (Rt2dAnimObjectUpdate *update, Rt2dKeyFrameShow *show)
Rt2dAnimObjectUpdate Rt2dAnimObjectUpdateSetMorph (Rt2dAnimObjectUpdate *update, Rt2dKeyFrameMorph *morph)
Rt2dAnimObjectUpdate Rt2dAnimObjectUpdateSetObject (Rt2dAnimObjectUpdate *update, Rt2dObject *object)
Rt2dKeyFrameList Rt2dKeyFrameListCreate (Rt2dAnimProps *props)
RwBool  Rt2dKeyFrameListDestroy (Rt2dKeyFrameList *keyframeList)
Rt2dKeyFrameList Rt2dKeyFrameListLock (Rt2dKeyFrameList *keyframeList, Rt2dAnimProps *props)
Rt2dKeyFrameList Rt2dKeyFrameListUnlock (Rt2dKeyFrameList *keyframeList, Rt2dAnimProps *props)
Rt2dKeyFrameList Rt2dKeyFrameListAddUpdateObject (Rt2dKeyFrameList *keyframeList, Rt2dAnimObjectUpdate *update)
RwUInt32  Rt2dKeyFrameListStreamGetSize (Rt2dKeyFrameList *keyframeList)
Rt2dKeyFrameList Rt2dKeyFrameListStreamWrite (Rt2dKeyFrameList *keyframeList, RwStream *stream)
Rt2dKeyFrameList Rt2dKeyFrameListStreamRead (RwStream *stream)
Rt2dKeyFrameList Rt2dKeyFrameListAdvance (Rt2dKeyFrameList *keyframeList, Rt2dAnimProps *props)
Rt2dKeyFrameList Rt2dKeyFrameListApply (Rt2dKeyFrameList *keyframeList, Rt2dAnimProps *props, RwReal alpha)
Rt2dAnimProps Rt2dAnimPropsCreate (Rt2dObject *scene)
RwBool  Rt2dAnimPropsDestroy (Rt2dAnimProps *props)
void  Rt2dAnimOpen (void)
void  Rt2dAnimClose (void)
Rt2dAnimOnEndReachedCallBack  Rt2dAnimSetOnEndReachedCallBack (Rt2dAnimOnEndReachedCallBack callback)
Rt2dAnimOnEndReachedCallBack  Rt2dAnimGetOnEndReachedCallBack (void)
Rt2dAnim Rt2dAnimOnEndReachedCallBackLoop (Rt2dAnim *anim, Rt2dAnimProps *props, RwReal remainingDeltaTime)
Rt2dAnim Rt2dAnimOnEndReachedCallBackStop (Rt2dAnim *anim, Rt2dAnimProps *props, RwReal remainingDeltaTime)

Detailed Description

Animation functions

Rt2dAnim Overview

Rt2dAnim is a low level structure that can be used to coordinate an animation on a single level of 2d scene. Animations are constructed out of a sequence of Rt2dKeyFrameList objects on the scene. Individual updates to the scene are scheduled through setting changes in Rt2dAnimObjectUpdate objects. Most animation operations are carried out in conjunction with an Rt2dAnimProps structure that enables the keframe lists to be constructed against an existing scene.

See also:
Rt2dAnimCreate , Rt2dKeyFrameListCreate , Rt2dSceneCreate

Typedef Documentation

typedef Rt2dAnim*(* Rt2dAnimOnEndReachedCallBack)(Rt2dAnim *anim, Rt2dAnimProps *props, RwReal remainingDeltaTime)
 

Rt2dAnimOnEndReachedCallBack This typedef defines a callback function called at the end of an animation.

Parameters:
anim  Pointer to the animation ending
props  Pointer to the props that the animation acts upon
remainingDeltaTime  Remaining time
Returns:
return value is ignored
typedef Rt2dKeyFrameList*( Rt2dKeyFrameListCallBack)( Rt2dAnim *anim, Rt2dAnimProps *props, Rt2dKeyFrameList *keyframeList, RwReal keyframeListTime, void *data)
 

Rt2dKeyFrameListCallBack This typedef defines a callback function to apply to a frame list.

Parameters:
anim  Pointer to the animation
props  Pointer to the props that the animation acts upon
keyframeList  The key frame list
keyframeListTime  The key frame list time
data  User defined data
Returns:
return value is ignored

Function Documentation

Rt2dAnim* Rt2dAnimAddDeltaFrameIndex Rt2dAnim   anim,
Rt2dAnimProps   props,
RwInt32    deltaFrame
 

Rt2dAnimAddDeltaFrameIndex moves the animation forward by the specified number of frames. Analagous to Rt2dAnimAddDeltaTime, except advances in terms of frames instead of time. Does not update any 2d objects.

Parameters:
anim  Pointer to the animation to advance or rewind
props  Pointer to the props that the animation acts upon
deltaFrame  Number of frames by which to advance the animation (may be -ve)
Returns:
Returns the animation if successful, NULL otherwise.
See also:
Rt2dAnimTimeUpdate , Rt2dAnimAddDeltaTime , Rt2dAnimGotoKeyFrameListByTime , Rt2dAnimGotoKeyFrameListByIndex
Rt2dAnim* Rt2dAnimAddDeltaTime Rt2dAnim   anim,
Rt2dAnimProps   props,
RwReal    deltaTime
 

Rt2dAnimAddDeltaTime notifies the animation system that time has passed. Does not update any 2d objects.

Parameters:
anim  Pointer to the animation to add time to
props  Pointer to the props that the animation updates
deltaTime  Change in time to be noted
Returns:
Returns the animation if successful, NULL otherwise.
See also:
Rt2dAnimTimeUpdate , Rt2dAnimSetDeltaTimeScale , Rt2dAnimAddDeltaFrameIndex , Rt2dAnimGotoKeyFrameListByTime , Rt2dAnimGotoKeyFrameListByIndex
Rt2dAnim* Rt2dAnimAddKeyFrameList Rt2dAnim   anim,
Rt2dKeyFrameList   keyframeList,
RwReal    time
 

Rt2dAnimAddKeyFrameList adds a keyframe list of changes to be applied to a 2d scene at a given time. Keyframe lists should be added in time order. Keyframe lists may only be added to locked animations.

Parameters:
anim  Pointer to an animation
keyframeList  Pointer to the keyframe list to be added
time  time at which the keyframe list will be applied during the course of the animation
Returns:
Returns the 2d animation if successful, NULL otherwise
See also:
Rt2dAnimLock
void Rt2dAnimClose void   
 

Rt2dAnimClose is used to perform various clean-up operations that are required to close- down the 2D animation tools API. This function complements Rt2dAnimOpen and should be used before closing down an application.

Returns:
None
See also:
Rt2dAnimOpen
Rt2dAnim* Rt2dAnimCopy Rt2dAnim   srcAnim,
Rt2dAnimProps   srcProps
 

Rt2dAnimCopy makes a new copy of an animation. The caller is responsible for destroying the new copy.

Parameters:
srcAnim  Pointer to a source animation
srcProps  Pointer to the source props
Returns:
Returns the new animation if successful, NULL otherwise.
See also:
Rt2dAnimDestroy
Rt2dAnim* Rt2dAnimCreate void   
 

Rt2dAnimCreate is used to create a new animation that may on act on a single level of a 2d scene.

Returns:
Pointer to the new animation
See also:
Rt2dSceneCreate
RwBool Rt2dAnimDestroy Rt2dAnim   anim,
Rt2dAnimProps   props
 

Rt2dAnimDestroy destroys a 2d animation.

Parameters:
anim  Pointer to an animation
props  Pointer to the props that the animation will modify
Returns:
Returns TRUE if successful, FALSE otherwise.
See also:
Rt2dAnimCreate
Rt2dAnim* Rt2dAnimForAllKeyFrameLists Rt2dAnim   anim,
Rt2dKeyFrameListCallBack    callBack,
Rt2dAnimProps   props,
void *    data
 

Rt2dAnimForAllKeyFrameLists calls the given callback for every keyframe list in the animation.

Parameters:
anim  Pointer to the animation whose keyframe lists the callback will be applied to
callBack  Callback function that will be applied to each keyframe list
props  Pointer to the props object that the animation updates
data  Pointer to user defined data that will be passed to the callback with each keyframe list
Returns:
Returns the animation if successful, NULL otherwise.
See also:
Rt2dKeyFrameListCallBack
RwReal Rt2dAnimGetCurrentTime Rt2dAnim   anim
 

Rt2dAnimGetCurrentTime returns the time since the start of the animation.

Parameters:
anim  Pointer to the animation for which the current time will be obtained
Returns:
Returns the time since the start of the animation
See also:
Rt2dAnimGetFinalKeyFrameListTime , Rt2dAnimGetPrevFrameTime , Rt2dAnimGetNextFrameTime
RwReal Rt2dAnimGetFinalKeyFrameListTime Rt2dAnim   anim
 

Rt2dAnimGetFinalKeyFrameListTime gets the time of the final frame

Parameters:
anim  Pointer to the animation used
Returns:
Returns time of the final keyframe list.
See also:
Rt2dAnimGetPrevFrameTime , Rt2dAnimGetNextFrameTime
Rt2dKeyFrameList* Rt2dAnimGetKeyFrameListByIndex Rt2dAnim   anim,
RwUInt32    frameIndex
 

Rt2dAnimGetKeyFrameListByIndex returns a given keyframe list by its index.

Parameters:
anim  Pointer to the animation from which the keyframe list will be obtained
frameIndex  Index of the frame list to be obtained
Returns:
Returns a pointer to the keyframe list if successful, NULL otherwise.
RwInt32 Rt2dAnimGetNextFrameIndex Rt2dAnim   anim
 

Rt2dAnimGetNextFrameIndex gets the index of the next frame.

Parameters:
anim  Pointer to the animation used
Returns:
Returns the index of the next frame
See also:
Rt2dAnimGetPrevFrameIndex
RwReal Rt2dAnimGetNextFrameTime Rt2dAnim   anim
 

Rt2dAnimGetNextFrameTime gets the time of the next frame.

Parameters:
anim  Pointer to the animation used
Returns:
Returns the time of the next frame
See also:
Rt2dAnimGetPrevFrameTime
RwInt32 Rt2dAnimGetNumberOfKeyFrames Rt2dAnim   anim
 

Rt2dAnimGetNumberOfKeyFrames gets the number of keyframes in the animation.

Parameters:
anim  Pointer to the animation for which the number of keyframe lists will be obtained
Returns:
Returns the number of key frame lists in the animation
See also:
Rt2dAnimAddKeyFrameList
Rt2dAnimOnEndReachedCallBack Rt2dAnimGetOnEndReachedCallBack void   
 

Rt2dAnimGetOnEndReachedCallBack gets the callback that is triggered on the end of an animation being reached.

Returns:
Returns the current callback
See also:
Rt2dAnimSetOnEndReachedCallBack , Rt2dAnimOnEndReachedCallBackLoop , Rt2dAnimOnEndReachedCallBackStop
RwInt32 Rt2dAnimGetPrevFrameIndex Rt2dAnim   anim
 

Rt2dAnimGetPrevFrameIndex gets the index of the previous frame.

Parameters:
anim  Pointer to the animation used
Returns:
Returns the index of the previous frame
See also:
Rt2dAnimGetNextFrameIndex
RwReal Rt2dAnimGetPrevFrameTime Rt2dAnim   anim
 

Rt2dAnimGetPrevFrameTime gets the time of the previous frame.

Parameters:
anim  Pointer to the animation used
Returns:
Returns the time of the previous frame
See also:
Rt2dAnimGetFinalKeyFrameListTime , Rt2dAnimGetPrevFrameTime
Rt2dAnim* Rt2dAnimGotoKeyFrameListByIndex Rt2dAnim   anim,
Rt2dAnimProps   props,
RwInt32    frameIndex
 

Rt2dAnimGotoKeyFrameListByIndex moves the animation to a given frame from the start of the animation. Does not update any 2d objects.

Parameters:
anim  Pointer to the animation whose position will be updated
props  Pointer to the props that the animation is applied to
frameIndex  Index of the frame to go to
Returns:
Returns the animation if successful, NULL otherwise.
See also:
Rt2dAnimTimeUpdate , Rt2dAnimAddDeltaTime , Rt2dAnimAddDeltaFrameIndex , Rt2dAnimGotoKeyFrameListByTime
Rt2dAnim* Rt2dAnimGotoKeyFrameListByTime Rt2dAnim   anim,
Rt2dAnimProps   props,
RwReal    newTime
 

Rt2dAnimGotoKeyFrameListByTime moves the animation to a given position in time from the start of the animation. Does not update any 2d objects.

Parameters:
anim  Pointer to the animation which is to be repositioned
props  Pointer to the props that the animation acts upon
newTime  Time to which the animation will be repositioned
Returns:
Returns the animation if successful, NULL otherwise.
See also:
Rt2dAnimTimeUpdate , Rt2dAnimAddDeltaTime , Rt2dAnimAddDeltaFrameIndex , Rt2dAnimGotoKeyFrameListByIndex
RwBool Rt2dAnimIsInterpolated Rt2dAnim   anim
 

Rt2dAnimIsInterpolated indicates if the animation is set to interpolate changes between successive keyframe lists

Parameters:
anim  Pointer to the animation used
Returns:
Returns TRUE if the animation is set to interpolate, FALSE otherwise.
See also:
Rt2dAnimSetInterpolate
Rt2dAnim* Rt2dAnimLock Rt2dAnim   anim,
Rt2dAnimProps   props
 

Rt2dAnimLock locks a 2d animation so that it may be modified.

Parameters:
anim  Pointer to an animation
props  Pointer to the props that the animation will modify
Returns:
Returns a pointer to the locked animation if successful, NULL otherwise.
See also:
Rt2dAnimUnlock
Rt2dAnimObjectUpdate* Rt2dAnimObjectUpdateClear Rt2dAnimObjectUpdate   update
 

Rt2dAnimObjectUpdateClear clears any actions stored in the update.

Parameters:
update  Pointer to the update to be used
Returns:
returns the update that was cleared
See also:
Rt2dAnimObjectUpdateCreate , Rt2dAnimObjectUpdateDestroy
Rt2dAnimObjectUpdate* Rt2dAnimObjectUpdateCreate Rt2dObject   object
 

Rt2dAnimObjectUpdateCreate creates an 'updater' for a 2d object that may contain several different kinds of 'update' actions. Rt2dAnimObjectUpdate may be stored for later application to a 2d object.

Parameters:
object  Pointer to the object to which the update will be applied
Returns:
returns the new 'updater'
See also:
Rt2dAnimObjectUpdateDestroy , Rt2dAnimObjectUpdateClear
RwBool Rt2dAnimObjectUpdateDestroy Rt2dAnimObjectUpdate   update
 

Rt2dAnimObjectUpdateDestroy

Parameters:
update  Pointer to the update to be destroyed
Returns:
returns TRUE if the update was successfully destroyed, FALSE otherwise.
See also:
Rt2dAnimObjectUpdateCreate , Rt2dAnimObjectUpdateClear
Rt2dAnimObjectUpdate* Rt2dAnimObjectUpdateSetColorMult Rt2dAnimObjectUpdate   update,
Rt2dKeyFrameColor   color
 

Rt2dAnimObjectUpdateSetColorMult sets a color multiplier change in an update.

Parameters:
update  Pointer to the update to be used
color  Pointer to the color multiplier to be set
Returns:
returns the update with the new color multiplier change in place
See also:
Rt2dAnimObjectUpdateSetTransform , Rt2dAnimObjectUpdateSetColorOffs , Rt2dAnimObjectUpdateSetShow , Rt2dAnimObjectUpdateSetMorph , Rt2dAnimObjectUpdateSetObject
Rt2dAnimObjectUpdate* Rt2dAnimObjectUpdateSetColorOffs Rt2dAnimObjectUpdate   update,
Rt2dKeyFrameColor   color
 

Rt2dAnimObjectUpdateSetColorOffs sets a color offset change in an update.

Parameters:
update  Pointer to the update to be used
color  Pointer to the color offset to be set
Returns:
returns the update with a new color offset change in place
See also:
Rt2dAnimObjectUpdateSetTransform , Rt2dAnimObjectUpdateSetColorMult , Rt2dAnimObjectUpdateSetShow , Rt2dAnimObjectUpdateSetMorph , Rt2dAnimObjectUpdateSetObject
Rt2dAnimObjectUpdate* Rt2dAnimObjectUpdateSetMorph Rt2dAnimObjectUpdate   update,
Rt2dKeyFrameMorph   morph
 

Rt2dAnimObjectUpdateSetMorph sets a morph change in an update.

Parameters:
update  Pointer to the update to be used
morph  Pointer to the shape morph to be set
Returns:
returns the update with the new morph object change in place
See also:
Rt2dAnimObjectUpdateSetTransform , Rt2dAnimObjectUpdateSetColorOffs , Rt2dAnimObjectUpdateSetColorMult , Rt2dAnimObjectUpdateSetShow , Rt2dAnimObjectUpdateSetMorph , Rt2dAnimObjectUpdateSetObject
Rt2dAnimObjectUpdate* Rt2dAnimObjectUpdateSetObject Rt2dAnimObjectUpdate   update,
Rt2dObject   object
 

Rt2dAnimObjectUpdateSetObject sets the object that is the target of the update.

Parameters:
update  Pointer to the update to be used
object  Pointer to the target object
Returns:
returns the update with the new target object
See also:
Rt2dAnimObjectUpdateSetTransform , Rt2dAnimObjectUpdateSetColorOffs , Rt2dAnimObjectUpdateSetColorMult , Rt2dAnimObjectUpdateSetShow , Rt2dAnimObjectUpdateSetMorph
Rt2dAnimObjectUpdate* Rt2dAnimObjectUpdateSetShow Rt2dAnimObjectUpdate   update,
Rt2dKeyFrameShow   show
 

Rt2dAnimObjectUpdateSetShow sets a show/hide change together with a depth value in an update.

Parameters:
update  Pointer to the update to be used
show  Pointer to the show/depth change to be set
Returns:
returns the update with the new show/depth change in place
See also:
Rt2dAnimObjectUpdateSetTransform , Rt2dAnimObjectUpdateSetColorOffs , Rt2dAnimObjectUpdateSetColorMult , Rt2dAnimObjectUpdateSetMorph , Rt2dAnimObjectUpdateSetObject
Rt2dAnimObjectUpdate* Rt2dAnimObjectUpdateSetTransform Rt2dAnimObjectUpdate   update,
Rt2dKeyFrameTransform   transform
 

Rt2dAnimObjectUpdateSetTransform sets a transform change in an update.

Parameters:
update  Pointer to the update to be used
transform  Pointer to the transform to be set
Returns:
returns the update with the new transform change in place
See also:
Rt2dAnimObjectUpdateSetColorOffs , Rt2dAnimObjectUpdateSetColorMult , Rt2dAnimObjectUpdateSetShow , Rt2dAnimObjectUpdateSetMorph , Rt2dAnimObjectUpdateSetObject
Rt2dAnim* Rt2dAnimOnEndReachedCallBackLoop Rt2dAnim   anim,
Rt2dAnimProps   props,
RwReal    remainingDeltaTime
 

Rt2dAnimOnEndReachedCallBackLoop is a callback that will cause an animation to be reset upon the end being reached. Can be used as an onEndReached callback.

Parameters:
anim  The animation ending
props  The props affected by the animation
remainingDeltaTime  The remaining time
Returns:
Returns the animation that was reset
See also:
Rt2dAnimSetOnEndReachedCallBack , Rt2dAnimOnEndReachedCallBackStop
Rt2dAnim* Rt2dAnimOnEndReachedCallBackStop Rt2dAnim   anim,
Rt2dAnimProps   props,
RwReal    remainingDeltaTime
 

Rt2dAnimOnEndReachedCallBackStop is a callback that will cause an animation to be stopped upon the end being reached. Can be used as an onEndReached callback.

Parameters:
anim  The animation ending
props  The props affected by the animation
remainingDeltaTime  The remaining time
Returns:
Returns the animation that was stopped
See also:
Rt2dAnimSetOnEndReachedCallBack , Rt2dAnimOnEndReachedCallBackLoop
void Rt2dAnimOpen void   
 

Rt2dAnimOpen is used to perform various initializations that are required before the 2D animation toolkit API can be used.

See also:
Rt2dAnimClose
Rt2dAnimProps* Rt2dAnimPropsCreate Rt2dObject   scene
 

Rt2dAnimPropsCreate creates a props object that represents a set of changes that have been applied to a 2d scene. Rt2dProps does not become the owner of the scene, but the scene must remain valid for the life of the Rt2dProps object.

Parameters:
scene  Pointer to the scene that the props will update
Returns:
Returns the new props object
See also:
Rt2dAnimPropsDestroy , Rt2dSceneCreate
RwBool Rt2dAnimPropsDestroy Rt2dAnimProps   props
 

Rt2dAnimPropsDestroy destroys a props object.

Parameters:
props  Pointer to the props object to destroy
Returns:
Returns TRUE if the props were successfully destroyed, FALSE otherwise
See also:
Rt2dAnimPropsCreate
Rt2dAnim* Rt2dAnimReset Rt2dAnim   anim,
Rt2dAnimProps   props
 

Rt2dAnimReset efficiently resets the animation back to the start

Parameters:
anim  Pointer to the animation to be reset
props  Pointer to the props that the animation acts upon
Returns:
Returns the animation if successful, NULL otherwise.
Rt2dAnim* Rt2dAnimSetDeltaTimeScale Rt2dAnim   anim,
RwReal    timeScale
 

Rt2dAnimSetDeltaTimeScale Sets the time scale to be applied to each delta time during playback. Can be used to slow, pause or play the animation in reverse. The default scale is 1.0.

Parameters:
anim  Pointer to the animation to set the time scale of
timeScale  New time scale factor
Returns:
Returns the animation if successful, NULL otherwise.
See also:
Rt2dAnimAddDeltaTime
Rt2dAnim* Rt2dAnimSetInterpolate Rt2dAnim   anim,
RwBool    interpolate
 

Rt2dAnimSetInterpolate sets the interpolation status of the animation. Setting the interpolation status to TRUE causes changes to 2d objects to be interpolated smoothly between keyframes. Default is FALSE.

Parameters:
anim  Pointer to the animation used
interpolate  New interpolation status, TRUE will cause animations to be interpolated between keyframes.
Returns:
Returns the animation whose interpolation status was set.
See also:
Rt2dAnimIsInterpolated
Rt2dAnimOnEndReachedCallBack Rt2dAnimSetOnEndReachedCallBack Rt2dAnimOnEndReachedCallBack    callback
 

Rt2dAnimSetOnEndReachedCallBack sets a callback that is triggered on the end of an animation being reached.

Parameters:
callback  The new callback to be triggered
Returns:
Returns the callback that was set
See also:
Rt2dAnimGetOnEndReachedCallBack , Rt2dAnimOnEndReachedCallBackLoop , Rt2dAnimOnEndReachedCallBackStop
RwUInt32 Rt2dAnimStreamGetSize Rt2dAnim   anim,
Rt2dAnimProps   props
 

Rt2dAnimStreamGetSize is used to determine the size in bytes of the binary representation of a 2d animation. This value is used in the binary chunk header to indicate the size of the chunk. The size includes the size of the chunk header.

Parameters:
anim  Pointer to an animation
props  Pointer to the props that the animation will modify
Returns:
Returns a RwUInt32 value equal to the chunk size (in bytes) of the shape.
See also:
Rt2dAnimStreamRead , Rt2dAnimStreamWrite
Rt2dAnim* Rt2dAnimStreamRead RwStream   stream,
Rt2dAnimProps   props
 

Rt2dAnimStreamRead reads an animation from a binary stream. Note that prior to this function call a binary animation chunk must be found in the stream using the RwStreamFindChunk API function.

The sequence to locate and read animation from a binary stream is as follows:

   RwStream *stream;
   Rt2dAnim *newAnimation;
  
   stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "mybinary.xxx");
   if( stream )
   {
       if( RwStreamFindChunk(stream, rwID_2DANIM, NULL, NULL) )
       {
           newAnimation = Rt2dAnimStreamRead(stream);
       }
  
       RwStreamClose(stream, NULL);
   }
Parameters:
stream  Pointer to the stream the animation will be read from
props  the props object that will be modified by the animation (currently not used)
Returns:
Returns a pointer to the animation if successful, NULL otherwise.
See also:
Rt2dAnimStreamWrite , Rt2dAnimStreamGetSize , RwStreamOpen , RwStreamClose , RwStreamFindChunk
Rt2dAnim* Rt2dAnimStreamWrite Rt2dAnim   anim,
RwStream   stream,
Rt2dAnimProps   props
 

Rt2dAnimStreamWrite is used to write the specified animation to the given binary stream. Note that the stream will have been opened prior to this function call.

Parameters:
anim  Pointer to the animation to stream.
stream  Pointer to the stream to write to.
props  Pointer to the props that the animation was acting upon
Returns:
Returns a new animation if successful, NULL otherwise.
See also:
Rt2dAnimStreamRead , Rt2dAnimStreamGetSize , RwStreamOpen , RwStreamClose
Rt2dAnim* Rt2dAnimTimeUpdate Rt2dAnim   anim,
Rt2dAnimProps   props
 

Rt2dAnimTimeUpdate applies the changes accumulated during time or frame updates to the 2d objects in the animation props. After this operation the position of objects within the props will be valid and can be tested (eg for collisions etc). At this point they are also ready to be rendered.

Parameters:
anim  Pointer to the animation to apply the time update for
props  Pointer to the props that contain the changes to applied and a reference to the scene which will be updated
Returns:
Returns the animation if successful, NULL otherwise.
See also:
Rt2dAnimAddDeltaTime , Rt2dAnimAddDeltaFrameIndex , Rt2dAnimGotoKeyFrameListByTime , Rt2dAnimGotoKeyFrameListByIndex
Rt2dAnim* Rt2dAnimUnlock Rt2dAnim   anim,
Rt2dAnimProps   props
 

Rt2dAnimUnlock unlocks a 2d animation so that it may be played or streamed out.

Parameters:
anim  Pointer to an animation
props  Pointer to the props that the animation will modify
Returns:
Returns a pointer to the unlocked animation if successful, NULL otherwise
See also:
Rt2dAnimLock
Rt2dKeyFrameList* Rt2dKeyFrameListAddUpdateObject Rt2dKeyFrameList   keyframeList,
Rt2dAnimObjectUpdate   update
 

Rt2dKeyFrameListAddUpdateObject adds a set of updates on a particular object to a keyframe list. The keyframe list must be locked first.

Parameters:
keyframeList  Pointer to the keyframe list to use
update  Pointer to the update object that contains the changes to be applied
Returns:
Returns the keyframe list the set of updates was added to if successful, NULL otherwise.
See also:
Rt2dKeyFrameListLock
Rt2dKeyFrameList* Rt2dKeyFrameListAdvance Rt2dKeyFrameList   keyframeList,
Rt2dAnimProps   props
 

Rt2dKeyFrameListAdvance caches a keyframe list against the provided props ready for later application to the 2d object managed by the props. The intent of this function is to allow fast paging through keyframe lists, keeping note of which changes need to be applied without actually applying them. To apply the changes, the Rt2dKeyFrameListApply function must be called.

Parameters:
keyframeList  Pointer to the keyframe list to use
props  Pointer to the props that the keyframe list will be applied to
Returns:
Returns the keyframe list that was advanced past.
See also:
Rt2dKeyFrameListApply
Rt2dKeyFrameList* Rt2dKeyFrameListApply Rt2dKeyFrameList   keyframeList,
Rt2dAnimProps   props,
RwReal    alpha
 

Rt2dKeyFrameListApply applies a set of changes to the provided props. The set of changes is interpolated between the last set of cached changes and the supplied keyframe list. The alpha value ranges between 0.0 and 1.0, and controls the blending between the cached changes and the supplied keyframe.

Parameters:
keyframeList  Pointer to the keyframe list use
props  Pointer to the props that the keyframe list will be applied to
alpha  Interpolation value between 0.0 and 1.0
Returns:
Returns the keyframe list that was updated.
See also:
Rt2dKeyFrameListAdvance
Rt2dKeyFrameList* Rt2dKeyFrameListCreate Rt2dAnimProps   props
 

Rt2dKeyFrameListCreate creates a new list of keyframes in locked form in order that they may be changed.

Parameters:
props  Pointer to the props that the keyframe will be applied to
Returns:
Returns the new list of keyframes.
See also:
Rt2dKeyFrameListDestroy
RwBool Rt2dKeyFrameListDestroy Rt2dKeyFrameList   keyframeList
 

Rt2dKeyFrameListDestroy destroys a list of keyframes

Parameters:
keyframeList  Pointer to the keyframeList to destroy
Returns:
Returns TRUE if the list of keyframes was destroyed successfully, FALSE otherwise.
See also:
Rt2dKeyFrameListCreate
Rt2dKeyFrameList* Rt2dKeyFrameListLock Rt2dKeyFrameList   keyframeList,
Rt2dAnimProps   props
 

Rt2dKeyFrameListLock locks a list of keyframes so that they may be edited

Parameters:
keyframeList  Pointer to the keyframe list to be locked
props  Pointer to the props that the list applies to
Returns:
Returns the locked list of keyframes.
See also:
Rt2dKeyFrameListUnlock
RwUInt32 Rt2dKeyFrameListStreamGetSize Rt2dKeyFrameList   keyframeList
 

Rt2dKeyFrameListStreamGetSize is used to determine the size in bytes of the binary representation of a keyframe list. This value is used in the binary chunk header to indicate the size of the chunk. The size includes the size of the chunk header.

Parameters:
keyframeList  Pointer to a list of keyframes
Returns:
Returns a RwUInt32 value equal to the chunk size (in bytes) of the shape.
See also:
Rt2dKeyFrameListStreamRead , Rt2dKeyFrameListStreamWrite
Rt2dKeyFrameList* Rt2dKeyFrameListStreamRead RwStream   stream
 

Rt2dKeyFrameListStreamRead reads a keyframe from a binary stream. Note that prior to this function call a binary keyframe chunk must be found in the stream using the RwStreamFindChunk API function.

The sequence to locate and read a keyframe from a binary stream is as follows:

   RwStream *stream;
   Rt2dKeyFrameList *newKeyFrame;
  
   stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "mybinary.xxx");
   if( stream )
   {
       if( RwStreamFindChunk(stream, rwID_2DKEYFRAME, NULL, NULL) )
       {
           newKeyFrame = Rt2dKeyFrameListStreamRead(stream);
       }
  
       RwStreamClose(stream, NULL);
   }
Parameters:
stream  Pointer to the stream the keyframe list will be read from
Returns:
Returns a pointer to the keyframe list if successful, NULL otherwise.
See also:
Rt2dKeyFrameListStreamWrite , Rt2dKeyFrameListStreamGetSize , RwStreamOpen , RwStreamClose , RwStreamFindChunk
Rt2dKeyFrameList* Rt2dKeyFrameListStreamWrite Rt2dKeyFrameList   keyframeList,
RwStream   stream
 

Rt2dKeyFrameListStreamWrite is used to write the specified keyframe list to the given binary stream. Note that the stream will have been opened prior to this function call.

Parameters:
keyframeList  Pointer to the keyframe list to stream.
stream  Pointer to the stream to write to.
Returns:
Returns a pointer to the keyframe list if successful, NULL otherwise.
See also:
Rt2dKeyFrameListStreamRead , Rt2dKeyFrameListStreamGetSize , RwStreamOpen , RwStreamClose
Rt2dKeyFrameList* Rt2dKeyFrameListUnlock Rt2dKeyFrameList   keyframeList,
Rt2dAnimProps   props
 

Rt2dKeyFrameListUnlock unlocks a list of keyframes in order that they may be changed

Parameters:
keyframeList  Pointer to the keyframe list to be unlocked
props  Pointer to the props that the keyframe list will be applied to
Returns:
Returns the unlocked list of keyframes
See also:
Rt2dKeyFrameListLock

Criterion Software © 1993-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:46:50 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)