00001 #ifndef _ANTISTD_
00002 #define _ANTISTD_
00003
00004 #define _ANTI_SDL
00005
00006
00007
00008 #define _ANTI_DEBUG
00009
00010 #ifdef _ANTI_SDL
00011 #include <SDL/SDL.h>
00012 #endif
00013
00014 #ifdef _ANTI_GLEW
00015 #include <GL/glew.h>
00016 #else
00017 #include <GL/gl.h>
00018 #include <GL/glu.h>
00019 #include <GL/glext.h>
00020 #endif
00021
00022 #ifdef _ANTI_SDL_IMAGE
00023 #include <SDL/SDL_image.h>
00024 #endif
00025 #include "png.h"
00026 #include "jpeglib.h"
00027
00028 #ifdef _ANTI_GLUT
00029 #include <GL/glut.h>
00030 #endif
00031
00032 #include <stdlib.h>
00033 #include <stdio.h>
00034 #include <math.h>
00035 #include <string.h>
00036 #include <stdarg.h>
00037 #include <setjmp.h>
00038 #include <time.h>
00039 #include <sys/time.h>
00040
00041 #include "libmala/fmath.h"
00042 #include "libmala/vector.h"
00043 #include "libmala/matrix.h"
00044 #include "libmala/quaternion.h"
00045 #include "libmala/plane.h"
00046
00047 typedef unsigned int uint;
00048 typedef unsigned short ushort;
00049 typedef unsigned char byte;
00050
00051 #include "debug.h"
00052
00053 #ifdef _ANTI_DEBUG
00054
00055 #define _ANTI_MALLOC(a,b) ASSERTPTR((a*)malloc(b*sizeof(a)),"malloc failed\n")
00056 #define _ANTI_CALLOC(a,b) ASSERTPTR((a*)calloc(b*sizeof(a)),"calloc failed\n")
00057 #define _ANTI_REALLOC(a,b,c) ASSERTPTR((a*)realloc(c,b*sizeof(a)),"realloc failed\n")
00058 #define _ANTI_FREE(a) free(a)
00059
00060 #define _ANTI_START(a) //aeProfilerStartSample(__aeProfiler,a)
00061 #define _ANTI_END() //aeProfilerEndSample(__aeProfiler)
00062 #define _ANTI_STARTF() //aeProfilerStartFrame(__aeProfiler)
00063 #define _ANTI_ENDF() //aeProfilerEndFrame(__aeProfiler)
00064 #define _ANTI_LOG(args...) //aeLog(__aeLogPtr,args)
00065
00066 #else
00067
00068 #define _ANTI_MALLOC(a,b) (a*)malloc(b*sizeof(a))
00069 #define _ANTI_CALLOC(a,b) (a*)calloc(b*sizeof(a))
00070 #define _ANTI_REALLOC(a,b,c) (a*)realloc(c,b*sizeof(a))
00071 #define _ANTI_FREE(a) free(a)
00072
00073 #define _ANTI_START(a)
00074 #define _ANTI_END()
00075 #define _ANTI_STARTF()
00076 #define _ANTI_ENDF()
00077 #define _ANTI_LOG(args...)
00078
00079 #endif
00080
00081 #include "antiutil.h"
00082
00083 #endif