Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6731 in orxonox.OLD for trunk/src/story_entities


Ignore:
Timestamp:
Jan 25, 2006, 6:46:06 PM (19 years ago)
Author:
bensch
Message:

merged avi_play back to the trunk. command https://svn.orxonox.net/orxonox/branches/avi_play . -r6602:HEAD

File:
1 edited

Legend:

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

    r6600 r6731  
    2020#include "graphics_engine.h"
    2121#include "load_param.h"
    22 #include "resource_manager.h"
     22#include "state.h"
    2323
    2424
     
    3535}
    3636
    37 MovieLoader::~MovieLoader()
     37MovieLoader::~MovieLoader() 
    3838{
    39   PRINTF(4)("Deleted MoviePlayer\n");
     39  delete this->movie_player;
    4040}
    4141
     
    5252{
    5353  movie_player->loadMovie(filename);
    54 
    55   PRINTF(0)("\nloaded Movie %s\n\n", filename);
    5654}
    5755
    5856
    59 ErrorMessage MovieLoader::init()
    60 {
    61 
    62 }
     57ErrorMessage MovieLoader::init() {}
    6358
    6459
    65 ErrorMessage MovieLoader::loadData()
    66 {
    67 
    68 }
     60ErrorMessage MovieLoader::loadData() {}
    6961
    7062
    71 ErrorMessage MovieLoader::unloadData()
    72 {
    73 
    74 }
     63ErrorMessage MovieLoader::unloadData() {}
    7564
    7665bool MovieLoader::start()
    7766{
    78   PRINTF(0)("\nMovieLoader INFO:\n");
    79   movie_player->printInformation();
    80   PRINTF(0)("\n");
    81 
     67  this->movie_player->start(0);
     68 
    8269  this->isRunning = true;
    83 
    8470  this->run();
    8571}
     
    9783  // first timestamp for t = 0
    9884  this->lastFrame = SDL_GetTicks ();
    99   this->movie_player->start(0);
    10085
    10186  while( this->isRunning)
    10287  {
    103 
    10488    this->tick();
    10589    this->draw();
    106 
    10790  }
    10891}
     
    121104
    122105  glBegin(GL_QUADS);
    123     glTexCoord2f(1.0f, 0.0f); glVertex2f( 0, 0);
    124     glTexCoord2f(1.0f, 1.0f); glVertex2f( 0, 100);
    125     glTexCoord2f(0.0f, 1.0f); glVertex2f( 100, 100);
    126     glTexCoord2f(0.0f, 0.0f); glVertex2f( 100, 0);
     106    glTexCoord2f(0.0f, 0.0f); glVertex2f( 0, 0);
     107    glTexCoord2f(0.0f, 1.0f); glVertex2f( 0, State::getResY());
     108    glTexCoord2f(1.0f, 1.0f); glVertex2f( State::getResX(), State::getResY());
     109    glTexCoord2f(1.0f, 0.0f); glVertex2f( State::getResX(), 0);
    127110  glEnd();
    128111
     
    139122
    140123  // calculate time difference in milliseconds (Uint32)
    141   this->dt = currentFrame - this->lastFrame;
     124  this->dt = currentFrame - this->lastFrame; 
    142125  // calculate time difference in seconds (float)
    143126  this->dts = (float)this->dt / 1000.0f;
Note: See TracChangeset for help on using the changeset viewer.