Changeset 6321 in orxonox.OLD for branches/avi_play/src
- Timestamp:
- Dec 27, 2005, 5:05:17 PM (19 years ago)
- Location:
- branches/avi_play/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/avi_play/src/lib/graphics/importer/movie_player.cc
r6320 r6321 82 82 void MoviePlayer::start(unsigned int start_frame) 83 83 { 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); 87 88 status = PLAY; 88 89 } … … 90 91 void MoviePlayer::resume() 91 92 { 92 if(status != STOP) 93 status = PLAY; 93 if(status == STOP) 94 texture = media_container->getFrame(2); 95 status = PLAY; 94 96 } 95 97 96 98 void MoviePlayer::pause() 97 99 { 98 status = PAUSE; 100 if(status != STOP) 101 status = PAUSE; 99 102 } 100 103 … … 102 105 { 103 106 status = STOP; 107 texture = NULL; 104 108 } 105 109 … … 107 111 { 108 112 if(status == PLAY) 113 { 109 114 texture = media_container->getNextFrame(); 115 if(texture == NULL) 116 status = STOP; 117 } 110 118 } 111 119 -
branches/avi_play/src/subprojects/importer/movie_player_test.cc
r6318 r6321 38 38 { 39 39 case SDLK_1: 40 movie_player->start(0); 41 PRINTF(0)("Start\n"); 42 break; 43 case SDLK_2: 40 44 movie_player->resume(); 41 45 PRINTF(0)("Play-/Resuming\n"); 42 46 break; 43 case SDLK_ 2:47 case SDLK_3: 44 48 movie_player->pause(); 45 49 PRINTF(0)("Pause\n"); 46 50 break; 47 case SDLK_ 3:51 case SDLK_4: 48 52 movie_player->stop(); 49 53 PRINTF(0)("Stopped\n"); … … 56 60 { 57 61 movie_player->tick(dt); 62 63 PRINTF(1)("Status %i\n", movie_player->getStatus()); 58 64 } 59 65
Note: See TracChangeset
for help on using the changeset viewer.