#include <nnsys/g2d/g2d_MultiCellAnimation.h>
void NNS_G2dInitMCAnimationInstance
(
NNSG2dMultiCellAnimation* pMultiCellAnim,
void* pWork,
const NNSG2dCellAnimBankData* pAnimBank,
const NNSG2dCellDataBank* pCellDataBank,
const NNSG2dMultiCellDataBank* pMultiCellDataBank,
NNSG2dMCType mcType
);
| pMultiCellAnim | [OUT] Multicell animation |
| pWork | [IN] Work region used by the multicell entity |
| pAnimBank | [IN] Animation bank that defines the cell animation that composes the multicell |
| pCellDataBank | [IN] Cell data bank |
| pMultiCellDataBank | [IN] Multicell data bank |
| mcType | [IN] Multicell entity type (NNSG2dMCType |
None.
Initializes multicell animation. pWork is a pointer to the memory region in the entity to be used as the work region. The work region size required for initializing the entity is obtained with the NNS_G2dGetMCWorkAreaSize function. mcType is an enumerated NNSG2dMCType that shows the multicell animation entity type. The NNSG2dMCType definition is shown below.
When
typedef enum
{
NNS_G2D_MCTYPE_DONOT_SHARE_CELLANIM,
NNS_G2D_MCTYPE_SHARE_CELLANIM
}NNSG2dMCType;
NNS_G2D_MCTYPE_DONOT_SHARE_CELLANIM is specified as mcType, the entity is initialized as the same data structures that were used in past versions and is processed in the same manner. If the programmer does not access multicell structure nodes or overwrite data, designating NNS_G2D_MCTYPE_SHARE_CELLANIM when initializing the entity provides an advantage in memory consumption and processing efficiency. When NNS_G2D_MCTYPE_SHARE_CELLANIM is specified as mcType and when data is input that plays back the same animation sequence on multiple nodes of a multicell, the cell animation entity is shared among those multiple nodes. This sharing reduces the memory consumption and the processing load for animation updates.
When NNS_G2D_MCTYPE_SHARE_CELLANIM has been specified, the multicell runtime entity does not store node-related information. As a result, node location changes and affine conversions are not supported. However, this specification uses fewer hardware resources (affine parameters) than NNS_G2D_MCTYPE_DONOT_SHARE_CELLANIM because it is guaranteed that nodes that playback the same cell animation will reference the same affine parameters, due to the above limitations. This is particulary true when rendering with the 2D graphics engine.
This function replaces the NNS_G2dInitMCAnimation, NNS_G2dInitMCInstance, and NNS_G2dSetMCDataToMCInstance functions. The previous functions will remain to maintain compatibility.
NNS_G2dGetMCWorkAreaSize, NNS_G2dInitMCAnimation, NNS_G2dInitMCInstance, NNS_G2dSetMCDataToMCInstance
01/31/2005 Initial version.
CONFIDENTIAL