| Rev | Line |   | 
|---|
| [6555] | 1 | /*! | 
|---|
 | 2 |  * @file movie_loader.h | 
|---|
 | 3 |  *  loads a movie | 
|---|
 | 4 |  */ | 
|---|
 | 5 |  | 
|---|
 | 6 | #ifndef _MOVIE_LOADER_H | 
|---|
 | 7 | #define _MOVIE_LOADER_H | 
|---|
 | 8 |  | 
|---|
 | 9 |  | 
|---|
 | 10 | #include "story_entity.h" | 
|---|
| [7022] | 11 | #include "event_listener.h" | 
|---|
| [6555] | 12 |  | 
|---|
| [6570] | 13 | class MoviePlayer; | 
|---|
| [6555] | 14 |  | 
|---|
| [7022] | 15 | class MovieLoader : public StoryEntity, virtual public EventListener | 
|---|
| [6555] | 16 | { | 
|---|
| [9869] | 17 |   ObjectListDeclaration(MovieLoader); | 
|---|
| [6576] | 18 |   private: | 
|---|
 | 19 |     MoviePlayer* movie_player; | 
|---|
| [6555] | 20 |  | 
|---|
| [6576] | 21 |     Uint32              lastFrame; | 
|---|
 | 22 |     Uint32              currentFrame; | 
|---|
 | 23 |     Uint32              dt;                           // time needed to calculate this frame (in milliSeconds) | 
|---|
 | 24 |     float               dts; | 
|---|
 | 25 |  | 
|---|
| [6555] | 26 |   public: | 
|---|
| [6576] | 27 |     MovieLoader(const TiXmlElement* root); | 
|---|
| [6555] | 28 |     virtual ~MovieLoader(); | 
|---|
 | 29 |  | 
|---|
 | 30 |     virtual void loadParams(const TiXmlElement* root); | 
|---|
 | 31 |  | 
|---|
 | 32 |     /* functions from story-entity */ | 
|---|
 | 33 |     virtual ErrorMessage init(); | 
|---|
 | 34 |     virtual ErrorMessage loadData(); | 
|---|
 | 35 |     virtual ErrorMessage unloadData(); | 
|---|
 | 36 |  | 
|---|
 | 37 |     virtual bool start(); | 
|---|
 | 38 |     virtual bool stop(); | 
|---|
 | 39 |     virtual bool pause(); | 
|---|
 | 40 |     virtual bool resume(); | 
|---|
 | 41 |     virtual void run(); | 
|---|
| [6557] | 42 |  | 
|---|
| [7022] | 43 |     virtual void process(const Event &event); | 
|---|
 | 44 |  | 
|---|
| [6557] | 45 |   private: | 
|---|
| [7221] | 46 |     void loadMovie(const std::string& filename); | 
|---|
| [7010] | 47 |     void setFPS(float fps); | 
|---|
| [6557] | 48 |     void tick(); | 
|---|
| [6598] | 49 |     void draw() const; | 
|---|
| [6567] | 50 |  | 
|---|
| [6555] | 51 | }; | 
|---|
 | 52 |  | 
|---|
 | 53 | #endif /* _MOVIE_LOADER_H */ | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.