Go to the documentation of this file.00001
00002
00003
00004
00005 #ifndef GLOBAL_H
00006 #define GLOBAL_H
00007
00008 #include <stdio.h>
00009
00010
00011
00012
00013
00014
00015
00016
00017 #define RECORD "record"
00018 #define HELP "help"
00019 #define SHELP "hh"
00020 #define DEBUGHELP "wizhelp"
00021 #define RUMORFILE "rumors"
00022 #define ORACLEFILE "oracles"
00023 #define DATAFILE "data"
00024 #define CMDHELPFILE "cmdhelp"
00025 #define HISTORY "history"
00026 #define LICENSE "license"
00027 #define OPTIONFILE "opthelp"
00028 #define OPTIONS_USED "options"
00029
00030 #define LEV_EXT ".lev"
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 #ifdef DUMB
00041 #ifdef BITFIELDS
00042 #undef BITFIELDS
00043 #endif
00044 #ifndef STUPID
00045 #define STUPID
00046 #endif
00047 #endif
00048
00049
00050
00051
00052
00053
00054 typedef schar xchar;
00055 #ifndef SKIP_BOOLEAN
00056 typedef xchar boolean;
00057 #endif
00058
00059 #ifndef TRUE
00060 #define TRUE ((boolean)1)
00061 #define FALSE ((boolean)0)
00062 #endif
00063
00064 #ifndef STRNCMPI
00065 # ifndef __SASC_60
00066 # define strcmpi(a,b) strncmpi((a),(b),-1)
00067 # endif
00068 #endif
00069
00070
00071
00072
00073 #ifdef INTERNAL_COMP
00074 # define RLECOMP
00075 # define ZEROCOMP
00076 #endif
00077
00078
00079
00080
00081 #ifdef BITFIELDS
00082 #define Bitfield(x,n) unsigned x:n
00083 #else
00084 #define Bitfield(x,n) uchar x
00085 #endif
00086
00087 #ifdef UNWIDENED_PROTOTYPES
00088 # define CHAR_P char
00089 # define SCHAR_P schar
00090 # define UCHAR_P uchar
00091 # define XCHAR_P xchar
00092 # define SHORT_P short
00093 #ifndef SKIP_BOOLEAN
00094 # define BOOLEAN_P boolean
00095 #endif
00096 # define ALIGNTYP_P aligntyp
00097 #else
00098 # ifdef WIDENED_PROTOTYPES
00099 # define CHAR_P int
00100 # define SCHAR_P int
00101 # define UCHAR_P int
00102 # define XCHAR_P int
00103 # define SHORT_P int
00104 # define BOOLEAN_P int
00105 # define ALIGNTYP_P int
00106 # endif
00107 #endif
00108 #if defined(ULTRIX_PROTO) && !defined(__STDC__)
00109
00110
00111
00112
00113
00114
00115
00116 #define OBJ_P void*
00117 #define MONST_P void*
00118 #else
00119 #define OBJ_P struct obj*
00120 #define MONST_P struct monst*
00121 #endif
00122
00123 #define SIZE(x) (int)(sizeof(x) / sizeof(x[0]))
00124
00125
00126
00127
00128
00129
00130
00131 #define LARGEST_INT 32767
00132
00133
00134 #ifdef REDO
00135 #define Getchar pgetchar
00136 #endif
00137
00138
00139 #include "coord.h"
00140
00141
00142
00143
00144
00145 #ifdef VMS
00146 #include "vmsconf.h"
00147 #endif
00148
00149 #ifdef UNIX
00150 #include "unixconf.h"
00151 #endif
00152
00153 #ifdef OS2
00154 #include "os2conf.h"
00155 #endif
00156
00157 #ifdef MSDOS
00158 #include "pcconf.h"
00159 #endif
00160
00161 #ifdef TOS
00162 #include "tosconf.h"
00163 #endif
00164
00165 #ifdef AMIGA
00166 #include "amiconf.h"
00167 #endif
00168
00169 #ifdef MAC
00170 #include "macconf.h"
00171 #endif
00172
00173 #ifdef __BEOS__
00174 #include "beconf.h"
00175 #endif
00176
00177 #ifdef WIN32
00178 #ifdef WIN_CE
00179 #include "wceconf.h"
00180 #else
00181 #include "ntconf.h"
00182 #endif
00183 #endif
00184
00185
00186 #ifndef PORT_ID
00187 # ifdef AMIGA
00188 # define PORT_ID "Amiga"
00189 # endif
00190 # ifdef MAC
00191 # define PORT_ID "Mac"
00192 # endif
00193 # ifdef MSDOS
00194 # ifdef PC9800
00195 # define PORT_ID "PC-9800"
00196 # else
00197 # define PORT_ID "PC"
00198 # endif
00199 # ifdef DJGPP
00200 # define PORT_SUB_ID "djgpp"
00201 # else
00202 # ifdef OVERLAY
00203 # define PORT_SUB_ID "overlaid"
00204 # else
00205 # define PORT_SUB_ID "non-overlaid"
00206 # endif
00207 # endif
00208 # endif
00209 # ifdef OS2
00210 # define PORT_ID "OS/2"
00211 # endif
00212 # ifdef TOS
00213 # define PORT_ID "ST"
00214 # endif
00215 # ifdef UNIX
00216 # define PORT_ID "Unix"
00217 # endif
00218 # ifdef VMS
00219 # define PORT_ID "VMS"
00220 # endif
00221 # ifdef WIN32
00222 # define PORT_ID "Windows"
00223 # ifndef PORT_SUB_ID
00224 # ifdef MSWIN_GRAPHICS
00225 # define PORT_SUB_ID "graphical"
00226 # else
00227 # define PORT_SUB_ID "tty"
00228 # endif
00229 # endif
00230 # endif
00231 #endif
00232
00233 #if defined(MICRO)
00234 #if !defined(AMIGA) && !defined(TOS) && !defined(OS2_HPFS)
00235 #define SHORT_FILENAMES
00236 #endif
00237 #endif
00238
00239 #ifdef VMS
00240
00241
00242
00243
00244
00245 # ifdef EXIT_SUCCESS
00246 # undef EXIT_SUCCESS
00247 # endif
00248 # ifdef EXIT_FAILURE
00249 # undef EXIT_FAILURE
00250 # endif
00251 #endif
00252
00253 #ifndef EXIT_SUCCESS
00254 # define EXIT_SUCCESS 0
00255 #endif
00256 #ifndef EXIT_FAILURE
00257 # define EXIT_FAILURE 1
00258 #endif
00259
00260 #if defined(X11_GRAPHICS) || defined(QT_GRAPHICS) || defined(GNOME_GRAPHICS) || defined(MSWIN_GRAPHICS)
00261 # ifndef USE_TILES
00262 # define USE_TILES
00263 # endif
00264 #endif
00265 #if defined(AMII_GRAPHICS) || defined(GEM_GRAPHICS)
00266 # ifndef USE_TILES
00267 # define USE_TILES
00268 # endif
00269 #endif
00270
00271
00272 #define Sprintf (void) sprintf
00273 #define Strcat (void) strcat
00274 #define Strcpy (void) strcpy
00275 #ifdef NEED_VARARGS
00276 #define Vprintf (void) vprintf
00277 #define Vfprintf (void) vfprintf
00278 #define Vsprintf (void) vsprintf
00279 #endif
00280
00281
00282
00283 #ifdef MONITOR_HEAP
00284 extern long *FDECL(nhalloc, (unsigned int,const char *,int));
00285 extern void FDECL(nhfree, (genericptr_t,const char *,int));
00286 # ifndef __FILE__
00287 # define __FILE__ ""
00288 # endif
00289 # ifndef __LINE__
00290 # define __LINE__ 0
00291 # endif
00292 # define alloc(a) nhalloc(a,__FILE__,(int)__LINE__)
00293 # define free(a) nhfree(a,__FILE__,(int)__LINE__)
00294 #else
00295 extern long *FDECL(alloc, (unsigned int));
00296 #endif
00297
00298
00299
00300 struct version_info {
00301 unsigned long incarnation;
00302 unsigned long feature_set;
00303 unsigned long entity_count;
00304 unsigned long struct_sizes;
00305 };
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317 #define COLNO 80
00318 #define ROWNO 21
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328 #if COLNO <= 140
00329 #define MAXCO 160
00330 #else
00331 #define MAXCO (COLNO+20)
00332 #endif
00333
00334
00335 #define MAXNROFROOMS 40
00336 #define MAX_SUBROOMS 24
00337 #define DOORMAX 120
00338
00339 #define BUFSZ 256
00340 #define QBUFSZ 128
00341 #define TBUFSZ 300
00342
00343
00344 #define PL_NSIZ 32
00345 #define PL_CSIZ 32
00346 #define PL_FSIZ 32
00347 #define PL_PSIZ 63
00348
00349
00350 #define MAXDUNGEON 16
00351 #define MAXLEVEL 32
00352 #define MAXSTAIRS 1
00353 #define ALIGNWEIGHT 4
00354
00355 #define MAXULEV 30
00356
00357 #define MAXMONNO 120
00358 #define MHPMAX 500
00359
00360 #endif