Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7010 in orxonox.OLD for trunk


Ignore:
Timestamp:
Feb 3, 2006, 12:40:23 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged avi_play back here

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/movie_loader.cc

    r6731 r7010  
    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
  • trunk/src/story_entities/movie_loader.h

    r6600 r7010  
    4141  private:
    4242    void loadMovie(const char* filename);
     43    void setFPS(float fps);
    4344    void tick();
    4445    void draw() const;
  • trunk/src/story_entities/story_entity.cc

    r6993 r7010  
    7777  .describe("Sets the ID of the next StoryEntity");
    7878
     79  LoadParam(root, "menu-entry", this, StoryEntity, addToGameMenu)
     80      .describe("If this entry is 1, the world is contained in the SimpleGameMenu");
     81
     82
     83  LoadParam(root, "description", this, StoryEntity, setDescription)
     84      .describe("Sets the description of this StoryEntity");
     85
     86  LoadParam(root, "menu-item-image", this, StoryEntity, setMenuItemImage)
     87      .describe("If this entry is 1, the world is contained in the SimpleGameMenu");
     88
     89  LoadParam(root, "screenshoot", this, StoryEntity, setMenuScreenshoot)
     90      .describe("If this entry is 1, the world is contained in the SimpleGameMenu");
     91
    7992  PRINTF(4)("Loaded StoryEntity specific stuff\n");
    8093}
     
    152165    .describe("Sets the description of this StoryEntity");
    153166
    154     LoadParam(root, "menu-entry", this, StoryEntity, addToGameMenu)
    155     .describe("If this entry is 1, the world is contained in the SimpleGameMenu");
    156 
    157167    LoadParam(root, "menu-item-image", this, StoryEntity, setMenuItemImage)
    158168    .describe("If this entry is 1, the world is contained in the SimpleGameMenu");
  • trunk/src/world_entities/movie_entity.cc

    r6731 r7010  
    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);
  • trunk/src/world_entities/movie_entity.h

    r6981 r7010  
    4141    void setRotation(float rotation);
    4242    void setSize(float width, float height);
     43    void setFPS(float fps);
    4344
    4445};
  • trunk/src/world_entities/playable.cc

    r6994 r7010  
    305305{
    306306  SYNCHELP_READ_BEGIN();
    307  
     307
    308308  byte b;
    309309  SYNCHELP_READ_BYTE( b, NWT_PL_B );
    310  
     310
    311311  byte flags;
    312  
     312
    313313  if ( b == DATA_FLAGS )
    314314  {
     
    316316
    317317    bFire = (flags & FLAGS_bFire) != 0;
    318    
     318
    319319    return SYNCHELP_READ_N;
    320320  }
    321  
     321
    322322  if ( b == DATA_SCORE )
    323323  {
     
    325325    SYNCHELP_READ_BYTE( newScore, NWT_PL_SCORE );
    326326    setScore( newScore );
    327    
     327
    328328    return SYNCHELP_READ_N;
    329329  }
     
    335335{
    336336  SYNCHELP_WRITE_BEGIN();
    337  
     337
    338338  if ( score != oldScore && isServer() )
    339339  {
     
    341341    SYNCHELP_WRITE_INT( score, NWT_PL_SCORE );
    342342    oldScore = score;
    343    
     343
    344344    return SYNCHELP_WRITE_N;
    345345  }
    346  
     346
    347347  byte flags = 0;
    348348
Note: See TracChangeset for help on using the changeset viewer.