Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 29, 2006, 12:19:48 AM (18 years ago)
Author:
patrick
Message:

merged the branche single_player_map with the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/md2/md2Model.cc

    r8490 r8894  
    103103  this->pModelInfo.pTexCoor = (float*)this->data->pTexCoor;
    104104
     105  this->animationSpeed = 1.0f;
     106
    105107  // triangle conversion
    106108  this->pModelInfo.pTriangles = new sTriangleExt[this->data->numTriangles];
     
    159161
    160162/**
     163 * sets the animation type
     164 * @param firstFrame: index of the first frame
     165 * @param lastFrame: index of the last frame
     166 * @param fps: frames per second
     167 * @param bStoppable: is 1 if so, 0 else
     168 */
     169void MD2Model::setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable, int animPlayback)
     170{
     171  this->animationState.startFrame = firstFrame;
     172  this->animationState.endFrame = lastFrame;
     173  this->animationState.nextFrame = firstFrame + 1;
     174  this->animationState.fps = fps;
     175  this->animationState.type = 0;
     176  this->animationState.numPlays = 0;
     177  this->animationState.animPlaybackMode = animPlayback;
     178
     179  this->animationState.interpolationState = 0.0f;
     180  this->animationState.localTime = 0.0f;
     181  this->animationState.lastTime = 0.0f;
     182  this->animationState.currentFrame = firstFrame;
     183}
     184
     185/**
    161186  \brief sets the animation type
    162187* @param type: animation type
     
    196221void MD2Model::tick(float time)
    197222{
    198   this->animate(time);
     223  this->animate(time * this->animationSpeed);
    199224  this->processLighting();
    200225  this->interpolate(/*this->verticesList*/);
Note: See TracChangeset for help on using the changeset viewer.