Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6321 in orxonox.OLD for branches/avi_play/src/lib


Ignore:
Timestamp:
Dec 27, 2005, 5:05:17 PM (18 years ago)
Author:
stefalie
Message:

branches/avi_play: controls should know work for the movie_player

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/avi_play/src/lib/graphics/importer/movie_player.cc

    r6320 r6321  
    8282void MoviePlayer::start(unsigned int start_frame)
    8383{
    84   if(status == STOP)
    85     //that'd probably do its job if getFrame worked
    86     texture = media_container->getFrame(3);
     84  if(start_frame < 2)
     85    texture = media_container->getFrame(2);
     86  else
     87    texture = media_container->getFrame(start_frame);
    8788  status = PLAY;
    8889}
     
    9091void MoviePlayer::resume()
    9192{
    92   if(status != STOP)
    93     status = PLAY;
     93  if(status == STOP)
     94    texture = media_container->getFrame(2);
     95  status = PLAY;
    9496}
    9597
    9698void MoviePlayer::pause()
    9799{
    98   status = PAUSE;
     100  if(status != STOP)
     101    status = PAUSE;
    99102}
    100103
     
    102105{
    103106  status = STOP;
     107  texture = NULL;
    104108}
    105109
     
    107111{
    108112  if(status == PLAY)
     113  {
    109114    texture = media_container->getNextFrame();
     115    if(texture == NULL)
     116      status = STOP;
     117  }
    110118}
    111119
Note: See TracChangeset for help on using the changeset viewer.