home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2002 April / Game.EXE_04_2002.iso / Alawar / Animation2D.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-02  |  953 b   |  38 lines

  1. #ifndef ANIMATION2D_H
  2. #define ANIMATION2D_H
  3. #include "Object2D.h"
  4. class Sequences;
  5. class String;
  6. class Scene2D;
  7.  
  8. class Animation2D : public Object2D
  9. {
  10. public:
  11.     Animation2D(Scene2D * scene, int layer, const String & name);
  12.     virtual ~Animation2D();
  13.  
  14.     virtual void render();
  15.  
  16.     void start(unsigned seq, bool is_loop);
  17.     bool life_cycle(unsigned delta_time_ms);
  18.     bool is_finished()const;
  19.     void set_transparency(unsigned alpha);
  20.  
  21.     void render_frame(unsigned seq, unsigned fr, int alpha)const;
  22.  
  23.     unsigned get_height()const;
  24.     unsigned get_height(unsigned seq, unsigned fr)const;
  25.     unsigned get_width()const;
  26.     unsigned get_width(unsigned seq, unsigned fr )const;
  27.     unsigned get_sequence_count()const;
  28.     unsigned get_frame_count(unsigned seq)const;
  29. private:
  30.     unsigned alpha;
  31.     unsigned current_seq;
  32.     unsigned current_fr;
  33.     unsigned time_ms;
  34.     bool loop_current;
  35.     bool finished;
  36.     const Sequences * sequences;
  37. };
  38. #endif //ANIMATION2D_H