lugre_prefix.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef LUGRE_PREFIX_H
00025 #define LUGRE_PREFIX_H
00026
00027 #include "lugre_platform.h"
00028
00029 #include <assert.h>
00030 #define ASSERT(x) assert(x)
00031 #include "lugre_profile.h"
00032
00033 #ifndef LUGRE_REDUCE_C_INCLUDES
00034 #include <stdlib.h>
00035 #include <stdio.h>
00036 #include <string.h>
00037 #include <cstring>
00038 #endif
00039
00040 namespace Lugre {
00041
00042 int mystricmp (const char *str1, const char *str2);
00043 float myround (const float x);
00044
00045 void MyCrash (const char* szMessage);
00046 void MyCrash (const char* szMessage,const char* szFile,unsigned int iLine,const char* szFunction);
00047 void MyShowError (const char* szMessage);
00048 void MyShowError (const char* szMessage,const char* szFile,unsigned int iLine,const char* szFunction);
00049
00050 bool Lugre_IsMainThread ();
00051
00052 template<typename T1, typename T2> inline T1 myabs(T1 a){return (a>0?a:-a);}
00053 template<typename T1, typename T2> inline T1 mymax(T1 a,T2 b){return (a<b?b:a);}
00054 template<typename T1, typename T2> inline T1 mymin(T1 a,T2 b){return (a>b?b:a);}
00055 template<typename T1> inline T1 mysquare(T1 a){return a*a;}
00056
00058 void printdebug (const char *szCategory, const char *szFormat = "", ...);
00059
00060 }
00061
00062 #endif