1 /* SCCS Id: @(#)ntconf.h 3.4 2002/03/10 */
2 /* Copyright (c) NetHack PC Development Team 1993, 1994. */
3 /* NetHack 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 3.4.0*/
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 game */
28 * -----------------------------------------------------------------
29 * The remaining code shouldn't need modification.
30 * -----------------------------------------------------------------
32 /* #define SHORT_FILENAMES /* All NT filesystems support long names now */
35 #undef MICRO /* never define this! */
38 #define NOCWD_ASSUMPTIONS /* Always define this. There are assumptions that
39 it is defined for WIN32.
40 Allow paths to be specified for HACKDIR,
41 LEVELDIR, SAVEDIR, BONESDIR, DATADIR,
42 SCOREDIR, LOCKDIR, CONFIGDIR, and TROUBLEDIR */
50 #define OPTIONS_USED "guioptions"
52 #define OPTIONS_USED "ttyoptions"
54 #define OPTIONS_FILE OPTIONS_USED
56 #define PORT_HELP "porthelp"
59 #define PORT_DEBUG /* include ability to debug international keyboard issues */
62 /* Stuff to help the user with some common, yet significant errors */
63 #define INTERJECT_PANIC 0
64 #define INTERJECTION_TYPES (INTERJECT_PANIC + 1)
65 extern void FDECL(interject_assistance, (int,int,genericptr_t,genericptr_t));
66 extern void FDECL(interject, (int));
68 /* The following is needed for prototypes of certain functions */
70 #include <process.h> /* Provides prototypes of exit(), spawn() */
73 #include <string.h> /* Provides prototypes of strncmpi(), etc. */
75 #define strncmpi(a,b,c) strnicmp(a,b,c)
78 #include <sys/types.h>
85 #define PATHLEN BUFSZ /* maximum pathlength */
86 #define FILENAME BUFSZ /* maximum filename length (conservative) */
88 #if defined(_MAX_PATH) && defined(_MAX_FNAME)
89 # if (_MAX_PATH < BUFSZ) && (_MAX_FNAME < BUFSZ)
92 #define PATHLEN _MAX_PATH
93 #define FILENAME _MAX_FNAME
100 #define rindex strrchr
104 /* Use the high quality random number routines. */
105 #define Rand() random()
107 #define Rand() rand()
110 //#define FCMASK 0660 /* file creation mask */
111 #define FCMASK (0x0180)
113 #define regularize nt_regularize
114 #define HLOCK "NHPERM"
117 #define M(c) ((char) (0x80 | (c)))
118 /* #define M(c) ((c) - 128) */
122 #define C(c) (0x1f & (c))
126 #define FILENAME_CMP stricmp /* case insensitive */
130 extern char levels[], bones[], permbones[],
133 /* this was part of the MICRO stuff in the past */
134 extern const char *alllevels, *allbones;
135 extern char hackdir[];
138 #define getlogin() ((char *)0)
139 extern void NDECL(win32_abort);
141 extern void FDECL(nttty_preference_update, (const char *));
142 extern void NDECL(toggle_mouse_support);
143 extern void FDECL(map_subkeyvalue, (char *));
144 extern void NDECL(load_keyboard_handler);
152 int _RTLENTRY _EXPFUNC access (const char _FAR *__path, int __amode);
153 int _RTLENTRY _EXPFUNC _chdrive(int __drive);
154 int _RTLENTRYF _EXPFUNC32 chdir( const char _FAR *__path );
155 char _FAR * _RTLENTRY _EXPFUNC getcwd( char _FAR *__buf, int __buflen );
156 int _RTLENTRY _EXPFUNC write (int __handle, const void _FAR *__buf, unsigned __len);
157 int _RTLENTRY _EXPFUNC creat (const char _FAR *__path, int __amode);
158 int _RTLENTRY _EXPFUNC close (int __handle);
159 int _RTLENTRY _EXPFUNC _close (int __handle);
160 int _RTLENTRY _EXPFUNC open (const char _FAR *__path, int __access,... /*unsigned mode*/);
161 long _RTLENTRY _EXPFUNC lseek (int __handle, long __offset, int __fromwhere);
162 int _RTLENTRY _EXPFUNC read (int __handle, void _FAR *__buf, unsigned __len);
165 #undef kbhit /* Use our special NT kbhit */
166 #define kbhit (*nt_kbhit)
169 #define MAX_LAN_USERNAME 20
170 #define LAN_RO_PLAYGROUND /* not implemented in 3.3.0 */
171 #define LAN_SHARED_BONES /* not implemented in 3.3.0 */
176 #define ALLOCA_HACK /* used in util/panic.c */
181 #define Getchar nhgetch
186 #pragma warning(disable:4018) /* signed/unsigned mismatch */
187 #pragma warning(disable:4305) /* init, conv from 'const int' to 'char' */
189 #pragma warning(disable:4761) /* integral size mismatch in arg; conv supp*/
191 #pragma warning(disable:4102) /* unreferenced label */
195 extern int FDECL(set_win32_option, (const char *, const char *));
197 #define LEFTBUTTON FROM_LEFT_1ST_BUTTON_PRESSED
198 #define RIGHTBUTTON RIGHTMOST_BUTTON_PRESSED
199 #define MIDBUTTON FROM_LEFT_2ND_BUTTON_PRESSED
200 #define MOUSEMASK (LEFTBUTTON | RIGHTBUTTON | MIDBUTTON)
201 #endif /* WIN32CON */
203 #endif /* NTCONF_H */