1 /* aNetHack 0.0.1 ntconf.h $ANH-Date: 1447424077 2015/11/13 14:14:37 $ $ANH-Branch: master $:$ANH-Revision: 1.48 $ */
2 /* Copyright (c) aNetHack PC Development Team 1993, 1994. */
3 /* aNetHack may be freely redistributed. See license for details. */
8 /* #define SHELL /* nt use of pcsys routines caused a hang */
10 #define RANDOM /* have Berkeley random(3) */
11 #define TEXTCOLOR /* Color text */
13 #define EXEPATH /* Allow .exe location to be used as HACKDIR */
14 #define TRADITIONAL_GLYPHMAP /* Store glyph mappings at level change time */
16 #define LAN_FEATURES /* Include code for lan-aware features. Untested in \
19 #define PC_LOCKING /* Prevent overwrites of aborted or in-progress games */
20 /* without first receiving confirmation. */
22 #define HOLD_LOCKFILE_OPEN /* Keep an exclusive lock on the .0 file */
24 #define SELF_RECOVER /* Allow the game itself to recover from an aborted \
27 #define SYSCF /* Use a global configuration */
28 #define SYSCF_FILE "sysconf" /* Use a file to hold the SYSCF configuration \
33 /*#define CHANGE_COLOR*/ /* allow palette changes */
34 #define SELECTSAVED /* Provide menu of saved games to choose from at start \
38 * -----------------------------------------------------------------
39 * The remaining code shouldn't need modification.
40 * -----------------------------------------------------------------
42 /* #define SHORT_FILENAMES /* All NT filesystems support long names now
46 #undef MICRO /* never define this! */
49 #define NOCWD_ASSUMPTIONS /* Always define this. There are assumptions that \
50 it is defined for WIN32. \
51 Allow paths to be specified for HACKDIR, \
52 LEVELDIR, SAVEDIR, BONESDIR, DATADIR, \
53 SCOREDIR, LOCKDIR, CONFIGDIR, and TROUBLEDIR */
60 #define OPTIONS_USED "options"
61 #define OPTIONS_FILE OPTIONS_USED
63 #define PORT_HELP "porthelp"
65 #define PORT_DEBUG /* include ability to debug international keyboard issues \
68 #define SAFERHANGUP /* Define SAFERHANGUP to delay hangup processing \
69 * until the main command loop. 'safer' because it \
70 * avoids certain cheats and also avoids losing \
71 * objects being thrown when the hangup occurs. \
74 /* Stuff to help the user with some common, yet significant errors */
75 #define INTERJECT_PANIC 0
76 #define INTERJECTION_TYPES (INTERJECT_PANIC + 1)
77 extern void FDECL(interject_assistance
,
78 (int, int, genericptr_t
, genericptr_t
));
79 extern void FDECL(interject
, (int));
82 *===============================================
83 * Compiler-specific adjustments
84 *===============================================
88 /* Visual C 8 warning elimination */
89 #ifndef _CRT_SECURE_NO_DEPRECATE
90 #define _CRT_SECURE_NO_DEPRECATE
92 #ifndef _SCL_SECURE_NO_DEPRECATE
93 #define _SCL_SECURE_NO_DEPRECATE
95 #ifndef _CRT_NONSTDC_NO_DEPRECATE
96 #define _CRT_NONSTDC_NO_DEPRECATE
98 #pragma warning(disable : 4996) /* VC8 deprecation warnings */
99 #pragma warning(disable : 4142) /* benign redefinition */
100 #pragma warning(disable : 4267) /* conversion from 'size_t' to XX */
101 #if (_MSC_VER > 1600)
102 #pragma warning(disable : 4459) /* hide global declaration */
103 #endif /* _MSC_VER > 1600 */
104 #endif /* _MSC_VER > 1000 */
105 #pragma warning(disable : 4761) /* integral size mismatch in arg; conv \
108 #pragma warning(disable : 4102) /* unreferenced label */
111 /* suppress a warning in cppregex.cpp */
112 #pragma warning(disable : 4101) /* unreferenced local variable */
114 #endif /* _MSC_VER */
117 #define RUNTIME_PORT_ID /* trigger run-time port identification for \
118 * identification of exe CPU architecture \
121 /* The following is needed for prototypes of certain functions */
122 #if defined(_MSC_VER)
123 #include <process.h> /* Provides prototypes of exit(), spawn() */
126 #include <string.h> /* Provides prototypes of strncmpi(), etc. */
128 #define strncmpi(a, b, c) strnicmp(a, b, c)
131 /* Visual Studio defines this in their own headers, which we don't use */
133 #define snprintf _snprintf
135 disable : 4996) /* deprecation warning suggesting snprintf_s */
138 #include <sys/types.h>
146 #define PATHLEN BUFSZ /* maximum pathlength */
147 #define FILENAME BUFSZ /* maximum filename length (conservative) */
149 #if defined(_MAX_PATH) && defined(_MAX_FNAME)
150 #if (_MAX_PATH < BUFSZ) && (_MAX_FNAME < BUFSZ)
153 #define PATHLEN _MAX_PATH
154 #define FILENAME _MAX_FNAME
160 #define rindex strrchr
167 /* Use the high quality random number routines. */
168 #define Rand() random()
170 #define Rand() rand()
173 #include <sys/stat.h>
174 #define FCMASK (_S_IREAD | _S_IWRITE) /* file creation mask */
175 #define regularize nt_regularize
176 #define HLOCK "NHPERM"
179 #define M(c) ((char) (0x80 | (c)))
180 /* #define M(c) ((c) - 128) */
184 #define C(c) (0x1f & (c))
188 #define FILENAME_CMP stricmp /* case insensitive */
191 /* this was part of the MICRO stuff in the past */
192 extern const char *alllevels
, *allbones
;
193 extern char hackdir
[];
196 #define getlogin() ((char *) 0)
197 extern void NDECL(win32_abort
);
198 extern void FDECL(nttty_preference_update
, (const char *));
199 extern void NDECL(toggle_mouse_support
);
200 extern void FDECL(map_subkeyvalue
, (char *));
201 extern void NDECL(load_keyboard_handler
);
202 extern void NDECL(raw_clear_screen
);
209 int _RTLENTRY _EXPFUNC
access(const char _FAR
*__path
, int __amode
);
210 int _RTLENTRY _EXPFUNC
_chdrive(int __drive
);
211 int _RTLENTRYF _EXPFUNC32
chdir(const char _FAR
*__path
);
212 char _FAR
*_RTLENTRY _EXPFUNC
getcwd(char _FAR
*__buf
, int __buflen
);
213 int _RTLENTRY _EXPFUNC
214 write(int __handle
, const void _FAR
*__buf
, unsigned __len
);
215 int _RTLENTRY _EXPFUNC
creat(const char _FAR
*__path
, int __amode
);
216 int _RTLENTRY _EXPFUNC
close(int __handle
);
217 int _RTLENTRY _EXPFUNC
_close(int __handle
);
218 int _RTLENTRY _EXPFUNC
219 open(const char _FAR
*__path
, int __access
, ... /*unsigned mode*/);
220 long _RTLENTRY _EXPFUNC
lseek(int __handle
, long __offset
, int __fromwhere
);
221 int _RTLENTRY _EXPFUNC
read(int __handle
, void _FAR
*__buf
, unsigned __len
);
224 #undef kbhit /* Use our special NT kbhit */
225 #define kbhit (*nt_kbhit)
228 #define MAX_LAN_USERNAME 20
232 #define ALLOCA_HACK /* used in util/panic.c */
235 extern int FDECL(set_win32_option
, (const char *, const char *));
236 #define LEFTBUTTON FROM_LEFT_1ST_BUTTON_PRESSED
237 #define RIGHTBUTTON RIGHTMOST_BUTTON_PRESSED
238 #define MIDBUTTON FROM_LEFT_2ND_BUTTON_PRESSED
239 #define MOUSEMASK (LEFTBUTTON | RIGHTBUTTON | MIDBUTTON)
241 extern int FDECL(alternative_palette
, (char *));
244 #endif /* NTCONF_H */