24 #include <csutil/csstring.h> 41 #define REDCODE "\033ff00000" 42 #define GREENCODE "\03300ff000" 43 #define BLUECODE "\0330000ff0" 44 #define WHITECODE "\033ffffff0" 45 #define DEFAULTCODE "\0330000000" 46 #define ESCAPECODE '\033' 52 static bool ParseColour(
const char* str,
int& r,
int& g,
int& b,
int& size)
54 if(strlen(str) <
LENGTHCODE || str[0] !=
'\033')
81 for(
int i = 0; i < len; i++)
83 if(str[i] >=
'a' && str[i] <=
'f')
84 count += (str[i] -
'a') + 10;
85 else if(str[i] >=
'0' && str[i] <=
'9')
86 count += (str[i] -
'0');
87 else if(str[i] >=
'A' && str[i] <=
'F')
88 count += (str[i] -
'A') + 10;
124 virtual void ScopedTimerCallback(
const ScopedTimer* timer) = 0;
151 ScopedTimer(csTicks limit,
const char * format, ... );
168 csTicks TimeUsed()
const;
Check how long time it take to process a scope.
Callback function for ScopedTimers.
static int DecodeHex(const char *str, int len)
float psGetRandom()
Returns a random number.
void GetTimeOfDay(csString &string)
Get the time of day in GMT.
static bool ParseColour(const char *str, int &r, int &g, int &b, int &size)
psPoint(int iX, int iY)
Constructor: initialize the object with given values.