ColorBankClass

The Con- /destructors are inline defined while the rest of functions are static, eg available by explicit qualification before creation of the first instance of this class.
 


 public:
 ColorBankClass() { nColors = nDarkendColors = 0; ColorPool = ColorBuffer = NULL; };
 ~ColorBankClass() {};

 enum ColorMode { NormalMode, UnlitMode, GreenMode, UnlitGreenMode };

 // Management functions
 static void Setup( int nclrs, int ndarkclrs );
 static void Cleanup( void );
 static void ReadPool( int file );
 static void SetLight( float red, float green, float blue );
 static void SetColorMode( ColorMode mode );

 // Debug parameter validation
 static BOOL IsValidColorIndex( int i );
 

  public:
 // Publicly used color array (set when color mode is chosen)
 static Pcolor  *ColorPool;

 // Color counts
  static int   nColors;   // Total number of colors in each set
  static int   nDarkendColors;  // Number of colors which are staticly lit

 // These are the color pools for each mode
  static Pcolor  *ColorBuffer;  // Normal (original) colors
  static Pcolor *DarkenedBuffer; // Processed for static lighting on some colors
  static Pcolor  *GreenIRBuffer;  // Processed for green without lighting
  static Pcolor  *GreenTVBuffer;  // Processed for green with static lighting on some colors

 // Light levels for the staticly lit colors
// float    redLevel;
// float    greenLevel;
// float    blueLevel;