build both tty NetHack.exe and gui NetHackW.exe
Changes to be committed: modified: include/config.h modified: include/extern.h modified: include/flag.h modified: include/global.h modified: include/ntconf.h modified: include/wintty.h modified: src/cmd.c modified: src/files.c modified: src/options.c modified: sys/share/pcmain.c modified: sys/share/pcsys.c modified: sys/share/pcunix.c modified: sys/winnt/Makefile.gcc modified: sys/winnt/Makefile.msc modified: sys/winnt/nttty.c new file: sys/winnt/stubs.c modified: sys/winnt/winnt.c modified: util/makedefs.c modified: win/tty/wintty.c Adjust the code and the command line Makefile so that you no longer have to choose whether to build the tty version NetHack.exe, or the gui version NetHackW.exe. Both will now be built in a single 'nmake install' pass.
This commit is contained in:
+1
-4
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 config.h $NHDT-Date: 1428084467 2015/04/03 18:07:47 $ $NHDT-Branch: scshunt-regex $:$NHDT-Revision: 1.76 $ */
|
/* NetHack 3.5 config.h $NHDT-Date: 1429675530 2015/04/22 04:05:30 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.81 $ */
|
||||||
/* NetHack 3.5 config.h $Date: 2012/01/27 20:15:26 $ $Revision: 1.37 $ */
|
/* NetHack 3.5 config.h $Date: 2012/01/27 20:15:26 $ $Revision: 1.37 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -109,9 +109,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MSWIN_GRAPHICS
|
#ifdef MSWIN_GRAPHICS
|
||||||
# ifdef TTY_GRAPHICS
|
|
||||||
# undef TTY_GRAPHICS
|
|
||||||
# endif
|
|
||||||
# ifndef DEFAULT_WINDOW_SYS
|
# ifndef DEFAULT_WINDOW_SYS
|
||||||
# define DEFAULT_WINDOW_SYS "mswin"
|
# define DEFAULT_WINDOW_SYS "mswin"
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 extern.h $NHDT-Date: 1429135323 2015/04/15 22:02:03 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.464 $ */
|
/* NetHack 3.5 extern.h $NHDT-Date: 1429675537 2015/04/22 04:05:37 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.471 $ */
|
||||||
/* Copyright (c) Steve Creps, 1988. */
|
/* Copyright (c) Steve Creps, 1988. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1500,10 +1500,10 @@ E void FDECL(regex_free, (struct nhregex *));
|
|||||||
|
|
||||||
/* ### nttty.c ### */
|
/* ### nttty.c ### */
|
||||||
|
|
||||||
#ifdef WIN32CON
|
#ifdef WIN32
|
||||||
E void NDECL(get_scr_size);
|
E void NDECL(get_scr_size);
|
||||||
E int NDECL(nttty_kbhit);
|
E int NDECL(nttty_kbhit);
|
||||||
E void NDECL(nttty_open);
|
E void FDECL(nttty_open,(int));
|
||||||
E void NDECL(nttty_rubout);
|
E void NDECL(nttty_rubout);
|
||||||
E int NDECL(tgetch);
|
E int NDECL(tgetch);
|
||||||
E int FDECL(ntposkey,(int *, int *, int *));
|
E int FDECL(ntposkey,(int *, int *, int *));
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 flag.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.60 $ */
|
/* NetHack 3.5 flag.h $NHDT-Date: 1429675538 2015/04/22 04:05:38 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.78 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -305,7 +305,7 @@ struct instance_flags {
|
|||||||
struct autopickup_exception *autopickup_exceptions[2];
|
struct autopickup_exception *autopickup_exceptions[2];
|
||||||
#define AP_LEAVE 0
|
#define AP_LEAVE 0
|
||||||
#define AP_GRAB 1
|
#define AP_GRAB 1
|
||||||
#ifdef WIN32CON
|
#ifdef WIN32
|
||||||
#define MAX_ALTKEYHANDLER 25
|
#define MAX_ALTKEYHANDLER 25
|
||||||
char altkeyhandler[MAX_ALTKEYHANDLER];
|
char altkeyhandler[MAX_ALTKEYHANDLER];
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+2
-9
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 global.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
/* NetHack 3.5 global.h $NHDT-Date: 1429675538 2015/04/22 04:05:38 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.41 $ */
|
||||||
/* NetHack 3.5 global.h $Date: 2012/01/29 03:00:14 $ $Revision: 1.31 $ */
|
/* NetHack 3.5 global.h $Date: 2012/01/29 03:00:14 $ $Revision: 1.31 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -197,13 +197,6 @@ typedef uchar nhsym;
|
|||||||
# endif
|
# endif
|
||||||
# ifdef WIN32
|
# ifdef WIN32
|
||||||
# define PORT_ID "Windows"
|
# define PORT_ID "Windows"
|
||||||
# ifndef PORT_SUB_ID
|
|
||||||
# ifdef MSWIN_GRAPHICS
|
|
||||||
# define PORT_SUB_ID "graphical"
|
|
||||||
# else
|
|
||||||
# define PORT_SUB_ID "tty"
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -234,7 +227,7 @@ typedef uchar nhsym;
|
|||||||
# define EXIT_FAILURE 1
|
# define EXIT_FAILURE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(X11_GRAPHICS) || defined(QT_GRAPHICS) || defined(GNOME_GRAPHICS) || defined(MSWIN_GRAPHICS)
|
#if defined(X11_GRAPHICS) || defined(QT_GRAPHICS) || defined(GNOME_GRAPHICS) || defined(WIN32)
|
||||||
# ifndef USE_TILES
|
# ifndef USE_TILES
|
||||||
# define USE_TILES /* glyph2tile[] will be available */
|
# define USE_TILES /* glyph2tile[] will be available */
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
+4
-17
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 ntconf.h $NHDT-Date: 1426966690 2015/03/21 19:38:10 $ $NHDT-Branch: master $:$NHDT-Revision: 1.37 $ */
|
/* NetHack 3.5 ntconf.h $NHDT-Date: 1429675540 2015/04/22 04:05:40 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.44 $ */
|
||||||
/* SCCS Id: @(#)ntconf.h 3.5 2002/03/10 */
|
/* SCCS Id: @(#)ntconf.h 3.5 2002/03/10 */
|
||||||
/* Copyright (c) NetHack PC Development Team 1993, 1994. */
|
/* Copyright (c) NetHack PC Development Team 1993, 1994. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -13,9 +13,8 @@
|
|||||||
|
|
||||||
#define EXEPATH /* Allow .exe location to be used as HACKDIR */
|
#define EXEPATH /* Allow .exe location to be used as HACKDIR */
|
||||||
#define TRADITIONAL_GLYPHMAP /* Store glyph mappings at level change time */
|
#define TRADITIONAL_GLYPHMAP /* Store glyph mappings at level change time */
|
||||||
#ifdef WIN32CON
|
|
||||||
#define LAN_FEATURES /* Include code for lan-aware features. Untested in 3.4.0*/
|
#define LAN_FEATURES /* Include code for lan-aware features. Untested in 3.4.0*/
|
||||||
#endif
|
|
||||||
|
|
||||||
#define PC_LOCKING /* Prevent overwrites of aborted or in-progress games */
|
#define PC_LOCKING /* Prevent overwrites of aborted or in-progress games */
|
||||||
/* without first receiving confirmation. */
|
/* without first receiving confirmation. */
|
||||||
@@ -29,10 +28,8 @@
|
|||||||
|
|
||||||
#define USER_SOUNDS
|
#define USER_SOUNDS
|
||||||
|
|
||||||
#ifdef WIN32CON
|
/*#define CHANGE_COLOR*/ /* allow palette changes */
|
||||||
#define CHANGE_COLOR /* allow palette changes in win32 console */
|
|
||||||
#define SELECTSAVED /* Provide menu of saved games to choose from at start */
|
#define SELECTSAVED /* Provide menu of saved games to choose from at start */
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* -----------------------------------------------------------------
|
* -----------------------------------------------------------------
|
||||||
@@ -56,18 +53,12 @@
|
|||||||
#ifdef OPTIONS_USED
|
#ifdef OPTIONS_USED
|
||||||
#undef OPTIONS_USED
|
#undef OPTIONS_USED
|
||||||
#endif
|
#endif
|
||||||
#ifdef MSWIN_GRAPHICS
|
#define OPTIONS_USED "options"
|
||||||
#define OPTIONS_USED "guioptions"
|
|
||||||
#else
|
|
||||||
#define OPTIONS_USED "ttyoptions"
|
|
||||||
#endif
|
|
||||||
#define OPTIONS_FILE OPTIONS_USED
|
#define OPTIONS_FILE OPTIONS_USED
|
||||||
|
|
||||||
#define PORT_HELP "porthelp"
|
#define PORT_HELP "porthelp"
|
||||||
|
|
||||||
#ifdef WIN32CON
|
|
||||||
#define PORT_DEBUG /* include ability to debug international keyboard issues */
|
#define PORT_DEBUG /* include ability to debug international keyboard issues */
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SAFERHANGUP /* Define SAFERHANGUP to delay hangup processing
|
#define SAFERHANGUP /* Define SAFERHANGUP to delay hangup processing
|
||||||
* until the main command loop. 'safer' because it
|
* until the main command loop. 'safer' because it
|
||||||
@@ -199,13 +190,11 @@ extern char hackdir[];
|
|||||||
#define getuid() 1
|
#define getuid() 1
|
||||||
#define getlogin() ((char *)0)
|
#define getlogin() ((char *)0)
|
||||||
extern void NDECL(win32_abort);
|
extern void NDECL(win32_abort);
|
||||||
#ifdef WIN32CON
|
|
||||||
extern void FDECL(nttty_preference_update, (const char *));
|
extern void FDECL(nttty_preference_update, (const char *));
|
||||||
extern void NDECL(toggle_mouse_support);
|
extern void NDECL(toggle_mouse_support);
|
||||||
extern void FDECL(map_subkeyvalue, (char *));
|
extern void FDECL(map_subkeyvalue, (char *));
|
||||||
extern void NDECL(load_keyboard_handler);
|
extern void NDECL(load_keyboard_handler);
|
||||||
extern void NDECL(raw_clear_screen);
|
extern void NDECL(raw_clear_screen);
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#ifndef __BORLANDC__
|
#ifndef __BORLANDC__
|
||||||
@@ -237,7 +226,6 @@ int _RTLENTRY _EXPFUNC read (int __handle, void _FAR *__buf, unsigned __len);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int FDECL(set_win32_option, (const char *, const char *));
|
extern int FDECL(set_win32_option, (const char *, const char *));
|
||||||
#ifdef WIN32CON
|
|
||||||
#define LEFTBUTTON FROM_LEFT_1ST_BUTTON_PRESSED
|
#define LEFTBUTTON FROM_LEFT_1ST_BUTTON_PRESSED
|
||||||
#define RIGHTBUTTON RIGHTMOST_BUTTON_PRESSED
|
#define RIGHTBUTTON RIGHTMOST_BUTTON_PRESSED
|
||||||
#define MIDBUTTON FROM_LEFT_2ND_BUTTON_PRESSED
|
#define MIDBUTTON FROM_LEFT_2ND_BUTTON_PRESSED
|
||||||
@@ -245,6 +233,5 @@ extern int FDECL(set_win32_option, (const char *, const char *));
|
|||||||
#ifdef CHANGE_COLOR
|
#ifdef CHANGE_COLOR
|
||||||
extern int FDECL(alternative_palette, (char *));
|
extern int FDECL(alternative_palette, (char *));
|
||||||
#endif
|
#endif
|
||||||
#endif /* WIN32CON */
|
|
||||||
|
|
||||||
#endif /* NTCONF_H */
|
#endif /* NTCONF_H */
|
||||||
|
|||||||
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 wintty.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
/* NetHack 3.5 wintty.h $NHDT-Date: 1429675543 2015/04/22 04:05:43 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.18 $ */
|
||||||
/* NetHack 3.5 wintty.h $Date: 2012/01/23 10:45:26 $ $Revision: 1.12 $ */
|
/* NetHack 3.5 wintty.h $Date: 2012/01/23 10:45:26 $ $Revision: 1.12 $ */
|
||||||
/* Copyright (c) David Cohrs, 1991,1992 */
|
/* Copyright (c) David Cohrs, 1991,1992 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -241,15 +241,15 @@ E int FDECL(term_putc, (int c));
|
|||||||
E int FDECL(term_flush, (void *desc));
|
E int FDECL(term_flush, (void *desc));
|
||||||
E int FDECL(term_puts, (const char *str));
|
E int FDECL(term_puts, (const char *str));
|
||||||
# endif /* MAC */
|
# endif /* MAC */
|
||||||
# if defined(MSDOS) || defined(WIN32CON)
|
# if defined(MSDOS) || defined(WIN32)
|
||||||
# if defined(SCREEN_BIOS) || defined(SCREEN_DJGPPFAST) || defined(WIN32CON)
|
# if defined(SCREEN_BIOS) || defined(SCREEN_DJGPPFAST) || defined(WIN32)
|
||||||
# undef putchar
|
# undef putchar
|
||||||
# undef putc
|
# undef putc
|
||||||
# undef puts
|
# undef puts
|
||||||
# define putchar(x) xputc(x) /* these are in video.c, nttty.c */
|
# define putchar(x) xputc(x) /* these are in video.c, nttty.c */
|
||||||
# define putc(x) xputc(x)
|
# define putc(x) xputc(x)
|
||||||
# define puts(x) xputs(x)
|
# define puts(x) xputs(x)
|
||||||
# endif/*SCREEN_BIOS || SCREEN_DJGPPFAST || WIN32CON */
|
# endif/*SCREEN_BIOS || SCREEN_DJGPPFAST || WIN32 */
|
||||||
# ifdef POSITIONBAR
|
# ifdef POSITIONBAR
|
||||||
E void FDECL(video_update_positionbar, (char *));
|
E void FDECL(video_update_positionbar, (char *));
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 cmd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
/* NetHack 3.5 cmd.c $NHDT-Date: 1429675557 2015/04/22 04:05:57 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.187 $ */
|
||||||
/* NetHack 3.5 cmd.c $Date: 2013/03/16 01:44:28 $ $Revision: 1.162 $ */
|
/* NetHack 3.5 cmd.c $Date: 2013/03/16 01:44:28 $ $Revision: 1.162 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -3718,10 +3718,8 @@ dotravel(VOID_ARGS)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PORT_DEBUG
|
#ifdef PORT_DEBUG
|
||||||
# ifdef WIN32CON
|
|
||||||
extern void NDECL(win32con_debug_keystrokes);
|
extern void NDECL(win32con_debug_keystrokes);
|
||||||
extern void NDECL(win32con_handler_info);
|
extern void NDECL(win32con_handler_info);
|
||||||
# endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
wiz_port_debug()
|
wiz_port_debug()
|
||||||
@@ -3735,9 +3733,9 @@ wiz_port_debug()
|
|||||||
char *menutext;
|
char *menutext;
|
||||||
void NDECL((*fn));
|
void NDECL((*fn));
|
||||||
} menu_selections[] = {
|
} menu_selections[] = {
|
||||||
#ifdef WIN32CON
|
#ifdef WIN32
|
||||||
{"test win32 keystrokes", win32con_debug_keystrokes},
|
{"test win32 keystrokes (tty only)", win32con_debug_keystrokes},
|
||||||
{"show keystroke handler information", win32con_handler_info},
|
{"show keystroke handler information (tty only)", win32con_handler_info},
|
||||||
#endif
|
#endif
|
||||||
{(char *)0, (void NDECL((*)))0} /* array terminator */
|
{(char *)0, (void NDECL((*)))0} /* array terminator */
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 files.c $NHDT-Date: 1429136302 2015/04/15 22:18:22 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.166 $ */
|
/* NetHack 3.5 files.c $NHDT-Date: 1429675565 2015/04/22 04:06:05 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.169 $ */
|
||||||
|
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1070,7 +1070,7 @@ get_saved_games()
|
|||||||
#if defined(SELECTSAVED)
|
#if defined(SELECTSAVED)
|
||||||
int n, j = 0;
|
int n, j = 0;
|
||||||
char **result = 0;
|
char **result = 0;
|
||||||
# ifdef WIN32CON
|
# ifdef WIN32
|
||||||
{
|
{
|
||||||
char *foundfile;
|
char *foundfile;
|
||||||
const char *fq_save;
|
const char *fq_save;
|
||||||
|
|||||||
+10
-10
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 options.c $NHDT-Date: 1428088105 2015/04/03 19:08:25 $ $NHDT-Branch: scshunt-regex $:$NHDT-Revision: 1.182 $ */
|
/* NetHack 3.5 options.c $NHDT-Date: 1429675568 2015/04/22 04:06:08 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.187 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ static struct Bool_Opt
|
|||||||
{"toptenwin",&iflags.toptenwin, FALSE, SET_IN_GAME},
|
{"toptenwin",&iflags.toptenwin, FALSE, SET_IN_GAME},
|
||||||
{"travel", &flags.travelcmd, TRUE, SET_IN_GAME},
|
{"travel", &flags.travelcmd, TRUE, SET_IN_GAME},
|
||||||
{"use_darkgray", &iflags.wc2_darkgray, TRUE, SET_IN_FILE},
|
{"use_darkgray", &iflags.wc2_darkgray, TRUE, SET_IN_FILE},
|
||||||
#ifdef WIN32CON
|
#ifdef WIN32
|
||||||
{"use_inverse", &iflags.wc_inverse, TRUE, SET_IN_GAME}, /*WC*/
|
{"use_inverse", &iflags.wc_inverse, TRUE, SET_IN_GAME}, /*WC*/
|
||||||
#else
|
#else
|
||||||
{"use_inverse", &iflags.wc_inverse, FALSE, SET_IN_GAME}, /*WC*/
|
{"use_inverse", &iflags.wc_inverse, FALSE, SET_IN_GAME}, /*WC*/
|
||||||
@@ -311,7 +311,7 @@ static struct Comp_Opt
|
|||||||
MAXOCLASSES, SET_IN_GAME },
|
MAXOCLASSES, SET_IN_GAME },
|
||||||
#ifdef CHANGE_COLOR
|
#ifdef CHANGE_COLOR
|
||||||
{ "palette",
|
{ "palette",
|
||||||
# ifndef WIN32CON
|
# ifndef WIN32
|
||||||
"palette (00c/880/-fff is blue/yellow/reverse white)",
|
"palette (00c/880/-fff is blue/yellow/reverse white)",
|
||||||
15 , SET_IN_GAME },
|
15 , SET_IN_GAME },
|
||||||
# else
|
# else
|
||||||
@@ -372,7 +372,7 @@ static struct Comp_Opt
|
|||||||
{ "videoshades", "gray shades to map to black/gray/white",
|
{ "videoshades", "gray shades to map to black/gray/white",
|
||||||
32, DISP_IN_GAME },
|
32, DISP_IN_GAME },
|
||||||
#endif
|
#endif
|
||||||
#ifdef WIN32CON
|
#ifdef WIN32
|
||||||
{"subkeyvalue", "override keystroke value", 7, SET_IN_FILE},
|
{"subkeyvalue", "override keystroke value", 7, SET_IN_FILE},
|
||||||
#endif
|
#endif
|
||||||
{ "windowcolors", "the foreground/background colors of windows", /*WC*/
|
{ "windowcolors", "the foreground/background colors of windows", /*WC*/
|
||||||
@@ -1734,7 +1734,7 @@ boolean tinitial, tfrom_file;
|
|||||||
) {
|
) {
|
||||||
int color_number, color_incr;
|
int color_number, color_incr;
|
||||||
|
|
||||||
# ifndef WIN32CON
|
# ifndef WIN32
|
||||||
if (duplicate) complain_about_duplicate(opts,1);
|
if (duplicate) complain_about_duplicate(opts,1);
|
||||||
# endif
|
# endif
|
||||||
# ifdef MAC
|
# ifdef MAC
|
||||||
@@ -1756,7 +1756,7 @@ boolean tinitial, tfrom_file;
|
|||||||
# ifdef MAC
|
# ifdef MAC
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
#ifdef WIN32CON
|
#ifdef WIN32
|
||||||
op = string_for_opt(opts, TRUE);
|
op = string_for_opt(opts, TRUE);
|
||||||
if (!alternative_palette(op))
|
if (!alternative_palette(op))
|
||||||
badoption(opts);
|
badoption(opts);
|
||||||
@@ -1802,7 +1802,7 @@ boolean tinitial, tfrom_file;
|
|||||||
color_number += color_incr;
|
color_number += color_incr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# endif /* !WIN32CON */
|
# endif /* !WIN32 */
|
||||||
if (!initial) {
|
if (!initial) {
|
||||||
need_redraw = TRUE;
|
need_redraw = TRUE;
|
||||||
}
|
}
|
||||||
@@ -1923,7 +1923,7 @@ goodfruit:
|
|||||||
if (duplicate) complain_about_duplicate(opts,1);
|
if (duplicate) complain_about_duplicate(opts,1);
|
||||||
if (negated) bad_negation(fullname, FALSE);
|
if (negated) bad_negation(fullname, FALSE);
|
||||||
else if ((op = string_for_opt(opts, negated))) {
|
else if ((op = string_for_opt(opts, negated))) {
|
||||||
#ifdef WIN32CON
|
#ifdef WIN32
|
||||||
(void)strncpy(iflags.altkeyhandler, op, MAX_ALTKEYHANDLER - 5);
|
(void)strncpy(iflags.altkeyhandler, op, MAX_ALTKEYHANDLER - 5);
|
||||||
load_keyboard_handler();
|
load_keyboard_handler();
|
||||||
#endif
|
#endif
|
||||||
@@ -2481,7 +2481,7 @@ goodfruit:
|
|||||||
/* no duplicate complaint here */
|
/* no duplicate complaint here */
|
||||||
if (negated) bad_negation(fullname, FALSE);
|
if (negated) bad_negation(fullname, FALSE);
|
||||||
else {
|
else {
|
||||||
#if defined(WIN32CON)
|
#if defined(WIN32)
|
||||||
op = string_for_opt(opts, 0);
|
op = string_for_opt(opts, 0);
|
||||||
map_subkeyvalue(op);
|
map_subkeyvalue(op);
|
||||||
#endif
|
#endif
|
||||||
@@ -3782,7 +3782,7 @@ char *buf;
|
|||||||
defopt);
|
defopt);
|
||||||
else if (!strcmp(optname,"align"))
|
else if (!strcmp(optname,"align"))
|
||||||
Sprintf(buf, "%s", rolestring(flags.initalign, aligns, adj));
|
Sprintf(buf, "%s", rolestring(flags.initalign, aligns, adj));
|
||||||
#ifdef WIN32CON
|
#ifdef WIN32
|
||||||
else if (!strcmp(optname,"altkeyhandler"))
|
else if (!strcmp(optname,"altkeyhandler"))
|
||||||
Sprintf(buf, "%s", iflags.altkeyhandler[0] ?
|
Sprintf(buf, "%s", iflags.altkeyhandler[0] ?
|
||||||
iflags.altkeyhandler : "default");
|
iflags.altkeyhandler : "default");
|
||||||
|
|||||||
+70
-12
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 pcmain.c $NHDT-Date: 1429135416 2015/04/15 22:03:36 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.60 $ */
|
/* NetHack 3.5 pcmain.c $NHDT-Date: 1429675589 2015/04/22 04:06:29 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.61 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -55,6 +55,8 @@ extern void FDECL(nethack_exit,(int));
|
|||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
extern boolean getreturn_enabled; /* from sys/share/pcsys.c */
|
extern boolean getreturn_enabled; /* from sys/share/pcsys.c */
|
||||||
extern int redirect_stdout; /* from sys/share/pcsys.c */
|
extern int redirect_stdout; /* from sys/share/pcsys.c */
|
||||||
|
char *NDECL(exename);
|
||||||
|
char default_window_sys[] = "mswin";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MSWIN_GRAPHICS)
|
#if defined(MSWIN_GRAPHICS)
|
||||||
@@ -79,7 +81,7 @@ unsigned _stklen = STKSIZ;
|
|||||||
* to help MinGW decide which entry point to choose. If both main and
|
* to help MinGW decide which entry point to choose. If both main and
|
||||||
* WinMain exist, the resulting executable won't work correctly.
|
* WinMain exist, the resulting executable won't work correctly.
|
||||||
*/
|
*/
|
||||||
#ifndef MSWIN_GRAPHICS
|
#ifndef __MINGW32__
|
||||||
int
|
int
|
||||||
main(argc,argv)
|
main(argc,argv)
|
||||||
int argc;
|
int argc;
|
||||||
@@ -88,6 +90,10 @@ char *argv[];
|
|||||||
boolean resuming;
|
boolean resuming;
|
||||||
|
|
||||||
sys_early_init();
|
sys_early_init();
|
||||||
|
#ifdef WIN32
|
||||||
|
Strcpy(default_window_sys, "tty");
|
||||||
|
#endif
|
||||||
|
|
||||||
resuming = pcmain(argc,argv);
|
resuming = pcmain(argc,argv);
|
||||||
#ifdef LAN_FEATURES
|
#ifdef LAN_FEATURES
|
||||||
init_lan_features();
|
init_lan_features();
|
||||||
@@ -97,7 +103,7 @@ char *argv[];
|
|||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /*MSWIN_GRAPHICS*/
|
#endif
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
pcmain(argc,argv)
|
pcmain(argc,argv)
|
||||||
@@ -142,7 +148,11 @@ char *argv[];
|
|||||||
#endif
|
#endif
|
||||||
hname = "NetHack"; /* used for syntax messages */
|
hname = "NetHack"; /* used for syntax messages */
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
choose_windows(DEFAULT_WINDOW_SYS);
|
choose_windows(DEFAULT_WINDOW_SYS);
|
||||||
|
#else
|
||||||
|
choose_windows(default_window_sys);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(AMIGA) && !defined(GNUDOS)
|
#if !defined(AMIGA) && !defined(GNUDOS)
|
||||||
/* Save current directory and make sure it gets restored when
|
/* Save current directory and make sure it gets restored when
|
||||||
@@ -217,7 +227,7 @@ char *argv[];
|
|||||||
# endif
|
# endif
|
||||||
ami_wininit_data();
|
ami_wininit_data();
|
||||||
#endif
|
#endif
|
||||||
#ifdef WIN32CON
|
#ifdef WIN32
|
||||||
save_getreturn_status = getreturn_enabled;
|
save_getreturn_status = getreturn_enabled;
|
||||||
raw_clear_screen();
|
raw_clear_screen();
|
||||||
getreturn_enabled = TRUE;
|
getreturn_enabled = TRUE;
|
||||||
@@ -267,16 +277,14 @@ char *argv[];
|
|||||||
* may do a prscore().
|
* may do a prscore().
|
||||||
*/
|
*/
|
||||||
if (!strncmp(argv[1], "-s", 2)) {
|
if (!strncmp(argv[1], "-s", 2)) {
|
||||||
#if defined(MSWIN_GRAPHICS) || defined(WIN32CON)
|
#if defined(WIN32)
|
||||||
int sfd = (int)_fileno(stdout);
|
int sfd = (int)_fileno(stdout);
|
||||||
redirect_stdout = (sfd >= 0) ? !isatty(sfd) : 0;
|
redirect_stdout = (sfd >= 0) ? !isatty(sfd) : 0;
|
||||||
|
|
||||||
# ifdef MSWIN_GRAPHICS
|
|
||||||
if (!redirect_stdout) {
|
if (!redirect_stdout) {
|
||||||
raw_printf("-s is not supported for the Graphical Interface\n");
|
raw_printf("-s is not supported for the Graphical Interface\n");
|
||||||
nethack_exit(EXIT_SUCCESS);
|
nethack_exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS)
|
#if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS)
|
||||||
@@ -336,11 +344,22 @@ char *argv[];
|
|||||||
chdirx(hackdir,1);
|
chdirx(hackdir,1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MSDOS
|
#if defined(MSDOS) || defined (WIN32)
|
||||||
/* We do this early for MSDOS because there are several
|
/* In 3.6.0, several ports process options before they init
|
||||||
* display/tile related options that affect init_nhwindows()
|
* the window port. This allows settings that impact window
|
||||||
|
* ports to be specified or read from the sys or user config files.
|
||||||
*/
|
*/
|
||||||
process_options(argc, argv);
|
process_options(argc, argv);
|
||||||
|
|
||||||
|
# ifdef WIN32
|
||||||
|
/*
|
||||||
|
if (!strncmpi(windowprocs.name, "mswin", 5))
|
||||||
|
NHWinMainInit();
|
||||||
|
else
|
||||||
|
*/
|
||||||
|
if (!strncmpi(windowprocs.name, "tty", 3))
|
||||||
|
nttty_open(1);
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MSDOS) || defined(WIN32)
|
#if defined(MSDOS) || defined(WIN32)
|
||||||
@@ -353,14 +372,14 @@ char *argv[];
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MSDOS
|
#if defined(MSDOS) || defined(WIN32)
|
||||||
init_nhwindows(&argc,argv);
|
init_nhwindows(&argc,argv);
|
||||||
#else
|
#else
|
||||||
init_nhwindows(&argc,argv);
|
init_nhwindows(&argc,argv);
|
||||||
process_options(argc, argv);
|
process_options(argc, argv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32CON
|
#ifdef WIN32
|
||||||
toggle_mouse_support(); /* must come after process_options */
|
toggle_mouse_support(); /* must come after process_options */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -637,6 +656,19 @@ char *argv[];
|
|||||||
case 'l':
|
case 'l':
|
||||||
bigscreen = -1;
|
bigscreen = -1;
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef WIN32
|
||||||
|
case 'w': /* windowtype */
|
||||||
|
if (strncmpi(&argv[0][2],"tty", 3)) {
|
||||||
|
nttty_open(1);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
else {
|
||||||
|
NHWinMainInit();
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
choose_windows(&argv[0][2]);
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
case '@':
|
case '@':
|
||||||
flags.randomall = 1;
|
flags.randomall = 1;
|
||||||
@@ -751,6 +783,32 @@ authorize_wizard_mode()
|
|||||||
#define PATH_SEPARATOR '\\'
|
#define PATH_SEPARATOR '\\'
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
static char exenamebuf[PATHLEN];
|
||||||
|
|
||||||
|
char *
|
||||||
|
exename()
|
||||||
|
{
|
||||||
|
int bsize = PATHLEN;
|
||||||
|
char *tmp = exenamebuf, *tmp2;
|
||||||
|
|
||||||
|
# ifdef UNICODE
|
||||||
|
{
|
||||||
|
TCHAR wbuf[PATHLEN * 4];
|
||||||
|
GetModuleFileName((HANDLE)0, wbuf, PATHLEN * 4);
|
||||||
|
WideCharToMultiByte(CP_ACP, 0, wbuf, -1, tmp, bsize, NULL, NULL);
|
||||||
|
}
|
||||||
|
# else
|
||||||
|
*(tmp + GetModuleFileName((HANDLE)0, tmp, bsize)) = '\0';
|
||||||
|
# endif
|
||||||
|
tmp2 = strrchr(tmp, PATH_SEPARATOR);
|
||||||
|
if (tmp2) *tmp2 = '\0';
|
||||||
|
tmp2++;
|
||||||
|
return tmp2;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define EXEPATHBUFSZ 256
|
#define EXEPATHBUFSZ 256
|
||||||
char exepathbuf[EXEPATHBUFSZ];
|
char exepathbuf[EXEPATHBUFSZ];
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 pcsys.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
/* NetHack 3.5 pcsys.c $NHDT-Date: 1429675591 2015/04/22 04:06:31 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.24 $ */
|
||||||
/* NetHack 3.5 pcsys.c $Date: 2012/01/22 06:33:47 $ $Revision: 1.18 $ */
|
/* NetHack 3.5 pcsys.c $Date: 2012/01/22 06:33:47 $ $Revision: 1.18 $ */
|
||||||
/* SCCS Id: @(#)pcsys.c 3.5 2002/01/22 */
|
/* SCCS Id: @(#)pcsys.c 3.5 2002/01/22 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -54,7 +54,7 @@ STATIC_DCL boolean NDECL(comspec_exists);
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32CON
|
#ifdef WIN32
|
||||||
extern int GUILaunched; /* from nttty.c */
|
extern int GUILaunched; /* from nttty.c */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -411,7 +411,7 @@ const char *str;
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN32CON
|
#ifndef WIN32
|
||||||
void
|
void
|
||||||
msmsg VA_DECL(const char *, fmt)
|
msmsg VA_DECL(const char *, fmt)
|
||||||
VA_START(fmt);
|
VA_START(fmt);
|
||||||
@@ -529,7 +529,7 @@ STATIC_OVL void msexit()
|
|||||||
restore_colors();
|
restore_colors();
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef WIN32CON
|
#ifdef WIN32
|
||||||
/* Only if we started from the GUI, not the command prompt,
|
/* Only if we started from the GUI, not the command prompt,
|
||||||
* we need to get one last return, so the score board does
|
* we need to get one last return, so the score board does
|
||||||
* not vanish instantly after being created.
|
* not vanish instantly after being created.
|
||||||
|
|||||||
+7
-5
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 pcunix.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
/* NetHack 3.5 pcunix.c $NHDT-Date: 1429675591 2015/04/22 04:06:31 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.31 $ */
|
||||||
/* NetHack 3.5 pcunix.c $Date: 2009/05/06 10:50:30 $ $Revision: 1.27 $ */
|
/* NetHack 3.5 pcunix.c $Date: 2009/05/06 10:50:30 $ $Revision: 1.27 $ */
|
||||||
/* SCCS Id: @(#)pcunix.c 3.5 1994/11/07 */
|
/* SCCS Id: @(#)pcunix.c 3.5 1994/11/07 */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
@@ -192,8 +192,9 @@ getlock()
|
|||||||
if(c == 'y' || c == 'Y')
|
if(c == 'y' || c == 'Y')
|
||||||
# ifndef SELF_RECOVER
|
# ifndef SELF_RECOVER
|
||||||
if(eraseoldlocks()) {
|
if(eraseoldlocks()) {
|
||||||
# if defined(WIN32CON)
|
# if defined(WIN32)
|
||||||
clear_screen(); /* display gets fouled up otherwise */
|
if (!strncmpi(windowprocs.name, "tty", 3))
|
||||||
|
clear_screen(); /* display gets fouled up otherwise */
|
||||||
# endif
|
# endif
|
||||||
goto gotlock;
|
goto gotlock;
|
||||||
} else {
|
} else {
|
||||||
@@ -205,8 +206,9 @@ getlock()
|
|||||||
}
|
}
|
||||||
# else /*SELF_RECOVER*/
|
# else /*SELF_RECOVER*/
|
||||||
if(recover_savefile()) {
|
if(recover_savefile()) {
|
||||||
# if defined(WIN32CON)
|
# if defined(WIN32)
|
||||||
clear_screen(); /* display gets fouled up otherwise */
|
if (!strncmpi(windowprocs.name, "tty", 3))
|
||||||
|
clear_screen(); /* display gets fouled up otherwise */
|
||||||
# endif
|
# endif
|
||||||
goto gotlock;
|
goto gotlock;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+165
-201
@@ -1,5 +1,4 @@
|
|||||||
# NetHack 3.5 Makefile.gcc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
# NetHack 3.5 Makefile.gcc $NHDT-Date: 1429675605 2015/04/22 04:06:45 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.45 $
|
||||||
# NetHack 3.5 Makefile.gcc $Date: 2011/10/11 02:37:22 $ $Revision: 1.38 $
|
|
||||||
# Copyright (c) NetHack PC Development Team 1993-2015
|
# Copyright (c) NetHack PC Development Team 1993-2015
|
||||||
#
|
#
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
@@ -16,7 +15,7 @@
|
|||||||
# This is used for building two versions of NetHack:
|
# This is used for building two versions of NetHack:
|
||||||
#
|
#
|
||||||
# A tty port utilizing the Win32 Console I/O subsystem, Console
|
# A tty port utilizing the Win32 Console I/O subsystem, Console
|
||||||
# NetHack;
|
# NetHack.
|
||||||
#
|
#
|
||||||
# A Win32 native port built on the Windows API, Graphical NetHack or
|
# A Win32 native port built on the Windows API, Graphical NetHack or
|
||||||
# NetHackW.
|
# NetHackW.
|
||||||
@@ -31,11 +30,17 @@
|
|||||||
# If you have any questions read the sys/winnt/Install.nt file included
|
# If you have any questions read the sys/winnt/Install.nt file included
|
||||||
# with the distribution.
|
# with the distribution.
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
#==============================================================================
|
|
||||||
# BUILD DECISIONS SECTION
|
# BUILD DECISIONS SECTION
|
||||||
#
|
#
|
||||||
|
# There are currently only 3 decisions that you have to make.
|
||||||
|
# 1. 32-bit or 64-bit?
|
||||||
|
# 2. Where do you want your build to end up?
|
||||||
|
# 3. Do you want debug information in the executable?
|
||||||
|
#
|
||||||
|
#==============================================================================
|
||||||
# 1. 32-bit or 64-bit?
|
# 1. 32-bit or 64-bit?
|
||||||
#
|
#
|
||||||
|
|
||||||
# 64 bit
|
# 64 bit
|
||||||
#TARGET_CPU=x64
|
#TARGET_CPU=x64
|
||||||
#
|
#
|
||||||
@@ -43,17 +48,7 @@
|
|||||||
TARGET_CPU=x86
|
TARGET_CPU=x86
|
||||||
#
|
#
|
||||||
#---------------------------------------------------------------
|
#---------------------------------------------------------------
|
||||||
# 2. Graphical version or command line version?
|
# 2. Where do you want the game to be built (which folder)?
|
||||||
#
|
|
||||||
# Graphical interface
|
|
||||||
# Set to Y for a graphical version
|
|
||||||
# Set to anything else (or undefine) for a tty version
|
|
||||||
|
|
||||||
#GRAPHICAL = Y
|
|
||||||
|
|
||||||
#
|
|
||||||
#---------------------------------------------------------------
|
|
||||||
# 3. Where do you want the game to be built (which folder)?
|
|
||||||
# If not present prior to compilation it gets created.
|
# If not present prior to compilation it gets created.
|
||||||
#
|
#
|
||||||
|
|
||||||
@@ -61,7 +56,7 @@ GAMEDIR = ../binary
|
|||||||
|
|
||||||
#
|
#
|
||||||
#---------------------------------------------------------------
|
#---------------------------------------------------------------
|
||||||
# 4. Do you want debug information in the executable?
|
# 3. Do you want debug information in the executable?
|
||||||
#
|
#
|
||||||
|
|
||||||
DEBUGINFO = Y
|
DEBUGINFO = Y
|
||||||
@@ -79,14 +74,6 @@ DEBUGINFO = Y
|
|||||||
# #
|
# #
|
||||||
################################################
|
################################################
|
||||||
|
|
||||||
ifeq "$(GRAPHICAL)" "Y"
|
|
||||||
# Game Name
|
|
||||||
GAME = NetHackW
|
|
||||||
else
|
|
||||||
# Game Name
|
|
||||||
GAME = NetHack
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Source directories. Makedefs hardcodes these, don't change them.
|
# Source directories. Makedefs hardcodes these, don't change them.
|
||||||
#
|
#
|
||||||
@@ -107,8 +94,8 @@ SSYS = ../sys/share
|
|||||||
MSWSYS = ../sys/winnt
|
MSWSYS = ../sys/winnt
|
||||||
# window port files (tty)
|
# window port files (tty)
|
||||||
TTY = ../win/tty
|
TTY = ../win/tty
|
||||||
# window port files (Win32)
|
# window port files (WIN32)
|
||||||
WIN32 = ../win/win32
|
MSWIN = ../win/win32
|
||||||
# Tile support files
|
# Tile support files
|
||||||
WSHR = ../win/share
|
WSHR = ../win/share
|
||||||
|
|
||||||
@@ -124,7 +111,7 @@ link = gcc
|
|||||||
|
|
||||||
#
|
#
|
||||||
#==========================================
|
#==========================================
|
||||||
# Exe File Info.
|
# Level Compiler Info
|
||||||
#==========================================
|
#==========================================
|
||||||
|
|
||||||
# Yacc/Lex ... if you got 'em.
|
# Yacc/Lex ... if you got 'em.
|
||||||
@@ -159,6 +146,9 @@ YTABC = y_tab.c
|
|||||||
YTABH = y_tab.h
|
YTABH = y_tab.h
|
||||||
LEXYYC = lexyy.c
|
LEXYYC = lexyy.c
|
||||||
|
|
||||||
|
#==========================================
|
||||||
|
# Exe File Info.
|
||||||
|
#==========================================
|
||||||
#
|
#
|
||||||
# Optional high-quality BSD random number generation routines
|
# Optional high-quality BSD random number generation routines
|
||||||
# (see pcconf.h). Set to nothing if not used.
|
# (see pcconf.h). Set to nothing if not used.
|
||||||
@@ -167,39 +157,7 @@ LEXYYC = lexyy.c
|
|||||||
RANDOM = $(OBJ)/random.o
|
RANDOM = $(OBJ)/random.o
|
||||||
#RANDOM =
|
#RANDOM =
|
||||||
|
|
||||||
ifeq "$(GRAPHICAL)" "Y"
|
WINPFLAG = -DTILES -DMSWIN_GRAPHICS -DWIN32CON -D_WIN32_IE=0x0400 -D_WIN32_WINNT=0x0501
|
||||||
WINPORT = $(O)tile.o $(O)mhaskyn.o $(O)mhdlg.o \
|
|
||||||
$(O)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \
|
|
||||||
$(O)mhmenu.o $(O)mhmsgwnd.o $(O)mhrip.o $(O)mhsplash.o \
|
|
||||||
$(O)mhstatus.o $(O)mhtext.o $(O)mswproc.o $(O)winhack.o
|
|
||||||
WINPFLAG = -DTILES -DMSWIN_GRAPHICS -D_WIN32_IE=0x0400
|
|
||||||
NHRES = $(O)winres.o
|
|
||||||
WINPINC = -I$(WIN32)
|
|
||||||
WINPHDR = $(WIN32)/mhaskyn.h $(WIN32)/mhdlg.h $(WIN32)/mhfont.h \
|
|
||||||
$(WIN32)/mhinput.h $(WIN32)/mhmain.h $(WIN32)/mhmap.h \
|
|
||||||
$(WIN32)/mhmenu.h $(WIN32)/mhmsg.h $(WIN32)/mhmsgwnd.h \
|
|
||||||
$(WIN32)/mhrip.h $(WIN32)/mhstatus.h \
|
|
||||||
$(WIN32)/mhtext.h $(WIN32)/resource.h $(WIN32)/winMS.h
|
|
||||||
WINPLIBS = -lcomctl32 -lwinmm
|
|
||||||
else
|
|
||||||
WINPORT = $(O)nttty.o
|
|
||||||
WINPFLAG= -DWIN32CON
|
|
||||||
WINPHDR =
|
|
||||||
NHRES = $(O)console.o
|
|
||||||
WINPINC =
|
|
||||||
WINPLIBS = -lwinmm
|
|
||||||
endif
|
|
||||||
|
|
||||||
TILEUTIL16 = $(UTIL)/tile2bmp.exe
|
|
||||||
TILEBMP16 = $(SRC)/tiles.bmp
|
|
||||||
|
|
||||||
TILEUTIL32 = $(UTIL)/til2bm32.exe
|
|
||||||
TILEBMP32 = $(SRC)/tiles32.bmp
|
|
||||||
|
|
||||||
SOUND = $(OBJ)/ntsound.o
|
|
||||||
|
|
||||||
#SOUND =
|
|
||||||
|
|
||||||
# To store all the level files,
|
# To store all the level files,
|
||||||
# help files, etc. in a single library file.
|
# help files, etc. in a single library file.
|
||||||
# USE_DLB = Y is left uncommented
|
# USE_DLB = Y is left uncommented
|
||||||
@@ -229,8 +187,11 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
CFLAGSBASE = -c $(cflags) -I$(INCL) $(WINPINC) $(cdebug)
|
CFLAGSBASE = -c $(cflags) -I$(INCL) $(WINPINC) $(cdebug)
|
||||||
LFLAGSBASEC = $(linkdebug)
|
#LFLAGSBASEC = $(linkdebug)
|
||||||
LFLAGSBASEG = $(linkdebug) -mwindows
|
#LFLAGSBASEG = $(linkdebug) -mwindows
|
||||||
|
|
||||||
|
conlibs = -lwinmm
|
||||||
|
guilibs = -lcomctl32 -lwinmm
|
||||||
|
|
||||||
#==========================================
|
#==========================================
|
||||||
# Util builds
|
# Util builds
|
||||||
@@ -244,12 +205,7 @@ LFLAGSU = $(LFLAGSBASEC)
|
|||||||
#==========================================
|
#==========================================
|
||||||
|
|
||||||
CFLAGS = $(CFLAGSBASE) $(WINPFLAG) $(DLBFLG)
|
CFLAGS = $(CFLAGSBASE) $(WINPFLAG) $(DLBFLG)
|
||||||
lflags = $(LFLAGSBASE)
|
lflags = $(LFLAGSBASEC) $(linkdebuf)
|
||||||
ifeq "$(GRAPHICAL)" "Y"
|
|
||||||
lflags = $(LFLAGSBASEG)
|
|
||||||
else
|
|
||||||
lflags = $(LFLAGSBASEC)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq "$(USE_DLB)" "Y"
|
ifeq "$(USE_DLB)" "Y"
|
||||||
DLB = nhdat
|
DLB = nhdat
|
||||||
@@ -257,76 +213,6 @@ else
|
|||||||
DLB =
|
DLB =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#==========================================
|
|
||||||
#================ RULES ==================
|
|
||||||
#==========================================
|
|
||||||
|
|
||||||
.SUFFIXES: .exe .o .til .uu .c .y .l
|
|
||||||
|
|
||||||
#==========================================
|
|
||||||
# Rules for files in src
|
|
||||||
#==========================================
|
|
||||||
|
|
||||||
$(OBJ)/%.o : /%.c
|
|
||||||
$(cc) $(CFLAGS) -o$@ $<
|
|
||||||
|
|
||||||
$(OBJ)/%.o : $(SRC)/%.c
|
|
||||||
$(cc) $(CFLAGS) -o$@ $<
|
|
||||||
|
|
||||||
#==========================================
|
|
||||||
# Rules for files in sys/share
|
|
||||||
#==========================================
|
|
||||||
|
|
||||||
$(OBJ)/%.o : $(SSYS)/%.c
|
|
||||||
$(cc) $(CFLAGS) -o$@ $<
|
|
||||||
|
|
||||||
$(OBJ)/%.o : $(SSYS)/%.cpp
|
|
||||||
g++ $(CFLAGS) -std=c++11 -o$@ $<
|
|
||||||
|
|
||||||
#==========================================
|
|
||||||
# Rules for files in sys/winnt
|
|
||||||
#==========================================
|
|
||||||
|
|
||||||
$(OBJ)/%.o : $(MSWSYS)/%.c
|
|
||||||
$(cc) $(CFLAGS) -o$@ $<
|
|
||||||
|
|
||||||
$(INCL)/%.h : $(MSWSYS)/%.h
|
|
||||||
@copy $< $@
|
|
||||||
|
|
||||||
#==========================================
|
|
||||||
# Rules for files in util
|
|
||||||
#==========================================
|
|
||||||
|
|
||||||
$(OBJ)/%.o : $(UTIL)/%.c
|
|
||||||
$(cc) $(CFLAGSU) -o$@ $<
|
|
||||||
|
|
||||||
#==========================================
|
|
||||||
# Rules for files in win/share
|
|
||||||
#==========================================
|
|
||||||
|
|
||||||
$(OBJ)/%.o : $(WSHR)/%.c
|
|
||||||
$(cc) $(CFLAGS) -o$@ $<
|
|
||||||
|
|
||||||
$(INCL)/%.h : $(WSHR)/%.h
|
|
||||||
@copy $< $@
|
|
||||||
|
|
||||||
#{$(WSHR)}.txt{$(DAT)}.txt:
|
|
||||||
# @copy $< $@
|
|
||||||
|
|
||||||
#==========================================
|
|
||||||
# Rules for files in win/tty
|
|
||||||
#==========================================
|
|
||||||
|
|
||||||
$(OBJ)/%.o : $(TTY)/%.c
|
|
||||||
$(cc) $(CFLAGS) -o$@ $<
|
|
||||||
|
|
||||||
#==========================================
|
|
||||||
# Rules for files in win/win32
|
|
||||||
#==========================================
|
|
||||||
|
|
||||||
$(OBJ)/%.o : $(WIN32)/%.c
|
|
||||||
$(cc) $(CFLAGS) -o$@ $<
|
|
||||||
|
|
||||||
#==========================================
|
#==========================================
|
||||||
#================ MACROS ==================
|
#================ MACROS ==================
|
||||||
#==========================================
|
#==========================================
|
||||||
@@ -429,17 +315,33 @@ OBJS = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \
|
|||||||
$(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \
|
$(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \
|
||||||
$(VOBJ26) $(VOBJ27) $(REGEX)
|
$(VOBJ26) $(VOBJ27) $(REGEX)
|
||||||
|
|
||||||
WINPOBJ = $(WINPORT)
|
GUIOBJ = $(O)mhaskyn.o $(O)mhdlg.o \
|
||||||
|
$(O)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \
|
||||||
|
$(O)mhmenu.o $(O)mhmsgwnd.o $(O)mhrip.o $(O)mhsplash.o \
|
||||||
|
$(O)mhstatus.o $(O)mhtext.o $(O)mswproc.o $(O)winhack.o
|
||||||
|
|
||||||
VVOBJ = $(O)version.o
|
GUIHDR = $(MSWIN)/mhaskyn.h $(MSWIN)/mhdlg.h $(MSWIN)/mhfont.h \
|
||||||
|
$(MSWIN)/mhinput.h $(MSWIN)/mhmain.h $(MSWIN)/mhmap.h \
|
||||||
|
$(MSWIN)/mhmenu.h $(MSWIN)/mhmsg.h $(MSWIN)/mhmsgwnd.h \
|
||||||
|
$(MSWIN)/mhrip.h $(MSWIN)/mhstatus.h \
|
||||||
|
$(MSWIN)/mhtext.h $(MSWIN)/resource.h $(MSWIN)/winMS.h
|
||||||
|
|
||||||
ALLOBJ = $(WINPOBJ) $(SOBJ) $(DLBOBJ) $(TTYOBJ) $(WOBJ) $(OBJS) $(VVOBJ)
|
KEYDLLS = $(GAMEDIR)/nhdefkey.dll $(GAMEDIR)/nh340key.dll $(GAMEDIR)/nhraykey.dll
|
||||||
|
|
||||||
ifeq "$(GRAPHICAL)" "Y"
|
TILEUTIL16 = $(UTIL)/tile2bmp.exe
|
||||||
OPTIONS_FILE = $(DAT)/guioptions
|
TILEBMP16 = $(SRC)/tiles.bmp
|
||||||
else
|
|
||||||
OPTIONS_FILE = $(DAT)/ttyoptions
|
TILEUTIL32 = $(UTIL)/til2bm32.exe
|
||||||
endif
|
TILEBMP32 = $(SRC)/tiles32.bmp
|
||||||
|
|
||||||
|
SOUND = $(OBJ)/ntsound.o
|
||||||
|
#SOUND =
|
||||||
|
|
||||||
|
VVOBJ = $(O)version.o
|
||||||
|
|
||||||
|
ALLOBJ = $(SOBJ) $(DLBOBJ) $(WOBJ) $(OBJS) $(VVOBJ)
|
||||||
|
|
||||||
|
OPTIONS_FILE = $(DAT)\options
|
||||||
|
|
||||||
#==========================================
|
#==========================================
|
||||||
# Header file macros
|
# Header file macros
|
||||||
@@ -478,12 +380,75 @@ TILE_H = ../win/share/tile.h
|
|||||||
|
|
||||||
DATABASE = $(DAT)/data.base
|
DATABASE = $(DAT)/data.base
|
||||||
|
|
||||||
#
|
#==========================================
|
||||||
# The name of the game.
|
#================ RULES ==================
|
||||||
#
|
#==========================================
|
||||||
|
|
||||||
GAMEFILE = $(GAMEDIR)/$(GAME).exe
|
.SUFFIXES: .exe .o .til .uu .c .y .l
|
||||||
|
|
||||||
|
#==========================================
|
||||||
|
# Rules for files in src
|
||||||
|
#==========================================
|
||||||
|
|
||||||
|
$(OBJ)/%.o : /%.c
|
||||||
|
$(cc) $(CFLAGS) -o$@ $<
|
||||||
|
|
||||||
|
$(OBJ)/%.o : $(SRC)/%.c
|
||||||
|
$(cc) $(CFLAGS) -o$@ $<
|
||||||
|
|
||||||
|
#==========================================
|
||||||
|
# Rules for files in sys/share
|
||||||
|
#==========================================
|
||||||
|
|
||||||
|
$(OBJ)/%.o : $(SSYS)/%.c
|
||||||
|
$(cc) $(CFLAGS) -o$@ $<
|
||||||
|
|
||||||
|
$(OBJ)/%.o : $(SSYS)/%.cpp
|
||||||
|
g++ $(CFLAGS) -std=c++11 -o$@ $<
|
||||||
|
|
||||||
|
#==========================================
|
||||||
|
# Rules for files in sys/winnt
|
||||||
|
#==========================================
|
||||||
|
|
||||||
|
$(OBJ)/%.o : $(MSWSYS)/%.c
|
||||||
|
$(cc) $(CFLAGS) -o$@ $<
|
||||||
|
|
||||||
|
$(INCL)/%.h : $(MSWSYS)/%.h
|
||||||
|
@copy $< $@
|
||||||
|
|
||||||
|
#==========================================
|
||||||
|
# Rules for files in util
|
||||||
|
#==========================================
|
||||||
|
|
||||||
|
$(OBJ)/%.o : $(UTIL)/%.c
|
||||||
|
$(cc) $(CFLAGSU) -o$@ $<
|
||||||
|
|
||||||
|
#==========================================
|
||||||
|
# Rules for files in win/share
|
||||||
|
#==========================================
|
||||||
|
|
||||||
|
$(OBJ)/%.o : $(WSHR)/%.c
|
||||||
|
$(cc) $(CFLAGS) -o$@ $<
|
||||||
|
|
||||||
|
$(INCL)/%.h : $(WSHR)/%.h
|
||||||
|
@copy $< $@
|
||||||
|
|
||||||
|
#{$(WSHR)}.txt{$(DAT)}.txt:
|
||||||
|
# @copy $< $@
|
||||||
|
|
||||||
|
#==========================================
|
||||||
|
# Rules for files in win/tty
|
||||||
|
#==========================================
|
||||||
|
|
||||||
|
$(OBJ)/%.o : $(TTY)/%.c
|
||||||
|
$(cc) $(CFLAGS) -o$@ $<
|
||||||
|
|
||||||
|
#==========================================
|
||||||
|
# Rules for files in win/win32
|
||||||
|
#==========================================
|
||||||
|
|
||||||
|
$(OBJ)/%.o : $(MSWIN)/%.c
|
||||||
|
$(cc) $(CFLAGS) -o$@ $<
|
||||||
|
|
||||||
#==========================================
|
#==========================================
|
||||||
#=============== TARGETS ==================
|
#=============== TARGETS ==================
|
||||||
@@ -500,20 +465,14 @@ GAMEFILE = $(GAMEDIR)/$(GAME).exe
|
|||||||
#
|
#
|
||||||
default : install
|
default : install
|
||||||
|
|
||||||
#
|
|
||||||
# The game target.
|
|
||||||
#
|
|
||||||
|
|
||||||
$(GAME) : $(O)obj.tag $(O)utility.tag graphicschk $(GAMEFILE)
|
|
||||||
@echo $(GAME) is up to date.
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Everything
|
# Everything
|
||||||
#
|
#
|
||||||
|
|
||||||
all : install
|
all : install
|
||||||
|
|
||||||
install: graphicschk $(GAME) $(O)install.tag
|
install: graphicschk $(O)obj.tag $(GAMEDIR)/NetHack.exe $(GAMEDIR)/NetHackW.exe $(O)install.tag
|
||||||
|
@echo NetHack is up to date.
|
||||||
@echo Done.
|
@echo Done.
|
||||||
|
|
||||||
|
|
||||||
@@ -587,35 +546,36 @@ $(O)utility.tag: $(INCL)/date.h $(INCL)/onames.h $(INCL)/pm.h \
|
|||||||
tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe
|
tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe
|
||||||
@echo Optional tile development utilities are up to date.
|
@echo Optional tile development utilities are up to date.
|
||||||
|
|
||||||
ifeq "$(GRAPHICAL)" "Y"
|
$(O)winres.o: $(TILEBMP16) $(MSWIN)/winhack.rc $(MSWIN)/mnsel.bmp \
|
||||||
$(NHRES): $(TILEBMP16) $(WIN32)/winhack.rc $(WIN32)/mnsel.bmp \
|
$(MSWIN)/mnselcnt.bmp $(MSWIN)/mnunsel.bmp \
|
||||||
$(WIN32)/mnselcnt.bmp $(WIN32)/mnunsel.bmp \
|
$(MSWIN)/petmark.bmp $(MSWIN)/NetHack.ico $(MSWIN)/rip.bmp \
|
||||||
$(WIN32)/petmark.bmp $(WIN32)/NetHack.ico $(WIN32)/rip.bmp \
|
$(MSWIN)/splash.bmp
|
||||||
$(WIN32)/splash.bmp
|
@$(rc) -o$@ --include-dir $(MSWIN) -i $(MSWIN)/winhack.rc
|
||||||
@$(rc) -o$@ --include-dir $(WIN32) -i $(WIN32)/winhack.rc
|
|
||||||
else
|
$(O)conres.o: $(MSWSYS)/console.rc $(MSWSYS)/NetHack.ico
|
||||||
$(NHRES): $(MSWSYS)/console.rc $(MSWSYS)/NetHack.ico
|
|
||||||
@$(rc) -o$@ --include-dir $(MSWSYS) -i $(MSWSYS)/console.rc
|
@$(rc) -o$@ --include-dir $(MSWSYS) -i $(MSWSYS)/console.rc
|
||||||
endif
|
|
||||||
|
|
||||||
#==========================================
|
#==========================================
|
||||||
# The main target.
|
# The game targets.
|
||||||
#==========================================
|
#==========================================
|
||||||
$(O)gamedir.tag:
|
$(O)gamedir.tag:
|
||||||
$(subst /,\,@if not exist $(GAMEDIR)/*.* echo creating directory $(GAMEDIR))
|
$(subst /,\,@if not exist $(GAMEDIR)/*.* echo creating directory $(GAMEDIR))
|
||||||
$(subst /,\,@if not exist $(GAMEDIR)/*.* mkdir $(GAMEDIR))
|
$(subst /,\,@if not exist $(GAMEDIR)/*.* mkdir $(GAMEDIR))
|
||||||
$(subst /,\,@echo directory created > $@)
|
$(subst /,\,@echo directory created > $@)
|
||||||
|
|
||||||
ifeq "$(GRAPHICAL)" "Y"
|
$(GAMEDIR)/NetHack.exe : $(O)gamedir.tag $(O)tile.o $(O)nttty.o $(O)guistub.o \
|
||||||
$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(O)gamedir.tag
|
$(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)conres.o $(KEYDLLS)
|
||||||
else
|
@echo Linking $@...
|
||||||
$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(O)gamedir.tag \
|
$(link) $(lflags) -o$@ $(ALLOBJ) $(TTYOBJ) $(O)nttty.o $(O)tile.o \
|
||||||
$(GAMEDIR)/nhdefkey.dll $(GAMEDIR)/nh340key.dll $(GAMEDIR)/nhraykey.dll
|
$(O)guistub.o $(O)conres.o $(conlibs) -static -lstdc++
|
||||||
endif
|
|
||||||
@echo Linking....
|
|
||||||
$(link) $(lflags) -o$@ $(ALLOBJ) $(NHRES) $(WINPLIBS) -static -lstdc++
|
|
||||||
$(subst /,\,@if exist $(O)install.tag del $(O)install.tag)
|
$(subst /,\,@if exist $(O)install.tag del $(O)install.tag)
|
||||||
|
|
||||||
|
$(GAMEDIR)/NetHackW.exe : $(O)gamedir.tag $(O)tile.o $(O)ttystub.o \
|
||||||
|
$(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)winres.o $(KEYDLLS)
|
||||||
|
@echo Linking $@...
|
||||||
|
$(link) $(lflags) -mwindows -o$@ $(ALLOBJ) $(GUIOBJ) $(O)tile.o $(O)ttystub.o \
|
||||||
|
$(O)winres.o $(guilibs) -static -lstdc++
|
||||||
|
$(subst /,\,@if exist $(O)install.tag del $(O)install.tag)
|
||||||
|
|
||||||
$(O)nhdefkey.o:
|
$(O)nhdefkey.o:
|
||||||
$(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nhdefkey.c
|
$(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nhdefkey.c
|
||||||
@@ -649,11 +609,9 @@ $(GAME)_.ico : $(MSWSYS)/$(GAME).ico
|
|||||||
#==========================================
|
#==========================================
|
||||||
|
|
||||||
graphicschk:
|
graphicschk:
|
||||||
ifeq "$(GRAPHICAL)" "Y"
|
|
||||||
@echo ----
|
@echo ----
|
||||||
@echo NOTE: This build will include tile support.
|
@echo NOTE: This build will include tile support.
|
||||||
@echo ----
|
@echo ----
|
||||||
endif
|
|
||||||
$(subst /,\,@echo graphicschk > graphicschk)
|
$(subst /,\,@echo graphicschk > graphicschk)
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -723,36 +681,36 @@ $(MSWSYS)/NetHack.ico : $(U)uudecode.exe $(MSWSYS)/nhico.uu
|
|||||||
$(subst /,\,copy NetHack.ico $@)
|
$(subst /,\,copy NetHack.ico $@)
|
||||||
del NetHack.ico
|
del NetHack.ico
|
||||||
|
|
||||||
$(WIN32)/NetHack.ico : $(MSWSYS)/NetHack.ico
|
$(MSWIN)/NetHack.ico : $(MSWSYS)/NetHack.ico
|
||||||
$(subst /,\,copy $< $@)
|
$(subst /,\,copy $< $@)
|
||||||
|
|
||||||
$(WIN32)/mnsel.bmp: $(U)uudecode.exe $(WIN32)/mnsel.uu
|
$(MSWIN)/mnsel.bmp: $(U)uudecode.exe $(MSWIN)/mnsel.uu
|
||||||
$(subst /,\,$(U)uudecode.exe $(WIN32)/mnsel.uu)
|
$(subst /,\,$(U)uudecode.exe $(MSWIN)/mnsel.uu)
|
||||||
$(subst /,\,copy mnsel.bmp $@)
|
$(subst /,\,copy mnsel.bmp $@)
|
||||||
del mnsel.bmp
|
del mnsel.bmp
|
||||||
|
|
||||||
$(WIN32)/mnselcnt.bmp: $(U)uudecode.exe $(WIN32)/mnselcnt.uu
|
$(MSWIN)/mnselcnt.bmp: $(U)uudecode.exe $(MSWIN)/mnselcnt.uu
|
||||||
$(subst /,\,$(U)uudecode.exe $(WIN32)/mnselcnt.uu)
|
$(subst /,\,$(U)uudecode.exe $(MSWIN)/mnselcnt.uu)
|
||||||
$(subst /,\,copy mnselcnt.bmp $@)
|
$(subst /,\,copy mnselcnt.bmp $@)
|
||||||
del mnselcnt.bmp
|
del mnselcnt.bmp
|
||||||
|
|
||||||
$(WIN32)/mnunsel.bmp: $(U)uudecode.exe $(WIN32)/mnunsel.uu
|
$(MSWIN)/mnunsel.bmp: $(U)uudecode.exe $(MSWIN)/mnunsel.uu
|
||||||
$(subst /,\,$(U)uudecode.exe $(WIN32)/mnunsel.uu)
|
$(subst /,\,$(U)uudecode.exe $(MSWIN)/mnunsel.uu)
|
||||||
$(subst /,\,copy mnunsel.bmp $@)
|
$(subst /,\,copy mnunsel.bmp $@)
|
||||||
del mnunsel.bmp
|
del mnunsel.bmp
|
||||||
|
|
||||||
$(WIN32)/petmark.bmp: $(U)uudecode.exe $(WIN32)/petmark.uu
|
$(MSWIN)/petmark.bmp: $(U)uudecode.exe $(MSWIN)/petmark.uu
|
||||||
$(subst /,\,$(U)uudecode.exe $(WIN32)/petmark.uu)
|
$(subst /,\,$(U)uudecode.exe $(MSWIN)/petmark.uu)
|
||||||
$(subst /,\,copy petmark.bmp $@)
|
$(subst /,\,copy petmark.bmp $@)
|
||||||
del petmark.bmp
|
del petmark.bmp
|
||||||
|
|
||||||
$(WIN32)/rip.bmp: $(U)uudecode.exe $(WIN32)/rip.uu
|
$(MSWIN)/rip.bmp: $(U)uudecode.exe $(MSWIN)/rip.uu
|
||||||
$(subst /,\,$(U)uudecode.exe $(WIN32)/rip.uu)
|
$(subst /,\,$(U)uudecode.exe $(MSWIN)/rip.uu)
|
||||||
$(subst /,\,copy rip.bmp $@)
|
$(subst /,\,copy rip.bmp $@)
|
||||||
del rip.bmp
|
del rip.bmp
|
||||||
|
|
||||||
$(WIN32)/splash.bmp: $(U)uudecode.exe $(WIN32)/splash.uu
|
$(MSWIN)/splash.bmp: $(U)uudecode.exe $(MSWIN)/splash.uu
|
||||||
$(subst /,\,$(U)uudecode.exe $(WIN32)/splash.uu)
|
$(subst /,\,$(U)uudecode.exe $(MSWIN)/splash.uu)
|
||||||
$(subst /,\,copy splash.bmp $@)
|
$(subst /,\,copy splash.bmp $@)
|
||||||
del splash.bmp
|
del splash.bmp
|
||||||
|
|
||||||
@@ -993,17 +951,9 @@ $(U)txt2ppm.exe: $(PPMWRITERS) $(TEXT_IO)
|
|||||||
@$(link) $(LFLAGSU) -o$@ $(PPMWRITERS) $(TEXT_IO)
|
@$(link) $(LFLAGSU) -o$@ $(PPMWRITERS) $(TEXT_IO)
|
||||||
|
|
||||||
|
|
||||||
ifeq "$(GRAPHICAL)" "Y"
|
|
||||||
$(TILEBMP16): $(TILEUTIL16) $(TILEFILES)
|
$(TILEBMP16): $(TILEUTIL16) $(TILEFILES)
|
||||||
@echo Creating 16x16 binary tile files (this may take some time)
|
@echo Creating 16x16 binary tile files (this may take some time)
|
||||||
$(subst /,\,@$(U)tile2bmp $(TILEBMP16))
|
$(subst /,\,@$(U)tile2bmp $(TILEBMP16))
|
||||||
#$(TILEBMP32): $(TILEUTIL32) $(TILEFILES32)
|
|
||||||
# @echo Creating 32x32 binary tile files (this may take some time)
|
|
||||||
# $(subst /,\,@$(U)til2bm32 $(TILEBMP32))
|
|
||||||
else
|
|
||||||
$(TILEBMP16):
|
|
||||||
$(TILEBMP32):
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO)
|
$(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO)
|
||||||
@echo Linking $@...
|
@echo Linking $@...
|
||||||
@@ -1128,6 +1078,21 @@ $(O)winnt.o: $(HACK_H) $(INCL)/win32api.h $(MSWSYS)/winnt.c
|
|||||||
$(O)ntsound.o: $(HACK_H) $(MSWSYS)/ntsound.c
|
$(O)ntsound.o: $(HACK_H) $(MSWSYS)/ntsound.c
|
||||||
$(cc) $(CFLAGS) -o$@ $(MSWSYS)/ntsound.c
|
$(cc) $(CFLAGS) -o$@ $(MSWSYS)/ntsound.c
|
||||||
|
|
||||||
|
|
||||||
|
#if you aren't linking in the full gui then
|
||||||
|
#include the following stub for proper linkage.
|
||||||
|
|
||||||
|
$(O)guistub.o: $(HACK_H) $(MSWSYS)/stubs.c
|
||||||
|
@$(cc) $(CFLAGS) -DGUISTUB -o$@ $(MSWSYS)/stubs.c
|
||||||
|
|
||||||
|
#if you aren't linking in the full tty then
|
||||||
|
#include the following stub for proper linkage.
|
||||||
|
|
||||||
|
$(O)ttystub.o: $(HACK_H) $(MSWSYS)/ttystub.c
|
||||||
|
@$(cc) $(CFLAGS) -DTTYSTUB -o$@ $(MSWSYS)/stubs.c
|
||||||
|
|
||||||
|
$(O)tile.o: $(SRC)/tile.c $(HACK_H)
|
||||||
|
|
||||||
#
|
#
|
||||||
# util dependencies
|
# util dependencies
|
||||||
#
|
#
|
||||||
@@ -1206,7 +1171,7 @@ $(O)wintext.o: ../win/X11/wintext.c $(HACK_H) $(INCL)/winX.h $(INCL)/xwindow.h
|
|||||||
$(cc) $(CFLAGS) -o$@ ../win/X11/wintext.c
|
$(cc) $(CFLAGS) -o$@ ../win/X11/wintext.c
|
||||||
$(O)winval.o: ../win/X11/winval.c $(HACK_H) $(INCL)/winX.h
|
$(O)winval.o: ../win/X11/winval.c $(HACK_H) $(INCL)/winX.h
|
||||||
$(cc) $(CFLAGS) -o$@ ../win/X11/winval.c
|
$(cc) $(CFLAGS) -o$@ ../win/X11/winval.c
|
||||||
$(O)tile.o: tile.c $(HACK_H)
|
$(O)tile.o: $(SRC)/tile.c $(HACK_H)
|
||||||
$(O)gnaskstr.o: ../win/gnome/gnaskstr.c ../win/gnome/gnaskstr.h \
|
$(O)gnaskstr.o: ../win/gnome/gnaskstr.c ../win/gnome/gnaskstr.h \
|
||||||
../win/gnome/gnmain.h
|
../win/gnome/gnmain.h
|
||||||
$(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnaskstr.c
|
$(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnaskstr.c
|
||||||
@@ -1258,7 +1223,6 @@ $(O)load_img.o: ../win/gem/load_img.c $(INCL)/load_img.h
|
|||||||
$(cc) $(CFLAGS) -o$@ ../win/gem/load_img.c
|
$(cc) $(CFLAGS) -o$@ ../win/gem/load_img.c
|
||||||
$(O)gr_rect.o: ../win/gem/gr_rect.c $(INCL)/gr_rect.h
|
$(O)gr_rect.o: ../win/gem/gr_rect.c $(INCL)/gr_rect.h
|
||||||
$(cc) $(CFLAGS) -o$@ ../win/gem/gr_rect.c
|
$(cc) $(CFLAGS) -o$@ ../win/gem/gr_rect.c
|
||||||
$(O)tile.o: tile.c $(HACK_H)
|
|
||||||
$(O)qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) $(INCL)/func_tab.h \
|
$(O)qt_win.o: ../win/Qt/qt_win.cpp $(HACK_H) $(INCL)/func_tab.h \
|
||||||
$(INCL)/dlb.h $(INCL)/patchlevel.h $(INCL)/tile2x11.h \
|
$(INCL)/dlb.h $(INCL)/patchlevel.h $(INCL)/tile2x11.h \
|
||||||
$(INCL)/qt_win.h $(INCL)/qt_clust.h $(INCL)/qt_kde0.h \
|
$(INCL)/qt_win.h $(INCL)/qt_clust.h $(INCL)/qt_kde0.h \
|
||||||
|
|||||||
+308
-365
File diff suppressed because it is too large
Load Diff
+40
-22
@@ -1,6 +1,6 @@
|
|||||||
/* NetHack 3.5 nttty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
/* NetHack 3.5 nttty.c $NHDT-Date: 1429675608 2015/04/22 04:06:48 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.59 $ */
|
||||||
/* NetHack 3.5 nttty.c $Date: 2009/05/06 10:53:34 $ $Revision: 1.54 $ */
|
/* NetHack 3.5 nttty.c $Date: 2009/05/06 10:53:34 $ $Revision: 1.54 $ */
|
||||||
/* SCCS Id: @(#)nttty.c 3.5 $NHDT-Date$ */
|
/* SCCS Id: @(#)nttty.c 3.5 $NHDT-Date: 1429675609 2015/04/22 04:06:49 $ */
|
||||||
/* SCCS Id: @(#)nttty.c 3.5 $Date: 2009/05/06 10:53:34 $ */
|
/* SCCS Id: @(#)nttty.c 3.5 $Date: 2009/05/06 10:53:34 $ */
|
||||||
/* Copyright (c) NetHack PC Development Team 1993 */
|
/* Copyright (c) NetHack PC Development Team 1993 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef WIN32CON
|
#ifdef WIN32
|
||||||
#define NEED_VARARGS /* Uses ... */
|
#define NEED_VARARGS /* Uses ... */
|
||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
#include "wintty.h"
|
#include "wintty.h"
|
||||||
@@ -273,35 +273,53 @@ DWORD ctrltype;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* called by init_tty in wintty.c for WIN32CON port only */
|
/* called by init_tty in wintty.c for WIN32 port only */
|
||||||
void
|
void
|
||||||
nttty_open()
|
nttty_open(mode)
|
||||||
|
int mode;
|
||||||
{
|
{
|
||||||
HANDLE hStdOut;
|
HANDLE hStdOut;
|
||||||
DWORD cmode;
|
DWORD cmode;
|
||||||
long mask;
|
long mask;
|
||||||
|
|
||||||
load_keyboard_handler();
|
try:
|
||||||
/* Initialize the function pointer that points to
|
/* The following lines of code were suggested by
|
||||||
* the kbhit() equivalent, in this TTY case nttty_kbhit()
|
|
||||||
*/
|
|
||||||
nt_kbhit = nttty_kbhit;
|
|
||||||
|
|
||||||
/* The following 6 lines of code were suggested by
|
|
||||||
* Bob Landau of Microsoft WIN32 Developer support,
|
* Bob Landau of Microsoft WIN32 Developer support,
|
||||||
* as the only current means of determining whether
|
* as the only current means of determining whether
|
||||||
* we were launched from the command prompt, or from
|
* we were launched from the command prompt, or from
|
||||||
* the NT program manager. M. Allison
|
* the NT program manager. M. Allison
|
||||||
*/
|
*/
|
||||||
hStdOut = GetStdHandle( STD_OUTPUT_HANDLE );
|
hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
GetConsoleScreenBufferInfo( hStdOut, &origcsbi);
|
if (hStdOut) {
|
||||||
GUILaunched = ((origcsbi.dwCursorPosition.X == 0) &&
|
GetConsoleScreenBufferInfo(hStdOut, &origcsbi);
|
||||||
(origcsbi.dwCursorPosition.Y == 0));
|
GUILaunched = ((origcsbi.dwCursorPosition.X == 0) &&
|
||||||
if ((origcsbi.dwSize.X <= 0) || (origcsbi.dwSize.Y <= 0))
|
(origcsbi.dwCursorPosition.Y == 0));
|
||||||
GUILaunched = 0;
|
if ((origcsbi.dwSize.X <= 0) || (origcsbi.dwSize.Y <= 0))
|
||||||
|
GUILaunched = 0;
|
||||||
|
} else if (mode) {
|
||||||
|
HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
|
HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE);
|
||||||
|
|
||||||
/* Obtain handles for the standard Console I/O devices */
|
if (!hStdOut && !hStdIn) {
|
||||||
hConIn = GetStdHandle(STD_INPUT_HANDLE);
|
/* Bool rval; */
|
||||||
|
AllocConsole();
|
||||||
|
AttachConsole(GetCurrentProcessId());
|
||||||
|
/* rval = SetStdHandle(STD_OUTPUT_HANDLE, hWrite); */
|
||||||
|
freopen("CON", "w", stdout);
|
||||||
|
freopen("CON", "r", stdin);
|
||||||
|
}
|
||||||
|
mode = 0;
|
||||||
|
goto try;
|
||||||
|
} else return;
|
||||||
|
|
||||||
|
load_keyboard_handler();
|
||||||
|
/* Initialize the function pointer that points to
|
||||||
|
* the kbhit() equivalent, in this TTY case nttty_kbhit()
|
||||||
|
*/
|
||||||
|
nt_kbhit = nttty_kbhit;
|
||||||
|
|
||||||
|
/* Obtain handles for the standard Console I/O devices */
|
||||||
|
hConIn = GetStdHandle(STD_INPUT_HANDLE);
|
||||||
hConOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
hConOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
#if 0
|
#if 0
|
||||||
hConIn = CreateFile("CONIN$",
|
hConIn = CreateFile("CONIN$",
|
||||||
@@ -1041,7 +1059,7 @@ msmsg VA_DECL(const char *, fmt)
|
|||||||
/* fatal error */
|
/* fatal error */
|
||||||
/*VARARGS1*/
|
/*VARARGS1*/
|
||||||
void
|
void
|
||||||
error VA_DECL(const char *,s)
|
nttty_error VA_DECL(const char *,s)
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
VA_START(s);
|
VA_START(s);
|
||||||
VA_INIT(s, const char *);
|
VA_INIT(s, const char *);
|
||||||
@@ -1445,4 +1463,4 @@ GetConsoleHwnd(void)
|
|||||||
return hwndFound;
|
return hwndFound;
|
||||||
}
|
}
|
||||||
# endif /*CHANGE_COLOR*/
|
# endif /*CHANGE_COLOR*/
|
||||||
#endif /* WIN32CON */
|
#endif /* WIN32 */
|
||||||
|
|||||||
@@ -0,0 +1,169 @@
|
|||||||
|
#include "hack.h"
|
||||||
|
|
||||||
|
#ifdef GUISTUB
|
||||||
|
# ifdef TTYSTUB
|
||||||
|
# error You can't compile this with both GUISTUB and TTYSTUB defined.
|
||||||
|
# endif
|
||||||
|
|
||||||
|
int GUILaunched;
|
||||||
|
struct window_procs mswin_procs = {"guistubs"};
|
||||||
|
void
|
||||||
|
mswin_destroy_reg()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* MINGW32 has trouble with both a main() and WinMain()
|
||||||
|
* so we move main for the MINGW tty version into this stub
|
||||||
|
* so that it is out of sight for the gui linkage.
|
||||||
|
*/
|
||||||
|
# ifdef __MINGW32__
|
||||||
|
extern char default_window_sys[];
|
||||||
|
|
||||||
|
int
|
||||||
|
main(argc,argv)
|
||||||
|
int argc;
|
||||||
|
char *argv[];
|
||||||
|
{
|
||||||
|
boolean resuming;
|
||||||
|
|
||||||
|
sys_early_init();
|
||||||
|
Strcpy(default_window_sys, "tty");
|
||||||
|
resuming = pcmain(argc,argv);
|
||||||
|
moveloop(resuming);
|
||||||
|
nethack_exit(EXIT_SUCCESS);
|
||||||
|
/*NOTREACHED*/
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
# endif
|
||||||
|
#endif /* GUISTUB */
|
||||||
|
|
||||||
|
/* =============================================== */
|
||||||
|
|
||||||
|
#ifdef TTYSTUB
|
||||||
|
|
||||||
|
#include "hack.h"
|
||||||
|
|
||||||
|
int GUILaunched;
|
||||||
|
struct window_procs tty_procs = {"ttystubs"};
|
||||||
|
|
||||||
|
void
|
||||||
|
win_tty_init(dir)
|
||||||
|
int dir;
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
nttty_open(mode)
|
||||||
|
int mode;
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
xputc(ch)
|
||||||
|
char ch;
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
xputs(s)
|
||||||
|
const char *s;
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
raw_clear_screen()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
clear_screen()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
backsp()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
has_color(int color)
|
||||||
|
{
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef NO_MOUSE_ALLOWED
|
||||||
|
void
|
||||||
|
toggle_mouse_support()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef PORT_DEBUG
|
||||||
|
void
|
||||||
|
win32con_debug_keystrokes()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
win32con_handler_info()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
map_subkeyvalue(op)
|
||||||
|
register char *op;
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
load_keyboard_handler()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* this is used as a printf() replacement when the window
|
||||||
|
* system isn't initialized yet
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
msmsg VA_DECL(const char *, fmt)
|
||||||
|
VA_START(fmt);
|
||||||
|
VA_INIT(fmt, const char *);
|
||||||
|
VA_END();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*VARARGS1*/
|
||||||
|
void
|
||||||
|
nttty_error VA_DECL(const char *,s)
|
||||||
|
VA_START(s);
|
||||||
|
VA_INIT(s, const char *);
|
||||||
|
VA_END();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
synch_cursor()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void more()
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* TTYSTUBS */
|
||||||
|
|
||||||
+3
-10
@@ -1,6 +1,6 @@
|
|||||||
/* NetHack 3.5 winnt.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
/* NetHack 3.5 winnt.c $NHDT-Date: 1429675609 2015/04/22 04:06:49 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.22 $ */
|
||||||
/* NetHack 3.5 winnt.c $Date: 2012/01/15 19:11:41 $ $Revision: 1.18 $ */
|
/* NetHack 3.5 winnt.c $Date: 2012/01/15 19:11:41 $ $Revision: 1.18 $ */
|
||||||
/* SCCS Id: @(#)winnt.c 3.5 $NHDT-Date$ */
|
/* SCCS Id: @(#)winnt.c 3.5 $NHDT-Date: 1429675610 2015/04/22 04:06:50 $ */
|
||||||
/* SCCS Id: @(#)winnt.c 3.5 $Date: 2012/01/15 19:11:41 $ */
|
/* SCCS Id: @(#)winnt.c 3.5 $Date: 2012/01/15 19:11:41 $ */
|
||||||
/* Copyright (c) NetHack PC Development Team 1993, 1994 */
|
/* Copyright (c) NetHack PC Development Team 1993, 1994 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -20,9 +20,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "win32api.h"
|
#include "win32api.h"
|
||||||
#ifdef WIN32CON
|
|
||||||
#include "wintty.h"
|
#include "wintty.h"
|
||||||
#endif
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
|
|
||||||
@@ -200,7 +198,7 @@ return &szFullPath[0];
|
|||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#ifndef WIN32CON
|
|
||||||
/* fatal error */
|
/* fatal error */
|
||||||
/*VARARGS1*/
|
/*VARARGS1*/
|
||||||
void
|
void
|
||||||
@@ -223,21 +221,17 @@ error VA_DECL(const char *,s)
|
|||||||
VA_END();
|
VA_END();
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
void Delay(int ms)
|
void Delay(int ms)
|
||||||
{
|
{
|
||||||
(void)Sleep(ms);
|
(void)Sleep(ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32CON
|
|
||||||
extern void NDECL(backsp);
|
extern void NDECL(backsp);
|
||||||
#endif
|
|
||||||
|
|
||||||
void win32_abort()
|
void win32_abort()
|
||||||
{
|
{
|
||||||
if (wizard) {
|
if (wizard) {
|
||||||
# ifdef WIN32CON
|
|
||||||
int c, ci, ct;
|
int c, ci, ct;
|
||||||
|
|
||||||
if (!iflags.window_inited)
|
if (!iflags.window_inited)
|
||||||
@@ -260,7 +254,6 @@ void win32_abort()
|
|||||||
}
|
}
|
||||||
if (c == 'y')
|
if (c == 'y')
|
||||||
DebugBreak();
|
DebugBreak();
|
||||||
# endif
|
|
||||||
}
|
}
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-4
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 makedefs.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: master $:$NHDT-Revision: 1.63 $ */
|
/* NetHack 3.5 makedefs.c $NHDT-Date: 1429675627 2015/04/22 04:07:07 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.91 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* Copyright (c) M. Stephenson, 1990, 1991. */
|
/* Copyright (c) M. Stephenson, 1990, 1991. */
|
||||||
/* Copyright (c) Dean Luick, 1990. */
|
/* Copyright (c) Dean Luick, 1990. */
|
||||||
@@ -1331,10 +1331,8 @@ static const char *build_opts[] = {
|
|||||||
# ifdef SCREEN_VGA
|
# ifdef SCREEN_VGA
|
||||||
"screen control via VGA graphics",
|
"screen control via VGA graphics",
|
||||||
# endif
|
# endif
|
||||||
# ifndef MSWIN_GRAPHICS
|
# ifdef WIN32CON
|
||||||
# ifdef WIN32CON
|
|
||||||
"screen control via WIN32 console I/O",
|
"screen control via WIN32 console I/O",
|
||||||
# endif
|
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef SHELL
|
#ifdef SHELL
|
||||||
|
|||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.5 wintty.c $NHDT-Date: 1428828474 2015/04/12 08:47:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.85 $ */
|
/* NetHack 3.5 wintty.c $NHDT-Date: 1429675638 2015/04/22 04:07:18 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.90 $ */
|
||||||
/* NetHack 3.5 wintty.c $Date: 2012/01/22 06:27:09 $ $Revision: 1.66 $ */
|
/* NetHack 3.5 wintty.c $Date: 2012/01/22 06:27:09 $ $Revision: 1.66 $ */
|
||||||
/* Copyright (c) David Cohrs, 1991 */
|
/* Copyright (c) David Cohrs, 1991 */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -111,7 +111,7 @@ struct window_procs tty_procs = {
|
|||||||
tty_start_screen,
|
tty_start_screen,
|
||||||
tty_end_screen,
|
tty_end_screen,
|
||||||
genl_outrip,
|
genl_outrip,
|
||||||
#if defined(WIN32CON)
|
#if defined(WIN32)
|
||||||
nttty_preference_update,
|
nttty_preference_update,
|
||||||
#else
|
#else
|
||||||
genl_preference_update,
|
genl_preference_update,
|
||||||
@@ -2906,7 +2906,7 @@ int dir;
|
|||||||
{
|
{
|
||||||
if(dir != WININIT) return;
|
if(dir != WININIT) return;
|
||||||
# if defined(WIN32CON)
|
# if defined(WIN32CON)
|
||||||
nttty_open();
|
if (!strncmpi(windowprocs.name, "tty", 3)) nttty_open(0);
|
||||||
# endif
|
# endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user