void Teddy::SetAnimationPose( ) { // First thing, get the first frame of animation animator.ProcessAnimation( tCurrent,pHead,20 ); // walks the anim node does the pose for everything that walk_anim_node( pFirstBone ); Time deltaTime = animationSpeed* Time(TIME_NTSC_30_FRAME); Time maxTime; tCurrent += deltaTime; findMaxTime(maxTime); // protection for time values for looping if( tCurrent < Time(TIME_ZERO) ) { tCurrent = maxTime; } else if ( tCurrent > maxTime ) { tCurrent = Time(TIME_ZERO); } else { // do nothing } }
STATIC RET_T perform( TARGET *targ, DEPEND *dep, DEPEND *impldep, time_t max_time ) /*********************************************************************************/ { CLIST *clist; CLIST *before; RET_T ret; DEPEND *depend; DEPEND *impliedDepend; depend = NULL; impliedDepend = NULL; assert( targ != NULL && dep != NULL ); if( Glob.query ) { ++cListCount; return( RET_WARN ); } if( Glob.touch ) { ++cListCount; ResetExecuted(); if( !targ->attr.symbolic ) { CacheRelease(); if( TouchFile( targ->node.name ) != RET_SUCCESS ) { PrtMsg( ERR | COULD_NOT_TOUCH, targ->node.name ); return( RET_ERROR ); } } targ->touched = true; return( RET_SUCCESS ); } /* means that this is a sufsuf made implicit rule */ if( impldep == NULL ) { clist = dep->clist; depend = dep; impliedDepend = NULL; } else { clist = impldep->clist; depend = targ->depend; impliedDepend = dep; } if( clist == NULL ) { clist = DotCList( DOT_DEFAULT ); if( clist == NULL ) { // No commands in Microsoft and POSIX mode is considered OK // and executed if( Glob.compat_nmake || Glob.compat_posix ) { targ->cmds_done = true; return( RET_SUCCESS ); } if( targ->attr.symbolic != false ) { targ->cmds_done = true; return( RET_SUCCESS ); } if( targ->allow_nocmd ) { /* for UNIX folks: make target symbolic */ targ->attr.symbolic = true; return( RET_SUCCESS ); } PrtMsg( FTL | NO_DEF_CMDS_FOR_MAKE, DotNames[DOT_DEFAULT], targ->node.name ); ExitFatal(); } } if( !Glob.noexec ) { ResetExecuted(); } if( !doneBefore ) { before = DotCList( DOT_BEFORE ); if( before != NULL ) { ++cListCount; if( ExecCList( before ) != RET_SUCCESS ) { PrtMsg( FTL | S_COMMAND_RET_BAD, DotNames[DOT_BEFORE] ); ExitFatal(); } } doneBefore = true; } exPush( targ, depend, impliedDepend ); ret = carryOut( targ, clist, findMaxTime( targ, dep, max_time ) ); exPop(); if( ret == RET_ERROR ) { ExitError(); } return( ret ); }