|
Atrinik Client 1.0
|
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 INCLUDE_H 00031 #define INCLUDE_H 00032 00033 /* If we're not using GNU C, ignore __attribute__ */ 00034 #ifndef __GNUC__ 00035 # define __attribute__(x) 00036 #endif 00037 00038 #ifndef WIN32 00039 # include "define.h" 00040 #else 00041 # include "win32.h" 00042 #endif 00043 00044 #include "config.h" 00045 00046 /* This is for the DevCpp IDE */ 00047 #ifndef __WIN_32 00048 # ifdef WIN32 00049 # define __WIN_32 00050 # endif 00051 #endif 00052 00053 typedef unsigned int uint32; 00054 typedef signed int sint32; 00055 typedef unsigned short uint16; 00056 typedef signed short sint16; 00057 typedef unsigned char uint8; 00058 typedef signed char sint8; 00059 00060 #ifdef WIN32 00061 typedef unsigned __int64 uint64; 00062 typedef signed __int64 sint64; 00063 # define atoll _atoi64 00064 # define FMT64 "I64d" 00065 # define FMT64U "I64u" 00066 #else 00067 # if SIZEOF_LONG == 8 00068 typedef unsigned long uint64; 00069 typedef signed long sint64; 00070 # define FMT64 "ld" 00071 # define FMT64U "lu" 00072 00073 # elif SIZEOF_LONG_LONG == 8 00074 typedef unsigned long long uint64; 00075 typedef signed long long sint64; 00076 # define FMT64 "lld" 00077 # define FMT64U "llu" 00078 00079 # else 00080 # error Do not know how to get a 64 bit value on this system. 00081 # error Correct and send email to the Atrinik Team on how to do this. 00082 # endif 00083 #endif 00084 00085 #ifndef MIN 00086 # define MIN(x, y) ((x) < (y) ? (x) : (y)) 00087 #endif 00088 00089 #ifndef MAX 00090 # define MAX(x, y) ((x) > (y) ? (x) : (y)) 00091 #endif 00092 00093 #define RANDOM() rand() 00094 #define SRANDOM(xyz) srand(xyz) 00095 00096 #define FABS(x) ((x) < 0 ? -(x) : (x)) 00097 00098 #include <SDL_mixer.h> 00099 00100 #ifdef WIN32 00101 # include "win32.h" 00102 #else 00103 # ifdef HAVE_SYS_STAT_H 00104 # include <sys/stat.h> 00105 # endif 00106 00107 # ifdef HAVE_SYS_TIME_H 00108 # include <sys/time.h> 00109 # endif 00110 00111 # include <time.h> 00112 00113 # ifdef HAVE_STRING_H 00114 # include <string.h> 00115 # endif 00116 00117 # ifdef HAVE_UNISTD_H 00118 # include <unistd.h> 00119 # endif 00120 00121 # ifdef HAVE_FCNTL_H 00122 # include <fcntl.h> 00123 # endif 00124 00125 # ifdef HAVE_DMALLOC_H 00126 # include <dmalloc.h> 00127 # endif 00128 00129 # include <sys/types.h> 00130 # include <errno.h> 00131 # include <ctype.h> 00132 # include <stdarg.h> 00133 # include <stddef.h> 00134 # include <netdb.h> 00135 # include <sys/socket.h> 00136 # include <netinet/in.h> 00137 # include <netinet/tcp.h> 00138 # include <arpa/inet.h> 00139 # include <SDL.h> 00140 # include <SDL_main.h> 00141 # include <SDL_image.h> 00142 # include <SDL_ttf.h> 00143 00144 typedef int SOCKET; 00145 #endif 00146 00147 #if !defined(WIN32) || defined(MINGW) 00148 # include <dirent.h> 00149 #endif 00150 00152 typedef enum LogLevel 00153 { 00155 llevError, 00157 llevBug, 00159 llevDebug, 00161 llevInfo 00162 } LogLevel; 00163 00164 #include <signal.h> 00165 #include <curl/curl.h> 00166 00167 #include <zlib.h> 00168 #include <item.h> 00169 00170 #include <text.h> 00171 #include <curl.h> 00172 #include <book.h> 00173 #include <sdlsocket.h> 00174 #include <commands.h> 00175 #include <main.h> 00176 #include <client.h> 00177 #include <effects.h> 00178 #include <sprite.h> 00179 #include <widget.h> 00180 #include <textwin.h> 00181 #include <player.h> 00182 #include <party.h> 00183 #include <misc.h> 00184 #include <event.h> 00185 #include <ignore.h> 00186 #include <sound.h> 00187 #include <map.h> 00188 #include <scripts.h> 00189 #include <inventory.h> 00190 #include <menu.h> 00191 #include <dialog.h> 00192 #include <list.h> 00193 #include <button.h> 00194 #include <popup.h> 00195 #include <server_settings.h> 00196 #include <server_files.h> 00197 #include <image.h> 00198 00199 #ifndef __CPROTO__ 00200 # include <proto.h> 00201 #endif 00202 00203 #endif
1.7.4