home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / RAYCAST.ZIP / SCRCAP.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-14  |  621 b   |  32 lines

  1. #include "ray.h"
  2. #include "globals.h"
  3. #include "palobj.h"
  4. #include "scrconf.h"
  5. #include "palette.h"
  6.  
  7. class Scr_Capturer : public palobj {
  8.   public:
  9.     Scr_Capturer() : palobj() {
  10.       holdimage=TRUE;
  11.     };
  12.     Init_Capture() {
  13.       image[0]=buff;
  14.       width=Get_Phys_Screen_Width();
  15.       height=Get_Phys_Screen_Height();
  16.       image_size=width*height;
  17.       palette[0]=NewPtr(768);
  18.       Get_Palette(palette[0],0,256);
  19.     }
  20. };
  21.     
  22.  
  23.  
  24. void Screen_Capture(PCHAR filename) {
  25.   Scr_Capturer the_cap;
  26.   the_cap.Init_Capture();
  27.   the_cap.assignoutfile(filename);
  28.   the_cap.Write();
  29.   }
  30.  
  31.  
  32.