All pastes #442915 Raw Edit

Stuff

public text v1 · immutable
·published 2007-04-16 15:32 UTC
rendered paste body

#define LoggString(Str) {if(g_IDevice){	g_IDevice->getLogger()->log((Str),ELL_INFORMATION);	} \
						 else{ printf("(No Device)\t%s\n",(Str)); } }

#define LoggInt(i)		{if(g_IDevice){	stringc str=(i);g_IDevice->getLogger()->log(str.c_str(),ELL_INFORMATION);	} \
						 else{ printf("(No Device)\t%d\n",(i)); } }
						 
#define LoggVector(V)	{if(g_IDevice){	stringc str=("X:");str+=(V).X;str+=(" Y:");str+=(V).Y;str+=(" Z:");str+=(V).Z;g_IDevice->getLogger()->log(str.c_str(),ELL_INFORMATION);	} \
						 else{ printf("(No Device)\tX:%d Y:%d Z:%d\n",(V).X, (V).Y, (V).Z); } }

#define LoggColor(C)	{if(g_IDevice){	stringc str=("A:");str+=(int)(C).getAlpha();str+=(" R:");str+=(int)(C).getRed();str+=(" G:");str+=(int)(C).getGreen();str+=(" B:");str+=(int)(C).getBlue();g_IDevice->getLogger()->log(str.c_str(),ELL_INFORMATION);	} \
						 else{ printf("(No Device)\tA: %d\tR:%d G:%d B:%d\n",(C).getAlpha(),(C).getRed(),(C).getGreen(),(C).getBlue()); } }




#define ToColor(V) SColor(0, (V).X, (V).Y, (V).Z)

#define ToVector(C) vector3df((C).getRed(), (C).getGreen(), (C).getBlue())


#define Logg(STR) {LoggString(__FILE__);LoggInt(__LINE__);LoggString(STR);}