Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6971 in orxonox.OLD for branches/avi_play/src


Ignore:
Timestamp:
Feb 2, 2006, 12:20:15 AM (19 years ago)
Author:
hdavid
Message:

branches/avi_play: custom fps can be set for the MovieEntity and MovieLoader via oxw-file

Location:
branches/avi_play/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/avi_play/src/story_entities/movie_loader.cc

    r6731 r6971  
    4747
    4848  LoadParam(root, "name", this, MovieLoader, loadMovie);
     49  LoadParam(root, "fps", this, MovieLoader, setFPS);
     50}
     51
     52void MovieLoader::setFPS(float fps)
     53{
     54  this->movie_player->setFPS(fps);
    4955}
    5056
  • branches/avi_play/src/story_entities/movie_loader.h

    r6600 r6971  
    4141  private:
    4242    void loadMovie(const char* filename);
     43    void setFPS(float fps);
    4344    void tick();
    4445    void draw() const;
  • branches/avi_play/src/world_entities/movie_entity.cc

    r6731 r6971  
    4646  counter = 0;
    4747  timer = 0;
    48   fps = media_container->getFPS();
    4948}
    5049
     
    6665  //LoadParam(root, "rotation", this, MovieEntity, setRotation);
    6766  LoadParam(root, "size", this, MovieEntity, setSize);
     67  LoadParam(root, "fps", this, MovieEntity, setFPS);
     68}
     69
     70void MovieEntity::setFPS(float fps)
     71{
     72  this->fps = fps;
     73PRINTF(0)("fps: %f\n", fps);
    6874}
    6975
     
    7177{
    7278  if(media_container->loadMedia(filename))
     79  {
    7380    mediaLoaded = true;
     81    fps = media_container->getFPS();
     82  }
    7483  else
    7584    mediaLoaded = false;
     
    7887void MovieEntity::setAxis(float axis)
    7988{
     89PRINTF(0)("fps: %f\n", fps);
    8090  this->axis = axis;
    8191}
     
    141151  glPushAttrib(GL_ENABLE_BIT);
    142152  glDisable(GL_LIGHTING);
     153  glDisable(GL_BLEND);
    143154
    144155  glEnable(GL_TEXTURE_2D);
  • branches/avi_play/src/world_entities/movie_entity.h

    r6731 r6971  
    4141    void setRotation(float rotation);
    4242    void setSize(float width, float height);
     43    void setFPS(float fps);
    4344
    4445};
Note: See TracChangeset for help on using the changeset viewer.