|
Atrinik Client 2.5
|
00001 /************************************************************************ 00002 * Atrinik, a Multiplayer Online Role Playing Game * 00003 * * 00004 * Copyright (C) 2009-2011 Alex Tokar and Atrinik Development Team * 00005 * * 00006 * Fork from Daimonin (Massive Multiplayer Online Role Playing Game) * 00007 * and Crossfire (Multiplayer game for X-windows). * 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 * This program is distributed in the hope that it will be useful, * 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00017 * GNU General Public License for more details. * 00018 * * 00019 * You should have received a copy of the GNU General Public License * 00020 * along with this program; if not, write to the Free Software * 00021 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00022 * * 00023 * The author can be reached at admin@atrinik.org * 00024 ************************************************************************/ 00025 00030 #ifndef GLOBAL_H 00031 #define GLOBAL_H 00032 00034 typedef unsigned int uint32; 00036 typedef signed int sint32; 00038 typedef unsigned short uint16; 00040 typedef signed short sint16; 00042 typedef unsigned char uint8; 00044 typedef signed char sint8; 00045 00046 /* If we're not using GNU C, ignore __attribute__ */ 00047 #ifndef __GNUC__ 00048 # define __attribute__(x) 00049 #endif 00050 00051 /* Include standard headers. */ 00052 #include <SDL.h> 00053 #include <SDL_main.h> 00054 #include <SDL_image.h> 00055 #include <SDL_ttf.h> 00056 #include <curl/curl.h> 00057 #include <zlib.h> 00058 #include <math.h> 00059 #include <config.h> 00060 #include <stdarg.h> 00061 #include <stdlib.h> 00062 #include <string.h> 00063 #include <errno.h> 00064 #include <ctype.h> 00065 #include <sys/types.h> 00066 #include <sys/stat.h> 00067 #include <signal.h> 00068 00069 #include <porting.h> 00070 00071 #ifdef HAVE_STDDEF_H 00072 # include <stddef.h> 00073 #endif 00074 00075 #ifdef HAVE_FCNTL_H 00076 # include <fcntl.h> 00077 #endif 00078 00079 #ifdef HAVE_UNISTD_H 00080 # include <unistd.h> 00081 #endif 00082 00083 #ifdef HAVE_SYS_TIME_H 00084 # include <sys/time.h> 00085 #endif 00086 00087 #ifdef HAVE_TIME_H 00088 # include <time.h> 00089 #endif 00090 00091 #ifdef LINUX 00092 # include <netdb.h> 00093 # include <sys/socket.h> 00094 # include <netinet/in.h> 00095 # include <netinet/tcp.h> 00096 #endif 00097 00098 #ifdef HAVE_ARPA_INET_H 00099 # include <arpa/inet.h> 00100 #endif 00101 00102 #ifdef HAVE_SDL_MIXER 00103 # include <SDL_mixer.h> 00104 #endif 00105 00106 #ifdef HAVE_DIRENT_H 00107 # include <dirent.h> 00108 # define NAMLEN(dirent) (strlen((dirent)->d_name)) 00109 #elif defined(HAVE_SYS_NDIR_H) || defined(HAVE_SYS_DIR_H) || defined(HAVE_NDIR_H) 00110 # define dirent direct 00111 # define NAMLEN(dirent) ((dirent)->d_namlen) 00112 # ifdef HAVE_SYS_NDIR_H 00113 # include <sys/ndir.h> 00114 # endif 00115 # ifdef HAVE_SYS_DIR_H 00116 # include <sys/dir.h> 00117 # endif 00118 # ifdef HAVE_NDIR_H 00119 # include <ndir.h> 00120 # endif 00121 #endif 00122 00123 #ifdef HAVE_SRANDOM 00124 # define RANDOM() random() 00125 # define SRANDOM(xyz) srandom(xyz) 00126 #else 00127 # ifdef HAVE_SRAND48 00128 # define RANDOM() lrand48() 00129 # define SRANDOM(xyz) srand48(xyz) 00130 # else 00131 # ifdef HAVE_SRAND 00132 # define RANDOM() rand() 00133 # define SRANDOM(xyz) srand(xyz) 00134 # else 00135 # error "Could not find a usable random routine" 00136 # endif 00137 # endif 00138 #endif 00139 00140 #ifdef HAVE_STRICMP 00141 # define strcasecmp(_s1_, _s2_) stricmp(_s1_, _s2_) 00142 #endif 00143 00144 #ifdef HAVE_STRNICMP 00145 # define strncasecmp(_s1_, _s2_, _nrof_) strnicmp(_s1_, _s2_, _nrof_) 00146 #endif 00147 00148 #ifndef MIN 00149 # define MIN(x, y) ((x) < (y) ? (x) : (y)) 00150 #endif 00151 00152 #ifndef MAX 00153 # define MAX(x, y) ((x) > (y) ? (x) : (y)) 00154 #endif 00155 00156 #ifndef FABS 00157 # define FABS(x) ((x) < 0 ? -(x) : (x)) 00158 #endif 00159 00161 typedef enum LogLevel 00162 { 00164 llevError, 00166 llevBug, 00168 llevDebug, 00170 llevInfo 00171 } LogLevel; 00172 00173 #include <version.h> 00174 #include <item.h> 00175 #include <text.h> 00176 #include <curl.h> 00177 #include <book.h> 00178 #include <commands.h> 00179 #include <main.h> 00180 #include <client.h> 00181 #include <effects.h> 00182 #include <sprite.h> 00183 #include <widget.h> 00184 #include <textwin.h> 00185 #include <player.h> 00186 #include <party.h> 00187 #include <misc.h> 00188 #include <event.h> 00189 #include <ignore.h> 00190 #include <sound.h> 00191 #include <map.h> 00192 #include <scripts.h> 00193 #include <inventory.h> 00194 #include <menu.h> 00195 #include <list.h> 00196 #include <button.h> 00197 #include <popup.h> 00198 #include <server_settings.h> 00199 #include <server_files.h> 00200 #include <image.h> 00201 #include <settings.h> 00202 #include <keybind.h> 00203 #include <binreloc.h> 00204 #include <sha1.h> 00205 #include <progress.h> 00206 #include <updater.h> 00207 00208 #ifndef __CPROTO__ 00209 # include <proto.h> 00210 #endif 00211 00212 #endif
1.7.4