| 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 | { | 
|---|
| [6576] | 17 |   private: | 
|---|
 | 18 |     MoviePlayer* movie_player; | 
|---|
| [6555] | 19 |  | 
|---|
| [6576] | 20 |     Uint32              lastFrame; | 
|---|
 | 21 |     Uint32              currentFrame; | 
|---|
 | 22 |     Uint32              dt;                           // time needed to calculate this frame (in milliSeconds) | 
|---|
 | 23 |     float               dts; | 
|---|
 | 24 |  | 
|---|
| [6555] | 25 |   public: | 
|---|
| [6576] | 26 |     MovieLoader(const TiXmlElement* root); | 
|---|
| [6555] | 27 |     virtual ~MovieLoader(); | 
|---|
 | 28 |  | 
|---|
 | 29 |     virtual void loadParams(const TiXmlElement* root); | 
|---|
 | 30 |  | 
|---|
 | 31 |     /* functions from story-entity */ | 
|---|
 | 32 |     virtual ErrorMessage init(); | 
|---|
 | 33 |     virtual ErrorMessage loadData(); | 
|---|
 | 34 |     virtual ErrorMessage unloadData(); | 
|---|
 | 35 |  | 
|---|
 | 36 |     virtual bool start(); | 
|---|
 | 37 |     virtual bool stop(); | 
|---|
 | 38 |     virtual bool pause(); | 
|---|
 | 39 |     virtual bool resume(); | 
|---|
 | 40 |     virtual void run(); | 
|---|
| [6557] | 41 |  | 
|---|
| [7022] | 42 |     virtual void process(const Event &event); | 
|---|
 | 43 |  | 
|---|
| [6557] | 44 |   private: | 
|---|
| [7221] | 45 |     void loadMovie(const std::string& filename); | 
|---|
| [7010] | 46 |     void setFPS(float fps); | 
|---|
| [6557] | 47 |     void tick(); | 
|---|
| [6598] | 48 |     void draw() const; | 
|---|
| [6567] | 49 |  | 
|---|
| [6555] | 50 | }; | 
|---|
 | 51 |  | 
|---|
 | 52 | #endif /* _MOVIE_LOADER_H */ | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.