home *** CD-ROM | disk | FTP | other *** search
/ Cutting-Edge 3D Game Programming with C++ / CE3DC++.ISO / BOOK / CHAP12 / PALSHADE.HPP < prev    next >
C/C++ Source or Header  |  1996-01-24  |  640b  |  34 lines

  1. //
  2. // File name: PalShade.HPP
  3. //
  4. // Description: The header file for a palette shading class
  5. //
  6. // Author: John De Goes
  7. //
  8. // Project: Cutting Edge 3D Game Programming
  9. //
  10.  
  11. #ifndef PALSHADEHPP
  12. #define PALSHADEHPP
  13.  
  14. #include <StdIO.H>
  15. #include <Windows.H>
  16.  
  17. const SHADE_COUNT = 32, COLOR_COUNT = 256;
  18.  
  19. class ShadeDat {
  20. protected:
  21.  
  22. public:
  23.   char Shade [ SHADE_COUNT * COLOR_COUNT ];
  24.   void GenTable ( double, double, double, RGBQUAD * );
  25.   int LoadTable ( char *FileName );
  26.   int SaveTable ( char *FileName );
  27. };
  28.  
  29. extern ShadeDat TextShade;
  30.  
  31. int GetColor ( int Red, int Green, int Blue, RGBQUAD *Pal );
  32.  
  33. #endif
  34.