- Main Page
- Classes
- Files

- File List
- File Members

# C:/Users/Public/AGS Final Folder/BFLETCHER D4010283/Source/Game/Source/Colour.h

Go to the documentation of this file.

    00001 #ifndef _COLOUR_H_
    00002 #define _COLOUR_H_
    00003
    00004 #include <cstdlib>
    00005
    00006 struct ColourRGB
    00007 {
    00008         ColourRGB() : r(0), g(0), b(0) {}
    00009         ColourRGB(const unsigned char &R, const unsigned char &G, const unsigned char &B)
    00010         : r(R), g(G), b(B)
    00011         {
    00012         }
    00013
    00014         bool operator== (const ColourRGB &colour) const
    00015         {
    00016                 if(r == colour.r && g == colour.g && b == colour.b)
    00017                         return true;
    00018                 else
    00019                         return false;
    00020         }
    00021
    00022         static ColourRGB GetRandomColour()
    00023         {
    00024                 return ColourRGB(rand() % 255, rand() % 255, rand() % 255);
    00025         }
    00026
    00027         unsigned char r, g, b;
    00028 };
    00029
    00030 #endif