home *** CD-ROM | disk | FTP | other *** search
/ C++ Games Programming / CPPGAMES.ISO / thx / include / viddir.h < prev    next >
C/C++ Source or Header  |  1995-05-08  |  2KB  |  65 lines

  1. // ---------- viddir.h
  2.  
  3. #ifndef VIDDIR_H
  4. #define VIDDIR_H
  5.  
  6. #include "director.h"
  7. #include "settings.h"
  8.  
  9. const int BUFFERPAGE = 2;
  10.  
  11. struct FlicHdr {
  12.   long int size;
  13.   char signature[2];
  14.   short int frames;
  15.   short int width;
  16.   short int height;
  17.   short int bitspixel;
  18.   short int reserved;
  19.   long int delay;
  20.   char filler2[108];
  21. };
  22.  
  23. struct patch_struct  {
  24.   int x1,y1,x2,y2;
  25. };
  26.  
  27. class VideoDirector : public Director  {
  28.   static int vpage;
  29.   static patch_struct patch[NUMPATCHES];
  30.   static int patchcount;
  31.   static int flicplaying;
  32.   static int flicframes;
  33.   static int flicnonstop;
  34.   static int delay;
  35.   static int first;
  36.   static char flic_context[16];
  37.   static FlicHdr flic_header;
  38.   void on_hs(int);
  39. protected:
  40.   VideoDirector();
  41.   virtual ~VideoDirector();
  42.   void init_video();
  43.   void fill_background_buffer(int frompage);
  44.   void restore_page();
  45.   virtual void iterate_director();
  46.   virtual void on_s(int = 0);
  47. public:
  48.   static void swap_video_pages();
  49.   static void synch_video_pages();
  50.   static void synch_patch(int,int,int,int);
  51.   static int set_synch_patch(int x1,int y1,int x2,int y2);
  52.   static int synch_patches(int frvpage = 1);
  53.   static void restore_patch(int x1,int y1,int x2,int y2);
  54.   static void flush_patch(int x1,int y1,int x2,int y2);
  55.   static int show_pcx(char* fname);
  56.   static void show_video(char* fname,int x,int y,int nonstop=0);
  57.   static void stop_video();
  58.   static int video_playing() { return flicplaying; }
  59.   static int active_page()   { return 1-vpage; }
  60.   static int visual_page()   { return vpage; }
  61.   static int install_palette(char*);
  62. };
  63.  
  64. #endif
  65.