00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef MAX_PATH
00024 #define MAX_PATH 64
00025 #endif
00026
00027 #ifndef PATH_SEPERATORSTR
00028 #if defined(WIN32)|defined(_WIN32)|defined(__NT__)|defined(__WINDOWS__)|defined(__WINDOWS_386__)
00029 #define PATHSEPERATOR_STR "\\"
00030 #else
00031 #define PATHSEPERATOR_STR "/"
00032 #endif
00033 #endif
00034 #ifndef PATH_SEPERATORCHAR
00035 #if defined(WIN32)|defined(_WIN32)|defined(__NT__)|defined(__WINDOWS__)|defined(__WINDOWS_386__)
00036 #define PATHSEPERATOR_CHAR '\\'
00037 #else
00038 #define PATHSEPERATOR_CHAR '/'
00039 #endif
00040 #endif
00041
00042
00043 #define random() ((rand () & 0x7fff) / ((float)0x7fff))
00044
00045 #define crandom() (2.0 * (random() - 0.5))
00046
00047 #define Maximum(x,y) (x > y ? x : y)
00048 #define Minimum(x,y) (x < y ? x : y)
00049
00050 #define FloatAbs(x) (*(float *) &((* (int *) &(x)) & 0x7FFFFFFF))
00051 #define IntAbs(x) (~(x))
00052
00053 #define _X 0
00054 #define _Y 1
00055 #define _Z 2
00056
00057 typedef struct foundfile_s
00058 {
00059 int offset;
00060 int length;
00061 char filename[MAX_PATH];
00062 } foundfile_t;
00063
00064 void Vector2Angles(vec3_t value1, vec3_t angles);
00065
00066 void ConvertPath(char *path);
00067
00068 void AppendPathSeperator(char *path, int length);
00069
00070 qboolean FindFileInPak(char *pakfile, char *filename, foundfile_t *file);
00071
00072 #ifdef BOTLIB
00073 qboolean FindQuakeFile(char *filename, foundfile_t *file);
00074 #else //BOTLIB
00075 qboolean FindQuakeFile(char *basedir, char *gamedir, char *filename, foundfile_t *file);
00076 #endif //BOTLIB
00077
00078
00079