include/df/struct.hpp

00001 //MISC Struct's
00002 
00003 //SystemCode::Set/GetTime()
00004 struct Time {
00005   uint16 Year;
00006   uint16 Month;
00007   uint16 DayOfWeek;
00008   uint16 Day;
00009   uint16 Hour;
00010   uint16 Minute;
00011   uint16 Second;
00012   uint16 Millisecond;
00013   BOOL operator > (Time &);  //see system.cpp
00014   BOOL operator < (Time &);  //see system.cpp
00015   BOOL operator == (Time &); //see system.cpp
00016 };
00017 
00018 struct Rect {
00019   int32 x1, y1, x2, y2;
00020 };
00021 
00022 struct Rect3 {
00023   int32 x1, y1, x2, y2, z1, z2;
00024 };
00025 
00026 struct Point {
00027   int32 x, y;
00028 };
00029 
00030 struct Point3 {
00031   int32 x, y, z;
00032 };
00033 
00034 struct RGB {
00035   union {
00036     struct {
00037       uint8 B, G, R, r;    //r=reserved (Must be ZERO)
00038     };
00039     uint32 x;
00040     uint8 a[4];  //array
00041   };
00042   RGB() : x(0) {}   //ctor to init r to ZERO (this could take a while for palettes!)}
00043 };
00044 
00045 #pragma pack(push,1)
00046 struct uint24 {
00047   uint8 x1,x2,x3;
00048   uint24(uint32 y) : 
00049     x1((y & 0xff)), x2((y & 0xff00) >> 8), x3((y & 0xff0000) >> 16)
00050     { }
00051   operator int () {
00052     return x3 << 16 + x2 << 8 + x1;
00053   }  
00054 };
00055 #pragma pack(pop)

Generated on Mon Mar 5 09:49:14 2007 for DigiForce by  doxygen 1.4.7