84 lines
4.4 KiB
C++
84 lines
4.4 KiB
C++
|
|
/*----------------------------------------------------------------------------
|
|
-- Description : GAM_fn_ucGetMorphAmount
|
|
-- Get the morph amount into the array of morphing data of an animation
|
|
------------------------------------------------------------------------------
|
|
-- Methods : Nothing to say
|
|
------------------------------------------------------------------------------
|
|
-- Input : _p_stAnim : Pointer to the morphed animation
|
|
-- _ulChannelNumber : Number of the channel
|
|
-- _uwFrameNumber : Number of the frame
|
|
-- Output : the amount of morphing
|
|
------------------------------------------------------------------------------
|
|
-- Creation date : Mar 97 Author: Alain Robin
|
|
------------------------------------------------------------------------------
|
|
-- Modifications :
|
|
-- Modification date : Modification author :
|
|
----------------------------------------------------------------------------*/
|
|
unsigned char GAM_fn_ucGetMorphAmount(tdstAnim3d *_p_stAnim, unsigned long _ulChannelNumber, unsigned short _uwFrameNumber)
|
|
{
|
|
/* We suppose that we have already tested that _p_stAnim->d_stMorphDataArray isn't NULL*/
|
|
return _p_stAnim->d_stMorphDataArray[_uwFrameNumber*_p_stAnim->ucMaxNumberOfElements+_ulChannelNumber].ucMorphingAmount;
|
|
}
|
|
|
|
/*----------------------------------------------------------------------------
|
|
-- Description : GAM_fn_ucGetMorphTarget
|
|
-- Get the morph amount into the array of morphing data of an animation
|
|
------------------------------------------------------------------------------
|
|
-- Methods : Nothing to say
|
|
------------------------------------------------------------------------------
|
|
-- Input : _p_stAnim : Pointer to the morphed animation
|
|
-- _ulChannelNumber : Number of the channel
|
|
-- _uwFrameNumber : Number of the frame
|
|
-- Output : the target of morphing
|
|
------------------------------------------------------------------------------
|
|
-- Creation date : Mar 97 Author: Alain Robin
|
|
------------------------------------------------------------------------------
|
|
-- Modifications :
|
|
-- Modification date : Modification author :
|
|
----------------------------------------------------------------------------*/
|
|
unsigned char GAM_fn_ucGetMorphTarget(tdstAnim3d *_p_stAnim, unsigned long _ulChannelNumber, unsigned short _uwFrameNumber)
|
|
{
|
|
/* We suppose that we have already tested that _p_stAnim->d_stMorphDataArray isn't NULL*/
|
|
return _p_stAnim->d_stMorphDataArray[_uwFrameNumber*_p_stAnim->ucMaxNumberOfElements+_ulChannelNumber].ucTarget;
|
|
}
|
|
|
|
/*----------------------------------------------------------------------------
|
|
-- Description : GAM_fn_p_stGetMorphData
|
|
-- Get the morph data into the array of morphing data of an animation
|
|
------------------------------------------------------------------------------
|
|
-- Methods : Nothing to say
|
|
------------------------------------------------------------------------------
|
|
-- Input : _p_stAnim : Pointer to the morphed animation
|
|
-- _ulChannelNumber : Number of the channel
|
|
-- _uwFrameNumber : Number of the frame
|
|
-- Output : the target of morphing
|
|
------------------------------------------------------------------------------
|
|
-- Creation date : Jun 98 Author: Alain Robin
|
|
------------------------------------------------------------------------------
|
|
-- Modifications :
|
|
-- Modification date : Modification author :
|
|
----------------------------------------------------------------------------*/
|
|
tdstMorphData* GAM_fn_p_stGetMorphData(tdstAnim3d *_p_stAnim, unsigned long _ulChannelNumber, unsigned short _uwFrameNumber)
|
|
{
|
|
|
|
return &_p_stAnim->d_stMorphDataArray[_uwFrameNumber*_p_stAnim->ucMaxNumberOfElements+_ulChannelNumber];
|
|
}
|
|
/*
|
|
// Animation is a interpolated animation
|
|
tdstA3dGENERAL *p_stCurrentA3dGENERAL;
|
|
long i;
|
|
|
|
#ifdef A3X_CUT
|
|
p_stCurrentA3dGENERAL= fn_p_GetA3dGENERAL( p_uwLastA3dGENERAL[_p_stAnim->uwNumOfA3dGENERAL], _uwFrameNumber );
|
|
#else
|
|
p_stCurrentA3dGENERAL= fn_p_GetA3dGENERAL( _p_stAnim->uwNumOfA3dGENERAL, _uwFrameNumber );
|
|
#endif
|
|
_p_stAnim->d_stMorphDataArray=&p_stMorphData[p_stCurrentA3dGENERAL->uwNumOfFirstMorphData];
|
|
for(i=0;i<p_stCurrentA3dGENERAL->uwNumberOfMorphData;++i)
|
|
if((_p_stAnim->d_stMorphDataArray[i].uwChannelNumber==_ulChannelNumber)&&(_p_stAnim->d_stMorphDataArray[i].uwFrameNumber==_uwFrameNumber))
|
|
return &(_p_stAnim->d_stMorphDataArray[i]);
|
|
return NULL;
|
|
}
|
|
*/
|