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.
|
|
Rt2dAnimOnEndReachedCallBack This typedef defines a callback function called at the end of an animation.
|
|
|
Rt2dKeyFrameListCallBack This typedef defines a callback function to apply to a frame list.
|
|
||||||||||||||||
|
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.
|
|
||||||||||||||||
|
Rt2dAnimAddDeltaTime notifies the animation system that time has passed. Does not update any 2d objects.
|
|
||||||||||||||||
|
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.
|
|
|
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.
|
|
||||||||||||
|
Rt2dAnimCopy makes a new copy of an animation. The caller is responsible for destroying the new copy.
|
|
|
Rt2dAnimCreate is used to create a new animation that may on act on a single level of a 2d scene.
|
|
||||||||||||
|
Rt2dAnimDestroy destroys a 2d animation.
|
|
||||||||||||||||||||
|
Rt2dAnimForAllKeyFrameLists calls the given callback for every keyframe list in the animation.
|
|
|
Rt2dAnimGetCurrentTime returns the time since the start of the animation.
|
|
|
Rt2dAnimGetFinalKeyFrameListTime gets the time of the final frame
|
|
||||||||||||
|
Rt2dAnimGetKeyFrameListByIndex returns a given keyframe list by its index.
|
|
|
Rt2dAnimGetNextFrameIndex gets the index of the next frame.
|
|
|
Rt2dAnimGetNextFrameTime gets the time of the next frame.
|
|
|
Rt2dAnimGetNumberOfKeyFrames gets the number of keyframes in the animation.
|
|
|
Rt2dAnimGetOnEndReachedCallBack gets the callback that is triggered on the end of an animation being reached.
|
|
|
Rt2dAnimGetPrevFrameIndex gets the index of the previous frame.
|
|
|
Rt2dAnimGetPrevFrameTime gets the time of the previous frame.
|
|
||||||||||||||||
|
Rt2dAnimGotoKeyFrameListByIndex moves the animation to a given frame from the start of the animation. Does not update any 2d objects.
|
|
||||||||||||||||
|
Rt2dAnimGotoKeyFrameListByTime moves the animation to a given position in time from the start of the animation. Does not update any 2d objects.
|
|
|
Rt2dAnimIsInterpolated indicates if the animation is set to interpolate changes between successive keyframe lists
|
|
||||||||||||
|
Rt2dAnimLock locks a 2d animation so that it may be modified.
|
|
|
Rt2dAnimObjectUpdateClear clears any actions stored in the update.
|
|
|
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.
|
|
|
|
||||||||||||
|
Rt2dAnimObjectUpdateSetColorMult sets a color multiplier change in an update.
|
|
||||||||||||
|
Rt2dAnimObjectUpdateSetColorOffs sets a color offset change in an update.
|
|
||||||||||||
|
Rt2dAnimObjectUpdateSetMorph sets a morph change in an update.
|
|
||||||||||||
|
Rt2dAnimObjectUpdateSetObject sets the object that is the target of the update.
|
|
||||||||||||
|
Rt2dAnimObjectUpdateSetShow sets a show/hide change together with a depth value in an update.
|
|
||||||||||||
|
Rt2dAnimObjectUpdateSetTransform sets a transform change in an update.
|
|
||||||||||||||||
|
Rt2dAnimOnEndReachedCallBackLoop is a callback that will cause an animation to be reset upon the end being reached. Can be used as an onEndReached callback.
|
|
||||||||||||||||
|
Rt2dAnimOnEndReachedCallBackStop is a callback that will cause an animation to be stopped upon the end being reached. Can be used as an onEndReached callback.
|
|
|
Rt2dAnimOpen is used to perform various initializations that are required before the 2D animation toolkit API can be used.
|
|
|
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.
|
|
|
Rt2dAnimPropsDestroy destroys a props object.
|
|
||||||||||||
|
Rt2dAnimReset efficiently resets the animation back to the start
|
|
||||||||||||
|
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.
|
|
||||||||||||
|
Rt2dAnimSetFreeListCreateParams allows the developer to specify how many 2d animation objects to preallocate space for. This applies to all the 2d animations objects. Call before RwEngineInit.
|
|
||||||||||||
|
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.
|
|
|
Rt2dAnimSetOnEndReachedCallBack sets a callback that is triggered on the end of an animation being reached.
|
|
||||||||||||
|
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.
|
|
||||||||||||
|
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); }
|
|
||||||||||||||||
|
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.
|
|
||||||||||||
|
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.
|
|
||||||||||||
|
Rt2dAnimUnlock unlocks a 2d animation so that it may be played or streamed out.
|
|
||||||||||||
|
Rt2dKeyFrameListAddUpdateObject adds a set of updates on a particular object to a keyframe list. The keyframe list must be locked first.
|
|
||||||||||||
|
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.
|
|
||||||||||||||||
|
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.
|
|
|
Rt2dKeyFrameListCreate creates a new list of keyframes in locked form in order that they may be changed.
|
|
|
Rt2dKeyFrameListDestroy destroys a list of keyframes
|
|
||||||||||||
|
Rt2dKeyFrameListLock locks a list of keyframes so that they may be edited
|
|
|
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.
|
|
|
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); }
|
|
||||||||||||
|
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.
|
|
||||||||||||
|
Rt2dKeyFrameListUnlock unlocks a list of keyframes in order that they may be changed
|
© 1993-2004 Criterion Software Limited. All rights reserved. Built Thu Feb 12 13:47:07 2004.
Send Feedback