diff --git a/.gitignore b/.gitignore index 614c54f6d..a4bfbe1de 100644 --- a/.gitignore +++ b/.gitignore @@ -48,5 +48,7 @@ Makefile.gcc-orig *.suo *.pdb *.ilk +# VS2013 extension to auto-whine about questionable code generates these +*.lastcodeanalysissucceeded # Win32-specific ignores end diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 6b853e1f1..1bba4373b 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -907,6 +907,8 @@ when commands (D, A, object identify) mix object class filtering with BUCX filtering, take the intersection rather than the union (so ?B picks blessed scrolls rather than all scrolls plus blessed everything) bmask is stored with the objects on the Plane of Water to prevent segfault +engraving on drawbridge with wand of digging should produce appropriate + message instead of referring to gravel Platform- and/or Interface-Specific Fixes @@ -1144,6 +1146,9 @@ win32gui: menu option to add/remove windows captions win32gui: support for saving/restoring message history win32gui: added menu options "Copy ASCII Screenshot To Clipboard" and "Save ASCII Screenshot To File" +win32gui, win32tty: add support for looking for sysconf in %COMMONPROGRAMFILES% + first and for user config file in %USERPROFILE% (improves support for + multi-login Windows environments) win32tty: support for 'selectsaved' option for menu of existing save files to choose from at game startup tty: add window port routines for saving/restoring message history diff --git a/include/config.h b/include/config.h index f6c56b4c6..78f217dd9 100644 --- a/include/config.h +++ b/include/config.h @@ -109,9 +109,6 @@ #endif #ifdef MSWIN_GRAPHICS -# ifdef TTY_GRAPHICS -# undef TTY_GRAPHICS -# endif # ifndef DEFAULT_WINDOW_SYS # define DEFAULT_WINDOW_SYS "mswin" # endif diff --git a/include/extern.h b/include/extern.h index bf2125b87..bc741bc57 100644 --- a/include/extern.h +++ b/include/extern.h @@ -756,7 +756,7 @@ E int FDECL(nhclose, (int)); E void NDECL(really_close); #endif #ifdef DEBUG -E boolean FDECL(showdebug, (const char *)); +E boolean FDECL(debugcore, (const char *, boolean)); #endif E boolean FDECL(read_tribute, (const char *,const char *,int)); @@ -1509,10 +1509,10 @@ E void FDECL(regex_free, (struct nhregex *)); /* ### nttty.c ### */ -#ifdef WIN32CON +#ifdef WIN32 E void NDECL(get_scr_size); E int NDECL(nttty_kbhit); -E void NDECL(nttty_open); +E void FDECL(nttty_open,(int)); E void NDECL(nttty_rubout); E int NDECL(tgetch); E int FDECL(ntposkey,(int *, int *, int *)); diff --git a/include/flag.h b/include/flag.h index d7891025b..d23c44095 100644 --- a/include/flag.h +++ b/include/flag.h @@ -306,7 +306,7 @@ struct instance_flags { struct autopickup_exception *autopickup_exceptions[2]; #define AP_LEAVE 0 #define AP_GRAB 1 -#ifdef WIN32CON +#ifdef WIN32 #define MAX_ALTKEYHANDLER 25 char altkeyhandler[MAX_ALTKEYHANDLER]; #endif diff --git a/include/global.h b/include/global.h index bf91cc288..4f69ee4e8 100644 --- a/include/global.h +++ b/include/global.h @@ -197,13 +197,6 @@ typedef uchar nhsym; # endif # ifdef WIN32 # 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 @@ -234,7 +227,7 @@ typedef uchar nhsym; # define EXIT_FAILURE 1 #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 # define USE_TILES /* glyph2tile[] will be available */ # endif diff --git a/include/lint.h b/include/lint.h index 28b2154f7..bf1255c71 100644 --- a/include/lint.h +++ b/include/lint.h @@ -34,19 +34,34 @@ extern unsigned nhUse_dummy; */ /* [DEBUG shouldn't be defined unless you know what you're doing...] */ #ifdef DEBUG -# define ifdebug(stmt) do { if (showdebug(__FILE__)) stmt; } while (0) +# define showdebug(file) debugcore(file, TRUE) +# define explicitdebug(file) debugcore(file, FALSE) +# define ifdebug(stmt) do { if (showdebug(__FILE__)) stmt; } while (0) +# ifdef _MSC_VER + /* if we have microsoft's C runtime we can use these instead */ +# include +# define crtdebug(stmt) do { if (showdebug(__FILE__)) stmt; \ + _RPT0(_CRT_WARN,"\n"); } while (0) +# define debugpline0(str) crtdebug(_RPT0(_CRT_WARN,str)) +# define debugpline1(fmt,arg) crtdebug(_RPT1(_CRT_WARN,fmt,arg)) +# define debugpline2(fmt,a1,a2) crtdebug(_RPT2(_CRT_WARN,fmt,a1,a2)) +# define debugpline3(fmt,a1,a2,a3) crtdebug(_RPT3(_CRT_WARN,fmt,a1,a2,a3)) +# define debugpline4(fmt,a1,a2,a3,a4) crtdebug(_RPT4(_CRT_WARN,fmt,a1,a2,a3,a4)) +# else /* these don't require compiler support for C99 variadic macros */ -# define debugpline0(str) ifdebug(pline(str)) -# define debugpline1(fmt,arg) ifdebug(pline(fmt,arg)) -# define debugpline2(fmt,a1,a2) ifdebug(pline(fmt,a1,a2)) -# define debugpline3(fmt,a1,a2,a3) ifdebug(pline(fmt,a1,a2,a3)) -# define debugpline4(fmt,a1,a2,a3,a4) ifdebug(pline(fmt,a1,a2,a3,a4)) +# define debugpline0(str) ifdebug(pline(str)) +# define debugpline1(fmt,arg) ifdebug(pline(fmt,arg)) +# define debugpline2(fmt,a1,a2) ifdebug(pline(fmt,a1,a2)) +# define debugpline3(fmt,a1,a2,a3) ifdebug(pline(fmt,a1,a2,a3)) +# define debugpline4(fmt,a1,a2,a3,a4) ifdebug(pline(fmt,a1,a2,a3,a4)) +# endif #else -# define debugpline0(str) /*empty*/ -# define debugpline1(fmt,arg) /*empty*/ -# define debugpline2(fmt,a1,a2) /*empty*/ -# define debugpline3(fmt,a1,a2,a3) /*empty*/ -# define debugpline4(fmt,a1,a2,a3,a4) /*empty*/ -#endif /*DEBUG*/ +# define debugpline0(str) /*empty*/ +# define debugpline1(fmt,arg) /*empty*/ +# define debugpline2(fmt,a1,a2) /*empty*/ +# define debugpline3(fmt,a1,a2,a3) /*empty*/ +# define debugpline4(fmt,a1,a2,a3,a4) /*empty*/ +#endif /*DEBUG*/ #endif /* LINT_H */ + diff --git a/include/ntconf.h b/include/ntconf.h index b3a561015..bc2a0b7ea 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -14,9 +14,8 @@ #define EXEPATH /* Allow .exe location to be used as HACKDIR */ #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*/ -#endif #define PC_LOCKING /* Prevent overwrites of aborted or in-progress games */ /* without first receiving confirmation. */ @@ -30,10 +29,8 @@ #define USER_SOUNDS -#ifdef WIN32CON -#define CHANGE_COLOR /* allow palette changes in win32 console */ +/*#define CHANGE_COLOR*/ /* allow palette changes */ #define SELECTSAVED /* Provide menu of saved games to choose from at start */ -#endif /* * ----------------------------------------------------------------- @@ -57,18 +54,12 @@ #ifdef OPTIONS_USED #undef OPTIONS_USED #endif -#ifdef MSWIN_GRAPHICS -#define OPTIONS_USED "guioptions" -#else -#define OPTIONS_USED "ttyoptions" -#endif +#define OPTIONS_USED "options" #define OPTIONS_FILE OPTIONS_USED #define PORT_HELP "porthelp" -#ifdef WIN32CON #define PORT_DEBUG /* include ability to debug international keyboard issues */ -#endif #define SAFERHANGUP /* Define SAFERHANGUP to delay hangup processing * until the main command loop. 'safer' because it @@ -102,6 +93,9 @@ extern void FDECL(interject, (int)); #pragma warning(disable:4996) /* VC8 deprecation warnings */ #pragma warning(disable:4142) /* benign redefinition */ #pragma warning(disable:4267) /* conversion from 'size_t' to XX */ +# if (_MSC_VER > 1600) +#pragma warning(disable:4459) /* hide global declaration */ +# endif /* _MSC_VER > 1600 */ # endif /* _MSC_VER > 1000 */ #pragma warning(disable:4761) /* integral size mismatch in arg; conv supp*/ # ifdef YYPREFIX @@ -197,13 +191,11 @@ extern char hackdir[]; #define getuid() 1 #define getlogin() ((char *)0) extern void NDECL(win32_abort); -#ifdef WIN32CON extern void FDECL(nttty_preference_update, (const char *)); extern void NDECL(toggle_mouse_support); extern void FDECL(map_subkeyvalue, (char *)); extern void NDECL(load_keyboard_handler); extern void NDECL(raw_clear_screen); -#endif #include #ifndef __BORLANDC__ @@ -235,7 +227,6 @@ int _RTLENTRY _EXPFUNC read (int __handle, void _FAR *__buf, unsigned __len); #endif extern int FDECL(set_win32_option, (const char *, const char *)); -#ifdef WIN32CON #define LEFTBUTTON FROM_LEFT_1ST_BUTTON_PRESSED #define RIGHTBUTTON RIGHTMOST_BUTTON_PRESSED #define MIDBUTTON FROM_LEFT_2ND_BUTTON_PRESSED @@ -243,6 +234,5 @@ extern int FDECL(set_win32_option, (const char *, const char *)); #ifdef CHANGE_COLOR extern int FDECL(alternative_palette, (char *)); #endif -#endif /* WIN32CON */ #endif /* NTCONF_H */ diff --git a/include/wintty.h b/include/wintty.h index 6491daa99..148d1707d 100644 --- a/include/wintty.h +++ b/include/wintty.h @@ -241,15 +241,15 @@ E int FDECL(term_putc, (int c)); E int FDECL(term_flush, (void *desc)); E int FDECL(term_puts, (const char *str)); # endif /* MAC */ -# if defined(MSDOS) || defined(WIN32CON) -# if defined(SCREEN_BIOS) || defined(SCREEN_DJGPPFAST) || defined(WIN32CON) +# if defined(MSDOS) || defined(WIN32) +# if defined(SCREEN_BIOS) || defined(SCREEN_DJGPPFAST) || defined(WIN32) # undef putchar # undef putc # undef puts # define putchar(x) xputc(x) /* these are in video.c, nttty.c */ # define putc(x) xputc(x) # define puts(x) xputs(x) -# endif/*SCREEN_BIOS || SCREEN_DJGPPFAST || WIN32CON */ +# endif/*SCREEN_BIOS || SCREEN_DJGPPFAST || WIN32 */ # ifdef POSITIONBAR E void FDECL(video_update_positionbar, (char *)); # endif diff --git a/src/allmain.c b/src/allmain.c index 34a561e46..a88611e27 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -61,10 +61,15 @@ boolean resuming; set_wear((struct obj *)0); /* for side-effects of worn starting gear */ (void) pickup(1); /* autopickup at initial location */ } else { /* restore old game */ +#ifndef WIN32 update_inventory(); /* for perm_invent */ +#endif read_engr_at(u.ux, u.uy); /* subset of pickup() */ } - +#ifdef WIN32 + update_inventory(); /* for perm_invent */ +#endif + (void) encumber_msg(); /* in case they auto-picked up something */ if (defer_see_monsters) { defer_see_monsters = FALSE; diff --git a/src/botl.c b/src/botl.c index ab868437c..d2ca04f1a 100644 --- a/src/botl.c +++ b/src/botl.c @@ -926,7 +926,7 @@ assign_hilite(sa,sb,sc,sd) char *sa, *sb, *sc, *sd; { char *tmp, *how; - int i, dt, idx = -1; + int i = -1, dt = -1, idx = -1; int coloridx[2] = {-1, -1}; boolean inverse[2] = {FALSE, FALSE}; boolean bold[2] = {FALSE, FALSE}; diff --git a/src/cmd.c b/src/cmd.c index 9b27842aa..abd6868a2 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -3745,10 +3745,8 @@ dotravel(VOID_ARGS) } #ifdef PORT_DEBUG -# ifdef WIN32CON extern void NDECL(win32con_debug_keystrokes); extern void NDECL(win32con_handler_info); -# endif int wiz_port_debug() @@ -3762,9 +3760,9 @@ wiz_port_debug() char *menutext; void NDECL((*fn)); } menu_selections[] = { -#ifdef WIN32CON - {"test win32 keystrokes", win32con_debug_keystrokes}, - {"show keystroke handler information", win32con_handler_info}, +#ifdef WIN32 + {"test win32 keystrokes (tty only)", win32con_debug_keystrokes}, + {"show keystroke handler information (tty only)", win32con_handler_info}, #endif {(char *)0, (void NDECL((*)))0} /* array terminator */ }; diff --git a/src/dungeon.c b/src/dungeon.c index 2ca6b866c..28125631a 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -81,7 +81,7 @@ dumpit() s_level *x; branch *br; - if (!showdebug(__FILE__)) return; + if (!explicitdebug(__FILE__)) return; for(i = 0; i < n_dgns; i++) { fprintf(stderr, "\n#%d \"%s\" (%s):\n", i, diff --git a/src/files.c b/src/files.c index c55c412d9..fdc8eebde 100644 --- a/src/files.c +++ b/src/files.c @@ -1068,7 +1068,7 @@ get_saved_games() #if defined(SELECTSAVED) int n, j = 0; char **result = 0; -# ifdef WIN32CON +# ifdef WIN32 { char *foundfile; const char *fq_save; @@ -3256,11 +3256,16 @@ assure_syscf_file() { #ifdef DEBUG /* used by debugpline() to decide whether to issue a message - from a partiular source file; caller passes __FILE__ and we check - whether it is in the source file list supplied by SYSCF's DEBUGFILES */ + * from a partiular source file; caller passes __FILE__ and we check + * whether it is in the source file list supplied by SYSCF's DEBUGFILES + * + * pass FALSE to override wildcard matching; useful for files + * like dungeon.c and questpgr.c, which generate a ridiculous amount of + * output if DEBUG is defined and effectively block the use of a wildcard */ boolean -showdebug(filename) +debugcore(filename, wildcards) const char *filename; +boolean wildcards; { const char *debugfiles, *p; @@ -3303,7 +3308,7 @@ const char *filename; * attempt a wildcard match against each element, but that would be * overkill for the intended usage.] */ - if (pmatch(debugfiles, filename)) + if (wildcards && pmatch(debugfiles, filename)) return TRUE; /* check whether filename is an element of the list */ @@ -3316,6 +3321,7 @@ const char *filename; } return FALSE; } + #endif /*DEBUG*/ /* ---------- BEGIN TRIBUTE ----------- */ diff --git a/src/hack.c b/src/hack.c index cbd9d2cfd..a5eb842b3 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1130,7 +1130,7 @@ domove() register struct monst *mtmp; register struct rm *tmpr; register xchar x,y; - struct trap *trap = (struct trap *)0; + struct trap *trap = NULL; int wtcap; boolean on_ice; xchar chainx, chainy, ballx, bally; /* ball&chain new positions */ diff --git a/src/mon.c b/src/mon.c index 0cb816d56..7c1320262 100644 --- a/src/mon.c +++ b/src/mon.c @@ -939,6 +939,8 @@ struct obj *otmp; { int otyp = otmp->otyp, newload = otmp->owt; struct permonst *mdat = mtmp->data; + short nattk = 0; + boolean glomper = FALSE; if (notake(mdat)) return FALSE; /* can't carry anything */ @@ -951,6 +953,21 @@ struct obj *otmp; (otyp != BELL_OF_OPENING || !is_covetous(mdat))) return FALSE; + /* monsters without hands can't pick up multiple objects at once + * unless they have an engulfing attack + * + * ...dragons, of course, can always carry gold pieces somehow */ + if (otmp->quan > 1) { + for (nattk = 0; nattk < NATTK; nattk++) + glomper = (glomper || mtmp->data->mattk[nattk].aatyp == AT_ENGL); + + if ((mtmp->data->mflags1 & M1_NOHANDS) && !glomper + && (!(mtmp->data->mlet == S_DRAGON + && otmp->oclass == COIN_CLASS))) { + return FALSE; + } + } + /* Steeds don't pick up stuff (to avoid shop abuse) */ if (mtmp == u.usteed) return (FALSE); if (mtmp->isshk) return(TRUE); /* no limit */ diff --git a/src/options.c b/src/options.c index b283b8d6c..82fc250c4 100644 --- a/src/options.c +++ b/src/options.c @@ -207,7 +207,7 @@ static struct Bool_Opt {"toptenwin",&iflags.toptenwin, FALSE, SET_IN_GAME}, {"travel", &flags.travelcmd, TRUE, SET_IN_GAME}, {"use_darkgray", &iflags.wc2_darkgray, TRUE, SET_IN_FILE}, -#ifdef WIN32CON +#ifdef WIN32 {"use_inverse", &iflags.wc_inverse, TRUE, SET_IN_GAME}, /*WC*/ #else {"use_inverse", &iflags.wc_inverse, FALSE, SET_IN_GAME}, /*WC*/ @@ -312,7 +312,7 @@ static struct Comp_Opt MAXOCLASSES, SET_IN_GAME }, #ifdef CHANGE_COLOR { "palette", -# ifndef WIN32CON +# ifndef WIN32 "palette (00c/880/-fff is blue/yellow/reverse white)", 15 , SET_IN_GAME }, # else @@ -373,7 +373,7 @@ static struct Comp_Opt { "videoshades", "gray shades to map to black/gray/white", 32, DISP_IN_GAME }, #endif -#ifdef WIN32CON +#ifdef WIN32 {"subkeyvalue", "override keystroke value", 7, SET_IN_FILE}, #endif { "windowcolors", "the foreground/background colors of windows", /*WC*/ @@ -1872,7 +1872,7 @@ boolean tinitial, tfrom_file; ) { int color_number, color_incr; -# ifndef WIN32CON +# ifndef WIN32 if (duplicate) complain_about_duplicate(opts,1); # endif # ifdef MAC @@ -1894,7 +1894,7 @@ boolean tinitial, tfrom_file; # ifdef MAC } # endif -#ifdef WIN32CON +#ifdef WIN32 op = string_for_opt(opts, TRUE); if (!alternative_palette(op)) badoption(opts); @@ -1940,7 +1940,7 @@ boolean tinitial, tfrom_file; color_number += color_incr; } } -# endif /* !WIN32CON */ +# endif /* !WIN32 */ if (!initial) { need_redraw = TRUE; } @@ -2061,7 +2061,7 @@ goodfruit: if (duplicate) complain_about_duplicate(opts,1); if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_opt(opts, negated))) { -#ifdef WIN32CON +#ifdef WIN32 (void)strncpy(iflags.altkeyhandler, op, MAX_ALTKEYHANDLER - 5); load_keyboard_handler(); #endif @@ -2619,7 +2619,7 @@ goodfruit: /* no duplicate complaint here */ if (negated) bad_negation(fullname, FALSE); else { -#if defined(WIN32CON) +#if defined(WIN32) op = string_for_opt(opts, 0); map_subkeyvalue(op); #endif @@ -3972,7 +3972,7 @@ char *buf; defopt); else if (!strcmp(optname,"align")) Sprintf(buf, "%s", rolestring(flags.initalign, aligns, adj)); -#ifdef WIN32CON +#ifdef WIN32 else if (!strcmp(optname,"altkeyhandler")) Sprintf(buf, "%s", iflags.altkeyhandler[0] ? iflags.altkeyhandler : "default"); diff --git a/src/questpgr.c b/src/questpgr.c index 68e4e1cc1..ffd5d552d 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -47,7 +47,7 @@ dump_qtlist() /* dump the character msg list to check appearance */ { struct qtmsg *msg; - if (!showdebug(__FILE__)) return; + if (!explicitdebug(__FILE__)) return; for (msg = qt_list.chrole; msg->msgnum > 0; msg++) { pline("msgnum %d: delivery %c", diff --git a/src/read.c b/src/read.c index a588caa9c..1bfd1d102 100644 --- a/src/read.c +++ b/src/read.c @@ -2320,14 +2320,14 @@ create_particular() pline1(thats_enough_tries); } else { if (!randmonst) { - firstchoice = which; - if (cant_revive(&which, FALSE, (struct obj *)0)) { - /* wizard mode can override handling of special monsters */ - Sprintf(buf, "Creating %s instead; force %s?", - mons[which].mname, mons[firstchoice].mname); - if (yn(buf) == 'y') which = firstchoice; - } - whichpm = &mons[which]; + firstchoice = which; + if (cant_revive(&which, FALSE, (struct obj *)0)) { + /* wizard mode can override handling of special monsters */ + Sprintf(buf, "Creating %s instead; force %s?", + mons[which].mname, mons[firstchoice].mname); + if (yn(buf) == 'y') which = firstchoice; + } + whichpm = &mons[which]; } for (i = 0; i <= multi; i++) { if (monclass != MAXMCLASSES) diff --git a/src/sp_lev.c b/src/sp_lev.c index 2e9df0726..aea32a636 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -385,6 +385,10 @@ opvar_free_x(ov) Free(ov); } +/* Borland doesn't know __FUNCTION__ */ +#ifdef __BORLANDC__ +#define __FUNCTION__ __FUNC__ +#endif #define opvar_free(ov) { if (ov) { opvar_free_x(ov); ov = NULL; } else impossible("opvar_free(), %s", __FUNCTION__); } struct opvar * diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index f5ff9d1e1..d545431e2 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -56,6 +56,8 @@ extern void FDECL(nethack_exit,(int)); #ifdef WIN32 extern boolean getreturn_enabled; /* from sys/share/pcsys.c */ extern int redirect_stdout; /* from sys/share/pcsys.c */ +char *NDECL(exename); +char default_window_sys[] = "mswin"; #endif #if defined(MSWIN_GRAPHICS) @@ -80,7 +82,7 @@ unsigned _stklen = STKSIZ; * to help MinGW decide which entry point to choose. If both main and * WinMain exist, the resulting executable won't work correctly. */ -#ifndef MSWIN_GRAPHICS +#ifndef __MINGW32__ int main(argc,argv) int argc; @@ -89,6 +91,10 @@ char *argv[]; boolean resuming; sys_early_init(); +#ifdef WIN32 + Strcpy(default_window_sys, "tty"); +#endif + resuming = pcmain(argc,argv); #ifdef LAN_FEATURES init_lan_features(); @@ -98,7 +104,7 @@ char *argv[]; /*NOTREACHED*/ return 0; } -#endif /*MSWIN_GRAPHICS*/ +#endif boolean pcmain(argc,argv) @@ -119,6 +125,17 @@ char *argv[]; #endif boolean resuming = FALSE; /* assume new game */ +#ifdef _MSC_VER + /* set these appropriately for VS debugging */ + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_DEBUG); + _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_DEBUG); /* | _CRTDBG_MODE_FILE);*/ + _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG); + /*| _CRTDBG_MODE_FILE | _CRTDBG_MODE_WNDW);*/ + /* use STDERR by default + _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); + _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/ +#endif + #if defined(__BORLANDC__) && !defined(_WIN32) startup(); #endif @@ -132,7 +149,11 @@ char *argv[]; #endif hname = "NetHack"; /* used for syntax messages */ +#ifndef WIN32 choose_windows(DEFAULT_WINDOW_SYS); +#else + choose_windows(default_window_sys); +#endif #if !defined(AMIGA) && !defined(GNUDOS) /* Save current directory and make sure it gets restored when @@ -207,7 +228,7 @@ char *argv[]; # endif ami_wininit_data(); #endif -#ifdef WIN32CON +#ifdef WIN32 save_getreturn_status = getreturn_enabled; raw_clear_screen(); getreturn_enabled = TRUE; @@ -257,16 +278,14 @@ char *argv[]; * may do a prscore(). */ if (!strncmp(argv[1], "-s", 2)) { -#if defined(MSWIN_GRAPHICS) || defined(WIN32CON) +#if defined(WIN32) int sfd = (int)_fileno(stdout); redirect_stdout = (sfd >= 0) ? !isatty(sfd) : 0; -# ifdef MSWIN_GRAPHICS if (!redirect_stdout) { raw_printf("-s is not supported for the Graphical Interface\n"); nethack_exit(EXIT_SUCCESS); } -# endif #endif #if defined(CHDIR) && !defined(NOCWD_ASSUMPTIONS) @@ -326,11 +345,22 @@ char *argv[]; chdirx(hackdir,1); #endif -#ifdef MSDOS - /* We do this early for MSDOS because there are several - * display/tile related options that affect init_nhwindows() +#if defined(MSDOS) || defined (WIN32) + /* In 3.6.0, several ports process options before they init + * 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); + +# ifdef WIN32 +/* + if (!strncmpi(windowprocs.name, "mswin", 5)) + NHWinMainInit(); + else +*/ + if (!strncmpi(windowprocs.name, "tty", 3)) + nttty_open(1); +# endif #endif #if defined(MSDOS) || defined(WIN32) @@ -343,14 +373,14 @@ char *argv[]; } #endif -#ifdef MSDOS +#if defined(MSDOS) || defined(WIN32) init_nhwindows(&argc,argv); #else init_nhwindows(&argc,argv); process_options(argc, argv); #endif -#ifdef WIN32CON +#ifdef WIN32 toggle_mouse_support(); /* must come after process_options */ #endif @@ -627,6 +657,19 @@ char *argv[]; case 'l': bigscreen = -1; 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 case '@': flags.randomall = 1; @@ -741,6 +784,32 @@ authorize_wizard_mode() #define PATH_SEPARATOR '\\' # 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 char exepathbuf[EXEPATHBUFSZ]; diff --git a/sys/share/pcsys.c b/sys/share/pcsys.c index 3d390f14e..c1da279ac 100644 --- a/sys/share/pcsys.c +++ b/sys/share/pcsys.c @@ -54,7 +54,7 @@ STATIC_DCL boolean NDECL(comspec_exists); # endif #endif -#ifdef WIN32CON +#ifdef WIN32 extern int GUILaunched; /* from nttty.c */ #endif @@ -411,7 +411,7 @@ const char *str; return; } -#ifndef WIN32CON +#ifndef WIN32 void msmsg VA_DECL(const char *, fmt) VA_START(fmt); @@ -529,7 +529,7 @@ STATIC_OVL void msexit() restore_colors(); # endif #endif -#ifdef WIN32CON +#ifdef WIN32 /* Only if we started from the GUI, not the command prompt, * we need to get one last return, so the score board does * not vanish instantly after being created. diff --git a/sys/share/pcunix.c b/sys/share/pcunix.c index be6301e4d..9ed51454c 100644 --- a/sys/share/pcunix.c +++ b/sys/share/pcunix.c @@ -192,8 +192,9 @@ getlock() if(c == 'y' || c == 'Y') # ifndef SELF_RECOVER if(eraseoldlocks()) { -# if defined(WIN32CON) - clear_screen(); /* display gets fouled up otherwise */ +# if defined(WIN32) + if (!strncmpi(windowprocs.name, "tty", 3)) + clear_screen(); /* display gets fouled up otherwise */ # endif goto gotlock; } else { @@ -205,8 +206,9 @@ getlock() } # else /*SELF_RECOVER*/ if(recover_savefile()) { -# if defined(WIN32CON) - clear_screen(); /* display gets fouled up otherwise */ +# if defined(WIN32) + if (!strncmpi(windowprocs.name, "tty", 3)) + clear_screen(); /* display gets fouled up otherwise */ # endif goto gotlock; } else { diff --git a/sys/unix/sysconf b/sys/unix/sysconf index 772839be3..fe4233d49 100644 --- a/sys/unix/sysconf +++ b/sys/unix/sysconf @@ -14,6 +14,11 @@ WIZARDS=root games # Uses the same syntax as the WIZARDS option above. #SHELLERS= +# Show debugging information originating from these source files. +# Use '*' for all, or list source files separated by spaces. +# Only available if game has been compiled with DEBUG. +#DEBUGFILES=* + # Users allowed to use #exploremode. Same syntax as WIZARDS above. EXPLORERS=* diff --git a/sys/winnt/Makefile.bcc b/sys/winnt/Makefile.bcc index 6f0ac19ee..3395d785b 100644 --- a/sys/winnt/Makefile.bcc +++ b/sys/winnt/Makefile.bcc @@ -1,7 +1,8 @@ # NetHack 3.6 Makefile.bcc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ # NetHack 3.6 Makefile.bcc $Date: 2011/10/11 02:37:22 $ $Revision: 1.46 $ -# Copyright (c) NetHack PC Development Team 1993-2010 +# Copyright (c) NetHack PC Development Team 1993-2015 # +#============================================================================== # # IMPORTANT NOTE: This Makefile has not been tested for 3.5.x. # @@ -14,15 +15,15 @@ # If you don't have this compiler, you can get it at: # http://www.borland.com/bcppbuilder/freecompiler/ # -# This makefile is set up to assume the directories are extracted at the -# root, but this can be changed by modifying the bccroot and related -# variables. +#============================================================================== # # This is used for building two versions of NetHack: +# # A tty port utilizing the Win32 Console I/O subsystem, Console -# NetHack; +# NetHack.exe +# # A Win32 native port built on the Windows API, Graphical NetHack or -# NetHackW. +# NetHackW.exe # # In addition to your C compiler, # @@ -31,32 +32,64 @@ # .y yacc (such as bison) # .l lex (such as flex) # -# # If you have any questions read the sys/winnt/Install.nt file included # with the distribution. -# -# -- -# Yitzhak Sapir #============================================================================== -# Do not delete the following 3 lines. # TARGETOS=BOTH -APPVER=4.0 +APPVER=5.0 bccbin = $(MAKEDIR) bccroot = $(MAKEDIR)\.. bccinc = $(bccroot)\include bcclib = $(bccroot)\lib -!IFNDEF APPVER -APPVER = 4.0 -!ENDIF +#============================================================================== +# 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? (comment/uncomment appropriate TARGET_CPU line) +# +# TODO +#--------------------------------------------------------------- +# 2. Where do you want the game to be built (which folder)? +# +GAMEDIR = ..\binary # Game directory +# +#--------------------------------------------------------------- +# 3. Do you want debug information in the executable? +# + +DEBUGINFO = Y + +#============================================================================== +# This marks the end of the BUILD DECISIONS section. +#============================================================================== +# +#=============================================== +#======= End of Modification Section =========== +#=============================================== +# +################################################ +# # +# Nothing below here should have to be changed.# +# # +################################################ + +# +#============================================================================== # Graphical interface # Set to Y for a graphical version # Set to anything else (or undefine) for a tty version -#GRAPHICAL = Y +GRAPHICAL = Y # Debug # Set to Y for Debug support (to produce full map files, listing files, and debug information) @@ -96,16 +129,12 @@ startobjg = $(startobj) !ENDIF libsmt = $(bcclib)\cw32mt.lib $(bcclib)\import32.lib -# -# Set the gamedir according to your preference. -# It must be present prior to compilation. !IF "$(GRAPHICAL)" == "Y" GAME = NetHackW # Game Name !ELSE GAME = NetHack # Game Name !ENDIF -GAMEDIR = ..\binary # Game directory # # Source directories. Makedefs hardcodes these, don't change them. @@ -202,14 +231,6 @@ RANDOM = $(OBJ)\random.o PRECOMPHEAD = N # set to Y if you want to use precomp. headers -#=============================================== -#======= End of Modification Section =========== -#=============================================== -################################################ -# # -# Nothing below here should have to be changed.# -# # -################################################ !IF "$(GRAPHICAL)" == "Y" WINPORT = $(O)tile.o $(O)mhaskyn.o $(O)mhdlg.o \ @@ -279,14 +300,159 @@ CFLAGS = $(CFLAGSBASE) $(WINPFLAG) $(DLBFLG) NHLFLAGS1 = /Gn /v /m /s /Gz /q /c lflags = $(LFLAGSBASE) $(NHLFLAGS1) -GAMEFILE = $(FDIR)\$(GAME).exe # whole thing - ! IF ("$(USE_DLB)"=="Y") DLB = nhdat ! ELSE DLB = ! ENDIF +#========================================== +#================ MACROS ================== +#========================================== +# This section creates shorthand macros for many objects +# referenced later on in the Makefile. +# + +DEFFILE = $(NTSYS)\$(GAME).def + +# +# Shorten up the location for some files +# + +O = $(OBJ)^\ + +U = $(UTIL)^\ + +# +# Utility Objects. +# + +MAKESRC = $(U)makedefs.c + +SPLEVSRC = $(U)lev_yacc.c $(U)lev_$(LEX).c $(U)lev_main.c $(U)panic.c + +DGNCOMPSRC = $(U)dgn_yacc.c $(U)dgn_$(LEX).c $(U)dgn_main.c + +MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o + +SPLEVOBJS = $(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o \ + $(O)alloc.o $(O)decl.o $(O)drawing.o \ + $(O)monst.o $(O)objects.o $(O)panic.o + +DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o \ + $(O)alloc.o $(O)panic.o + +RECOVOBJS = $(O)recover.o + +TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt + +# +# These are not invoked during a normal game build in 3.4 +# +TEXT_IO = $(O)tiletext.o $(O)tiletxt.o $(O)drawing.o \ + $(O)decl.o $(O)monst.o $(O)objects.o + +GIFREADERS = $(O)gifread.o $(O)alloc.o $(O)panic.o + +PPMWRITERS = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o + +# +# Object files for the game itself. +# + +VOBJ01 = $(O)allmain.o $(O)alloc.o $(O)apply.o $(O)artifact.o +VOBJ02 = $(O)attrib.o $(O)ball.o $(O)bones.o $(O)botl.o +VOBJ03 = $(O)cmd.o $(O)dbridge.o $(O)decl.o $(O)detect.o +VOBJ04 = $(O)dig.o $(O)display.o $(O)do.o $(O)do_name.o +VOBJ05 = $(O)do_wear.o $(O)dog.o $(O)dogmove.o $(O)dokick.o +VOBJ06 = $(O)dothrow.o $(O)drawing.o $(O)dungeon.o $(O)eat.o +VOBJ07 = $(O)end.o $(O)engrave.o $(O)exper.o $(O)explode.o +VOBJ08 = $(O)extralev.o $(O)files.o $(O)fountain.o $(O)hack.o +VOBJ09 = $(O)hacklib.o $(O)invent.o $(O)light.o $(O)lock.o +VOBJ10 = $(O)mail.o $(O)pcmain.o $(O)makemon.o $(O)mapglyph.o $(O)mcastu.o +VOBJ11 = $(O)mhitm.o $(O)mhitu.o $(O)minion.o $(O)mklev.o +VOBJ12 = $(O)mkmap.o $(O)mkmaze.o $(O)mkobj.o $(O)mkroom.o +VOBJ13 = $(O)mon.o $(O)mondata.o $(O)monmove.o $(O)monst.o +VOBJ14 = $(O)monstr.o $(O)mplayer.o $(O)mthrowu.o $(O)muse.o +VOBJ15 = $(O)music.o $(O)o_init.o $(O)objects.o $(O)objnam.o +VOBJ16 = $(O)options.o $(O)pager.o $(O)pickup.o $(O)pline.o +VOBJ17 = $(O)polyself.o $(O)potion.o $(O)pray.o $(O)priest.o +VOBJ18 = $(O)quest.o $(O)questpgr.o $(RANDOM) $(O)read.o +VOBJ19 = $(O)rect.o $(O)region.o $(O)restore.o $(O)rip.o +VOBJ20 = $(O)rnd.o $(O)role.o $(O)rumors.o $(O)save.o +VOBJ21 = $(O)shk.o $(O)shknam.o $(O)sit.o $(O)sounds.o +VOBJ22 = $(O)sp_lev.o $(O)spell.o $(O)steal.o $(O)steed.o +VOBJ23 = $(O)sys.o $(O)teleport.o $(O)timeout.o $(O)topten.o +VOBJ24 = $(O)track.o $(O)trap.o $(O)u_init.o $(O)uhitm.o +VOBJ25 = $(O)vault.o $(O)vis_tab.o $(O)vision.o $(O)weapon.o +VOBJ26 = $(O)were.o $(O)wield.o $(O)windows.o $(O)wizard.o +VOBJ27 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o + +DLBOBJ = $(O)dlb.o + +REGEX = $(O)cppregex.o + +TTYOBJ = $(O)topl.o $(O)getline.o $(O)wintty.o + +SOBJ = $(O)winnt.o $(O)pcsys.o $(O)pcunix.o \ + $(SOUND) $(O)nhlan.o + +OBJS = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ + $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \ + $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ + $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ + $(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \ + $(VOBJ26) $(VOBJ27) + +TILOBJ = $(WINPORT) + +VVOBJ = $(O)version.o + +ALLOBJ = $(TILOBJ) $(SOBJ) $(DLBOBJ) $(TTYOBJ) $(WOBJ) $(OBJS) $(VVOBJ) + + +!IF "$(GRAPHICAL)" == "Y" +OPTIONS_FILE = $(DAT)\guioptions +!ELSE +OPTIONS_FILE = $(DAT)\ttyoptions +!ENDIF +#========================================== +# Header file macros +#========================================== + +CONFIG_H = $(INCL)\config.h $(INCL)\config1.h $(INCL)\tradstdc.h \ + $(INCL)\global.h $(INCL)\coord.h $(INCL)\vmsconf.h \ + $(INCL)\system.h $(INCL)\unixconf.h $(INCL)\os2conf.h \ + $(INCL)\micro.h $(INCL)\pcconf.h $(INCL)\tosconf.h \ + $(INCL)\amiconf.h $(INCL)\macconf.h $(INCL)\beconf.h \ + $(INCL)\ntconf.h + +HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\context.h $(INCL)\align.h \ + $(INCL)\dungeon.h $(INCL)\monsym.h $(INCL)\mkroom.h \ + $(INCL)\objclass.h $(INCL)\youprop.h $(INCL)\prop.h \ + $(INCL)\permonst.h $(INCL)\monattk.h \ + $(INCL)\monflag.h $(INCL)\mondata.h $(INCL)\pm.h \ + $(INCL)\wintype.h $(INCL)\decl.h $(INCL)\quest.h \ + $(INCL)\spell.h $(INCL)\sys.h $(INCL)\color.h $(INCL)\obj.h \ + $(INCL)\you.h $(INCL)\attrib.h $(INCL)\monst.h $(INCL)\lint.h \ + $(INCL)\mextra.h $(INCL)\skills.h $(INCL)\onames.h \ + $(INCL)\timeout.h $(INCL)\trap.h $(INCL)\flag.h $(INCL)\rm.h \ + $(INCL)\vision.h $(INCL)\display.h $(INCL)\engrave.h \ + $(INCL)\rect.h $(INCL)\region.h $(INCL)\winprocs.h $(INCL)\botl.h \ + $(INCL)\wintty.h $(INCL)\trampoli.h + +LEV_H = $(INCL)\lev.h +DGN_FILE_H = $(INCL)\dgn_file.h +LEV_COMP_H = $(INCL)\lev_comp.h +SP_LEV_H = $(INCL)\sp_lev.h +TILE_H = ..\win\share\tile.h + +#========================================== +# Miscellaneous +#========================================== + +DATABASE = $(DAT)\data.base + #========================================== #================ RULES ================== #========================================== @@ -354,151 +520,6 @@ DLB = {$(WIN32)}.c{$(OBJ)}.o: @$(cc) $(CFLAGS) -o$@ $< -#========================================== -#================ MACROS ================== -#========================================== -# This section creates shorthand macros for many objects -# referenced later on in the Makefile. -# - -DEFFILE = $(NTSYS)\$(GAME).def - -# -# Shorten up the location for some files -# - -O = $(OBJ)^\ - -U = $(UTIL)^\ - -# -# Utility Objects. -# - -MAKESRC = $(U)makedefs.c - -SPLEVSRC = $(U)lev_yacc.c $(U)lev_$(LEX).c $(U)lev_main.c $(U)panic.c - -DGNCOMPSRC = $(U)dgn_yacc.c $(U)dgn_$(LEX).c $(U)dgn_main.c - -MAKEOBJS = $(O)makedefs.o $(O)monst.o $(O)objects.o - -SPLEVOBJS = $(O)lev_yacc.o $(O)lev_$(LEX).o $(O)lev_main.o \ - $(O)alloc.o $(O)decl.o $(O)drawing.o \ - $(O)monst.o $(O)objects.o $(O)panic.o - -DGNCOMPOBJS = $(O)dgn_yacc.o $(O)dgn_$(LEX).o $(O)dgn_main.o \ - $(O)alloc.o $(O)panic.o - -RECOVOBJS = $(O)recover.o - -TILEFILES = $(WSHR)\monsters.txt $(WSHR)\objects.txt $(WSHR)\other.txt - -# -# These are not invoked during a normal game build in 3.4 -# -TEXT_IO = $(O)tiletext.o $(O)tiletxt.o $(O)drawing.o \ - $(O)decl.o $(O)monst.o $(O)objects.o - -GIFREADERS = $(O)gifread.o $(O)alloc.o $(O)panic.o - -PPMWRITERS = $(O)ppmwrite.o $(O)alloc.o $(O)panic.o - -# -# Object files for the game itself. -# - -VOBJ01 = $(O)allmain.o $(O)alloc.o $(O)apply.o $(O)artifact.o -VOBJ02 = $(O)attrib.o $(O)ball.o $(O)bones.o $(O)botl.o -VOBJ03 = $(O)cmd.o $(O)dbridge.o $(O)decl.o $(O)detect.o -VOBJ04 = $(O)dig.o $(O)display.o $(O)do.o $(O)do_name.o -VOBJ05 = $(O)do_wear.o $(O)dog.o $(O)dogmove.o $(O)dokick.o -VOBJ06 = $(O)dothrow.o $(O)drawing.o $(O)dungeon.o $(O)eat.o -VOBJ07 = $(O)end.o $(O)engrave.o $(O)exper.o $(O)explode.o -VOBJ08 = $(O)extralev.o $(O)files.o $(O)fountain.o $(O)hack.o -VOBJ09 = $(O)hacklib.o $(O)invent.o $(O)light.o $(O)lock.o -VOBJ10 = $(O)mail.o $(O)makemon.o $(O)mapglyph.o $(O)mcastu.o -VOBJ11 = $(O)mhitm.o $(O)mhitu.o $(O)minion.o $(O)mklev.o -VOBJ12 = $(O)mkmap.o $(O)mkmaze.o $(O)mkobj.o $(O)mkroom.o -VOBJ13 = $(O)mon.o $(O)mondata.o $(O)monmove.o $(O)monst.o -VOBJ14 = $(O)monstr.o $(O)mplayer.o $(O)mthrowu.o $(O)muse.o -VOBJ15 = $(O)music.o $(O)o_init.o $(O)objects.o $(O)objnam.o -VOBJ16 = $(O)options.o $(O)pager.o $(O)pickup.o $(O)pline.o -VOBJ17 = $(O)polyself.o $(O)potion.o $(O)pray.o $(O)priest.o -VOBJ18 = $(O)quest.o $(O)questpgr.o $(RANDOM) $(O)read.o -VOBJ19 = $(O)rect.o $(O)region.o $(O)restore.o $(O)rip.o -VOBJ20 = $(O)rnd.o $(O)role.o $(O)rumors.o $(O)save.o -VOBJ21 = $(O)shk.o $(O)shknam.o $(O)sit.o $(O)sounds.o -VOBJ22 = $(O)sp_lev.o $(O)spell.o $(O)steal.o $(O)steed.o -VOBJ23 = $(O)sys.o $(O)teleport.o $(O)timeout.o $(O)topten.o -VOBJ24 = $(O)track.o $(O)trap.o $(O)u_init.o $(O)uhitm.o -VOBJ25 = $(O)vault.o $(O)vis_tab.o $(O)vision.o $(O)weapon.o -VOBJ26 = $(O)were.o $(O)wield.o $(O)windows.o $(O)wizard.o -VOBJ27 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o - -DLBOBJ = $(O)dlb.o - -TTYOBJ = $(O)topl.o $(O)getline.o $(O)wintty.o - -SOBJ = $(O)winnt.o $(O)pcsys.o $(O)pcunix.o \ - $(SOUND) $(O)pcmain.o $(O)nhlan.o - -OBJS = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ - $(VOBJ06) $(VOBJ07) $(VOBJ08) $(VOBJ09) $(VOBJ10) \ - $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ - $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ - $(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \ - $(VOBJ26) $(VOBJ27) - -TILOBJ = $(WINPORT) - -VVOBJ = $(O)version.o - -ALLOBJ = $(TILOBJ) $(SOBJ) $(DLBOBJ) $(TTYOBJ) $(WOBJ) $(OBJS) $(VVOBJ) - - -!IF "$(GRAPHICAL)" == "Y" -OPTIONS_FILE = $(DAT)\guioptions -!ELSE -OPTIONS_FILE = $(DAT)\ttyoptions -!ENDIF -#========================================== -# Header file macros -#========================================== - -CONFIG_H = $(INCL)\config.h $(INCL)\config1.h $(INCL)\tradstdc.h \ - $(INCL)\global.h $(INCL)\coord.h $(INCL)\vmsconf.h \ - $(INCL)\system.h $(INCL)\unixconf.h $(INCL)\os2conf.h \ - $(INCL)\micro.h $(INCL)\pcconf.h $(INCL)\tosconf.h \ - $(INCL)\amiconf.h $(INCL)\macconf.h $(INCL)\beconf.h \ - $(INCL)\ntconf.h - -HACK_H = $(INCL)\hack.h $(CONFIG_H) $(INCL)\context.h $(INCL)\align.h \ - $(INCL)\dungeon.h $(INCL)\monsym.h $(INCL)\mkroom.h \ - $(INCL)\objclass.h $(INCL)\youprop.h $(INCL)\prop.h \ - $(INCL)\permonst.h $(INCL)\monattk.h \ - $(INCL)\monflag.h $(INCL)\mondata.h $(INCL)\pm.h \ - $(INCL)\wintype.h $(INCL)\decl.h $(INCL)\quest.h \ - $(INCL)\spell.h $(INCL)\sys.h $(INCL)\color.h $(INCL)\obj.h \ - $(INCL)\you.h $(INCL)\attrib.h $(INCL)\monst.h \ - $(INCL)\mextra.h $(INCL)\skills.h $(INCL)\onames.h \ - $(INCL)\timeout.h $(INCL)\trap.h $(INCL)\flag.h $(INCL)\rm.h \ - $(INCL)\vision.h $(INCL)\display.h $(INCL)\engrave.h \ - $(INCL)\rect.h $(INCL)\region.h $(INCL)\winprocs.h \ - $(INCL)\wintty.h $(INCL)\trampoli.h - -LEV_H = $(INCL)\lev.h -DGN_FILE_H = $(INCL)\dgn_file.h -LEV_COMP_H = $(INCL)\lev_comp.h -SP_LEV_H = $(INCL)\sp_lev.h -TILE_H = ..\win\share\tile.h - -#========================================== -# Miscellaneous -#========================================== - -DATABASE = $(DAT)\data.base - # # The name of the game. # @@ -738,6 +759,14 @@ $(INCL)\vis_tab.h: $(U)makedefs.exe $(SRC)\vis_tab.c: $(U)makedefs.exe $(U)makedefs -z +$(DAT)\engrave: $(DAT)\engrave.txt $(U)makedefs.exe + ..\util\makedefs -s +$(DAT)\epitaph: $(DAT)\epitaph.txt $(U)makedefs.exe + ..\util\makedefs -s +$(DAT)\bogusmon: $(DAT)\bogusmon.txt $(U)makedefs.exe + ..\util\makedefs -s + + #========================================== # uudecode utility and uuencoded targets #========================================== @@ -1029,6 +1058,12 @@ $(O)tile2bmp.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(INCL)\win32api.h spotless: clean ! IF ("$(OBJ)"!="") -rmdir $(OBJ) /s /Q + if exist $(GAMEDIR)\nhdefkey.dll del $(GAMEDIR)\nhdefkey.dll + if exist $(GAMEDIR)\nh340key.dll del $(GAMEDIR)\nh340key.dll + if exist $(GAMEDIR)\nhraykey.dll del $(GAMEDIR)\nhraykey.dll + if exist $(GAMEDIR)\NetHack.exe del $(GAMEDIR)\NetHack.exe + if exist $(GAMEDIR)\NetHack.pdb del $(GAMEDIR)\NetHack.pdb + if exist $(GAMEDIR)\nhdat del $(GAMEDIR)\nhdat ! ENDIF if exist $(INCL)\date.h del $(INCL)\date.h if exist $(INCL)\onames.h del $(INCL)\onames.h @@ -1040,6 +1075,9 @@ spotless: clean if exist $(U)*.map del $(U)*.map if exist $(DAT)\data del $(DAT)\data if exist $(DAT)\rumors del $(DAT)\rumors + if exist $(DAT)\engrave del $(DAT)\engrave + if exist $(DAT)\epitaph del $(DAT)\epitaph + if exist $(DAT)\bogusmon del $(DAT)\bogusmon if exist $(DAT)\???-fil?.lev del $(DAT)\???-fil?.lev if exist $(DAT)\???-goal.lev del $(DAT)\???-goal.lev if exist $(DAT)\???-loca.lev del $(DAT)\???-loca.lev @@ -1080,7 +1118,10 @@ spotless: clean if exist $(SRC)\vis_tab.c del $(SRC)\vis_tab.c if exist $(U)recover.exe del $(U)recover.exe if exist nhdat. del nhdat. - + if exist $(O)obj.tag del $(O)obj.tag + if exist $(O)gamedir.tag del $(O)gamedir.tag + if exist $(O)nh*key.lib del $(O)nh*key.lib + if exist $(O)nh*key.exp del $(O)nh*key.exp clean: if exist $(O)*.o del $(O)*.o if exist $(O)utility.tag del $(O)utility.tag @@ -1089,7 +1130,48 @@ clean: if exist $(U)dgncomp.exe del $(U)dgncomp.exe if exist $(SRC)\*.lnk del $(SRC)\*.lnk if exist $(SRC)\*.map del $(SRC)\*.map + if exist $(O)install.tag del $(O)install.tag + if exist $(O)console.res del $(O)console.res + if exist $(O)dgncomp.MAP del $(O)dgncomp.MAP + if exist $(O)dgncomp.PDB del $(O)dgncomp.PDB + if exist $(O)dlb_main.MAP del $(O)dlb_main.MAP + if exist $(O)dlb_main.PDB del $(O)dlb_main.PDB + if exist $(O)gamedir.tag del $(O)gamedir.tag + if exist $(O)levcomp.MAP del $(O)levcomp.MAP + if exist $(O)levcomp.PDB del $(O)levcomp.PDB + if exist $(O)makedefs.MAP del $(O)makedefs.MAP + if exist $(O)makedefs.PDB del $(O)makedefs.PDB + if exist $(O)NetHack.MAP del $(O)NetHack.MAP + if exist $(O)nh340key.def del $(O)nh340key.def + if exist $(O)nh340key.exp del $(O)nh340key.exp + if exist $(O)nh340key.lib del $(O)nh340key.lib + if exist $(O)nh340key.map del $(O)nh340key.map + if exist $(O)nh340key.PDB del $(O)nh340key.PDB + if exist $(O)nhdefkey.def del $(O)nhdefkey.def + if exist $(O)nhdefkey.exp del $(O)nhdefkey.exp + if exist $(O)nhdefkey.lib del $(O)nhdefkey.lib + if exist $(O)nhdefkey.map del $(O)nhdefkey.map + if exist $(O)nhdefkey.PDB del $(O)nhdefkey.PDB + if exist $(O)nhraykey.def del $(O)nhraykey.def + if exist $(O)nhraykey.exp del $(O)nhraykey.exp + if exist $(O)nhraykey.lib del $(O)nhraykey.lib + if exist $(O)nhraykey.map del $(O)nhraykey.map + if exist $(O)nhraykey.PDB del $(O)nhraykey.PDB + if exist $(O)obj.tag del $(O)obj.tag + if exist $(O)sp_lev.tag del $(O)sp_lev.tag + if exist $(O)uudecode.MAP del $(O)uudecode.MAP + if exist $(O)uudecode.PDB del $(O)uudecode.PDB + rem + rem defer to the steps in ..\win\win32\levstuff.mak + rem + make -f ..\win\win32\levstuff.mak clean + rem + rem defer to the steps in ..\win\win32\dgnstuff.mak + rem + make -f ..\win\win32\dgnstuff.mak clean + if exist $(TILEBMP16) del $(TILEBMP16) + if exist $(TILEBMP32) del $(TILEBMP32) #=================================================================== # OTHER DEPENDENCIES diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 5ed47d5f2..c63a461dd 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -1,19 +1,22 @@ # NetHack 3.6 Makefile.gcc $NHDT-Date: 1430958114 2015/05/07 00:21:54 $ $NHDT-Branch: master $:$NHDT-Revision: 1.39 $ # NetHack 3.6 Makefile.gcc $Date: 2011/10/11 02:37:22 $ $Revision: 1.38 $ -# Copyright (c) NetHack PC Development Team 1993-2010 # -# NetHack 3.6.x Makefile for MinGW +#============================================================================== # # Win32 Compilers Tested: -# - MinGW 1.0 (gcc version 2.95.3-6) (Console NetHack only) -# - MinGW 2.0 (gcc version 3.2) +# === TDM-GCC Compiler Suite for Windows === +# --- GCC 4.6 & 4.7 Series --- +# *** Standard MinGW 32-bit Edition *** # # If you don't have this compiler, you can get it at: -# http://www.mingw.org/ +# http://tdm-gcc.tdragon.net/ # +#============================================================================== # This is used for building two versions of NetHack: +# # 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 # NetHackW. # @@ -24,53 +27,52 @@ # .y yacc (such as bison) # .l lex (such as flex) # -# # If you have any questions read the sys/winnt/Install.nt file included # with the distribution. -# -# -- -# Dion Nicolaas #============================================================================== -# Graphical interface -# Set to Y for a graphical version -# Set to anything else (or undefine) for a tty version +# 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? +# -#GRAPHICAL = Y +# 64 bit +#TARGET_CPU=x64 +# +# 32 bit +TARGET_CPU=x86 +# +#--------------------------------------------------------------- +# 2. Where do you want the game to be built (which folder)? +# If not present prior to compilation it gets created. +# -# Debug -# Set to Y for Debug support (to produce debug information) -# Set to anything else (or undefine) for a "release" version -# You can set your debug options below. - -DEBUG = Y - -cc = gcc -rc = windres -link = gcc - -cflags = -mms-bitfields -lflags = -ifeq "$(DEBUG)" "Y" -cdebug = -g -linkdebug = -g -else -cdebug = -linkdebug = -endif +GAMEDIR = ../binary # -# Set the gamedir according to your preference. -# If not present prior to compilation it gets created. +#--------------------------------------------------------------- +# 3. Do you want debug information in the executable? +# -ifeq "$(GRAPHICAL)" "Y" -# Game Name -GAME = NetHackW -else -# Game Name -GAME = NetHack -endif -# Game directory -GAMEDIR = ../binary +DEBUGINFO = Y + +# This marks the end of the BUILD DECISIONS section. +#============================================================================== +# +#=============================================== +#======= End of Modification Section =========== +#=============================================== +# +################################################ +# # +# Nothing below here should have to be changed.# +# # +################################################ # # Source directories. Makedefs hardcodes these, don't change them. @@ -89,11 +91,11 @@ SRC = ../src # Shared system files SSYS = ../sys/share # NT Win32 specific files -NTSYS = ../sys/winnt +MSWSYS = ../sys/winnt # window port files (tty) TTY = ../win/tty -# window port files (Win32) -WIN32 = ../win/win32 +# window port files (WIN32) +MSWIN = ../win/win32 # Tile support files WSHR = ../win/share @@ -103,10 +105,13 @@ WSHR = ../win/share OBJ = o +cc = gcc +rc = windres +link = gcc # #========================================== -# Exe File Info. +# Level Compiler Info #========================================== # Yacc/Lex ... if you got 'em. @@ -141,6 +146,9 @@ YTABC = y_tab.c YTABH = y_tab.h LEXYYC = lexyy.c +#========================================== +# Exe File Info. +#========================================== # # Optional high-quality BSD random number generation routines # (see pcconf.h). Set to nothing if not used. @@ -149,48 +157,7 @@ LEXYYC = lexyy.c RANDOM = $(OBJ)/random.o #RANDOM = -#=============================================== -#======= End of Modification Section =========== -#=============================================== -################################################ -# # -# Nothing below here should have to be changed.# -# # -################################################ - -ifeq "$(GRAPHICAL)" "Y" -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 = - +WINPFLAG = -DTILES -DMSWIN_GRAPHICS -DWIN32CON -D_WIN32_IE=0x0400 -D_WIN32_WINNT=0x0501 # To store all the level files, # help files, etc. in a single library file. # USE_DLB = Y is left uncommented @@ -207,10 +174,24 @@ endif # Setting up the compiler and linker # macros. All builds include the base ones. #========================================== +cflags = -mms-bitfields +lflags = +ifeq "$(DEBUGINFO)" "Y" +cdebug = -g +linkdebug = -g +else +cdebug = +linkdebug = +endif + + CFLAGSBASE = -c $(cflags) -I$(INCL) $(WINPINC) $(cdebug) -LFLAGSBASEC = $(linkdebug) -LFLAGSBASEG = $(linkdebug) -mwindows +#LFLAGSBASEC = $(linkdebug) +#LFLAGSBASEG = $(linkdebug) -mwindows + +conlibs = -lwinmm +guilibs = -lcomctl32 -lwinmm #========================================== # Util builds @@ -224,14 +205,7 @@ LFLAGSU = $(LFLAGSBASEC) #========================================== CFLAGS = $(CFLAGSBASE) $(WINPFLAG) $(DLBFLG) -lflags = $(LFLAGSBASE) -ifeq "$(GRAPHICAL)" "Y" -lflags = $(LFLAGSBASEG) -else -lflags = $(LFLAGSBASEC) -endif - -GAMEFILE = $(GAMEDIR)/$(GAME).exe # whole thing +lflags = $(LFLAGSBASEC) $(linkdebuf) ifeq "$(USE_DLB)" "Y" DLB = nhdat @@ -239,73 +213,6 @@ else DLB = 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$@ $< - -#========================================== -# Rules for files in sys/winnt -#========================================== - -$(OBJ)/%.o : $(NTSYS)/%.c - $(cc) $(CFLAGS) -o$@ $< - -$(INCL)/%.h : $(NTSYS)/%.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 ================== #========================================== @@ -313,7 +220,7 @@ $(OBJ)/%.o : $(WIN32)/%.c # referenced later on in the Makefile. # -DEFFILE = $(NTSYS)/$(GAME).def +DEFFILE = $(MSWSYS)/$(GAME).def # # Shorten up the location for some files @@ -394,6 +301,8 @@ VOBJ27 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o DLBOBJ = $(O)dlb.o +REGEX = $(O)cppregex.o + TTYOBJ = $(O)topl.o $(O)getline.o $(O)wintty.o SOBJ = $(O)winnt.o $(O)pcsys.o $(O)pcunix.o \ @@ -404,19 +313,35 @@ OBJS = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ $(VOBJ11) $(VOBJ12) $(VOBJ13) $(VOBJ14) $(VOBJ15) \ $(VOBJ16) $(VOBJ17) $(VOBJ18) $(VOBJ19) $(VOBJ20) \ $(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \ - $(VOBJ26) $(VOBJ27) + $(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" -OPTIONS_FILE = $(DAT)/guioptions -else -OPTIONS_FILE = $(DAT)/ttyoptions -endif +TILEUTIL16 = $(UTIL)/tile2bmp.exe +TILEBMP16 = $(SRC)/tiles.bmp + +TILEUTIL32 = $(UTIL)/til2bm32.exe +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 @@ -437,7 +362,7 @@ HACK_H = $(INCL)/hack.h $(CONFIG_H) $(INCL)/align.h $(INCL)/context.h \ $(INCL)/wintype.h $(INCL)/decl.h $(INCL)/quest.h \ $(INCL)/spell.h $(INCL)/color.h $(INCL)/obj.h \ $(INCL)/you.h $(INCL)/attrib.h $(INCL)/monst.h $(INCL)/lint.h \ - $(INCL)/mextra.h $(INCL)/skills.h $(INCL)/onames.h + $(INCL)/mextra.h $(INCL)/skills.h $(INCL)/onames.h \ $(INCL)/timeout.h $(INCL)/trap.h $(INCL)/flag.h $(INCL)/rm.h \ $(INCL)/vision.h $(INCL)/display.h $(INCL)/engrave.h \ $(INCL)/rect.h $(INCL)/region.h $(INCL)/winprocs.h \ @@ -455,12 +380,75 @@ TILE_H = ../win/share/tile.h 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 ================== @@ -475,14 +463,7 @@ GAMEFILE = $(GAMEDIR)/$(GAME).exe # # The default make target (so just typing 'nmake' is useful). # -default : $(GAMEFILE) - -# -# The main target. -# - -$(GAME) : $(O)obj.tag $(O)utility.tag graphicschk $(GAMEFILE) - @echo $(GAME) is up to date. +default : install # # Everything @@ -490,7 +471,8 @@ $(GAME) : $(O)obj.tag $(O)utility.tag graphicschk $(GAMEFILE) 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. @@ -506,13 +488,14 @@ else $(subst /,\,copy $(DAT)/*.lev $(GAMEDIR)) $(subst /,\,if exist $(GAMEDIR)/makefile del $(GAMEDIR)/makefile) endif + $(subst /,\,if not exist $(GAMEDIR)/sysconf copy $(MSWSYS)/sysconf $(GAMEDIR)) $(subst /,\,if exist $(DAT)/symbols copy $(DAT)/symbols $(GAMEDIR)) $(subst /,\,if exist $(DOC)/guidebook.txt copy $(DOC)/guidebook.txt $(GAMEDIR)/Guidebook.txt) $(subst /,\,if exist $(DOC)/nethack.txt copy $(DOC)/nethack.txt $(GAMEDIR)/NetHack.txt) - $(subst /,\,copy $(NTSYS)/defaults.nh $(GAMEDIR)/defaults.nh) + $(subst /,\,copy $(MSWSYS)/defaults.nh $(GAMEDIR)/defaults.nh) $(subst /,\,echo install done > $@) -# copy $(NTSYS)/winnt.hlp $(GAMEDIR) +# copy $(MSWSYS)/winnt.hlp $(GAMEDIR) recover: $(U)recover.exe $(subst /,\,if exist $(U)recover.exe copy $(U)recover.exe $(GAMEDIR)) @@ -563,38 +546,39 @@ $(O)utility.tag: $(INCL)/date.h $(INCL)/onames.h $(INCL)/pm.h \ tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe @echo Optional tile development utilities are up to date. -ifeq "$(GRAPHICAL)" "Y" -$(NHRES): $(TILEBMP16) $(WIN32)/winhack.rc $(WIN32)/mnsel.bmp \ - $(WIN32)/mnselcnt.bmp $(WIN32)/mnunsel.bmp \ - $(WIN32)/petmark.bmp $(WIN32)/NetHack.ico $(WIN32)/rip.bmp \ - $(WIN32)/splash.bmp - @$(rc) -o$@ --include-dir $(WIN32) -i $(WIN32)/winhack.rc -else -$(NHRES): $(NTSYS)/console.rc $(NTSYS)/NetHack.ico - @$(rc) -o$@ --include-dir $(NTSYS) -i $(NTSYS)/console.rc -endif +$(O)winres.o: $(TILEBMP16) $(MSWIN)/winhack.rc $(MSWIN)/mnsel.bmp \ + $(MSWIN)/mnselcnt.bmp $(MSWIN)/mnunsel.bmp \ + $(MSWIN)/petmark.bmp $(MSWIN)/NetHack.ico $(MSWIN)/rip.bmp \ + $(MSWIN)/splash.bmp + @$(rc) -o$@ --include-dir $(MSWIN) -i $(MSWIN)/winhack.rc + +$(O)conres.o: $(MSWSYS)/console.rc $(MSWSYS)/NetHack.ico + @$(rc) -o$@ --include-dir $(MSWSYS) -i $(MSWSYS)/console.rc #========================================== -# The main target. +# The game targets. #========================================== $(O)gamedir.tag: $(subst /,\,@if not exist $(GAMEDIR)/*.* echo creating directory $(GAMEDIR)) $(subst /,\,@if not exist $(GAMEDIR)/*.* mkdir $(GAMEDIR)) $(subst /,\,@echo directory created > $@) -ifeq "$(GRAPHICAL)" "Y" -$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(O)gamedir.tag -else -$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(O)gamedir.tag \ - $(GAMEDIR)/nhdefkey.dll $(GAMEDIR)/nh340key.dll $(GAMEDIR)/nhraykey.dll -endif - @echo Linking.... - @$(link) $(lflags) -o$@ $(ALLOBJ) $(NHRES) $(WINPLIBS) +$(GAMEDIR)/NetHack.exe : $(O)gamedir.tag $(O)tile.o $(O)nttty.o $(O)guistub.o \ + $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)conres.o $(KEYDLLS) + @echo Linking $@... + $(link) $(lflags) -o$@ $(ALLOBJ) $(TTYOBJ) $(O)nttty.o $(O)tile.o \ + $(O)guistub.o $(O)conres.o $(conlibs) -static -lstdc++ $(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: - $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(NTSYS)/nhdefkey.c + $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nhdefkey.c $(GAMEDIR)/nhdefkey.dll : $(O)nhdefkey.o $(O)gamedir.tag @echo Linking $@ @@ -602,7 +586,7 @@ $(GAMEDIR)/nhdefkey.dll : $(O)nhdefkey.o $(O)gamedir.tag -Wl,--add-stdcall-alias -o $@ $< $(O)nh340key.o: - $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(NTSYS)/nh340key.c + $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nh340key.c $(GAMEDIR)/nh340key.dll : $(O)nh340key.o $(O)gamedir.tag @echo Linking $@ @@ -610,26 +594,24 @@ $(GAMEDIR)/nh340key.dll : $(O)nh340key.o $(O)gamedir.tag -Wl,--add-stdcall-alias -o $@ $< $(O)nhraykey.o: - $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(NTSYS)/nhraykey.c + $(cc) $(CFLAGS) -DBUILD_DLL -o$@ $(MSWSYS)/nhraykey.c $(GAMEDIR)/nhraykey.dll : $(O)nhraykey.o $(O)gamedir.tag @echo Linking $@ $(cc) -shared -Wl,--export-all-symbols \ -Wl,--add-stdcall-alias -o $@ $< -$(GAME)_.ico : $(NTSYS)/$(GAME).ico - $(subst /,\,@copy $(NTSYS)/$(GAME).ico $@) +$(GAME)_.ico : $(MSWSYS)/$(GAME).ico + $(subst /,\,@copy $(MSWSYS)/$(GAME).ico $@) #========================================== # Create directory for holding object files #========================================== graphicschk: -ifeq "$(GRAPHICAL)" "Y" @echo ---- @echo NOTE: This build will include tile support. @echo ---- -endif $(subst /,\,@echo graphicschk > graphicschk) # @@ -656,9 +638,6 @@ $(O)makedefs.o: $(CONFIG_H) $(INCL)/monattk.h $(INCL)/monflag.h \ $(INCL)/date.h $(OPTIONS_FILE): $(U)makedefs.exe $(subst /,\,$(U)makedefs -v) -#$(OPTIONS_FILE): $(U)makedefs.exe -# $(subst /,\,$(U)makedefs -v) - $(INCL)/onames.h : $(U)makedefs.exe $(subst /,\,$(U)makedefs -o) @@ -677,6 +656,17 @@ $(INCL)/vis_tab.h: $(U)makedefs.exe $(SRC)/vis_tab.c: $(U)makedefs.exe $(subst /,\,$(U)makedefs -z) +$(DAT)/engrave: $(DAT)/engrave.txt $(U)makedefs.exe + $(subst /,\,$(U)makedefs -s) + +$(DAT)/epitaph: $(DAT)/epitaph.txt $(U)makedefs.exe + $(subst /,\,$(U)makedefs -s) + +$(DAT)/bogusmon: $(DAT)/bogusmon.txt $(U)makedefs.exe + $(subst /,\,$(U)makedefs -s) + + + #========================================== # uudecode utility and uuencoded targets #========================================== @@ -686,41 +676,41 @@ $(U)uudecode.exe: $(O)uudecode.o $(O)uudecode.o: $(SSYS)/uudecode.c -$(NTSYS)/NetHack.ico : $(U)uudecode.exe $(NTSYS)/nhico.uu - $(subst /,\,$(U)uudecode.exe $(NTSYS)/nhico.uu) +$(MSWSYS)/NetHack.ico : $(U)uudecode.exe $(MSWSYS)/nhico.uu + $(subst /,\,$(U)uudecode.exe $(MSWSYS)/nhico.uu) $(subst /,\,copy NetHack.ico $@) del NetHack.ico -$(WIN32)/NetHack.ico : $(NTSYS)/NetHack.ico +$(MSWIN)/NetHack.ico : $(MSWSYS)/NetHack.ico $(subst /,\,copy $< $@) -$(WIN32)/mnsel.bmp: $(U)uudecode.exe $(WIN32)/mnsel.uu - $(subst /,\,$(U)uudecode.exe $(WIN32)/mnsel.uu) +$(MSWIN)/mnsel.bmp: $(U)uudecode.exe $(MSWIN)/mnsel.uu + $(subst /,\,$(U)uudecode.exe $(MSWIN)/mnsel.uu) $(subst /,\,copy mnsel.bmp $@) del mnsel.bmp -$(WIN32)/mnselcnt.bmp: $(U)uudecode.exe $(WIN32)/mnselcnt.uu - $(subst /,\,$(U)uudecode.exe $(WIN32)/mnselcnt.uu) +$(MSWIN)/mnselcnt.bmp: $(U)uudecode.exe $(MSWIN)/mnselcnt.uu + $(subst /,\,$(U)uudecode.exe $(MSWIN)/mnselcnt.uu) $(subst /,\,copy mnselcnt.bmp $@) del mnselcnt.bmp -$(WIN32)/mnunsel.bmp: $(U)uudecode.exe $(WIN32)/mnunsel.uu - $(subst /,\,$(U)uudecode.exe $(WIN32)/mnunsel.uu) +$(MSWIN)/mnunsel.bmp: $(U)uudecode.exe $(MSWIN)/mnunsel.uu + $(subst /,\,$(U)uudecode.exe $(MSWIN)/mnunsel.uu) $(subst /,\,copy mnunsel.bmp $@) del mnunsel.bmp -$(WIN32)/petmark.bmp: $(U)uudecode.exe $(WIN32)/petmark.uu - $(subst /,\,$(U)uudecode.exe $(WIN32)/petmark.uu) +$(MSWIN)/petmark.bmp: $(U)uudecode.exe $(MSWIN)/petmark.uu + $(subst /,\,$(U)uudecode.exe $(MSWIN)/petmark.uu) $(subst /,\,copy petmark.bmp $@) del petmark.bmp -$(WIN32)/rip.bmp: $(U)uudecode.exe $(WIN32)/rip.uu - $(subst /,\,$(U)uudecode.exe $(WIN32)/rip.uu) +$(MSWIN)/rip.bmp: $(U)uudecode.exe $(MSWIN)/rip.uu + $(subst /,\,$(U)uudecode.exe $(MSWIN)/rip.uu) $(subst /,\,copy rip.bmp $@) del rip.bmp -$(WIN32)/splash.bmp: $(U)uudecode.exe $(WIN32)/splash.uu - $(subst /,\,$(U)uudecode.exe $(WIN32)/splash.uu) +$(MSWIN)/splash.bmp: $(U)uudecode.exe $(MSWIN)/splash.uu + $(subst /,\,$(U)uudecode.exe $(MSWIN)/splash.uu) $(subst /,\,copy splash.bmp $@) del splash.bmp @@ -850,8 +840,8 @@ $(O)obj.tag: # Header files NOT distributed in ../include #=========================================== -$(INCL)/win32api.h: $(NTSYS)/win32api.h - $(subst /,\,copy $(NTSYS)/win32api.h $@) +$(INCL)/win32api.h: $(MSWSYS)/win32api.h + $(subst /,\,copy $(MSWSYS)/win32api.h $@) #========================================== @@ -868,13 +858,13 @@ $(O)dlb.o: $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)/dlb.h $(O)dlb_main.o: $(UTIL)/dlb_main.c $(INCL)/config.h $(INCL)/dlb.h $(cc) $(CFLAGS) -o$@ $(UTIL)/dlb_main.c -$(DAT)/porthelp: $(NTSYS)/porthelp - $(subst /,\,@copy $(NTSYS)/porthelp $@ >nul) +$(DAT)/porthelp: $(MSWSYS)/porthelp + $(subst /,\,@copy $(MSWSYS)/porthelp $@ >nul) nhdat: $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \ $(DAT)/quest.dat $(DAT)/rumors $(DAT)/help $(DAT)/hh $(DAT)/cmdhelp \ $(DAT)/history $(DAT)/opthelp $(DAT)/wizhelp $(DAT)/dungeon \ - $(DAT)/porthelp $(DAT)/license $(O)sp_lev.tag + $(DAT)/porthelp $(DAT)/license $(DAT)/engrave $(DAT)/epitaph $(DAT)/bogusmon $(DAT)/tribute $(O)sp_lev.tag $(subst /,\,echo data >$(DAT)/dlb.lst) $(subst /,\,echo oracles >>$(DAT)/dlb.lst) $(subst /,\,if exist $(DAT)/options echo options >>$(DAT)/dlb.lst) @@ -891,6 +881,10 @@ nhdat: $(U)dlb_main.exe $(DAT)/data $(DAT)/oracles $(OPTIONS_FILE) \ $(subst /,\,echo wizhelp >>$(DAT)/dlb.lst) $(subst /,\,echo dungeon >>$(DAT)/dlb.lst) $(subst /,\,echo license >>$(DAT)/dlb.lst) + $(subst /,\,echo engrave >>$(DAT)/dlb.lst) + $(subst /,\,echo epitaph >>$(DAT)/dlb.lst) + $(subst /,\,echo bogusmon >>$(DAT)/dlb.lst) + $(subst /,\,echo tribute >>$(DAT)/dlb.lst) dir /l /b /-p $(subst /,\,$(DAT)/*.lev >>$(DAT)/dlb.lst) $(subst /,\,$(U)dlb_main CcIf $(DAT) dlb.lst $(SRC)/nhdat) @@ -957,17 +951,13 @@ $(U)txt2ppm.exe: $(PPMWRITERS) $(TEXT_IO) @$(link) $(LFLAGSU) -o$@ $(PPMWRITERS) $(TEXT_IO) -ifeq "$(GRAPHICAL)" "Y" $(TILEBMP16): $(TILEUTIL16) $(TILEFILES) @echo Creating 16x16 binary tile files (this may take some time) $(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) @echo Linking $@... @@ -978,7 +968,7 @@ $(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32) @$(link) $(LFLAGSU) -o$@ $(O)til2bm32.o $(TEXT_IO32) $(O)tile2bmp.o: $(WSHR)/tile2bmp.c $(HACK_H) $(TILE_H) $(INCL)/win32api.h - $(cc) $(CFLAGS) -I$(WSHR) -o$@ $(WSHR)/tile2bmp.c + $(cc) $(CFLAGS) -mno-ms-bitfields -I$(WSHR) -o$@ $(WSHR)/tile2bmp.c $(O)til2bm32.o: $(WSHR)/til2bm32.c $(HACK_H) $(TILE_H) $(INCL)/win32api.h $(cc) $(CFLAGS) -I$(WSHR) -DTILE_X=32 -DTILE_Y=32 -o$@ $(WSHR)/til2bm32.c @@ -1039,9 +1029,6 @@ spotless: clean $(subst /,\,if exist $(U)recover.exe del $(U)recover.exe) $(subst /,\,if exist $(DAT)/dlb.lst del $(DAT)/dlb.lst) $(subst /,\,if exist nhdat. del nhdat.) - $(subst /,\,if exist $(O)install.tag del $(O)install.tag) - $(subst /,\,if exist $(O)obj.tag del $(O)obj.tag) - $(subst /,\,if exist $(O)gamedir.tag del $(O)gamedir.tag) ifneq "$(OBJ)" "" $(subst /,\,rmdir $(OBJ)) /s /Q endif @@ -1054,8 +1041,11 @@ clean: $(subst /,\,if exist $(U)dgncomp.exe del $(U)dgncomp.exe) $(subst /,\,if exist $(SRC)/*.lnk del $(SRC)/*.lnk) $(subst /,\,if exist $(SRC)/*.map del $(SRC)/*.map) - $(subst /,\,if exist $(TILEBMP16) del $(TILEBMP16)) - $(subst /,\,if exist $(TILEBMP32) del $(TILEBMP32)) + $(subst /,\,if exist $(O)install.tag del $(O)install.tag) + $(subst /,\,if exist $(O)gamedir.tag del $(O)gamedir.tag) + $(subst /,\,if exist $(O)obj.tag del $(O)obj.tag) + $(subst /,\,if exist $(TILEBMP16) del $(TILEBMP16)) + $(subst /,\,if exist $(TILEBMP32) del $(TILEBMP32)) #=================================================================== # OTHER DEPENDENCIES @@ -1085,12 +1075,27 @@ $(DAT)/dungeon: $(O)utility.tag $(DAT)/dungeon.def # NT dependencies # -$(O)nttty.o: $(HACK_H) $(TILE_H) $(INCL)/win32api.h $(NTSYS)/nttty.c - $(cc) $(CFLAGS) -I$(WSHR) -o$@ $(NTSYS)/nttty.c -$(O)winnt.o: $(HACK_H) $(INCL)/win32api.h $(NTSYS)/winnt.c - $(cc) $(CFLAGS) -o$@ $(NTSYS)/winnt.c -$(O)ntsound.o: $(HACK_H) $(NTSYS)/ntsound.c - $(cc) $(CFLAGS) -o$@ $(NTSYS)/ntsound.c +$(O)nttty.o: $(HACK_H) $(TILE_H) $(INCL)/win32api.h $(MSWSYS)/nttty.c + $(cc) $(CFLAGS) -I$(WSHR) -o$@ $(MSWSYS)/nttty.c +$(O)winnt.o: $(HACK_H) $(INCL)/win32api.h $(MSWSYS)/winnt.c + $(cc) $(CFLAGS) -o$@ $(MSWSYS)/winnt.c +$(O)ntsound.o: $(HACK_H) $(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)/stubs.c + @$(cc) $(CFLAGS) -DTTYSTUB -o$@ $(MSWSYS)/stubs.c + +$(O)tile.o: $(SRC)/tile.c $(HACK_H) # # util dependencies @@ -1170,7 +1175,7 @@ $(O)wintext.o: ../win/X11/wintext.c $(HACK_H) $(INCL)/winX.h $(INCL)/xwindow.h $(cc) $(CFLAGS) -o$@ ../win/X11/wintext.c $(O)winval.o: ../win/X11/winval.c $(HACK_H) $(INCL)/winX.h $(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 \ ../win/gnome/gnmain.h $(cc) $(CFLAGS) $(GNOMEINC) -o$@ ../win/gnome/gnaskstr.c @@ -1222,7 +1227,6 @@ $(O)load_img.o: ../win/gem/load_img.c $(INCL)/load_img.h $(cc) $(CFLAGS) -o$@ ../win/gem/load_img.c $(O)gr_rect.o: ../win/gem/gr_rect.c $(INCL)/gr_rect.h $(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 \ $(INCL)/dlb.h $(INCL)/patchlevel.h $(INCL)/tile2x11.h \ $(INCL)/qt_win.h $(INCL)/qt_clust.h $(INCL)/qt_kde0.h \ diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 27cb86723..55592b22d 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -15,10 +15,10 @@ # This is used for building two versions of NetHack: # # A tty port utilizing the Win32 Console I/O subsystem, Console -# NetHack; +# NetHack.exe # # A Win32 native port built on the Windows API, Graphical NetHack or -# NetHackW. +# NetHackW.exe # # In addition to your C compiler, # @@ -30,10 +30,11 @@ # If you have any questions read the sys/winnt/Install.nt file included # with the distribution. #============================================================================== -#============================================================================== -# This section is used to determine the version of Visual Studio we are using. -# We set VSVER to 0000 to flag any version that is too old or untested. +# Before we get started, this section is used to determine the version of +# Visual Studio we are using. We set VSVER to 0000 to flag any version that +# is too old or untested. # + !IF "$(_NMAKE_VER)" == "14.00.22310.1" VSVER=2015 !ELSEIF "$(_NMAKE_VER)" == "12.00.21005.1" @@ -43,21 +44,28 @@ VSVER=2010 !ELSE VSVER=0000 #untested version !ENDIF -# + #============================================================================== # BUILD DECISIONS SECTION # -# 1. 32-bit or 64-bit? +# 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? (comment/uncomment appropriate TARGET_CPU line) +# + !IF ($(VSVER) >= 2013) -# Set your desired target to x86 (32-bit) or x64 (64-bit) here by -# uncommenting the appropriate target size. # # 64 bit #TARGET_CPU=x64 # # 32 bit TARGET_CPU=x86 + !ELSE # For VS2010 use "setenv /x86" or "setenv /x64" before invoking make process # DO NOT DELETE THE FOLLOWING LINE @@ -65,27 +73,19 @@ TARGET_CPU=x86 !ENDIF # #--------------------------------------------------------------- -# 2. Graphical version or command line version? -# -# Graphical interface -# Uncomment below to set to Y for a graphical version - -#GRAPHICAL = Y - -# -#--------------------------------------------------------------- -# 3. Where do you want the game to be built (which folder)? +# 2. Where do you want the game to be built (which folder)? # GAMEDIR = ..\binary # Game directory # #--------------------------------------------------------------- -# 4. Do you want debug information in the executable? +# 3. Do you want debug information in the executable? # - + DEBUGINFO = Y +#============================================================================== # This marks the end of the BUILD DECISIONS section. #============================================================================== # @@ -99,15 +99,12 @@ DEBUGINFO = Y # # ################################################ +# +#============================================================================== + # Set the gamedir according to your preference. # If not present prior to compilation it gets created. -!IF "$(GRAPHICAL)" == "Y" -GAME = NetHackW # Game Name -!ELSE -GAME = NetHack # Game Name -!ENDIF - # # Source directories. Makedefs hardcodes these, don't change them. # @@ -120,7 +117,7 @@ SRC = ..\src # Main source SSYS = ..\sys\share # Shared system files MSWSYS= ..\sys\winnt # mswin specific files TTY = ..\win\tty # window port files (tty) -WIN32 = ..\win\win32 # window port files (Win32) +MSWIN = ..\win\win32 # window port files (WIN32) WSHR = ..\win\share # Tile support files # @@ -133,63 +130,6 @@ cc=cl link=link rc=Rc -# -#============================================= -# Visual Studio versions >= 2013 specific stuff -#============================================= - -!IF "$(TARGET_CPU)" == "" -TARGET_CPU=x86 -!ENDIF - -# Common compiler flags: -# -c - compile without linking -# -W3 - Set warning level to level 3 (-W4 for 64-bit compilations) -# -Zi - generate debugging information -# -Od - disable all optimizations -# -Ox - use maximum optimizations -# -Zd - generate only public symbols and line numbers for debugging -# -GS - enable security checks -# -ccommon=-c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -c -lflags=/INCREMENTAL:NO /NOLOGO - -!IF "$(TARGET_CPU)" == "x86" -cflags = $(ccommon) -D_X86_=1 -DWIN32 -D_WIN32 -W3 -scall = -Gz - -!ELSEIF "$(TARGET_CPU)" == "x64" -cflags = $(ccommon) -D_AMD64_=1 -DWIN64 -D_WIN64 -DWIN32 -D_WIN32 -cflags = $(cflags) -W4 -scall = -!ENDIF - -# declarations for use on Intel x86 systems -!IF "$(TARGET_CPU)" == "x86" -DLLENTRY = @12 -!ENDIF - -# declarations for use on AMD64 systems -!IF "$(TARGET_CPU)" == "x64" -DLLENTRY = -!ENDIF - -# for Windows applications -conlflags = $(lflags) -subsystem:console,$(EXEVER) -guilflags = $(lflags) -subsystem:windows,$(EXEVER) -dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll - -# basic subsystem specific libraries, less the C Run-Time -baselibs = kernel32.lib $(optlibs) $(winsocklibs) advapi32.lib -winlibs = $(baselibs) user32.lib gdi32.lib comdlg32.lib winspool.lib - -# for Windows applications that use the C Run-Time libraries -conlibs = $(baselibs) -guilibs = $(winlibs) -# -# End of VS2013 and greater stuff -#============================================= - # #========================================== # Exe File Info. @@ -204,50 +144,7 @@ guilibs = $(winlibs) RANDOM = $(OBJ)\random.o #RANDOM = -PRECOMPHEAD = N # set to Y if you want to use precomp. headers - -# -# If you defined ZLIB_COMP in include/config.h and you need -# to link with the zlib.lib library, uncomment the line below. -# If necessary, prefix explicit path information to the file name -# otherwise it assumes the NetHack src directory. -# - -#ZLIB = zlib.lib - -!IF "$(GRAPHICAL)" == "Y" -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 -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 -WINDLLS = -WINPFLAG= -DTILES -DMSWIN_GRAPHICS -NHRES = $(O)winhack.res -WINPINC = -I$(WIN32) -COMCTRL = comctl32.lib -!ELSE -WINPORT = $(O)nttty.o -WINPHDR = -WINDLLS = $(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll $(GAMEDIR)\nhraykey.dll -WINPFLAG= -DWIN32CON -NHRES = $(O)console.res -WINPINC = -COMCTRL = -!ENDIF - -TILEUTIL16 = $(UTIL)\tile2bmp.exe -TILEBMP16 = $(SRC)\tiles.bmp - -TILEUTIL32 = $(UTIL)\til2bm32.exe -TILEBMP32 = $(SRC)\tiles32.bmp - -SOUND = $(OBJ)\ntsound.o - -#SOUND = +WINPFLAG= -DTILES -DMSWIN_GRAPHICS -DWIN32CON # To store all the level files, # help files, etc. in a single library file. @@ -261,6 +158,15 @@ DLBFLG = -DDLB DLBFLG = ! ENDIF +# +# If you defined ZLIB_COMP in include/config.h and you need +# to link with the zlib.lib library, uncomment the line below. +# If necessary, prefix explicit path information to the file name +# otherwise it assumes the NetHack src directory. +# + +#ZLIB = zlib.lib + #========================================== #========================================== # Setting up the compiler and linker @@ -322,11 +228,13 @@ cflags = $(cflags:-W4=-W3) # declarations for use on Intel x86 systems !IF "$(TARGET_CPU)" == "x86" DLLENTRY = @12 +EXEVER=5.01 !ENDIF # declarations for use on AMD64 systems !IF "$(TARGET_CPU)" == "x64" DLLENTRY = +EXEVER=5.02 !ENDIF # for Windows applications @@ -349,108 +257,21 @@ INCLDIR= /I..\include # Util builds #========================================== -cflagsUtil = $(cflags) $(INCLDIR) $(WINPFLAG) $(DLBFLG) -lflagsUtil = $(lflags) $(conlibs) +cflagsBuild = $(cflags) $(INCLDIR) $(WINPFLAG) $(DLBFLG) +lflagsBuild = $(lflags) $(conlibs) #========================================== # - Game build #========================================== -GAMEPDBFILE= /PDB:"$(O)$(GAME).PDB" -GAMEMAPFILE= /MAP:"$(O)$(GAME).MAP" LIBS= user32.lib winmm.lib $(ZLIB) -!IF ("$(GRAPHICAL)"=="Y") - -cflagsGame = $(cflags) $(guiflags) $(INCLDIR) $(WINPFLAG) $(DLBFLG) -lflagsGame = $(lflags) $(guilibs) $(GAMEPDBFILE) $(GAMEMAPFILE) - -!ELSE - -cflagsGame = $(cflags) $(conflags) $(INCLDIR) $(WINPFLAG) $(DLBFLG) -lflagsGame = $(lflags) $(conlibs) $(GAMEPDBFILE) $(GAMEMAPFILE) - -!ENDIF - -GAMEFILE = $(GAMEDIR)\$(GAME).exe # whole thing - ! IF ("$(USE_DLB)"=="Y") DLB = nhdat ! ELSE DLB = ! ENDIF -#========================================== -#================ RULES ================== -#========================================== - -.SUFFIXES: .exe .o .til .uu .c .y .l - -#========================================== -# Rules for files in src -#========================================== - -.c{$(OBJ)}.o: - @$(cc) $(cflagsUtil) -Fo$@ $< - -{$(SRC)}.c{$(OBJ)}.o: - @$(CC) $(cflagsUtil) -Fo$@ $< - -#========================================== -# Rules for files in sys\share -#========================================== - -{$(SSYS)}.c{$(OBJ)}.o: - @$(CC) $(cflagsUtil) -Fo$@ $< - -{$(SSYS)}.cpp{$(OBJ)}.o: - @$(CC) $(cflagsUtil) -Fo$@ $< - -#========================================== -# Rules for files in sys\winnt -#========================================== - -{$(MSWSYS)}.c{$(OBJ)}.o: - @$(CC) $(cflagsUtil) -Fo$@ $< - -{$(MSWSYS)}.h{$(INCL)}.h: - @copy $< $@ - -#========================================== -# Rules for files in util -#========================================== - -{$(UTIL)}.c{$(OBJ)}.o: - @$(CC) $(cflagsUtil) -Fo$@ $< - -#========================================== -# Rules for files in win\share -#========================================== - -{$(WSHR)}.c{$(OBJ)}.o: - @$(CC) $(cflagsUtil) -Fo$@ $< - -{$(WSHR)}.h{$(INCL)}.h: - @copy $< $@ - -#{$(WSHR)}.txt{$(DAT)}.txt: -# @copy $< $@ - -#========================================== -# Rules for files in win\tty -#========================================== - -{$(TTY)}.c{$(OBJ)}.o: - @$(CC) $(cflagsUtil) -Fo$@ $< - - -#========================================== -# Rules for files in win\win32 -#========================================== - -{$(WIN32)}.c{$(OBJ)}.o: - @$(cc) $(cflagsUtil) -Fo$@ $< - #========================================== #================ MACROS ================== #========================================== @@ -531,6 +352,7 @@ VOBJ24 = $(O)track.o $(O)trap.o $(O)u_init.o $(O)uhitm.o VOBJ25 = $(O)vault.o $(O)vis_tab.o $(O)vision.o $(O)weapon.o VOBJ26 = $(O)were.o $(O)wield.o $(O)windows.o $(O)wizard.o VOBJ27 = $(O)worm.o $(O)worn.o $(O)write.o $(O)zap.o + DLBOBJ = $(O)dlb.o REGEX = $(O)cppregex.o @@ -547,17 +369,34 @@ OBJS = $(VOBJ01) $(VOBJ02) $(VOBJ03) $(VOBJ04) $(VOBJ05) \ $(VOBJ21) $(VOBJ22) $(VOBJ23) $(VOBJ24) $(VOBJ25) \ $(VOBJ26) $(VOBJ27) $(VOBJ28) $(VOBJ29) $(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 + +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 + +COMCTRL = comctl32.lib + +KEYDLLS = $(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll $(GAMEDIR)\nhraykey.dll + +TILEUTIL16 = $(UTIL)\tile2bmp.exe +TILEBMP16 = $(SRC)\tiles.bmp + +TILEUTIL32 = $(UTIL)\til2bm32.exe +TILEBMP32 = $(SRC)\tiles32.bmp + +SOUND = $(OBJ)\ntsound.o VVOBJ = $(O)version.o -ALLOBJ = $(WINPOBJ) $(SOBJ) $(DLBOBJ) $(TTYOBJ) $(WOBJ) $(OBJS) $(VVOBJ) +ALLOBJ = $(SOBJ) $(DLBOBJ) $(WOBJ) $(OBJS) $(VVOBJ) + +OPTIONS_FILE = $(DAT)\options -!IF "$(GRAPHICAL)" == "Y" -OPTIONS_FILE = $(DAT)\guioptions -!ELSE -OPTIONS_FILE = $(DAT)\ttyoptions -!ENDIF #========================================== # Header file macros #========================================== @@ -595,11 +434,76 @@ TILE_H = ..\win\share\tile.h 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 +#========================================== + +.c{$(OBJ)}.o: + @$(cc) $(cflagsBuild) -Fo$@ $< + +{$(SRC)}.c{$(OBJ)}.o: + @$(cc) $(cflagsBuild) -Fo$@ $< + +#========================================== +# Rules for files in sys\share +#========================================== + +{$(SSYS)}.c{$(OBJ)}.o: + @$(cc) $(cflagsBuild) -Fo$@ $< + +{$(SSYS)}.cpp{$(OBJ)}.o: + @$(CC) $(cflagsBuild) /EHsc -Fo$@ $< + +#========================================== +# Rules for files in sys\winnt +#========================================== + +{$(MSWSYS)}.c{$(OBJ)}.o: + @$(cc) $(cflagsBuild) -Fo$@ $< + +{$(MSWSYS)}.h{$(INCL)}.h: + @copy $< $@ + +#========================================== +# Rules for files in util +#========================================== + +{$(UTIL)}.c{$(OBJ)}.o: + @$(cc) $(cflagsBuild) -Fo$@ $< + +#========================================== +# Rules for files in win\share +#========================================== + +{$(WSHR)}.c{$(OBJ)}.o: + @$(cc) $(cflagsBuild) -Fo$@ $< + +{$(WSHR)}.h{$(INCL)}.h: + @copy $< $@ + +#{$(WSHR)}.txt{$(DAT)}.txt: +# @copy $< $@ + +#========================================== +# Rules for files in win\tty +#========================================== + +{$(TTY)}.c{$(OBJ)}.o: + $(cc) $(cflagsBuild) -Fo$@ $< + + +#========================================== +# Rules for files in win\win32 +#========================================== + +{$(MSWIN)}.c{$(OBJ)}.o: + @$(cc) $(cflagsBuild) -Fo$@ $< #========================================== #=============== TARGETS ================== @@ -614,19 +518,15 @@ default : install # The game target. # -$(GAME): $(O)obj.tag $(O)utility.tag envchk $(GAMEFILE) - @echo $(GAME) is up to date. - # # Everything # all : install -install: envchk $(GAME) $(O)install.tag +install: envchk $(O)obj.tag $(O)utility.tag $(GAMEDIR)\NetHack.exe $(GAMEDIR)\NetHackW.exe $(O)install.tag @echo Done. - $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \ $(DAT)\oracles $(DAT)\quest.dat $(O)sp_lev.tag $(DLB) ! IF ("$(USE_DLB)"=="Y") @@ -693,26 +593,25 @@ $(O)sp_lev.tag: $(O)utility.tag $(DAT)\bigroom.des $(DAT)\castle.des \ $(O)utility.tag: $(INCL)\date.h $(INCL)\onames.h $(INCL)\pm.h \ $(SRC)\monstr.c $(SRC)\vis_tab.c \ $(U)levcomp.exe $(INCL)\vis_tab.h \ - $(U)dgncomp.exe + $(U)dgncomp.exe $(TILEUTIL16) @echo utilities made >$@ @echo utilities made. tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe @echo Optional tile development utilities are up to date. -!IF "$(GRAPHICAL)"=="Y" -$(NHRES): $(TILEBMP16) $(WIN32)\winhack.rc $(WIN32)\mnsel.bmp \ - $(WIN32)\mnselcnt.bmp $(WIN32)\mnunsel.bmp \ - $(WIN32)\petmark.bmp $(WIN32)\NetHack.ico $(WIN32)\rip.bmp \ - $(WIN32)\splash.bmp - @$(rc) -r -fo$@ -i$(WIN32) -dNDEBUG $(WIN32)\winhack.rc -!ELSE -$(NHRES): $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico +$(O)winhack.res: $(TILEBMP16) $(MSWIN)\winhack.rc $(MSWIN)\mnsel.bmp \ + $(MSWIN)\mnselcnt.bmp $(MSWIN)\mnunsel.bmp \ + $(MSWIN)\petmark.bmp $(MSWIN)\NetHack.ico $(MSWIN)\rip.bmp \ + $(MSWIN)\splash.bmp + @$(rc) -r -fo$@ -i$(MSWIN) -dNDEBUG $(MSWIN)\winhack.rc + +$(O)console.res: $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico @$(rc) -r -fo$@ -i$(MSWSYS) -dNDEBUG $(MSWSYS)\console.rc -!ENDIF + #========================================== -# The main target. +# The game targets. #========================================== # The section for linking the NetHack image looks a little strange at @@ -736,16 +635,60 @@ $(NHRES): $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico # with ^ as we have done below. Every occurence # of a in $(ALLOBJ) is replaced by # <+>. + +GAMEOBJ=$(ALLOBJ:^ =^ +) +GAMEOBJ=$(GAMEOBJ:^ =^ +) + # # DO NOT INDENT THE << below! # -$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(O)gamedir.tag $(WINDLLS) +# NetHack +# full gui linkage libs: +# libs: $(LIBS) $(conlibs) $(guilibs) $(COMCTRL) +# objs: $(GAMEOBJ) $(TTYOBJ) $(O)nttty.o $(O)tile.o $(GUIOBJ) +# otherwise: +# libs: $(LIBS) $(conlibs) +# objs: $(GAMEOBJ) $(TTYOBJ) $(O)tile.o $(O)guistub.o + + +$(GAMEDIR)\NetHack.exe : $(O)gamedir.tag $(O)tile.o $(O)nttty.o $(O)guistub.o \ + $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)console.res $(KEYDLLS) @if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR) - @echo Linking $@ - $(link) $(lflagsGame) /STACK:2048 $(LIBS) $(COMCTRL) -out:$@ @<<$(GAME).lnk - $(ALLOBJ:^ =^ - ) $(NHRES) + @echo Linking $@ ... + $(link) $(lflagsBuild) $(conlflags) /STACK:2048 /PDB:$(GAMEDIR)\$(@B).PDB /MAP:$(O)$(AB).MAP \ + $(LIBS) $(conlibs) -out:$@ @<<$(@B).lnk + $(GAMEOBJ) + $(TTYOBJ) + $(O)nttty.o + $(O)tile.o + $(O)guistub.o + $(O)console.res +<< + @if exist $(O)install.tag del $(O)install.tag + @if exist $(GAMEDIR)\$(GAME).bak del $(GAMEDIR)\$(GAME).bak + +# NetHackW +# full tty linkage libs: +# libs: $(LIBS) $(guilibs) $(COMCTRL) +# objs: $(GAMEOBJ) $(GUIOBJ) $(TTYOBJ) $(O)tile.o $(O)nttty.o +# otherwise: +# libs: $(LIBS) $(guilibs) $(COMCTRL) +# objs: $(GAMEOBJ) $(GUIOBJ) $(O)tile.o $(O)ttystub.o + +$(GAMEDIR)\NetHackW.exe : $(O)gamedir.tag $(O)tile.o $(O)ttystub.o \ + $(ALLOBJ) $(TTYOBJ) $(GUIOBJ) $(O)winhack.res $(O)gamedir.tag $(KEYDLLS) + @if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR) + @echo Linking $@ + $(link) $(lflagsBuild) $(guilflags) /STACK:2048 /PDB:$(GAMEDIR)\$(@B).PDB \ + /MAP:$(O)$(AB).MAP $(LIBS) $(guilibs) $(COMCTRL) -out:$@ @<<$(@B).lnk + $(GAMEOBJ) + $(GUIOBJ) + $(O)tile.o + $(O)ttystub.o + $(O)winhack.res << @if exist $(O)install.tag del $(O)install.tag @if exist $(GAMEDIR)\$(GAME).bak del $(GAMEDIR)\$(GAME).bak @@ -821,21 +764,21 @@ $(GAMEDIR)\nhraykey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def #========================================== $(U)nhsizes.exe: $(O)nhsizes.o @echo Linking $@ - $(link) $(lflagsUtil) -out:$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o + $(link) $(lflagsBuild) -out:$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o $(O)nhsizes.o: $(CONFIG_H) nhsizes.c - @$(CC) $(cflagsUtil) -Fo$@ nhsizes.c + @$(cc) $(cflagsBuild) -Fo$@ nhsizes.c $(U)makedefs.exe: $(MAKEOBJS) @echo Linking $@ - @$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(MAKEOBJS) + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(MAKEOBJS) $(O)makedefs.o: $(CONFIG_H) $(INCL)\monattk.h $(INCL)\monflag.h $(INCL)\objclass.h \ $(INCL)\monsym.h $(INCL)\qtext.h $(INCL)\patchlevel.h \ $(U)makedefs.c @if not exist $(OBJ)\*.* echo creating directory $(OBJ) @if not exist $(OBJ)\*.* mkdir $(OBJ) - @$(CC) $(cflagsUtil) -Fo$@ $(U)makedefs.c + @$(cc) $(cflagsBuild) -Fo$@ $(U)makedefs.c # # date.h should be remade every time any of the source or include @@ -877,48 +820,48 @@ $(DAT)\bogusmon: $(DAT)\bogusmon.txt $(U)makedefs.exe $(U)uudecode.exe: $(O)uudecode.o @echo Linking $@ - @$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)uudecode.o + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)uudecode.o $(O)uudecode.o: $(SSYS)\uudecode.c - @$(CC) $(cflagsUtil) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c + @$(cc) $(cflagsBuild) /D_CRT_SECURE_NO_DEPRECATE -Fo$@ $(SSYS)\uudecode.c $(MSWSYS)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu chdir $(MSWSYS) ..\..\util\uudecode.exe nhico.uu chdir ..\..\src -$(WIN32)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu - chdir $(WIN32) +$(MSWIN)\NetHack.ico : $(U)uudecode.exe $(MSWSYS)\nhico.uu + chdir $(MSWIN) ..\..\util\uudecode.exe ../../sys/winnt/nhico.uu chdir ..\..\src -$(WIN32)\mnsel.bmp: $(U)uudecode.exe $(WIN32)\mnsel.uu - chdir $(WIN32) +$(MSWIN)\mnsel.bmp: $(U)uudecode.exe $(MSWIN)\mnsel.uu + chdir $(MSWIN) ..\..\util\uudecode.exe mnsel.uu chdir ..\..\src -$(WIN32)\mnselcnt.bmp: $(U)uudecode.exe $(WIN32)\mnselcnt.uu - chdir $(WIN32) +$(MSWIN)\mnselcnt.bmp: $(U)uudecode.exe $(MSWIN)\mnselcnt.uu + chdir $(MSWIN) ..\..\util\uudecode.exe mnselcnt.uu chdir ..\..\src -$(WIN32)\mnunsel.bmp: $(U)uudecode.exe $(WIN32)\mnunsel.uu - chdir $(WIN32) +$(MSWIN)\mnunsel.bmp: $(U)uudecode.exe $(MSWIN)\mnunsel.uu + chdir $(MSWIN) ..\..\util\uudecode.exe mnunsel.uu chdir ..\..\src -$(WIN32)\petmark.bmp: $(U)uudecode.exe $(WIN32)\petmark.uu - chdir $(WIN32) +$(MSWIN)\petmark.bmp: $(U)uudecode.exe $(MSWIN)\petmark.uu + chdir $(MSWIN) ..\..\util\uudecode.exe petmark.uu chdir ..\..\src -$(WIN32)\rip.bmp: $(U)uudecode.exe $(WIN32)\rip.uu - chdir $(WIN32) +$(MSWIN)\rip.bmp: $(U)uudecode.exe $(MSWIN)\rip.uu + chdir $(MSWIN) ..\..\util\uudecode.exe rip.uu chdir ..\..\src -$(WIN32)\splash.bmp: $(U)uudecode.exe $(WIN32)\splash.uu - chdir $(WIN32) +$(MSWIN)\splash.bmp: $(U)uudecode.exe $(MSWIN)\splash.uu + chdir $(MSWIN) ..\..\util\uudecode.exe splash.uu chdir ..\..\src @@ -933,18 +876,18 @@ $(U)lev_yacc.c $(INCL)\lev_comp.h: $(U)lev_comp.y nmake -nologo -f ..\win\win32\levstuff.mak default $(O)lev_yacc.o: $(HACK_H) $(SP_LEV_H) $(INCL)\lev_comp.h $(U)lev_yacc.c - @$(CC) $(cflagsUtil) -Fo$@ $(U)lev_yacc.c + @$(cc) $(cflagsBuild) -Fo$@ $(U)lev_yacc.c $(O)lev_lex.o: $(HACK_H) $(INCL)\lev_comp.h $(SP_LEV_H) \ $(U)lev_lex.c - @$(CC) $(cflagsUtil) -Fo$@ $(U)lev_lex.c + @$(cc) $(cflagsBuild) -Fo$@ $(U)lev_lex.c $(O)lev_main.o: $(U)lev_main.c $(HACK_H) $(SP_LEV_H) - @$(CC) $(cflagsUtil) -Fo$@ $(U)lev_main.c + @$(cc) $(cflagsBuild) -Fo$@ $(U)lev_main.c $(U)levcomp.exe: $(LEVCOMPOBJS) @echo Linking $@ - @$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk $(LEVCOMPOBJS:^ =^ ) << @@ -959,18 +902,18 @@ $(U)dgn_yacc.c $(INCL)\dgn_comp.h : $(U)dgn_comp.y nmake -nologo -f ..\win\win32\dgnstuff.mak default $(O)dgn_yacc.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h $(U)dgn_yacc.c - @$(CC) $(cflagsUtil) -Fo$@ $(U)dgn_yacc.c + @$(cc) $(cflagsBuild) -Fo$@ $(U)dgn_yacc.c $(O)dgn_lex.o: $(HACK_H) $(DGN_FILE_H) $(INCL)\dgn_comp.h \ $(U)dgn_lex.c - @$(CC) $(cflagsUtil) -Fo$@ $(U)dgn_lex.c + @$(cc) $(cflagsBuild) -Fo$@ $(U)dgn_lex.c $(O)dgn_main.o: $(HACK_H) $(U)dgn_main.c - @$(CC) $(cflagsUtil) -Fo$@ $(U)dgn_main.c + @$(cc) $(cflagsBuild) -Fo$@ $(U)dgn_main.c $(U)dgncomp.exe: $(DGNCOMPOBJS) @echo Linking $@ - @$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk $(DGNCOMPOBJS:^ =^ ) << @@ -1004,11 +947,9 @@ envchk: # @echo Warning, the CL Environment variable is defined: # @echo CL=$(CL) ! ENDIF -! IF "$(GRAPHICAL)"=="Y" @echo ---- @echo NOTE: This build will include tile support. @echo ---- -! ENDIF #========================================== #=========== SECONDARY TARGETS ============ @@ -1028,7 +969,7 @@ $(INCL)\win32api.h: $(MSWSYS)\win32api.h $(U)dlb_main.exe: $(DLBOBJ) $(O)dlb.o @echo Linking $@ - @$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk $(O)dlb_main.o $(O)dlb.o $(O)alloc.o @@ -1036,10 +977,10 @@ $(U)dlb_main.exe: $(DLBOBJ) $(O)dlb.o << $(O)dlb.o: $(O)dlb_main.o $(O)alloc.o $(O)panic.o $(INCL)\dlb.h - @$(CC) $(cflagsUtil) /Fo$@ $(SRC)\dlb.c + @$(cc) $(cflagsBuild) /Fo$@ $(SRC)\dlb.c $(O)dlb_main.o: $(UTIL)\dlb_main.c $(INCL)\config.h $(INCL)\dlb.h - @$(CC) $(cflagsUtil) /Fo$@ $(UTIL)\dlb_main.c + @$(cc) $(cflagsBuild) /Fo$@ $(UTIL)\dlb_main.c $(DAT)\porthelp: $(MSWSYS)\porthelp @copy $(MSWSYS)\porthelp $@ >nul @@ -1079,10 +1020,10 @@ nhdat: $(U)dlb_main.exe $(DAT)\data $(DAT)\oracles $(OPTIONS_FILE) \ $(U)recover.exe: $(RECOVOBJS) @echo Linking $@ - $(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(RECOVOBJS) + $(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(RECOVOBJS) $(O)recover.o: $(CONFIG_H) $(U)recover.c $(INCL)\win32api.h - @$(CC) $(cflagsUtil) -Fo$@ $(U)recover.c + @$(cc) $(cflagsBuild) -Fo$@ $(U)recover.c #========================================== # Tile Mapping @@ -1094,31 +1035,31 @@ $(SRC)\tile.c: $(U)tilemap.exe $(U)tilemap.exe: $(O)tilemap.o @echo Linking $@ - @$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)tilemap.o + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(O)tilemap.o $(O)tilemap.o: $(WSHR)\tilemap.c $(HACK_H) - @$(CC) $(cflagsUtil) -Fo$@ $(WSHR)\tilemap.c + @$(cc) $(cflagsBuild) -Fo$@ $(WSHR)\tilemap.c $(O)tiletx32.o: $(WSHR)\tilemap.c $(HACK_H) - @$(CC) $(cflagsUtil) /DTILETEXT /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tilemap.c + @$(cc) $(cflagsBuild) /DTILETEXT /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tilemap.c $(O)tiletxt.o: $(WSHR)\tilemap.c $(HACK_H) - @$(CC) $(cflagsUtil) /DTILETEXT -Fo$@ $(WSHR)\tilemap.c + @$(cc) $(cflagsBuild) /DTILETEXT -Fo$@ $(WSHR)\tilemap.c $(O)gifread.o: $(WSHR)\gifread.c $(CONFIG_H) $(TILE_H) - @$(CC) $(cflagsUtil) -I$(WSHR) -Fo$@ $(WSHR)\gifread.c + @$(cc) $(cflagsBuild) -I$(WSHR) -Fo$@ $(WSHR)\gifread.c $(O)gifrd32.o: $(WSHR)\gifread.c $(CONFIG_H) $(TILE_H) - @$(CC) $(cflagsUtil) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\gifread.c + @$(cc) $(cflagsBuild) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\gifread.c $(O)ppmwrite.o: $(WSHR)\ppmwrite.c $(CONFIG_H) $(TILE_H) - @$(CC) $(cflagsUtil) -I$(WSHR) -Fo$@ $(WSHR)\ppmwrite.c + @$(cc) $(cflagsBuild) -I$(WSHR) -Fo$@ $(WSHR)\ppmwrite.c $(O)tiletext.o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H) - @$(CC) $(cflagsUtil) -I$(WSHR) -Fo$@ $(WSHR)\tiletext.c + @$(cc) $(cflagsBuild) -I$(WSHR) -Fo$@ $(WSHR)\tiletext.c $(O)tilete32.o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H) - @$(CC) $(cflagsUtil) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tiletext.c + @$(cc) $(cflagsBuild) -I$(WSHR) /DTILE_X=32 /DTILE_Y=32 -Fo$@ $(WSHR)\tiletext.c #========================================== # Optional Tile Utilities @@ -1126,7 +1067,7 @@ $(O)tilete32.o: $(WSHR)\tiletext.c $(CONFIG_H) $(TILE_H) $(U)gif2txt.exe: $(GIFREADERS) $(TEXT_IO) @echo Linking $@ - @$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk $(GIFREADERS:^ =^ ) $(TEXT_IO:^ =^ @@ -1135,7 +1076,7 @@ $(U)gif2txt.exe: $(GIFREADERS) $(TEXT_IO) $(U)gif2tx32.exe: $(GIFREADERS32) $(TEXT_IO32) @echo Linking $@ - @$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk $(GIFREADERS32:^ =^ ) $(TEXT_IO32:^ =^ @@ -1144,14 +1085,13 @@ $(U)gif2tx32.exe: $(GIFREADERS32) $(TEXT_IO32) $(U)txt2ppm.exe: $(PPMWRITERS) $(TEXT_IO) @echo Linking $@ - @$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk $(PPMWRITERS:^ =^ ) $(TEXT_IO:^ =^ ) << -!IF "$(GRAPHICAL)"=="Y" $(TILEBMP16): $(TILEUTIL16) $(TILEFILES) @echo Creating 16x16 binary tile files (this may take some time) @$(U)tile2bmp $(TILEBMP16) @@ -1159,14 +1099,10 @@ $(TILEBMP16): $(TILEUTIL16) $(TILEFILES) # @echo Creating 32x32 binary tile files (this may take some time) # @$(U)til2bm32 $(TILEBMP32) -!ELSE -$(TILEBMP16): -$(TILEBMP32): -!ENDIF $(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO) @echo Linking $@ - @$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk $(O)tile2bmp.o $(TEXT_IO:^ =^ ) @@ -1174,17 +1110,17 @@ $(U)tile2bmp.exe: $(O)tile2bmp.o $(TEXT_IO) $(U)til2bm32.exe: $(O)til2bm32.o $(TEXT_IO32) @echo Linking $@ - @$(link) $(lflagsUtil) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk + @$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ @<<$(@B).lnk $(O)til2bm32.o $(TEXT_IO32:^ =^ ) << $(O)tile2bmp.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(INCL)\win32api.h - @$(CC) $(cflagsUtil) -I$(WSHR) /DPACKED_FILE /Fo$@ $(WSHR)\tile2bmp.c + @$(cc) $(cflagsBuild) -I$(WSHR) /DPACKED_FILE /Fo$@ $(WSHR)\tile2bmp.c $(O)til2bm32.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(INCL)\win32api.h - @$(CC) $(cflagsUtil) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c + @$(cc) $(cflagsBuild) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c #========================================== # Housekeeping @@ -1305,10 +1241,8 @@ clean: rem nmake -nologo -f ..\win\win32\dgnstuff.mak clean -! IF ("$(WINPFLAG)"!="") if exist $(TILEBMP16) del $(TILEBMP16) if exist $(TILEBMP32) del $(TILEBMP32) -! ENDIF #=================================================================== # OTHER DEPENDENCIES @@ -1341,20 +1275,37 @@ $(DAT)\dungeon: $(O)utility.tag $(DAT)\dungeon.def # $(O)nttty.o: $(HACK_H) $(TILE_H) $(INCL)\win32api.h $(MSWSYS)\nttty.c - @$(CC) $(cflagsUtil) -I$(WSHR) -Fo$@ $(MSWSYS)\nttty.c -$(O)nhkeys.o: $(HACK_H) $(TILE_H) $(INCL)\win32api.h $(MSWSYS)\nhkeys.c - @$(CC) $(cflagsUtil) -I$(WSHR) -Fo$@ $(MSWSYS)\nhkeys.c + @$(cc) $(cflagsBuild) -I$(WSHR) -Fo$@ $(MSWSYS)\nttty.c $(O)winnt.o: $(HACK_H) $(INCL)\win32api.h $(MSWSYS)\winnt.c - @$(CC) $(cflagsUtil) -Fo$@ $(MSWSYS)\winnt.c + @$(cc) $(cflagsBuild) -Fo$@ $(MSWSYS)\winnt.c $(O)ntsound.o: $(HACK_H) $(MSWSYS)\ntsound.c - @$(CC) $(cflagsUtil) -Fo$@ $(MSWSYS)\ntsound.c + @$(cc) $(cflagsBuild) -Fo$@ $(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) $(cflagsBuild) -DGUISTUB -Fo$@ $(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)\stubs.c + @$(cc) $(cflagsBuild) -DTTYSTUB -Fo$@ $(MSWSYS)\stubs.c # # util dependencies # $(O)panic.o: $(U)panic.c $(CONFIG_H) - @$(CC) $(cflagsUtil) -Fo$@ $(U)panic.c + @$(cc) $(cflagsBuild) -Fo$@ $(U)panic.c + +# +# sys/share dependencies +# + +(O)cppregex.o: $(O)cppregex.cpp $(HACK_H) + @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\cppregex.cpp # # The rest are stolen from sys/unix/Makefile.src, @@ -1362,7 +1313,7 @@ $(O)panic.o: $(U)panic.c $(CONFIG_H) # * ../include changed to $(INCL) # * slashes changed to back-slashes # * -c (which is included in CFLAGS) substituted with -Fo$@ -# * $(CFLAGS) replaced with $(cFlagsUtil) +# * $(CFLAGS) replaced with $(cflagsBuild) # * $(CC) replaced with @$(CC) # * targets prefixed with $(O) # * the single win32api.h reference uncommented @@ -1372,116 +1323,116 @@ $(O)panic.o: $(U)panic.c $(CONFIG_H) # $(O)tos.o: ..\sys\atari\tos.c $(HACK_H) $(INCL)\tcap.h - @$(CC) $(cflagsUtil) -Fo$@ ..\sys\atari\tos.c + @$(CC) $(cflagsBuild) -Fo$@ ..\sys\atari\tos.c $(O)pcmain.o: ..\sys\share\pcmain.c $(HACK_H) $(INCL)\dlb.h \ $(INCL)\win32api.h - @$(CC) $(cflagsUtil) -Fo$@ ..\sys\share\pcmain.c + @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\pcmain.c $(O)pcsys.o: ..\sys\share\pcsys.c $(HACK_H) - @$(CC) $(cflagsUtil) -Fo$@ ..\sys\share\pcsys.c + @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\pcsys.c $(O)pctty.o: ..\sys\share\pctty.c $(HACK_H) - @$(CC) $(cflagsUtil) -Fo$@ ..\sys\share\pctty.c + @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\pctty.c $(O)pcunix.o: ..\sys\share\pcunix.c $(HACK_H) - @$(CC) $(cflagsUtil) -Fo$@ ..\sys\share\pcunix.c + @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\pcunix.c $(O)random.o: ..\sys\share\random.c $(HACK_H) - @$(CC) $(cflagsUtil) -Fo$@ ..\sys\share\random.c + @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\random.c $(O)ioctl.o: ..\sys\share\ioctl.c $(HACK_H) $(INCL)\tcap.h - @$(CC) $(cflagsUtil) -Fo$@ ..\sys\share\ioctl.c + @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\ioctl.c $(O)unixtty.o: ..\sys\share\unixtty.c $(HACK_H) - @$(CC) $(cflagsUtil) -Fo$@ ..\sys\share\unixtty.c + @$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\unixtty.c $(O)unixmain.o: ..\sys\unix\unixmain.c $(HACK_H) $(INCL)\dlb.h - @$(CC) $(cflagsUtil) -Fo$@ ..\sys\unix\unixmain.c + @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixmain.c $(O)unixunix.o: ..\sys\unix\unixunix.c $(HACK_H) - @$(CC) $(cflagsUtil) -Fo$@ ..\sys\unix\unixunix.c + @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixunix.c $(O)unixres.o: ..\sys\unix\unixres.c $(CONFIG_H) - @$(CC) $(cflagsUtil) -Fo$@ ..\sys\unix\unixres.c + @$(CC) $(cflagsBuild) -Fo$@ ..\sys\unix\unixres.c $(O)bemain.o: ..\sys\be\bemain.c $(HACK_H) $(INCL)\dlb.h - @$(CC) $(cflagsUtil) -Fo$@ ..\sys\be\bemain.c + @$(CC) $(cflagsBuild) -Fo$@ ..\sys\be\bemain.c $(O)getline.o: ..\win\tty\getline.c $(HACK_H) $(INCL)\func_tab.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\tty\getline.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\getline.c $(O)termcap.o: ..\win\tty\termcap.c $(HACK_H) $(INCL)\tcap.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\tty\termcap.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\termcap.c $(O)topl.o: ..\win\tty\topl.c $(HACK_H) $(INCL)\tcap.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\tty\topl.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\topl.c $(O)wintty.o: ..\win\tty\wintty.c $(HACK_H) $(INCL)\dlb.h $(INCL)\tcap.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\tty\wintty.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\tty\wintty.c $(O)Window.o: ..\win\X11\Window.c $(INCL)\xwindowp.h $(INCL)\xwindow.h \ $(CONFIG_H) - @$(CC) $(cflagsUtil) -Fo$@ ..\win\X11\Window.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\Window.c $(O)dialogs.o: ..\win\X11\dialogs.c $(CONFIG_H) - @$(CC) $(cflagsUtil) -Fo$@ ..\win\X11\dialogs.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\dialogs.c $(O)winX.o: ..\win\X11\winX.c $(HACK_H) $(INCL)\winX.h $(INCL)\dlb.h \ ..\win\X11\nh72icon ..\win\X11\nh56icon ..\win\X11\nh32icon - @$(CC) $(cflagsUtil) -Fo$@ ..\win\X11\winX.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winX.c $(O)winmap.o: ..\win\X11\winmap.c $(INCL)\xwindow.h $(HACK_H) $(INCL)\dlb.h \ $(INCL)\winX.h $(INCL)\tile2x11.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\X11\winmap.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmap.c $(O)winmenu.o: ..\win\X11\winmenu.c $(HACK_H) $(INCL)\winX.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\X11\winmenu.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmenu.c $(O)winmesg.o: ..\win\X11\winmesg.c $(INCL)\xwindow.h $(HACK_H) $(INCL)\winX.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\X11\winmesg.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmesg.c $(O)winmisc.o: ..\win\X11\winmisc.c $(HACK_H) $(INCL)\func_tab.h \ $(INCL)\winX.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\X11\winmisc.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winmisc.c $(O)winstat.o: ..\win\X11\winstat.c $(HACK_H) $(INCL)\winX.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\X11\winstat.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winstat.c $(O)wintext.o: ..\win\X11\wintext.c $(HACK_H) $(INCL)\winX.h $(INCL)\xwindow.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\X11\wintext.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\wintext.c $(O)winval.o: ..\win\X11\winval.c $(HACK_H) $(INCL)\winX.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\X11\winval.c -$(O)tile.o: tile.c $(HACK_H) + @$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\winval.c +$(O)tile.o: $(SRC)\tile.c $(HACK_H) $(O)gnaskstr.o: ..\win\gnome\gnaskstr.c ..\win\gnome\gnaskstr.h \ ..\win\gnome\gnmain.h - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gnaskstr.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnaskstr.c $(O)gnbind.o: ..\win\gnome\gnbind.c ..\win\gnome\gnbind.h ..\win\gnome\gnmain.h \ ..\win\gnome\gnmenu.h ..\win\gnome\gnaskstr.h \ ..\win\gnome\gnyesno.h - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gnbind.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnbind.c $(O)gnglyph.o: ..\win\gnome\gnglyph.c ..\win\gnome\gnglyph.h $(INCL)\tile2x11.h - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gnglyph.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnglyph.c $(O)gnmain.o: ..\win\gnome\gnmain.c ..\win\gnome\gnmain.h ..\win\gnome\gnsignal.h \ ..\win\gnome\gnbind.h ..\win\gnome\gnopts.h $(HACK_H) \ $(INCL)\date.h - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmain.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmain.c $(O)gnmap.o: ..\win\gnome\gnmap.c ..\win\gnome\gnmap.h ..\win\gnome\gnglyph.h \ ..\win\gnome\gnsignal.h $(HACK_H) - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmap.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmap.c $(O)gnmenu.o: ..\win\gnome\gnmenu.c ..\win\gnome\gnmenu.h ..\win\gnome\gnmain.h \ ..\win\gnome\gnbind.h $(INCL)\func_tab.h - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmenu.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmenu.c $(O)gnmesg.o: ..\win\gnome\gnmesg.c ..\win\gnome\gnmesg.h ..\win\gnome\gnsignal.h - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmesg.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnmesg.c $(O)gnopts.o: ..\win\gnome\gnopts.c ..\win\gnome\gnopts.h ..\win\gnome\gnglyph.h \ ..\win\gnome\gnmain.h ..\win\gnome\gnmap.h $(HACK_H) - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gnopts.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnopts.c $(O)gnplayer.o: ..\win\gnome\gnplayer.c ..\win\gnome\gnplayer.h \ ..\win\gnome\gnmain.h $(HACK_H) - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gnplayer.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnplayer.c $(O)gnsignal.o: ..\win\gnome\gnsignal.c ..\win\gnome\gnsignal.h \ ..\win\gnome\gnmain.h - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gnsignal.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnsignal.c $(O)gnstatus.o: ..\win\gnome\gnstatus.c ..\win\gnome\gnstatus.h \ ..\win\gnome\gnsignal.h ..\win\gnome\gn_xpms.h \ ..\win\gnome\gnomeprv.h - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gnstatus.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnstatus.c $(O)gntext.o: ..\win\gnome\gntext.c ..\win\gnome\gntext.h ..\win\gnome\gnmain.h \ ..\win\gnome\gn_rip.h - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gntext.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gntext.c $(O)gnyesno.o: ..\win\gnome\gnyesno.c ..\win\gnome\gnbind.h ..\win\gnome\gnyesno.h - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gnyesno.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnyesno.c $(O)gnworn.o: ..\win\gnome\gnworn.c ..\win\gnome\gnworn.h ..\win\gnome\gnglyph.h \ ..\win\gnome\gnsignal.h ..\win\gnome\gnomeprv.h - @$(CC) $(cflagsUtil) $(GNOMEINC) -Fo$@ ..\win\gnome\gnworn.c + @$(CC) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnworn.c $(O)wingem.o: ..\win\gem\wingem.c $(HACK_H) $(INCL)\func_tab.h $(INCL)\dlb.h \ $(INCL)\patchlevel.h $(INCL)\wingem.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\gem\wingem.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\wingem.c $(O)wingem1.o: ..\win\gem\wingem1.c $(INCL)\gem_rsc.h $(INCL)\load_img.h \ $(INCL)\gr_rect.h $(INCL)\wintype.h $(INCL)\wingem.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\gem\wingem1.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\wingem1.c $(O)load_img.o: ..\win\gem\load_img.c $(INCL)\load_img.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\gem\load_img.c + @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\load_img.c $(O)gr_rect.o: ..\win\gem\gr_rect.c $(INCL)\gr_rect.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\gem\gr_rect.c -$(O)tile.o: tile.c $(HACK_H) + @$(CC) $(cflagsBuild) -Fo$@ ..\win\gem\gr_rect.c +$(O)tile.o: $(SRC)\tile.c $(HACK_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)\qt_win.h $(INCL)\qt_clust.h $(INCL)\qt_kde0.h \ @@ -1492,11 +1443,11 @@ $(O)qt_clust.o: ..\win\Qt\qt_clust.cpp $(INCL)\qt_clust.h $(O)qttableview.o: ..\win\Qt\qttableview.cpp $(INCL)\qttableview.h $(CXX) $(CXXFLAGS) -Fo$@ ..\win\Qt\qttableview.cpp $(O)wc_chainin.o: ..\win\chain\wc_chainin.c $(HACK_H) - @$(CC) $(cflagsUtil) -Fo$@ ..\win\chain\wc_chainin.c + @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_chainin.c $(O)wc_chainout.o: ..\win\chain\wc_chainout.c $(HACK_H) - @$(CC) $(cflagsUtil) -Fo$@ ..\win\chain\wc_chainout.c + @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_chainout.c $(O)wc_trace.o: ..\win\chain\wc_trace.c $(HACK_H) $(INCL)\func_tab.h - @$(CC) $(cflagsUtil) -Fo$@ ..\win\chain\wc_trace.c + @$(cc) $(cflagsBuild) -Fo$@ ..\win\chain\wc_trace.c $(O)monstr.o: monstr.c $(CONFIG_H) $(O)vis_tab.o: vis_tab.c $(CONFIG_H) $(INCL)\vis_tab.h $(O)allmain.o: allmain.c $(HACK_H) diff --git a/sys/winnt/nhsetup.bat b/sys/winnt/nhsetup.bat index 6bb9a45f0..82bd27ee6 100755 --- a/sys/winnt/nhsetup.bat +++ b/sys/winnt/nhsetup.bat @@ -1,15 +1,45 @@ @REM NetHack 3.6 nhsetup.bat $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ @REM NetHack 3.6 nhsetup.bat $Date: 2010/09/05 14:22:16 $ $Revision: 1.21 $ */ -@REM Copyright (c) NetHack PC Development Team 1993-2010 +@REM Copyright (c) NetHack PC Development Team 1993-2015 @REM NetHack may be freely redistributed. See license for details. @REM Win32 setup batch file, see Install.nt for details @REM @echo off +pushd %~dp0 +set WIN32PATH=..\..\win\win32 +set BUILDPATH=..\..\build +set BINPATH=..\..\binary +set VCDir= -set _pause= +:studiocheck +@REM Set fallbacks here for 32-bit VS2010 +SET REGTREE=HKLM\Software\Microsoft\VCExpress\12.0\Setup\VC +SET MSVCVERSION=2010 + +@REM if we're in a 64-bit cmd prompt, gotta include Wow6432Node +echo Checking for 64-bit environment... +if "%ProgramFiles%" NEQ "%ProgramFiles(x86)%" SET REGTREE=HKLM\Software\Wow6432Node\Microsoft\VCExpress\12.0\Setup\VC + +@REM i can see your house from here... or at least your VC++ folder +echo Checking version of VC++ installed... +echo Checking for VC2013 Express... +for /f "usebackq skip=2 tokens=1-2*" %%a IN (`reg query %REGTREE% /v ProductDir`) do @set VCDir="%%c" +if not defined VCDir goto :othereditions +if not exist %VCDir% goto :othereditions + +set MSVCVERSION=2013 +goto :fallback + +:othereditions +@REM TODO: teach ourselves to detect full versions of Studio, which are under a different registry hive +echo VC2013 Express not found; dropping back. + +:fallback +echo Using VS%MSVCVERSION%. +set SRCPATH=%WIN32PATH%\vs%MSVCVERSION% :nxtcheck -echo Checking to see if directories are set up properly +echo Checking to see if directories are set up properly... if not exist ..\..\include\hack.h goto :err_dir if not exist ..\..\src\hack.c goto :err_dir if not exist ..\..\dat\wizard.des goto :err_dir @@ -18,9 +48,9 @@ if not exist ..\..\sys\winnt\winnt.c goto :err_dir echo Directories look ok. :do_tty -if NOT exist ..\..\binary\*.* mkdir ..\..\binary -if NOT exist ..\..\binary\license copy ..\..\dat\license ..\..\binary\license >nul -echo Copying Microsoft Makefile - Makefile.msc to ..\..\src\Makefile. +if NOT exist %BINPATH%\*.* mkdir %BINPATH% +if NOT exist %BINPATH%\license copy ..\..\dat\license %BINPATH%\license >nul +echo Copying Microsoft Makefile - Makefile.msc to ..\..\src\Makefile... if NOT exist ..\..\src\Makefile goto :domsc copy ..\..\src\Makefile ..\..\src\Makefile-orig >nul echo Your existing @@ -31,7 +61,7 @@ echo ..\..\src\Makefile-orig copy Makefile.msc ..\..\src\Makefile >nul echo Microsoft Makefile copied ok. -echo Copying Borland Makefile - Makefile.bcc to ..\..\src\Makefile.bcc +echo Copying Borland Makefile - Makefile.bcc to ..\..\src\Makefile.bcc... if NOT exist ..\..\src\Makefile.bcc goto :dobor copy ..\..\src\Makefile.bcc ..\..\src\Makefile.bcc-orig >nul echo Your existing @@ -42,7 +72,7 @@ echo ..\..\src\Makefile.bcc-orig copy Makefile.bcc ..\..\src\Makefile.bcc >nul echo Borland Makefile copied ok. -echo Copying MinGW Makefile - Makefile.gcc to ..\..\src\Makefile.gcc +echo Copying MinGW Makefile - Makefile.gcc to ..\..\src\Makefile.gcc... if NOT exist ..\..\src\Makefile.gcc goto :dogcc copy ..\..\src\Makefile.gcc ..\..\src\Makefile.gcc-orig >nul echo Your existing @@ -54,61 +84,75 @@ copy Makefile.gcc ..\..\src\Makefile.gcc >nul echo MinGW Makefile copied ok. :do_win -if not exist ..\..\win\win32\nethack.sln goto :err_win +if not exist %SRCPATH%\nethack.sln goto :err_win echo. -if exist ..\..\build\*.* goto projectcopy +if exist %BUILDPATH%\*.* goto projectcopy -echo Creating ..\..\build directory -mkdir ..\..\build +echo Creating %BUILDPATH% directory... +mkdir %BUILDPATH% :projectcopy @REM Visual Studio Express solution file -if NOT exist ..\..\win\win32\nethack.sln goto skipsoln -echo Copying ..\..\win\win32\nethack.sln ..\..\nethack.sln -copy ..\..\win\win32\nethack.sln ..\.. >nul +if NOT exist %SRCPATH%\nethack.sln goto skipsoln +echo Copying %SRCPATH%\nethack.sln to ..\..\nethack.sln... +copy %SRCPATH%\nethack.sln ..\.. >nul :skipsoln -if NOT exist ..\..\binary\*.* echo Creating ..\..\binary directory -if NOT exist ..\..\binary\*.* mkdir ..\..\binary -if NOT exist ..\..\binary\license copy ..\..\dat\license ..\..\binary\license >nul +if NOT exist %BINPATH%\*.* echo Creating %BINPATH% directory... +if NOT exist %BINPATH%\*.* mkdir %BINPATH% +if NOT exist %BINPATH%\license copy ..\..\dat\license %BINPATH%\license >nul -echo Copying Visual C project files to ..\..\build directory +echo Copying Visual C project files to %BUILDPATH% directory... -copy ..\..\win\win32\dgnstuff.mak ..\..\build >nul -copy ..\..\win\win32\levstuff.mak ..\..\build >nul -copy ..\..\win\win32\tiles.mak ..\..\build >nul +copy %WIN32PATH%\dgnstuff.mak %BUILDPATH% >nul +copy %WIN32PATH%\levstuff.mak %BUILDPATH% >nul +copy %WIN32PATH%\tiles.mak %BUILDPATH% >nul +@REM Visual C++ 201X Express project files +:vcexpress +if NOT exist %SRCPATH%\makedefs.vcxproj goto skipvcexpress +if NOT exist %SRCPATH%\tile2bmp.vcxproj goto skipvcexpress +if NOT exist %SRCPATH%\tilemap.vcxproj goto skipvcexpress +if NOT exist %SRCPATH%\uudecode.vcxproj goto skipvcexpress +if NOT exist %SRCPATH%\NetHackW.vcxproj goto skipvcexpress +if NOT exist %SRCPATH%\NetHack.vcxproj goto skipvcexpress +if NOT exist %SRCPATH%\dgncomp.vcxproj goto skipvcexpress +if NOT exist %SRCPATH%\dgnstuff.vcxproj goto skipvcexpress +if NOT exist %SRCPATH%\dlb_main.vcxproj goto skipvcexpress +if NOT exist %SRCPATH%\levcomp.vcxproj goto skipvcexpress +if NOT exist %SRCPATH%\levstuff.vcxproj goto skipvcexpress +if NOT exist %SRCPATH%\recover.vcxproj goto skipvcexpress +if NOT exist %SRCPATH%\tiles.vcxproj goto skipvcexpress +if NOT exist %SRCPATH%\nhdefkey.vcxproj goto skipvcexpress -@REM Visual C++ 2010 Express project files -:VC2010 -if NOT exist ..\..\win\win32\makedefs.vcxproj goto skipVC2010 -if NOT exist ..\..\win\win32\tile2bmp.vcxproj goto skipVC2010 -if NOT exist ..\..\win\win32\tilemap.vcxproj goto skipVC2010 -if NOT exist ..\..\win\win32\uudecode.vcxproj goto skipVC2010 -if NOT exist ..\..\win\win32\NetHackW.vcxproj goto skipVC2010 -if NOT exist ..\..\win\win32\dgncomp.vcxproj goto skipVC2010 -if NOT exist ..\..\win\win32\dgnstuff.vcxproj goto skipVC2010 -if NOT exist ..\..\win\win32\dlb_main.vcxproj goto skipVC2010 -if NOT exist ..\..\win\win32\levcomp.vcxproj goto skipVC2010 -if NOT exist ..\..\win\win32\levstuff.vcxproj goto skipVC2010 -if NOT exist ..\..\win\win32\recover.vcxproj goto skipVC2010 -if NOT exist ..\..\win\win32\tiles.vcxproj goto skipVC2010 +copy %SRCPATH%\makedefs.vcxproj %BUILDPATH% >nul +copy %SRCPATH%\tile2bmp.vcxproj %BUILDPATH% >nul +copy %SRCPATH%\tilemap.vcxproj %BUILDPATH% >nul +copy %SRCPATH%\uudecode.vcxproj %BUILDPATH% >nul +copy %SRCPATH%\NetHackW.vcxproj %BUILDPATH% >nul +copy %SRCPATH%\NetHack.vcxproj %BUILDPATH% >nul +copy %SRCPATH%\dgncomp.vcxproj %BUILDPATH% >nul +copy %SRCPATH%\dgnstuff.vcxproj %BUILDPATH% >nul +copy %SRCPATH%\dlb_main.vcxproj %BUILDPATH% >nul +copy %SRCPATH%\levcomp.vcxproj %BUILDPATH% >nul +copy %SRCPATH%\levstuff.vcxproj %BUILDPATH% >nul +copy %SRCPATH%\recover.vcxproj %BUILDPATH% >nul +copy %SRCPATH%\tiles.vcxproj %BUILDPATH% >nul +copy %SRCPATH%\nhdefkey.vcxproj %BUILDPATH% >nul +echo LIBRARY nhdefkey >%BUILDPATH%\nhdefkey64.def +echo LIBRARY nhdefkey >%BUILDPATH%\nhdefkey.def +echo EXPORTS >>%BUILDPATH%\nhdefkey.def +echo ProcessKeystroke >>%BUILDPATH%\nhdefkey.def +echo NHkbhit >>%BUILDPATH%\nhdefkey.def +echo CheckInput >>%BUILDPATH%\nhdefkey.def +echo SourceWhere >>%BUILDPATH%\nhdefkey.def +echo SourceAuthor >>%BUILDPATH%\nhdefkey.def +echo KeyHandlerName >>%BUILDPATH%\nhdefkey.def -copy ..\..\win\win32\makedefs.vcxproj ..\..\build >nul -copy ..\..\win\win32\tile2bmp.vcxproj ..\..\build >nul -copy ..\..\win\win32\tilemap.vcxproj ..\..\build >nul -copy ..\..\win\win32\uudecode.vcxproj ..\..\build >nul -copy ..\..\win\win32\NetHackW.vcxproj ..\..\build >nul -copy ..\..\win\win32\dgncomp.vcxproj ..\..\build >nul -copy ..\..\win\win32\dgnstuff.vcxproj ..\..\build >nul -copy ..\..\win\win32\dlb_main.vcxproj ..\..\build >nul -copy ..\..\win\win32\levcomp.vcxproj ..\..\build >nul -copy ..\..\win\win32\levstuff.vcxproj ..\..\build >nul -copy ..\..\win\win32\recover.vcxproj ..\..\build >nul -copy ..\..\win\win32\tiles.vcxproj ..\..\build >nul -:skipVC2010 +echo Done copying files. +:skipvcexpress goto :done @@ -138,8 +182,8 @@ echo. :fini :end -set _pause=Y -if "%0"=="nhsetup" set _pause=N -if "%0"=="NHSETUP" set _pause=N +set _pause=N +for %%x in (%cmdcmdline%) do if /i "%%~x"=="/c" set _pause=Y if "%_pause%"=="Y" pause set _pause= +popd diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 457ae628c..10b0749bf 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -1,7 +1,4 @@ -/* NetHack 3.6 nttty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ -/* NetHack 3.6 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 $Date: 2009/05/06 10:53:34 $ */ +/* NetHack 3.6 nttty.c $NHDT-Date: 1430988888 2015/05/07 08:54:48 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.61 $ */ /* Copyright (c) NetHack PC Development Team 1993 */ /* NetHack may be freely redistributed. See license for details. */ @@ -15,7 +12,7 @@ * */ -#ifdef WIN32CON +#ifdef WIN32 #define NEED_VARARGS /* Uses ... */ #include "hack.h" #include "wintty.h" @@ -273,35 +270,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 -nttty_open() +nttty_open(mode) +int mode; { HANDLE hStdOut; DWORD cmode; long mask; - load_keyboard_handler(); - /* Initialize the function pointer that points to - * the kbhit() equivalent, in this TTY case nttty_kbhit() - */ - nt_kbhit = nttty_kbhit; - - /* The following 6 lines of code were suggested by +try: + /* The following lines of code were suggested by * Bob Landau of Microsoft WIN32 Developer support, * as the only current means of determining whether * we were launched from the command prompt, or from * the NT program manager. M. Allison */ - hStdOut = GetStdHandle( STD_OUTPUT_HANDLE ); - GetConsoleScreenBufferInfo( hStdOut, &origcsbi); - GUILaunched = ((origcsbi.dwCursorPosition.X == 0) && - (origcsbi.dwCursorPosition.Y == 0)); - if ((origcsbi.dwSize.X <= 0) || (origcsbi.dwSize.Y <= 0)) - GUILaunched = 0; + hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); + if (hStdOut) { + GetConsoleScreenBufferInfo(hStdOut, &origcsbi); + GUILaunched = ((origcsbi.dwCursorPosition.X == 0) && + (origcsbi.dwCursorPosition.Y == 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 */ - hConIn = GetStdHandle(STD_INPUT_HANDLE); + if (!hStdOut && !hStdIn) { + /* 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); #if 0 hConIn = CreateFile("CONIN$", @@ -1041,7 +1056,7 @@ msmsg VA_DECL(const char *, fmt) /* fatal error */ /*VARARGS1*/ void -error VA_DECL(const char *,s) +nttty_error VA_DECL(const char *,s) char buf[BUFSZ]; VA_START(s); VA_INIT(s, const char *); @@ -1445,4 +1460,4 @@ GetConsoleHwnd(void) return hwndFound; } # endif /*CHANGE_COLOR*/ -#endif /* WIN32CON */ +#endif /* WIN32 */ diff --git a/sys/winnt/stubs.c b/sys/winnt/stubs.c new file mode 100644 index 000000000..6b899a03e --- /dev/null +++ b/sys/winnt/stubs.c @@ -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 */ + diff --git a/sys/winnt/winnt.c b/sys/winnt/winnt.c index 893674cf4..4e27f63d8 100644 --- a/sys/winnt/winnt.c +++ b/sys/winnt/winnt.c @@ -1,7 +1,4 @@ -/* NetHack 3.6 winnt.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ -/* NetHack 3.6 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 $Date: 2012/01/15 19:11:41 $ */ +/* NetHack 3.6 winnt.c $NHDT-Date: 1430988900 2015/05/07 08:55:00 $ $NHDT-Branch: win32-x64-working $:$NHDT-Revision: 1.24 $ */ /* Copyright (c) NetHack PC Development Team 1993, 1994 */ /* NetHack may be freely redistributed. See license for details. */ @@ -20,9 +17,7 @@ #endif #include #include "win32api.h" -#ifdef WIN32CON #include "wintty.h" -#endif #ifdef WIN32 @@ -200,7 +195,7 @@ return &szFullPath[0]; } # endif -#ifndef WIN32CON + /* fatal error */ /*VARARGS1*/ void @@ -223,21 +218,17 @@ error VA_DECL(const char *,s) VA_END(); exit(EXIT_FAILURE); } -#endif void Delay(int ms) { (void)Sleep(ms); } -#ifdef WIN32CON extern void NDECL(backsp); -#endif void win32_abort() { if (wizard) { -# ifdef WIN32CON int c, ci, ct; if (!iflags.window_inited) @@ -260,7 +251,6 @@ void win32_abort() } if (c == 'y') DebugBreak(); -# endif } abort(); } diff --git a/util/makedefs.c b/util/makedefs.c index 1e2b8ec82..2a77c91f7 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1332,10 +1332,8 @@ static const char *build_opts[] = { # ifdef SCREEN_VGA "screen control via VGA graphics", # endif -# ifndef MSWIN_GRAPHICS -# ifdef WIN32CON +# ifdef WIN32CON "screen control via WIN32 console I/O", -# endif # endif #endif #ifdef SHELL diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 70f4dde72..4b681a0ea 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -111,7 +111,7 @@ struct window_procs tty_procs = { tty_start_screen, tty_end_screen, genl_outrip, -#if defined(WIN32CON) +#if defined(WIN32) nttty_preference_update, #else genl_preference_update, @@ -2208,12 +2208,12 @@ tty_putstr(window, attr, str) cw->data[cw->cury-1][++i] = '\0'; tty_putstr(window, attr, &str[i]); } - } break; } } + void tty_display_file(fname, complain) const char *fname; @@ -2906,7 +2906,7 @@ int dir; { if(dir != WININIT) return; # if defined(WIN32CON) - nttty_open(); + if (!strncmpi(windowprocs.name, "tty", 3)) nttty_open(0); # endif return; } diff --git a/win/win32/dgnstuff.mak b/win/win32/dgnstuff.mak index a23aadfd8..004a0621b 100644 --- a/win/win32/dgnstuff.mak +++ b/win/win32/dgnstuff.mak @@ -1,27 +1,22 @@ # $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ # $Date: 2002/01/22 22:54:54 $ $Revision: 1.3 $ -#Set all of these or none of them -#YACC = byacc.exe -#LEX = flex.exe -#YTABC = y_tab.c -#YTABH = y_tab.h -#LEXYYC = lexyy.c +# Set all of these or none of them. +# +# bison and flex are the ones found in GnuWin32, which +# is probably the easiest set of these tools to find +# on Windows. +# +#YACC = bison.exe -y +#LEX = flex.exe +#YTABC = y.tab.c +#YTABH = y.tab.h +#LEXYYC = lex.yy.c -!IF "$(YACC)"!="" -@echo Yacc-alike set to $(YACC) -@echo YTABC set to $(YTABC) -@echo YTABH set to $(YTABH) -!ENDIF - -!IF "$(LEX)"!="" -@echo Lex-alike set to $(LEX) -@echo LEXYYC set to $(LEXYYC) -!ENDIF default: all -all: ..\util\dgn_yacc.c ..\util\dgn_lex.c +all: tools ..\util\dgn_yacc.c ..\util\dgn_lex.c rebuild: clean all @@ -30,6 +25,19 @@ clean: -del ..\util\dgn_yacc.c -del ..\include\dgn_comp.h +tools: +!IFDEF YACC + @echo Yacc-alike set to $(YACC) + @echo YTABC set to $(YTABC) + @echo YTABH set to $(YTABH) +!ENDIF + +!IFDEF LEX + @echo Lex-alike set to $(LEX) + @echo LEXYYC set to $(LEXYYC) +!ENDIF + + #========================================== # Dungeon Compiler Stuff #========================================== diff --git a/win/win32/levstuff.mak b/win/win32/levstuff.mak index 2597e5eb7..7f549abcd 100644 --- a/win/win32/levstuff.mak +++ b/win/win32/levstuff.mak @@ -1,26 +1,18 @@ # $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ # $Date:2002/01/22 22:54:54 $ $Revision: 1.2 $ -#YACC = byacc.exe -#LEX = flex.exe -#YTABC = y_tab.c -#YTABH = y_tab.h -#LEXYYC = lexyy.c -!IF "$(YACC)"!="" -@echo Yacc-alike set to $(YACC) -@echo YTABC set to $(YTABC) -@echo YTABH set to $(YTABH) -!ENDIF +# Set all of these or none of them. +# +# bison and flex are the ones found in GnuWin32, which +# is probably the easiest set of these tools to find +# on Windows. +# +#YACC = bison.exe -y +#LEX = flex.exe +#YTABC = y.tab.c +#YTABH = y.tab.h +#LEXYYC = lex.yy.c -!IF "$(LEX)"!="" -@echo Lex-alike set to $(LEX) -@echo LEXYYC set to $(LEXYYC) -!ENDIF - -# these won't have an impact unless YACC/LEX are defined -YTABC = y.tab.c -YTABH = y.tab.h -LEXYYC = lex.yy.c default: all diff --git a/win/win32/mhaskyn.c b/win/win32/mhaskyn.c index e1a899291..d8a60ff3c 100644 --- a/win/win32/mhaskyn.c +++ b/win/win32/mhaskyn.c @@ -10,6 +10,9 @@ int mswin_yes_no_dialog( const char *question, const char *choices, int def) { + UNREFERENCED_PARAMETER(question); + UNREFERENCED_PARAMETER(choices); + UNREFERENCED_PARAMETER(def); return '\032'; } diff --git a/win/win32/mhdlg.c b/win/win32/mhdlg.c index 5818286f3..30f43d0fd 100644 --- a/win/win32/mhdlg.c +++ b/win/win32/mhdlg.c @@ -19,14 +19,9 @@ struct getlin_data { size_t result_size; }; -#ifdef _M_X64 -INT_PTR -#else -BOOL -#endif -CALLBACK GetlinDlgProc(HWND, UINT, WPARAM, LPARAM); +INT_PTR CALLBACK GetlinDlgProc(HWND, UINT, WPARAM, LPARAM); -INT_PTR mswin_getlin_window ( +int mswin_getlin_window ( const char *question, char *result, size_t result_size @@ -51,15 +46,10 @@ INT_PTR mswin_getlin_window ( ); if( ret==-1 ) panic("Cannot create getlin window"); - return ret; + return (int)ret; } -#ifdef _M_X64 -INT_PTR -#else -BOOL -#endif -CALLBACK GetlinDlgProc(HWND hWnd, UINT message, WPARAM wParam, LONG_PTR lParam) +INT_PTR CALLBACK GetlinDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { struct getlin_data* data; RECT main_rt, dlg_rt; @@ -79,7 +69,7 @@ CALLBACK GetlinDlgProc(HWND hWnd, UINT message, WPARAM wParam, LONG_PTR lParam) case WM_INITDIALOG: data = (struct getlin_data*)lParam; SetWindowText(hWnd, NH_A2W(data->question, wbuf, sizeof(wbuf))); - SetWindowLongPtr(hWnd, GWLP_USERDATA, lParam); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)data); /* center dialog in the main window */ GetWindowRect(hWnd, &dlg_rt); @@ -177,14 +167,9 @@ struct extcmd_data { int* selection; }; -#ifdef _M_X64 -INT_PTR -#else -BOOL -#endif -CALLBACK ExtCmdDlgProc(HWND, UINT, WPARAM, LPARAM); +INT_PTR CALLBACK ExtCmdDlgProc(HWND, UINT, WPARAM, LPARAM); -INT_PTR mswin_ext_cmd_window (int* selection) +int mswin_ext_cmd_window (int* selection) { INT_PTR ret; struct extcmd_data data; @@ -203,29 +188,22 @@ INT_PTR mswin_ext_cmd_window (int* selection) (LPARAM)&data ); if( ret==-1 ) panic("Cannot create extcmd window"); - return ret; + return (int)ret; } - -#ifdef _M_X64 -INT_PTR -#else -BOOL -#endif -CALLBACK ExtCmdDlgProc(HWND hWnd, UINT message, WPARAM wParam, LONG_PTR lParam) +INT_PTR CALLBACK ExtCmdDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { struct extcmd_data* data; RECT main_rt, dlg_rt; SIZE dlg_sz; int i; - const char *ptr; TCHAR wbuf[255]; switch (message) { case WM_INITDIALOG: data = (struct extcmd_data*)lParam; - SetWindowLongPtr(hWnd, GWLP_USERDATA, lParam); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)data); /* center dialog in the main window */ GetWindowRect(GetNHApp()->hMainWnd, &main_rt); @@ -245,8 +223,8 @@ CALLBACK ExtCmdDlgProc(HWND hWnd, UINT message, WPARAM wParam, LONG_PTR lParam) TRUE ); /* fill combobox with extended commands */ - for(i=0; (ptr=extcmdlist[i].ef_txt); i++) { - SendDlgItemMessage(hWnd, IDC_EXTCMD_LIST, LB_ADDSTRING, (WPARAM)0, (LPARAM)NH_A2W(ptr, wbuf, sizeof(wbuf)) ); + for(i=0; extcmdlist[i].ef_txt; i++) { + SendDlgItemMessage(hWnd, IDC_EXTCMD_LIST, LB_ADDSTRING, (WPARAM)0, (LPARAM)NH_A2W(extcmdlist[i].ef_txt, wbuf, sizeof(wbuf)) ); } /* set focus to the list control */ @@ -302,17 +280,12 @@ struct plsel_data { int* selection; }; -#ifdef _M_X64 -INT_PTR -#else -BOOL -#endif -CALLBACK PlayerSelectorDlgProc(HWND, UINT, WPARAM, LONG_PTR); +INT_PTR CALLBACK PlayerSelectorDlgProc(HWND, UINT, WPARAM, LPARAM); static void plselInitDialog(HWND hWnd); static void plselAdjustLists(HWND hWnd, int changed_opt); static int plselFinalSelection(HWND hWnd, int* selection); - INT_PTR mswin_player_selection_window ( int* selection ) +int mswin_player_selection_window ( int* selection ) { INT_PTR ret; struct plsel_data data; @@ -331,15 +304,10 @@ static int plselFinalSelection(HWND hWnd, int* selection); ); if( ret==-1 ) panic("Cannot create getlin window"); - return ret; + return (int)ret; } -#ifdef _M_X64 -INT_PTR -#else -BOOL -#endif -CALLBACK PlayerSelectorDlgProc(HWND hWnd, UINT message, WPARAM wParam, LONG_PTR lParam) +INT_PTR CALLBACK PlayerSelectorDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { struct plsel_data* data; RECT main_rt, dlg_rt; @@ -349,7 +317,7 @@ CALLBACK PlayerSelectorDlgProc(HWND hWnd, UINT message, WPARAM wParam, LONG_PTR { case WM_INITDIALOG: data = (struct plsel_data*)lParam; - SetWindowLongPtr(hWnd, GWLP_USERDATA, lParam); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)data); /* center dialog in the main window */ GetWindowRect(GetNHApp()->hMainWnd, &main_rt); @@ -705,6 +673,8 @@ int plselFinalSelection(HWND hWnd, int* selection) { LRESULT ind; + UNREFERENCED_PARAMETER(selection); + /* get current selections */ if( SendDlgItemMessage(hWnd, IDC_PLSEL_ROLE_RANDOM, BM_GETCHECK, 0, 0)==BST_CHECKED ) { flags.initrole = ROLE_RANDOM; diff --git a/win/win32/mhdlg.h b/win/win32/mhdlg.h index c641ccc71..39cb8edcd 100644 --- a/win/win32/mhdlg.h +++ b/win/win32/mhdlg.h @@ -10,9 +10,9 @@ #include "config.h" #include "global.h" -INT_PTR mswin_getlin_window (const char *question, char *result, size_t result_size); -INT_PTR mswin_ext_cmd_window (int* selection); -INT_PTR mswin_player_selection_window(int* selection); +int mswin_getlin_window (const char *question, char *result, size_t result_size); +int mswin_ext_cmd_window (int* selection); +int mswin_player_selection_window(int* selection); #endif /* MSWINDlgWindow_h */ diff --git a/win/win32/mhfont.c b/win/win32/mhfont.c index 911321d39..5b5c79737 100644 --- a/win/win32/mhfont.c +++ b/win/win32/mhfont.c @@ -25,7 +25,6 @@ static void __cdecl font_table_cleanup(void); void mswin_init_splashfonts(HWND hWnd) { HDC hdc = GetDC(hWnd); - HFONT fnt = NULL; LOGFONT lgfnt; ZeroMemory( &lgfnt, sizeof(lgfnt) ); lgfnt.lfHeight = -80; // height of font @@ -78,11 +77,12 @@ HGDIOBJ mswin_get_font(int win_type, int attr, HDC hdc, BOOL replace) switch(win_type) { case NHW_STATUS: - lgfnt.lfHeight = -iflags.wc_fontsiz_status*GetDeviceCaps(hdc, LOGPIXELSY)/72; // height of font + font_size = (attr==ATR_BOLD)? iflags.wc_fontsiz_status+1 : iflags.wc_fontsiz_status; + lgfnt.lfHeight = -font_size*GetDeviceCaps(hdc, LOGPIXELSY)/72; // height of font lgfnt.lfWidth = 0; // average character width lgfnt.lfEscapement = 0; // angle of escapement lgfnt.lfOrientation = 0; // base-line orientation angle - lgfnt.lfWeight = FW_BOLD; // font weight + lgfnt.lfWeight = (attr==ATR_BOLD)? FW_BOLD : FW_NORMAL; // font weight lgfnt.lfItalic = FALSE; // italic attribute option lgfnt.lfUnderline = FALSE; // underline attribute option lgfnt.lfStrikeOut = FALSE; // strikeout attribute option diff --git a/win/win32/mhmain.c b/win/win32/mhmain.c index 12c87c078..ea932371a 100644 --- a/win/win32/mhmain.c +++ b/win/win32/mhmain.c @@ -26,7 +26,7 @@ static TCHAR szMainWindowClass[] = TEXT("MSNHMainWndClass"); static TCHAR szTitle[MAX_LOADSTRING]; extern void mswin_display_splash_window(BOOL); -LRESULT CALLBACK MainWndProc(HWND, UINT, UINT, LPARAM); +LRESULT CALLBACK MainWndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM); static LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam); static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam); @@ -176,7 +176,7 @@ static const char scanmap[] = { /* ... */ // // PURPOSE: Processes messages for the main window. */ -LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, UINT wParam, LPARAM lParam) +LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { PNHMainWindow data; @@ -188,7 +188,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, UINT wParam, LPARAM lParam if( !data ) panic("out of memory"); ZeroMemory(data, sizeof(NHMainWindow)); data->mapAcsiiModeSave = MAP_MODE_ASCII12x16; - SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)data); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)data); /* update menu items */ CheckMenuItem( @@ -414,6 +414,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, UINT wParam, LPARAM lParam } } + } /* end switch */ } break; @@ -526,7 +527,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, UINT wParam, LPARAM lParam /* clean up */ free( (PNHMainWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA) ); - SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)0); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)0); // PostQuitMessage(0); exit(1); @@ -540,6 +541,10 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT message, UINT wParam, LPARAM lParam void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) { + UNREFERENCED_PARAMETER(hWnd); + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + switch(wParam) { /* new window was just added */ @@ -755,6 +760,8 @@ LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) int wmId, wmEvent; PNHMainWindow data; + UNREFERENCED_PARAMETER(lParam); + data = (PNHMainWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA); wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); @@ -809,7 +816,7 @@ LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) char* p; size_t len; HANDLE hglbCopy; - TCHAR* p_copy; + char* p_copy; p = nh_compose_ascii_screenshot(); if( !p ) return 0; @@ -822,18 +829,18 @@ LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) EmptyClipboard(); - hglbCopy = GlobalAlloc(GMEM_MOVEABLE, (len + 1) * sizeof(TCHAR)); + hglbCopy = GlobalAlloc(GMEM_MOVEABLE, (len + 1) * sizeof(char)); if (hglbCopy == NULL) { CloseClipboard(); return FALSE; } - p_copy = (TCHAR*)GlobalLock(hglbCopy); - NH_A2W( p, p_copy, len ); - p_copy[len] = (TCHAR) 0; // null character + p_copy = (char*)GlobalLock(hglbCopy); + strncpy(p_copy, p, len); + p_copy[len] = 0; // null character GlobalUnlock(hglbCopy); - SetClipboardData(CF_TEXT, hglbCopy); + SetClipboardData(SYMHANDLING(H_IBM)? CF_OEMTEXT : CF_TEXT, hglbCopy); CloseClipboard(); @@ -842,32 +849,34 @@ LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) case IDM_SETTING_SCREEN_TO_FILE: { OPENFILENAME ofn; - char filename[1024]; + TCHAR filename[1024]; + TCHAR whackdir[MAX_PATH]; FILE* pFile; char* text; + wchar_t* wtext; + int tlen = 0; ZeroMemory(filename, sizeof(filename)); ZeroMemory(&ofn, sizeof(ofn)); ofn.lStructSize = sizeof (OPENFILENAME); ofn.hwndOwner = hWnd; ofn.hInstance = GetNHApp()->hApp; - ofn.lpstrFilter = - "Text Files (*.txt)\x0*.txt\x0" - "All Files (*.*)\x0*.*\x0" - "\x0\x0"; + ofn.lpstrFilter = TEXT("Text Files (*.txt)\x0*.txt\x0") + TEXT("All Files (*.*)\x0*.*\x0") + TEXT("\x0\x0"); ofn.lpstrCustomFilter = NULL; ofn.nMaxCustFilter = 0; ofn.nFilterIndex = 1; ofn.lpstrFile = filename; - ofn.nMaxFile = sizeof(filename); + ofn.nMaxFile = SIZE(filename); ofn.lpstrFileTitle = NULL; ofn.nMaxFileTitle = 0; - ofn.lpstrInitialDir = hackdir; + ofn.lpstrInitialDir = NH_A2W(hackdir, whackdir, MAX_PATH); ofn.lpstrTitle = NULL; ofn.Flags = OFN_LONGNAMES | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST; ofn.nFileOffset = 0; ofn.nFileExtension = 0; - ofn.lpstrDefExt = "txt"; + ofn.lpstrDefExt = TEXT("txt"); ofn.lCustData = 0; ofn.lpfnHook = 0; ofn.lpTemplateName = 0; @@ -877,18 +886,23 @@ LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) text = nh_compose_ascii_screenshot(); if( !text ) return FALSE; - pFile = fopen(filename, "wb"); + pFile = _tfopen(filename, TEXT("wt+,ccs=UTF-8")); if( !pFile ) { - char buf[4096]; - sprintf(buf, "Cannot open %s for writing!", filename); + TCHAR buf[4096]; + _stprintf(buf, TEXT("Cannot open %s for writing!"), filename); NHMessageBox(hWnd, buf, MB_OK | MB_ICONERROR); free(text); return FALSE; } - fwrite(text, strlen(text), 1, pFile); + tlen = strlen(text); + wtext = (wchar_t*)malloc(tlen*sizeof(wchar_t)); + if( !wtext ) panic("out of memory"); + MultiByteToWideChar(NH_CODEPAGE,0,text,-1,wtext,tlen); + fwrite(wtext, tlen*sizeof(wchar_t), 1, pFile); fclose(pFile); free(text); + free(wtext); } break; case IDM_NHMODE: @@ -902,7 +916,7 @@ LRESULT onWMCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) mswin_destroy_reg(); /* Notify the user that windows settings will not be saved this time. */ NHMessageBox(GetNHApp()->hMainWnd, - "Your Windows Settings will not be stored when you exit this time.", + TEXT("Your Windows Settings will not be stored when you exit this time."), MB_OK | MB_ICONINFORMATION); break; } @@ -977,6 +991,8 @@ LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) RECT main_rt, dlg_rt; SIZE dlg_sz; + UNREFERENCED_PARAMETER(lParam); + switch (message) { case WM_INITDIALOG: @@ -1129,10 +1145,10 @@ void nhlock_windows( BOOL lock ) for( i=0; iwindowlist[i].win) && !GetNHApp()->windowlist[i].dead) { DWORD style; - style = (DWORD)GetWindowLongPtr(GetNHApp()->windowlist[i].win, GWL_STYLE); + style = GetWindowLong(GetNHApp()->windowlist[i].win, GWL_STYLE); if( lock ) style &= ~WS_CAPTION; else style |= WS_CAPTION; - SetWindowLongPtr(GetNHApp()->windowlist[i].win, GWL_STYLE, style); + SetWindowLong(GetNHApp()->windowlist[i].win, GWL_STYLE, style); SetWindowPos( GetNHApp()->windowlist[i].win, NULL, diff --git a/win/win32/mhmap.c b/win/win32/mhmap.c index 69533e2ad..8037898dc 100644 --- a/win/win32/mhmap.c +++ b/win/win32/mhmap.c @@ -302,6 +302,8 @@ int mswin_map_mode(HWND hWnd, int mode) mswin_map_stretch(hWnd, &mapSize, TRUE); + mswin_update_inventory(); /* for perm_invent to hide/show tiles */ + return oldMode; } @@ -412,7 +414,7 @@ LRESULT CALLBACK MapWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPara case WM_DESTROY: if( data->hMapFont ) DeleteObject(data->hMapFont); free(data); - SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)0); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)0); break; default: @@ -560,6 +562,9 @@ void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) PNHMapWindow data; int i,j; + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + /* set window data */ data = (PNHMapWindow)malloc(sizeof(NHMapWindow)); if( !data ) panic("out of memory"); @@ -575,7 +580,7 @@ void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) data->xScrTile = GetNHApp()->mapTile_X; data->yScrTile = GetNHApp()->mapTile_Y; - SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)data); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)data); } /* on WM_PAINT */ @@ -745,6 +750,8 @@ void onMSNH_VScroll(HWND hWnd, WPARAM wParam, LPARAM lParam) int yNewPos; int yDelta; + UNREFERENCED_PARAMETER(lParam); + /* get window data */ data = (PNHMapWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA); @@ -803,6 +810,8 @@ void onMSNH_HScroll(HWND hWnd, WPARAM wParam, LPARAM lParam) int xNewPos; int xDelta; + UNREFERENCED_PARAMETER(lParam); + /* get window data */ data = (PNHMapWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA); diff --git a/win/win32/mhmenu.c b/win/win32/mhmenu.c index d9e5ffc5b..679e44782 100644 --- a/win/win32/mhmenu.c +++ b/win/win32/mhmenu.c @@ -75,7 +75,7 @@ static WNDPROC editControlWndProc = NULL; #define NHMENU_IS_SELECTED(item) ((item).count!=0) #define NHMENU_HAS_GLYPH(item) ((item).glyph!=NO_GLYPH) -LRESULT CALLBACK MenuWndProc(HWND, UINT, WPARAM, LPARAM); +INT_PTR CALLBACK MenuWndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK NHMenuListWndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK NHMenuTextWndProc(HWND, UINT, WPARAM, LPARAM); static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam); @@ -122,9 +122,9 @@ HWND mswin_init_menu_window (int type) { if( !GetNHApp()->bWindowsLocked ) { DWORD style; - style = (DWORD)GetWindowLongPtr(ret, GWL_STYLE); + style = GetWindowLong(ret, GWL_STYLE); style |= WS_CAPTION; - SetWindowLongPtr(ret, GWL_STYLE, style); + SetWindowLong(ret, GWL_STYLE, style); SetWindowPos(ret, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); } @@ -247,7 +247,7 @@ int mswin_menu_window_select_menu (HWND hWnd, int how, MENU_ITEM_P ** _selected, return ret_val; } /*-----------------------------------------------------------------------------*/ -LRESULT CALLBACK MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { PNHMenuWindow data; HWND control; @@ -269,7 +269,7 @@ LRESULT CALLBACK MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar data->bmpCheckedCount = LoadBitmap(GetNHApp()->hApp, MAKEINTRESOURCE(IDB_MENU_SEL_COUNT)); data->bmpNotChecked = LoadBitmap(GetNHApp()->hApp, MAKEINTRESOURCE(IDB_MENU_UNSEL)); data->is_active = FALSE; - SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)data); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)data); /* set font for the text cotrol */ control = GetDlgItem(hWnd, IDC_MENU_TEXT); @@ -279,7 +279,7 @@ LRESULT CALLBACK MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar /* subclass edit control */ editControlWndProc = (WNDPROC)GetWindowLongPtr(control, GWLP_WNDPROC); - SetWindowLongPtr(control,GWLP_WNDPROC, (LONG)NHMenuTextWndProc); + SetWindowLongPtr(control, GWLP_WNDPROC, (LONG_PTR)NHMenuTextWndProc); /* Even though the dialog has no caption, you can still set the title which shows on Alt-Tab */ @@ -329,7 +329,7 @@ LRESULT CALLBACK MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar case WM_COMMAND: { switch (LOWORD(wParam)) - { + { case IDCANCEL: if( data->type == MENU_TYPE_MENU && (data->how==PICK_ONE || data->how==PICK_ANY) && @@ -354,14 +354,6 @@ LRESULT CALLBACK MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar data->done = 1; data->result = 0; return TRUE; - - case IDC_MENU_TEXT: - switch (HIWORD(wParam)) - { - case EN_SETFOCUS: - HideCaret((HWND)lParam); - return TRUE; - } } } break; @@ -477,7 +469,7 @@ LRESULT CALLBACK MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar SetTextColor(hdcEdit, text_fg_brush ? text_fg_color : (COLORREF)GetSysColor(DEFAULT_COLOR_FG_TEXT) ); - return (BOOL)(text_bg_brush + return (INT_PTR)(text_bg_brush ? text_bg_brush : SYSCLR_TO_BRUSH(DEFAULT_COLOR_BG_TEXT)); } } return FALSE; @@ -491,7 +483,7 @@ LRESULT CALLBACK MenuWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar if( data->text.text ) free(data->text.text); } free(data); - SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)0); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)0); } return TRUE; } @@ -809,7 +801,7 @@ void SetMenuListType(HWND hWnd, int how) /* install the hook for the control window procedure */ wndProcListViewOrig = (WNDPROC)GetWindowLongPtr(control, GWLP_WNDPROC); - SetWindowLongPtr(control, GWLP_WNDPROC, (LONG)NHMenuListWndProc); + SetWindowLongPtr(control, GWLP_WNDPROC, (LONG_PTR)NHMenuListWndProc); /* set control colors */ ListView_SetBkColor(control, @@ -873,6 +865,8 @@ BOOL onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam) RECT list_rect; int i; + UNREFERENCED_PARAMETER(wParam); + lpmis = (LPMEASUREITEMSTRUCT) lParam; data = (PNHMenuWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA); GetClientRect(GetMenuControl(hWnd), &list_rect); @@ -884,12 +878,11 @@ BOOL onMeasureItem(HWND hWnd, WPARAM wParam, LPARAM lParam) /* Set the height of the list box items to max height of the individual items */ for( i=0; imenu.size; i++) { if( NHMENU_HAS_GLYPH(data->menu.items[i]) && !IS_MAP_ASCII(iflags.wc_map_mode) ) { - lpmis->itemHeight = max( lpmis->itemHeight, (UINT)max(tm.tmHeight, GetNHApp()->mapTile_Y) ); + lpmis->itemHeight = max( lpmis->itemHeight, (UINT)max(tm.tmHeight, GetNHApp()->mapTile_Y)+2 ); } else { - lpmis->itemHeight = max( lpmis->itemHeight, (UINT)max(tm.tmHeight, TILE_Y) ); + lpmis->itemHeight = max( lpmis->itemHeight, (UINT)max(tm.tmHeight, TILE_Y)+2 ); } } - lpmis->itemHeight += 2; /* set width to the window width */ lpmis->itemWidth = list_rect.right - list_rect.left; @@ -920,6 +913,8 @@ BOOL onDrawItem(HWND hWnd, WPARAM wParam, LPARAM lParam) int color = NO_COLOR, attr; boolean menucolr = FALSE; + UNREFERENCED_PARAMETER(wParam); + lpdis = (LPDRAWITEMSTRUCT) lParam; /* If there are no list box items, skip this message. */ @@ -1460,10 +1455,10 @@ void mswin_menu_window_size (HWND hWnd, LPSIZE sz) extra_cx = (wrt.right-wrt.left) - sz->cx; if( data->type==MENU_TYPE_MENU ) { - sz->cx = max(sz->cx, data->menu.menu_cx + GetSystemMetrics(SM_CXVSCROLL) ); + sz->cx = data->menu.menu_cx + GetSystemMetrics(SM_CXVSCROLL); } else { /* Use the width of the text box */ - sz->cx = max( sz->cx, data->text.text_box_size.cx + 2*GetSystemMetrics(SM_CXVSCROLL)); + sz->cx = data->text.text_box_size.cx + 2*GetSystemMetrics(SM_CXVSCROLL); } sz->cx += extra_cx; } else { @@ -1561,7 +1556,15 @@ LRESULT CALLBACK NHMenuListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA /* Text control window proc - implements scrolling without a cursor */ LRESULT CALLBACK NHMenuTextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { + HDC hDC; + RECT rc; + switch(message) { + case WM_ERASEBKGND: + hDC = (HDC) wParam; + GetClientRect(hWnd, &rc); + FillRect(hDC, &rc, text_bg_brush? text_bg_brush : SYSCLR_TO_BRUSH(DEFAULT_COLOR_BG_TEXT)); + return 0; case WM_KEYDOWN: switch (wParam) @@ -1596,9 +1599,14 @@ LRESULT CALLBACK NHMenuTextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA SendMessage(hWnd, EM_SCROLL, SB_LINEDOWN, 0); return 0; - } + } break; + /* edit control needs to know nothing of its focus */ + case WM_SETFOCUS: + HideCaret(hWnd); + return 0; + } if( editControlWndProc ) diff --git a/win/win32/mhmenu.h b/win/win32/mhmenu.h index 10a8c6129..dc66a4f68 100644 --- a/win/win32/mhmenu.h +++ b/win/win32/mhmenu.h @@ -14,6 +14,7 @@ #define MENU_TYPE_TEXT 1 #define MENU_TYPE_MENU 2 +extern COLORREF nhcolor_to_RGB (int c); HWND mswin_init_menu_window ( int type ); int mswin_menu_window_select_menu (HWND hwnd, int how, MENU_ITEM_P ** selected, BOOL activate); void mswin_menu_window_size (HWND hwnd, LPSIZE sz); diff --git a/win/win32/mhmsg.h b/win/win32/mhmsg.h index bdfc3a0ec..0a6a062e8 100644 --- a/win/win32/mhmsg.h +++ b/win/win32/mhmsg.h @@ -22,15 +22,16 @@ #define MSNH_MSG_DIED 109 #define MSNH_MSG_CARET 110 #define MSNH_MSG_GETTEXT 111 +#define MSNH_MSG_UPDATE_STATUS 112 typedef struct mswin_nhmsg_add_wnd { winid wid; } MSNHMsgAddWnd, *PMSNHMsgAddWnd; typedef struct mswin_nhmsg_putstr { - int attr; - const char* text; - boolean append; + int attr; + const char* text; + int append; } MSNHMsgPutstr, *PMSNHMsgPutstr; typedef struct mswin_nhmsg_print_glyph { @@ -68,5 +69,12 @@ typedef struct mswin_nhmsg_get_text { char buffer[]; } MSNHMsgGetText, *PMSNHMsgGetText; +typedef struct mswin_nhmsg_update_status { + int n_fields; + const char** vals; + boolean* activefields; + int* colors; +} MSNHMsgUpdateStatus, *PMSNHMsgUpdateStatus; + #endif diff --git a/win/win32/mhmsgwnd.c b/win/win32/mhmsgwnd.c index 31b404207..acfc70a54 100644 --- a/win/win32/mhmsgwnd.c +++ b/win/win32/mhmsgwnd.c @@ -163,7 +163,7 @@ LRESULT CALLBACK NHMessageWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM PNHMessageWindow data; data = (PNHMessageWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA); free(data); - SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)0); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)0); } break; case WM_SIZE: @@ -273,7 +273,7 @@ void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam) /* get the input */ while (!okkey) { - char c = mswin_nhgetch(); + int c = mswin_nhgetch(); switch (c) { @@ -382,6 +382,8 @@ void onMSNH_VScroll(HWND hWnd, WPARAM wParam, LPARAM lParam) SCROLLINFO si; int yInc; + UNREFERENCED_PARAMETER(lParam); + /* get window data */ data = (PNHMessageWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA); @@ -564,7 +566,6 @@ void onPaint(HWND hWnd) TCHAR wbuf[MAXWINDOWTEXT+2]; size_t wlen; COLORREF OldBg, OldFg; - int do_more = 0; hdc = BeginPaint(hWnd, &ps); @@ -655,12 +656,15 @@ void onCreate(HWND hWnd, WPARAM wParam, LPARAM lParam) PNHMessageWindow data; SIZE dummy; + UNREFERENCED_PARAMETER(wParam); + UNREFERENCED_PARAMETER(lParam); + /* set window data */ data = (PNHMessageWindow)malloc(sizeof(NHMessageWindow)); if( !data ) panic("out of memory"); ZeroMemory(data, sizeof(NHMessageWindow)); data->max_text = MAXWINDOWTEXT; - SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)data); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)data); /* re-calculate window size (+ font size) */ mswin_message_window_size(hWnd, &dummy); @@ -760,8 +764,6 @@ BOOL more_prompt_check(HWND hWnd) HDC hdc; HGDIOBJ saveFont; RECT client_rt, draw_rt; - BOOL retval = FALSE; - int visible_lines = 0; int i; int remaining_height; char tmptext[MAXWINDOWTEXT+1]; diff --git a/win/win32/mhrip.c b/win/win32/mhrip.c index 7211e1af9..e4b1778d2 100644 --- a/win/win32/mhrip.c +++ b/win/win32/mhrip.c @@ -28,7 +28,7 @@ typedef struct mswin_nethack_text_window { TCHAR* rip_text; } NHRIPWindow, *PNHRIPWindow; -LRESULT CALLBACK NHRIPWndProc(HWND, UINT, WPARAM, LPARAM); +INT_PTR CALLBACK NHRIPWndProc(HWND, UINT, WPARAM, LPARAM); static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam); HWND mswin_init_RIP_window () { @@ -47,7 +47,7 @@ HWND mswin_init_RIP_window () { if( !data ) panic("out of memory"); ZeroMemory(data, sizeof(NHRIPWindow)); - SetWindowLongPtr(ret, GWLP_USERDATA, (LONG)data); + SetWindowLongPtr(ret, GWLP_USERDATA, (LONG_PTR)data); return ret; } @@ -118,7 +118,7 @@ void mswin_display_RIP_window (HWND hWnd) GetNHApp()->hPopupWnd = NULL; } -LRESULT CALLBACK NHRIPWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK NHRIPWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; PNHRIPWindow data; @@ -218,7 +218,7 @@ LRESULT CALLBACK NHRIPWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa if( data->rip_text ) free(data->rip_text); if (data->rip_bmp != NULL) DeleteObject(data->rip_bmp); free(data); - SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)0); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)0); } break; diff --git a/win/win32/mhsplash.c b/win/win32/mhsplash.c index f586d1bac..21b948ab8 100644 --- a/win/win32/mhsplash.c +++ b/win/win32/mhsplash.c @@ -16,7 +16,7 @@ PNHWinApp GetNHApp(void); -LRESULT CALLBACK NHSplashWndProc(HWND, UINT, WPARAM, LPARAM); +INT_PTR CALLBACK NHSplashWndProc(HWND, UINT, WPARAM, LPARAM); #define SPLASH_WIDTH 440 #define SPLASH_HEIGHT 322 @@ -177,9 +177,12 @@ void mswin_display_splash_window (BOOL show_ver) mswin_destroy_splashfonts(); } -LRESULT CALLBACK NHSplashWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK NHSplashWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc; + + UNREFERENCED_PARAMETER(lParam); + switch (message) { case WM_INITDIALOG: diff --git a/win/win32/mhstatus.c b/win/win32/mhstatus.c index 92759fed3..4e8c23d55 100644 --- a/win/win32/mhstatus.c +++ b/win/win32/mhstatus.c @@ -11,14 +11,34 @@ #define NHSW_LINES 2 #define MAXWINDOWTEXT BUFSZ +extern COLORREF nhcolor_to_RGB (int c); /* from mhmap */ + typedef struct mswin_nethack_status_window { - int index; - char window_text[NHSW_LINES][MAXWINDOWTEXT+1]; + int index; + char window_text[NHSW_LINES][MAXWINDOWTEXT+1]; + int n_fields; + const char** vals; + boolean* activefields; + int* colors; } NHStatusWindow, *PNHStatusWindow; +#ifdef STATUS_VIA_WINDOWPORT +static int fieldorder1[] = { + BL_TITLE, BL_STR, BL_DX,BL_CO, BL_IN, + BL_WI, BL_CH,BL_ALIGN, BL_SCORE, -1 + }; +static int fieldorder2[] = { + BL_LEVELDESC, BL_GOLD, BL_HP, BL_HPMAX, + BL_ENE, BL_ENEMAX, BL_AC, BL_XP, BL_EXP, BL_HD, + BL_TIME, BL_HUNGER,BL_CAP, BL_CONDITION, -1 + }; +static int* fieldorders[] = {fieldorder1, fieldorder2, NULL}; +#endif /* STATUS_VIA_WINDOWPORT */ + static TCHAR szStatusWindowClass[] = TEXT("MSNHStatusWndClass"); LRESULT CALLBACK StatusWndProc(HWND, UINT, WPARAM, LPARAM); static void register_status_window_class(void); +static LRESULT onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam); #define DEFAULT_COLOR_BG_STATUS COLOR_WINDOW #define DEFAULT_COLOR_FG_STATUS COLOR_WINDOWTEXT @@ -64,7 +84,7 @@ HWND mswin_init_status_window () { if( !data ) panic("out of memory"); ZeroMemory(data, sizeof(NHStatusWindow)); - SetWindowLongPtr(ret, GWLP_USERDATA, (LONG)data); + SetWindowLongPtr(ret, GWLP_USERDATA, (LONG_PTR)data); return ret; } @@ -91,9 +111,6 @@ void register_status_window_class() LRESULT CALLBACK StatusWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { - RECT rt; - PAINTSTRUCT ps; - HDC hdc; PNHStatusWindow data; data = (PNHStatusWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA); @@ -118,43 +135,39 @@ LRESULT CALLBACK StatusWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP case MSNH_MSG_GETTEXT: { PMSNHMsgGetText msg_data = (PMSNHMsgGetText)lParam; +#ifdef STATUS_VIA_WINDOWPORT + int **fop; + int *f; + msg_data->buffer[0] = '\0'; + if( data->n_fields>0 ) { + for(fop = fieldorders; *fop; fop++) { + for(f=*fop; *f!=-1; f++) { + if (data->activefields[*f]) + strncat(msg_data->buffer, data->vals[*f], msg_data->max_size - strlen(msg_data->buffer)); + } + strncat(msg_data->buffer, "\r\n", msg_data->max_size - strlen(msg_data->buffer) ); + } + } +#else /* STATUS_VIA_WINDOWPORT */ strncpy(msg_data->buffer, data->window_text[0], msg_data->max_size); strncat(msg_data->buffer, "\r\n", msg_data->max_size - strlen(msg_data->buffer) ); strncat(msg_data->buffer, data->window_text[1], msg_data->max_size - strlen(msg_data->buffer) ); +#endif /* STATUS_VIA_WINDOWPORT */ + } break; + + case MSNH_MSG_UPDATE_STATUS: { + PMSNHMsgUpdateStatus msg_data = (PMSNHMsgUpdateStatus)lParam; + data->n_fields = msg_data->n_fields; + data->vals = msg_data->vals; + data->activefields = msg_data->activefields; + data->colors = msg_data->colors; + InvalidateRect(hWnd, NULL, TRUE); } break; - } /* end switch( wParam ) { */ } break; - case WM_PAINT: { - int i; - SIZE sz; - HGDIOBJ oldFont; - TCHAR wbuf[BUFSZ]; - COLORREF OldBg, OldFg; - - hdc = BeginPaint(hWnd, &ps); - GetClientRect(hWnd, &rt); - - oldFont = SelectObject(hdc, mswin_get_font(NHW_STATUS, ATR_NONE, hdc, FALSE)); - - OldBg = SetBkColor(hdc, status_bg_brush - ? status_bg_color : (COLORREF)GetSysColor(DEFAULT_COLOR_BG_STATUS)); - OldFg = SetTextColor(hdc, status_fg_brush - ? status_fg_color : (COLORREF)GetSysColor(DEFAULT_COLOR_FG_STATUS)); - - for(i=0; iwindow_text[i], wbuf, sizeof(wbuf)), strlen(data->window_text[i]), &sz); - NH_A2W(data->window_text[i], wbuf, BUFSZ); - DrawText(hdc, wbuf, strlen(data->window_text[i]), &rt, DT_LEFT | DT_END_ELLIPSIS); - rt.top += sz.cy; - } - - SelectObject(hdc, oldFont); - SetTextColor (hdc, OldFg); - SetBkColor (hdc, OldBg); - EndPaint(hWnd, &ps); - } break; + case WM_PAINT: + return onWMPaint(hWnd, wParam, lParam); case WM_SIZE: { RECT rt; @@ -174,7 +187,7 @@ LRESULT CALLBACK StatusWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP case WM_DESTROY: free(data); - SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)0); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)0); break; case WM_SETFOCUS: @@ -187,6 +200,125 @@ LRESULT CALLBACK StatusWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP return 0; } +#ifdef STATUS_VIA_WINDOWPORT +static LRESULT onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam) +{ + int* f; + int** fop; + SIZE sz; + HGDIOBJ oldFont, normalFont, boldFont; + TCHAR wbuf[BUFSZ]; + COLORREF OldBg, OldFg, Bg, Fg; + RECT rt; + PAINTSTRUCT ps; + HDC hdc; + PNHStatusWindow data; + + data = (PNHStatusWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA); + + hdc = BeginPaint(hWnd, &ps); + GetClientRect(hWnd, &rt); + + normalFont = mswin_get_font(NHW_STATUS, ATR_NONE, hdc, FALSE); + boldFont = mswin_get_font(NHW_STATUS, ATR_BOLD, hdc, FALSE); + oldFont = SelectObject(hdc, normalFont); + + Bg = status_bg_brush? status_bg_color : (COLORREF)GetSysColor(DEFAULT_COLOR_BG_STATUS); + OldBg = SetBkColor(hdc, Bg); + + Fg = status_fg_brush? status_fg_color : (COLORREF)GetSysColor(DEFAULT_COLOR_FG_STATUS); + OldFg = SetTextColor(hdc, Fg); + + for(fop = fieldorders; *fop; fop++) { + LONG left = rt.left; + LONG cy = 0; + int vlen; + for(f=*fop; *f!=-1; f++) { + if( ((*f)>= data->n_fields) || (!data->activefields[*f])) continue; + vlen = strlen(data->vals[*f]); + NH_A2W(data->vals[*f], wbuf, SIZE(wbuf)); + + if(data->colors[*f]==CLR_MAX || data->colors[*f]==BL_HILITE_NONE) { + SelectObject(hdc, normalFont); + SetBkColor(hdc, Bg); + SetTextColor(hdc, Fg); + } else if(data->colors[*f]>0) { + SelectObject(hdc, normalFont); + SetBkColor(hdc, Bg); + SetTextColor(hdc, nhcolor_to_RGB(data->colors[*f])); + } else if(data->colors[*f]==BL_HILITE_INVERSE) { + SelectObject(hdc, normalFont); + SetBkColor(hdc, Fg); + SetTextColor(hdc, Bg); + } else if(data->colors[*f]==BL_HILITE_BOLD) { + SelectObject(hdc, boldFont); + SetBkColor(hdc, Bg); + SetTextColor(hdc, Fg); + } else { + SelectObject(hdc, normalFont); + SetBkColor(hdc, Bg); + SetTextColor(hdc, Fg); + } + + GetTextExtentPoint32(hdc, wbuf, vlen, &sz); + DrawText(hdc, wbuf, vlen, &rt, DT_LEFT); + + rt.left += sz.cx; + cy = max(cy, sz.cy); + } + rt.left = left; + rt.top += cy; + } + + SelectObject(hdc, oldFont); + SetTextColor (hdc, OldFg); + SetBkColor (hdc, OldBg); + EndPaint(hWnd, &ps); + + return 0; +} +#else +static LRESULT onWMPaint(HWND hWnd, WPARAM wParam, LPARAM lParam) +{ + int i; + SIZE sz; + HGDIOBJ oldFont; + TCHAR wbuf[BUFSZ]; + COLORREF OldBg, OldFg; + RECT rt; + PAINTSTRUCT ps; + HDC hdc; + PNHStatusWindow data; + + data = (PNHStatusWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA); + + hdc = BeginPaint(hWnd, &ps); + GetClientRect(hWnd, &rt); + + oldFont = SelectObject(hdc, mswin_get_font(NHW_STATUS, ATR_NONE, hdc, FALSE)); + + OldBg = SetBkColor(hdc, status_bg_brush + ? status_bg_color : (COLORREF)GetSysColor(DEFAULT_COLOR_BG_STATUS)); + OldFg = SetTextColor(hdc, status_fg_brush + ? status_fg_color : (COLORREF)GetSysColor(DEFAULT_COLOR_FG_STATUS)); + + for(i=0; iwindow_text[i]); + NH_A2W(data->window_text[i], wbuf, SIZE(wbuf)); + GetTextExtentPoint32(hdc, wbuf, wlen, &sz); + DrawText(hdc, wbuf, wlen, &rt, DT_LEFT | DT_END_ELLIPSIS); + rt.top += sz.cy; + } + + SelectObject(hdc, oldFont); + SetTextColor (hdc, OldFg); + SetBkColor (hdc, OldBg); + EndPaint(hWnd, &ps); + + return 0; +} +#endif /*STATUS_VIA_WINDOWPORT*/ + void mswin_status_window_size (HWND hWnd, LPSIZE sz) { TEXTMETRIC tm; @@ -194,20 +326,24 @@ void mswin_status_window_size (HWND hWnd, LPSIZE sz) HDC hdc; PNHStatusWindow data; RECT rt; - GetWindowRect(hWnd, &rt); - sz->cx = rt.right - rt.left; - sz->cy = rt.bottom - rt.top; + SIZE text_sz; + + GetClientRect(hWnd, &rt); data = (PNHStatusWindow)GetWindowLongPtr(hWnd, GWLP_USERDATA); if(data) { hdc = GetDC(hWnd); saveFont = SelectObject(hdc, mswin_get_font(NHW_STATUS, ATR_NONE, hdc, FALSE)); + GetTextExtentPoint32(hdc, _T("W"), 1, &text_sz); GetTextMetrics(hdc, &tm); - sz->cy = tm.tmHeight * NHSW_LINES + 2*GetSystemMetrics(SM_CYSIZEFRAME); + rt.bottom = rt.top + text_sz.cy*NHSW_LINES; SelectObject(hdc, saveFont); ReleaseDC(hWnd, hdc); } + AdjustWindowRect(&rt, GetWindowLong(hWnd, GWL_STYLE), FALSE); + sz->cx = rt.right - rt.left; + sz->cy = rt.bottom - rt.top; } diff --git a/win/win32/mhtext.c b/win/win32/mhtext.c index 4d45ca744..e2121ec68 100644 --- a/win/win32/mhtext.c +++ b/win/win32/mhtext.c @@ -19,7 +19,7 @@ static WNDPROC editControlWndProc = 0; #define DEFAULT_COLOR_BG_TEXT COLOR_WINDOW #define DEFAULT_COLOR_FG_TEXT COLOR_WINDOWTEXT -LRESULT CALLBACK NHTextWndProc(HWND, UINT, WPARAM, LPARAM); +INT_PTR CALLBACK NHTextWndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK NHEditHookWndProc(HWND, UINT, WPARAM, LPARAM); static void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam); static void LayoutText(HWND hwnd); @@ -54,9 +54,9 @@ HWND mswin_init_text_window () { SetWindowText(ret, "Text"); if( !GetNHApp()->bWindowsLocked ) { DWORD style; - style = (DWORD)GetWindowLongPtr(ret, GWL_STYLE); + style = GetWindowLong(ret, GWL_STYLE); style |= WS_CAPTION; - SetWindowLongPtr(ret, GWL_STYLE, style); + SetWindowLong(ret, GWL_STYLE, style); SetWindowPos(ret, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); } @@ -64,7 +64,7 @@ HWND mswin_init_text_window () { data = (PNHTextWindow)malloc(sizeof(NHTextWindow)); if( !data ) panic("out of memory"); ZeroMemory(data, sizeof(NHTextWindow)); - SetWindowLongPtr(ret, GWLP_USERDATA, (LONG)data); + SetWindowLongPtr(ret, GWLP_USERDATA, (LONG_PTR)data); return ret; } @@ -77,14 +77,14 @@ void mswin_display_text_window (HWND hWnd) HWND control; control = GetDlgItem(hWnd, IDC_TEXT_CONTROL); SendMessage(control, EM_FMTLINES, 1, 0 ); - SetWindowText(GetDlgItem(hWnd, IDC_TEXT_CONTROL), data->window_text); + SetWindowText(control, data->window_text); } mswin_popup_display(hWnd, NULL); mswin_popup_destroy(hWnd); } -LRESULT CALLBACK NHTextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK NHTextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { HWND control; HDC hdc; @@ -107,7 +107,7 @@ LRESULT CALLBACK NHTextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP /* subclass edit control */ editControlWndProc = (WNDPROC)GetWindowLongPtr(control, GWLP_WNDPROC); - SetWindowLongPtr(control, GWLP_WNDPROC, (LONG)NHEditHookWndProc); + SetWindowLongPtr(control, GWLP_WNDPROC, (LONG_PTR)NHEditHookWndProc); SetFocus(control); @@ -151,14 +151,7 @@ LRESULT CALLBACK NHTextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP DestroyWindow(hWnd); SetFocus(GetNHApp()->hMainWnd); return TRUE; - case IDC_TEXT_CONTROL: - switch (HIWORD(wParam)) - { - case EN_SETFOCUS: - HideCaret((HWND)lParam); - return TRUE; - } - } + } break; case WM_CTLCOLORSTATIC: { /* sent by edit control before it is drawn */ @@ -171,7 +164,7 @@ LRESULT CALLBACK NHTextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP SetTextColor(hdcEdit, text_fg_brush ? text_fg_color : (COLORREF)GetSysColor(DEFAULT_COLOR_FG_TEXT) ); - return (BOOL)(text_bg_brush + return (INT_PTR)(text_bg_brush ? text_bg_brush : SYSCLR_TO_BRUSH(DEFAULT_COLOR_BG_TEXT)); } } return FALSE; @@ -180,7 +173,7 @@ LRESULT CALLBACK NHTextWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lP if( data ) { if( data->window_text ) free(data->window_text); free(data); - SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG)0); + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)0); } break; @@ -249,7 +242,15 @@ void LayoutText(HWND hWnd) /* Edit box hook */ LRESULT CALLBACK NHEditHookWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { + HDC hDC; + RECT rc; + switch(message) { + case WM_ERASEBKGND: + hDC = (HDC) wParam; + GetClientRect(hWnd, &rc); + FillRect(hDC, &rc, text_bg_brush? text_bg_brush : SYSCLR_TO_BRUSH(DEFAULT_COLOR_BG_TEXT)); + return 1; case WM_KEYDOWN: switch (wParam) @@ -286,7 +287,13 @@ LRESULT CALLBACK NHEditHookWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA } break; + + /* edit control needs to know nothing of focus. We will take care of it for it */ + case WM_SETFOCUS: + HideCaret(hWnd); + return 0; } + if( editControlWndProc ) return CallWindowProc(editControlWndProc, hWnd, message, wParam, lParam); diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 81de3ebc5..947152c6b 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -12,6 +12,7 @@ #include "dlb.h" #include "func_tab.h" /* for extended commands */ #include "winMS.h" +#include #include "mhmap.h" #include "mhstatus.h" #include "mhtext.h" @@ -29,7 +30,7 @@ #define LLEN 128 -extern winid WIN_STATUS; +#define NHTRACE_LOG "nhtrace.log" #ifdef _DEBUG extern void logDebug(const char *fmt, ...); @@ -127,12 +128,12 @@ struct window_procs mswin_procs = { mswin_getmsghistory, mswin_putmsghistory, #ifdef STATUS_VIA_WINDOWPORT - genl_status_init, - genl_status_finish, - genl_status_enablefield, - genl_status_update, + mswin_status_init, + mswin_status_finish, + mswin_status_enablefield, + mswin_status_update, # ifdef STATUS_HILITES - genl_status_threshold, + mswin_status_threshold, # endif #endif genl_can_suspend_yes, @@ -155,12 +156,16 @@ init_nhwindows(int* argcp, char** argv) */ void mswin_init_nhwindows(int* argc, char** argv) { + UNREFERENCED_PARAMETER(argc); + UNREFERENCED_PARAMETER(argv); + logDebug("mswin_init_nhwindows()\n"); #ifdef _DEBUG + if (showdebug(NHTRACE_LOG)) { /* truncate trace file */ - FILE *dfp = fopen("nhtrace.log", "w"); + FILE *dfp = fopen(NHTRACE_LOG, "w"); fclose(dfp); } #endif @@ -687,6 +692,7 @@ void mswin_get_nh_event(void) MSG msg; logDebug("mswin_get_nh_event()\n"); + while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)!=0 ) { if (!TranslateAccelerator(msg.hwnd, GetNHApp()->hAccelTable, &msg)) { TranslateMessage(&msg); @@ -702,6 +708,7 @@ void mswin_get_nh_event(void) void mswin_exit_nhwindows(const char *str) { logDebug("mswin_exit_nhwindows(%s)\n", str); + /* Write Window settings to the registry */ mswin_write_reg(); while (max_brush) @@ -712,6 +719,7 @@ void mswin_exit_nhwindows(const char *str) void mswin_suspend_nhwindows(const char *str) { logDebug("mswin_suspend_nhwindows(%s)\n", str); + return; } @@ -720,6 +728,7 @@ void mswin_suspend_nhwindows(const char *str) void mswin_resume_nhwindows() { logDebug("mswin_resume_nhwindows()\n"); + return; } @@ -1817,7 +1826,8 @@ void mswin_outrip(winid wid, int how, time_t when) void mswin_preference_update(const char *pref) { HDC hdc; - + int i; + if( stricmp( pref, "font_menu")==0 || stricmp( pref, "font_size_menu")==0 ) { if( iflags.wc_fontsiz_menuhMainWnd, hdc); - InvalidateRect(mswin_hwnd_from_winid(WIN_STATUS), NULL, TRUE); + for (i=1; iwindowlist[i].type == NHW_STATUS + && GetNHApp()->windowlist[i].win != NULL) { + InvalidateRect(GetNHApp()->windowlist[i].win, NULL, TRUE); + } + } mswin_layout_main_window(NULL); return; } @@ -1968,6 +1983,8 @@ void mswin_putmsghistory(const char * msg, BOOLEAN_P restoring) { BOOL save_sound_opt; + UNREFERENCED_PARAMETER(restoring); + if (!msg) return; /* end of message history restore */ save_sound_opt = GetNHApp()->bNoSounds; GetNHApp()->bNoSounds = TRUE; /* disable sounds while restoring message history */ @@ -2147,8 +2164,11 @@ void mswin_popup_destroy(HWND hWnd) void logDebug(const char *fmt, ...) { - FILE *dfp = fopen("nhtrace.log", "a"); + FILE *dfp; + if (!showdebug(NHTRACE_LOG)) return; + + dfp = fopen(NHTRACE_LOG, "a"); if (dfp) { va_list args; @@ -2583,3 +2603,276 @@ int NHMessageBox(HWND hWnd, LPCTSTR text, UINT type) return MessageBox(hWnd, text, title, type); } +#ifdef STATUS_VIA_WINDOWPORT +static const char *_status_fieldnm[MAXBLSTATS]; +static const char *_status_fieldfmt[MAXBLSTATS]; +static char *_status_vals[MAXBLSTATS]; +static int _status_colors[MAXBLSTATS]; +static boolean _status_activefields[MAXBLSTATS]; +extern winid WIN_STATUS; + +# ifdef STATUS_HILITES +typedef struct hilite_data_struct { + int thresholdtype; + anything threshold; + int behavior; + int under; + int over; +} hilite_data_t; +static hilite_data_t _status_hilites[MAXBLSTATS]; +#endif /* STATUS_HILITES */ +/* +status_init() -- core calls this to notify the window port that a status + display is required. The window port should perform + the necessary initialization in here, allocate memory, etc. +*/ +void +mswin_status_init(void) +{ + int i; + logDebug("mswin_status_init()\n"); + for (i = 0; i < MAXBLSTATS; ++i) { + _status_vals[i] = (char *)alloc(BUFSZ); + *_status_vals[i] = '\0'; + _status_activefields[i] = FALSE; + _status_fieldfmt[i] = (const char *)0; + _status_colors[i] = CLR_MAX; /* no color */ +# ifdef STATUS_HILITES + _status_hilites[i].thresholdtype = 0; + _status_hilites[i].behavior = BL_TH_NONE; + _status_hilites[i].under = BL_HILITE_NONE; + _status_hilites[i].over = BL_HILITE_NONE; +#endif /* STATUS_HILITES */ + } + /* Use a window for the genl version; backward port compatibility */ + WIN_STATUS = create_nhwindow(NHW_STATUS); + display_nhwindow(WIN_STATUS, FALSE); +} + +/* +status_finish() -- called when it is time for the window port to tear down + the status display and free allocated memory, etc. +*/ +void +mswin_status_finish(void) +{ + /* tear down routine */ + int i; + + logDebug("mswin_status_finish()\n"); + + /* free alloc'd memory here */ + for (i = 0; i < MAXBLSTATS; ++i) { + if (_status_vals[i]) free((genericptr_t)_status_vals[i]); + _status_vals[i] = (char *)0; + } +} + +/* +status_enablefield(int fldindex, char fldname, char fieldfmt, boolean enable) + -- notifies the window port which fields it is authorized to + display. + -- This may be called at any time, and is used + to disable as well as enable fields, depending on the + value of the final argument (TRUE = enable). + -- fldindex could be one of the following from botl.h: + BL_TITLE, BL_STR, BL_DX, BL_CO, BL_IN, BL_WI, BL_CH, + BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, BL_ENE, BL_ENEMAX, + BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX, + BL_LEVELDESC, BL_EXP, BL_CONDITION + -- There are MAXBLSTATS status fields (from botl.h) +*/ +void +mswin_status_enablefield(int fieldidx, const char *nm, const char *fmt, boolean enable) +{ + logDebug("mswin_status_enablefield(%d, %s, %s, %d)\n", fieldidx, nm, fmt, (int)enable); + _status_fieldfmt[fieldidx] = fmt; + _status_fieldnm[fieldidx] = nm; + _status_activefields[fieldidx] = enable; +} + +# ifdef STATUS_HILITES +/* +status_threshold(int fldidx, int threshholdtype, anything threshold, + int behavior, int under, int over) + -- called when a hiliting preference is added, changed, or + removed. + -- the fldindex identifies which field is having its hiliting + preference set. It is an integer index value from botl.h + -- fldindex could be any one of the following from botl.h: + BL_TITLE, BL_STR, BL_DX, BL_CO, BL_IN, BL_WI, BL_CH, + BL_ALIGN, BL_SCORE, BL_CAP, BL_GOLD, BL_ENE, BL_ENEMAX, + BL_XP, BL_AC, BL_HD, BL_TIME, BL_HUNGER, BL_HP, BL_HPMAX, + BL_LEVELDESC, BL_EXP, BL_CONDITION + -- datatype is P_INT, P_UINT, P_LONG, or P_MASK. + -- threshold is an "anything" union which can contain the + datatype value. + -- behavior is used to define how threshold is used and can + be BL_TH_NONE, BL_TH_VAL_PERCENTAGE, BL_TH_VAL_ABSOLUTE, + or BL_TH_UPDOWN. BL_TH_NONE means don't do anything above + or below the threshold. BL_TH_VAL_PERCENTAGE treats the + threshold value as a precentage of the maximum possible + value. BL_TH_VAL_ABSOLUTE means that the threshold is an + actual value. BL_TH_UPDOWN means that threshold is not + used, and the two below/above hilite values indicate how + to display something going down (under) or rising (over). + -- under is the hilite attribute used if value is below the + threshold. The attribute can be BL_HILITE_NONE, + BL_HILITE_INVERSE, BL_HILITE_BOLD (-1, -2, or -3), or one + of the color indexes of CLR_BLACK, CLR_RED, CLR_GREEN, + CLR_BROWN, CLR_BLUE, CLR_MAGENTA, CLR_CYAN, CLR_GRAY, + CLR_ORANGE, CLR_BRIGHT_GREEN, CLR_YELLOW, CLR_BRIGHT_BLUE, + CLR_BRIGHT_MAGENTA, CLR_BRIGHT_CYAN, or CLR_WHITE (0 - 15). + -- over is the hilite attribute used if value is at or above + the threshold. The attribute can be BL_HILITE_NONE, + BL_HILITE_INVERSE, BL_HILITE_BOLD (-1, -2, or -3), or one + of the color indexes of CLR_BLACK, CLR_RED, CLR_GREEN, + CLR_BROWN, CLR_BLUE, CLR_MAGENTA, CLR_CYAN, CLR_GRAY, + CLR_ORANGE, CLR_BRIGHT_GREEN, CLR_YELLOW, CLR_BRIGHT_BLUE, + CLR_BRIGHT_MAGENTA, CLR_BRIGHT_CYAN, or CLR_WHITE (0 - 15). +*/ +void +mswin_status_threshold(int fldidx, int thresholdtype, anything threshold, int behavior, int under, int over) +{ + logDebug("mswin_status_threshold(%d, %d, %d, %d, %d)\n", fldidx, thresholdtype, behavior, under, over); + assert(fldidx>=0 && fldidx 0) _status_colors[idx] = _status_hilites[idx].over; + else if(chg < 0) _status_colors[idx] = _status_hilites[idx].under; + else _status_colors[idx] = CLR_MAX; + } break; + + case BL_TH_VAL_PERCENTAGE: { + int pct_th = 0; + if(_status_hilites[idx].thresholdtype!=ANY_INT) { + impossible("mswin_status_update: unsupported percentage threshold type %d", _status_hilites[idx].thresholdtype); + break; + } + pct_th = _status_hilites[idx].threshold.a_int; + _status_colors[idx] = (percent >= pct_th)? _status_hilites[idx].over : _status_hilites[idx].under; + } break; + + case BL_TH_VAL_ABSOLUTE: { + int c = CLR_MAX; + int o = _status_hilites[idx].over; + int u = _status_hilites[idx].under; + anything* t = &_status_hilites[idx].threshold; + switch (_status_hilites[idx].thresholdtype) { + case ANY_LONG: c = (value >= t->a_long)? o : u; break; + case ANY_INT: c = (value >= t->a_int)? o : u; break; + case ANY_UINT: c = ((unsigned long)value >= t->a_uint)? o : u; break; + case ANY_ULONG: c = ((unsigned long)value >= t->a_ulong)? o : u; break; + case ANY_MASK32: c = (value & t->a_ulong)? o : u; break; + default: + impossible("mswin_status_update: unsupported absolute threshold type %d\n", _status_hilites[idx].thresholdtype); + break; + } + _status_colors[idx] = c; + } break; + } +#endif /* STATUS_HILITES */ + + /* send command to status window */ + ZeroMemory(&update_cmd_data, sizeof(update_cmd_data)); + update_cmd_data.n_fields = MAXBLSTATS; + update_cmd_data.vals = _status_vals; + update_cmd_data.activefields = _status_activefields; + update_cmd_data.colors = _status_colors; + SendMessage( + mswin_hwnd_from_winid(WIN_STATUS), + WM_MSNH_COMMAND, (WPARAM)MSNH_MSG_UPDATE_STATUS, (LPARAM)&update_cmd_data ); +} + +#endif /*STATUS_VIA_WINDOWPORT*/ diff --git a/win/win32/NetHack.sln b/win/win32/vs2010/NetHack.sln similarity index 100% rename from win/win32/NetHack.sln rename to win/win32/vs2010/NetHack.sln diff --git a/win/win32/NetHackW.vcxproj b/win/win32/vs2010/NetHackW.vcxproj similarity index 100% rename from win/win32/NetHackW.vcxproj rename to win/win32/vs2010/NetHackW.vcxproj diff --git a/win/win32/dgncomp.vcxproj b/win/win32/vs2010/dgncomp.vcxproj similarity index 100% rename from win/win32/dgncomp.vcxproj rename to win/win32/vs2010/dgncomp.vcxproj diff --git a/win/win32/dgnstuff.vcxproj b/win/win32/vs2010/dgnstuff.vcxproj similarity index 100% rename from win/win32/dgnstuff.vcxproj rename to win/win32/vs2010/dgnstuff.vcxproj diff --git a/win/win32/dlb_main.vcxproj b/win/win32/vs2010/dlb_main.vcxproj similarity index 100% rename from win/win32/dlb_main.vcxproj rename to win/win32/vs2010/dlb_main.vcxproj diff --git a/win/win32/levcomp.vcxproj b/win/win32/vs2010/levcomp.vcxproj similarity index 98% rename from win/win32/levcomp.vcxproj rename to win/win32/vs2010/levcomp.vcxproj index 879172ccf..8bcad70dc 100644 --- a/win/win32/levcomp.vcxproj +++ b/win/win32/vs2010/levcomp.vcxproj @@ -89,7 +89,7 @@ MaxSpeed OnlyExplicitInline ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;YY_NO_UNISTD_H;%(PreprocessorDefinitions) true MultiThreaded true @@ -185,7 +185,7 @@ chdir ..\build MaxSpeed OnlyExplicitInline ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) - NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;YY_NO_UNISTD_H;%(PreprocessorDefinitions) true MultiThreaded true @@ -279,7 +279,7 @@ chdir ..\build Disabled ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -376,7 +376,7 @@ chdir ..\build Disabled ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) - _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug .\Debug/levcomp.pch @@ -566,4 +566,4 @@ chdir ..\build - \ No newline at end of file + diff --git a/win/win32/levstuff.vcxproj b/win/win32/vs2010/levstuff.vcxproj similarity index 100% rename from win/win32/levstuff.vcxproj rename to win/win32/vs2010/levstuff.vcxproj diff --git a/win/win32/makedefs.vcxproj b/win/win32/vs2010/makedefs.vcxproj similarity index 100% rename from win/win32/makedefs.vcxproj rename to win/win32/vs2010/makedefs.vcxproj diff --git a/win/win32/recover.vcxproj b/win/win32/vs2010/recover.vcxproj similarity index 100% rename from win/win32/recover.vcxproj rename to win/win32/vs2010/recover.vcxproj diff --git a/win/win32/tile2bmp.vcxproj b/win/win32/vs2010/tile2bmp.vcxproj similarity index 100% rename from win/win32/tile2bmp.vcxproj rename to win/win32/vs2010/tile2bmp.vcxproj diff --git a/win/win32/tilemap.vcxproj b/win/win32/vs2010/tilemap.vcxproj similarity index 100% rename from win/win32/tilemap.vcxproj rename to win/win32/vs2010/tilemap.vcxproj diff --git a/win/win32/tiles.vcxproj b/win/win32/vs2010/tiles.vcxproj similarity index 100% rename from win/win32/tiles.vcxproj rename to win/win32/vs2010/tiles.vcxproj diff --git a/win/win32/uudecode.vcxproj b/win/win32/vs2010/uudecode.vcxproj similarity index 100% rename from win/win32/uudecode.vcxproj rename to win/win32/vs2010/uudecode.vcxproj diff --git a/win/win32/vs2013/NetHack.sln b/win/win32/vs2013/NetHack.sln new file mode 100644 index 000000000..3b335b62f --- /dev/null +++ b/win/win32/vs2013/NetHack.sln @@ -0,0 +1,187 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Express 2013 for Windows Desktop +VisualStudioVersion = 12.0.31101.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetHackW", "build\NetHackW.vcxproj", "{CEC5D360-8804-454F-8591-002184C23499}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dgncomp", "build\dgncomp.vcxproj", "{8A3F81C7-2968-49A8-86BF-2669412AD7DE}" + ProjectSection(ProjectDependencies) = postProject + {642BC75D-ABAF-403E-8224-7C725FD4CB42} = {642BC75D-ABAF-403E-8224-7C725FD4CB42} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dgnstuff", "build\dgnstuff.vcxproj", "{B9E02F2C-8851-442B-BF2A-3581802B78D4}" + ProjectSection(ProjectDependencies) = postProject + {FF144DFB-83A5-4D26-A598-715A2B354782} = {FF144DFB-83A5-4D26-A598-715A2B354782} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dlb_main", "build\dlb_main.vcxproj", "{0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "levcomp", "build\levcomp.vcxproj", "{9DD9C52E-E8C9-4533-BD22-83C055C0AABA}" + ProjectSection(ProjectDependencies) = postProject + {B9E02F2C-8851-442B-BF2A-3581802B78D4} = {B9E02F2C-8851-442B-BF2A-3581802B78D4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "levstuff", "build\levstuff.vcxproj", "{FF144DFB-83A5-4D26-A598-715A2B354782}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "makedefs", "build\makedefs.vcxproj", "{BA3DD34C-04B7-40D0-B373-9329AA9E8945}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "recover", "build\recover.vcxproj", "{2F35F228-6733-4FE5-9B46-B3AA10D4BC2E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tile2bmp", "build\tile2bmp.vcxproj", "{642BC75D-ABAF-403E-8224-7C725FD4CB42}" + ProjectSection(ProjectDependencies) = postProject + {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} = {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tilemap", "build\tilemap.vcxproj", "{93F10526-209E-41D7-BBEA-775787876895}" + ProjectSection(ProjectDependencies) = postProject + {8A3F81C7-2968-49A8-86BF-2669412AD7DE} = {8A3F81C7-2968-49A8-86BF-2669412AD7DE} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiles", "build\tiles.vcxproj", "{55946465-FC65-47B3-BB48-742C7694C0D6}" + ProjectSection(ProjectDependencies) = postProject + {93F10526-209E-41D7-BBEA-775787876895} = {93F10526-209E-41D7-BBEA-775787876895} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "uudecode", "build\uudecode.vcxproj", "{63F9B82B-F589-4082-ABE5-D4F0682050AB}" + ProjectSection(ProjectDependencies) = postProject + {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NetHack", "build\NetHack.vcxproj", "{609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}" + ProjectSection(ProjectDependencies) = postProject + {63F9B82B-F589-4082-ABE5-D4F0682050AB} = {63F9B82B-F589-4082-ABE5-D4F0682050AB} + {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} = {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} + {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945} + {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC} = {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC} + {8A3F81C7-2968-49A8-86BF-2669412AD7DE} = {8A3F81C7-2968-49A8-86BF-2669412AD7DE} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nhdefkey", "build\nhdefkey.vcxproj", "{6813477F-64B6-4B97-B230-438D0D233385}" + ProjectSection(ProjectDependencies) = postProject + {BA3DD34C-04B7-40D0-B373-9329AA9E8945} = {BA3DD34C-04B7-40D0-B373-9329AA9E8945} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CEC5D360-8804-454F-8591-002184C23499}.Debug|Win32.ActiveCfg = Debug|Win32 + {CEC5D360-8804-454F-8591-002184C23499}.Debug|Win32.Build.0 = Debug|Win32 + {CEC5D360-8804-454F-8591-002184C23499}.Debug|x64.ActiveCfg = Debug|x64 + {CEC5D360-8804-454F-8591-002184C23499}.Debug|x64.Build.0 = Debug|x64 + {CEC5D360-8804-454F-8591-002184C23499}.Release|Win32.ActiveCfg = Release|Win32 + {CEC5D360-8804-454F-8591-002184C23499}.Release|Win32.Build.0 = Release|Win32 + {CEC5D360-8804-454F-8591-002184C23499}.Release|x64.ActiveCfg = Release|x64 + {CEC5D360-8804-454F-8591-002184C23499}.Release|x64.Build.0 = Release|x64 + {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Debug|Win32.ActiveCfg = Debug|Win32 + {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Debug|Win32.Build.0 = Debug|Win32 + {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Debug|x64.ActiveCfg = Debug|x64 + {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Debug|x64.Build.0 = Debug|x64 + {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Release|Win32.ActiveCfg = Release|Win32 + {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Release|Win32.Build.0 = Release|Win32 + {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Release|x64.ActiveCfg = Release|x64 + {8A3F81C7-2968-49A8-86BF-2669412AD7DE}.Release|x64.Build.0 = Release|x64 + {B9E02F2C-8851-442B-BF2A-3581802B78D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {B9E02F2C-8851-442B-BF2A-3581802B78D4}.Debug|Win32.Build.0 = Debug|Win32 + {B9E02F2C-8851-442B-BF2A-3581802B78D4}.Debug|x64.ActiveCfg = Debug|x64 + {B9E02F2C-8851-442B-BF2A-3581802B78D4}.Debug|x64.Build.0 = Debug|x64 + {B9E02F2C-8851-442B-BF2A-3581802B78D4}.Release|Win32.ActiveCfg = Release|Win32 + {B9E02F2C-8851-442B-BF2A-3581802B78D4}.Release|Win32.Build.0 = Release|Win32 + {B9E02F2C-8851-442B-BF2A-3581802B78D4}.Release|x64.ActiveCfg = Release|x64 + {B9E02F2C-8851-442B-BF2A-3581802B78D4}.Release|x64.Build.0 = Release|x64 + {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Debug|Win32.ActiveCfg = Debug|Win32 + {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Debug|Win32.Build.0 = Debug|Win32 + {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Debug|x64.ActiveCfg = Debug|x64 + {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Debug|x64.Build.0 = Debug|x64 + {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Release|Win32.ActiveCfg = Release|Win32 + {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Release|Win32.Build.0 = Release|Win32 + {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Release|x64.ActiveCfg = Release|x64 + {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC}.Release|x64.Build.0 = Release|x64 + {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Debug|Win32.ActiveCfg = Debug|Win32 + {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Debug|Win32.Build.0 = Debug|Win32 + {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Debug|x64.ActiveCfg = Debug|x64 + {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Debug|x64.Build.0 = Debug|x64 + {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Release|Win32.ActiveCfg = Release|Win32 + {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Release|Win32.Build.0 = Release|Win32 + {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Release|x64.ActiveCfg = Release|x64 + {9DD9C52E-E8C9-4533-BD22-83C055C0AABA}.Release|x64.Build.0 = Release|x64 + {FF144DFB-83A5-4D26-A598-715A2B354782}.Debug|Win32.ActiveCfg = Debug|Win32 + {FF144DFB-83A5-4D26-A598-715A2B354782}.Debug|Win32.Build.0 = Debug|Win32 + {FF144DFB-83A5-4D26-A598-715A2B354782}.Debug|x64.ActiveCfg = Debug|x64 + {FF144DFB-83A5-4D26-A598-715A2B354782}.Debug|x64.Build.0 = Debug|x64 + {FF144DFB-83A5-4D26-A598-715A2B354782}.Release|Win32.ActiveCfg = Release|Win32 + {FF144DFB-83A5-4D26-A598-715A2B354782}.Release|Win32.Build.0 = Release|Win32 + {FF144DFB-83A5-4D26-A598-715A2B354782}.Release|x64.ActiveCfg = Release|x64 + {FF144DFB-83A5-4D26-A598-715A2B354782}.Release|x64.Build.0 = Release|x64 + {BA3DD34C-04B7-40D0-B373-9329AA9E8945}.Debug|Win32.ActiveCfg = Debug|Win32 + {BA3DD34C-04B7-40D0-B373-9329AA9E8945}.Debug|Win32.Build.0 = Debug|Win32 + {BA3DD34C-04B7-40D0-B373-9329AA9E8945}.Debug|x64.ActiveCfg = Debug|x64 + {BA3DD34C-04B7-40D0-B373-9329AA9E8945}.Debug|x64.Build.0 = Debug|x64 + {BA3DD34C-04B7-40D0-B373-9329AA9E8945}.Release|Win32.ActiveCfg = Release|Win32 + {BA3DD34C-04B7-40D0-B373-9329AA9E8945}.Release|Win32.Build.0 = Release|Win32 + {BA3DD34C-04B7-40D0-B373-9329AA9E8945}.Release|x64.ActiveCfg = Release|x64 + {BA3DD34C-04B7-40D0-B373-9329AA9E8945}.Release|x64.Build.0 = Release|x64 + {2F35F228-6733-4FE5-9B46-B3AA10D4BC2E}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F35F228-6733-4FE5-9B46-B3AA10D4BC2E}.Debug|Win32.Build.0 = Debug|Win32 + {2F35F228-6733-4FE5-9B46-B3AA10D4BC2E}.Debug|x64.ActiveCfg = Debug|x64 + {2F35F228-6733-4FE5-9B46-B3AA10D4BC2E}.Debug|x64.Build.0 = Debug|x64 + {2F35F228-6733-4FE5-9B46-B3AA10D4BC2E}.Release|Win32.ActiveCfg = Release|Win32 + {2F35F228-6733-4FE5-9B46-B3AA10D4BC2E}.Release|Win32.Build.0 = Release|Win32 + {2F35F228-6733-4FE5-9B46-B3AA10D4BC2E}.Release|x64.ActiveCfg = Release|x64 + {2F35F228-6733-4FE5-9B46-B3AA10D4BC2E}.Release|x64.Build.0 = Release|x64 + {642BC75D-ABAF-403E-8224-7C725FD4CB42}.Debug|Win32.ActiveCfg = Debug|Win32 + {642BC75D-ABAF-403E-8224-7C725FD4CB42}.Debug|Win32.Build.0 = Debug|Win32 + {642BC75D-ABAF-403E-8224-7C725FD4CB42}.Debug|x64.ActiveCfg = Debug|x64 + {642BC75D-ABAF-403E-8224-7C725FD4CB42}.Debug|x64.Build.0 = Debug|x64 + {642BC75D-ABAF-403E-8224-7C725FD4CB42}.Release|Win32.ActiveCfg = Release|Win32 + {642BC75D-ABAF-403E-8224-7C725FD4CB42}.Release|Win32.Build.0 = Release|Win32 + {642BC75D-ABAF-403E-8224-7C725FD4CB42}.Release|x64.ActiveCfg = Release|x64 + {642BC75D-ABAF-403E-8224-7C725FD4CB42}.Release|x64.Build.0 = Release|x64 + {93F10526-209E-41D7-BBEA-775787876895}.Debug|Win32.ActiveCfg = Debug|Win32 + {93F10526-209E-41D7-BBEA-775787876895}.Debug|Win32.Build.0 = Debug|Win32 + {93F10526-209E-41D7-BBEA-775787876895}.Debug|x64.ActiveCfg = Debug|x64 + {93F10526-209E-41D7-BBEA-775787876895}.Debug|x64.Build.0 = Debug|x64 + {93F10526-209E-41D7-BBEA-775787876895}.Release|Win32.ActiveCfg = Release|Win32 + {93F10526-209E-41D7-BBEA-775787876895}.Release|Win32.Build.0 = Release|Win32 + {93F10526-209E-41D7-BBEA-775787876895}.Release|x64.ActiveCfg = Release|x64 + {93F10526-209E-41D7-BBEA-775787876895}.Release|x64.Build.0 = Release|x64 + {55946465-FC65-47B3-BB48-742C7694C0D6}.Debug|Win32.ActiveCfg = Debug|Win32 + {55946465-FC65-47B3-BB48-742C7694C0D6}.Debug|Win32.Build.0 = Debug|Win32 + {55946465-FC65-47B3-BB48-742C7694C0D6}.Debug|x64.ActiveCfg = Debug|x64 + {55946465-FC65-47B3-BB48-742C7694C0D6}.Debug|x64.Build.0 = Debug|x64 + {55946465-FC65-47B3-BB48-742C7694C0D6}.Release|Win32.ActiveCfg = Release|Win32 + {55946465-FC65-47B3-BB48-742C7694C0D6}.Release|Win32.Build.0 = Release|Win32 + {55946465-FC65-47B3-BB48-742C7694C0D6}.Release|x64.ActiveCfg = Release|x64 + {55946465-FC65-47B3-BB48-742C7694C0D6}.Release|x64.Build.0 = Release|x64 + {63F9B82B-F589-4082-ABE5-D4F0682050AB}.Debug|Win32.ActiveCfg = Debug|Win32 + {63F9B82B-F589-4082-ABE5-D4F0682050AB}.Debug|Win32.Build.0 = Debug|Win32 + {63F9B82B-F589-4082-ABE5-D4F0682050AB}.Debug|x64.ActiveCfg = Debug|x64 + {63F9B82B-F589-4082-ABE5-D4F0682050AB}.Debug|x64.Build.0 = Debug|x64 + {63F9B82B-F589-4082-ABE5-D4F0682050AB}.Release|Win32.ActiveCfg = Release|Win32 + {63F9B82B-F589-4082-ABE5-D4F0682050AB}.Release|Win32.Build.0 = Release|Win32 + {63F9B82B-F589-4082-ABE5-D4F0682050AB}.Release|x64.ActiveCfg = Release|x64 + {63F9B82B-F589-4082-ABE5-D4F0682050AB}.Release|x64.Build.0 = Release|x64 + {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Debug|Win32.ActiveCfg = Debug|Win32 + {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Debug|Win32.Build.0 = Debug|Win32 + {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Debug|x64.ActiveCfg = Debug|Win32 + {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Release|Win32.ActiveCfg = Release|Win32 + {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Release|Win32.Build.0 = Release|Win32 + {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751}.Release|x64.ActiveCfg = Release|Win32 + {6813477F-64B6-4B97-B230-438D0D233385}.Debug|Win32.ActiveCfg = Debug|Win32 + {6813477F-64B6-4B97-B230-438D0D233385}.Debug|Win32.Build.0 = Debug|Win32 + {6813477F-64B6-4B97-B230-438D0D233385}.Debug|x64.ActiveCfg = Debug|x64 + {6813477F-64B6-4B97-B230-438D0D233385}.Debug|x64.Build.0 = Debug|x64 + {6813477F-64B6-4B97-B230-438D0D233385}.Release|Win32.ActiveCfg = Release|Win32 + {6813477F-64B6-4B97-B230-438D0D233385}.Release|Win32.Build.0 = Release|Win32 + {6813477F-64B6-4B97-B230-438D0D233385}.Release|x64.ActiveCfg = Release|x64 + {6813477F-64B6-4B97-B230-438D0D233385}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/win/win32/vs2013/NetHack.vcxproj b/win/win32/vs2013/NetHack.vcxproj new file mode 100644 index 000000000..3721b37e8 --- /dev/null +++ b/win/win32/vs2013/NetHack.vcxproj @@ -0,0 +1,492 @@ + + + + + Release + Win32 + + + Release + x64 + + + Debug + Win32 + + + Debug + x64 + + + + {609BC774-C6F8-4B2B-AA7D-5B3D0EA95751} + Win32Proj + NetHack + + + + Application + true + v120 + MultiByte + + + Application + false + MultiByte + v120 + + + Application + false + v120 + true + MultiByte + + + Application + false + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + false + false + .\Debug\ + .\Debug\ + .\Debug\$(ProjectName)\ + .\Debug\$(ProjectName)\ + true + true + + + + /Gs /Oi- /FS %(AdditionalOptions) + Disabled + Level3 + Default + Speed + true + MaxSpeed + true + false + TILES;MSWIN_GRAPHICS;WIN32;WIN32CON;DLB;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + ..\win\win32;..\include;..\sys\winnt;..\sys\share;..\win\share;%(AdditionalIncludeDirectories) + true + MultiThreaded + true + .\Release/NetHack.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + + + Console + true + true + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;winmm.lib;Winmm.lib;%(AdditionalDependencies) + true + true + .\Release/NetHack.pdb + true + .\Release/NetHack.map + + + MachineX86 + true + + + true + .\Release/NetHack.bsc + + + Install exe + + copy $(OutDir)NetHack.exe ..\binary + copy ..\dat\nhdat ..\binary + copy ..\dat\license ..\binary + if exist tiles.bmp copy tiles.bmp ..\binary + if NOT exist ..\binary\sysconf copy ..\sys\winnt\sysconf ..\binary\sysconf + if exist ..\doc\Guidebook.txt copy ..\doc\Guidebook.txt ..\binary\Guidebook.txt + if exist ..\doc\nethack.txt copy ..\doc\nethack.txt ..\binary\NetHack.txt + copy ..\sys\winnt\defaults.nh ..\binary\defaults.nh + + + + + + /Gs /Oi- /FS %(AdditionalOptions) + Disabled + Level3 + Default + Speed + true + MaxSpeed + true + false + TILES;MSWIN_GRAPHICS;WIN32;WIN32CON;DLB;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + ..\win\win32;..\include;..\sys\winnt;..\sys\share;..\win\share;%(AdditionalIncludeDirectories) + true + MultiThreaded + true + .\Release/NetHack.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + + + Console + true + true + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Winmm.lib;%(AdditionalDependencies) + true + true + .\Release/NetHack.pdb + true + .\Release/NetHack.map + + + + + true + .\Release/NetHack.bsc + + + Install exe + + copy $(OutDir)NetHack.exe ..\binary + copy ..\dat\nhdat ..\binary + copy ..\dat\license ..\binary + if exist tiles.bmp copy tiles.bmp ..\binary + if NOT exist ..\binary\sysconf copy ..\sys\winnt\sysconf ..\binary\sysconf + if exist ..\doc\Guidebook.txt copy ..\doc\Guidebook.txt ..\binary\Guidebook.txt + if exist ..\doc\nethack.txt copy ..\doc\nethack.txt ..\binary\NetHack.txt + copy ..\sys\winnt\defaults.nh ..\binary\defaults.nh + + + + + + /Gs /Oi- /FS %(AdditionalOptions) + Disabled + Default + Speed + true + ..\win\win32;..\include;..\sys\winnt;..\sys\share;..\win\share;%(AdditionalIncludeDirectories) + TILES;MSWIN_GRAPHICS;NDEBUG;WIN32;WIN32CON;DLB;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + true + MultiThreadedDebug + true + .\Debug/NetHack.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + + + .\Release/NetHack.pdb + true + .\Release/NetHack.map + Console + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;Winmm.lib;%(AdditionalDependencies) + MachineX86 + + + true + .\Debug/NetHack.bsc + + + Install exe + + if NOT exist ..\binary\*.* mkdir ..\binary + copy $(OutDir)NetHack.exe ..\binary + copy ..\dat\nhdat ..\binary + copy ..\dat\license ..\binary + copy ..\dat\symbols ..\binary + if exist tiles.bmp copy tiles.bmp ..\binary + if NOT exist ..\binary\sysconf copy ..\sys\winnt\sysconf ..\binary\sysconf + if exist ..\doc\Guidebook.txt copy ..\doc\Guidebook.txt ..\binary\Guidebook.txt + if exist ..\doc\nethack.txt copy ..\doc\nethack.txt ..\binary\NetHack.txt + copy ..\sys\winnt\defaults.nh ..\binary\defaults.nh + + + + + + /Gs /Oi- /FS %(AdditionalOptions) + Disabled + Default + Speed + true + ..\win\win32;..\include;..\sys\winnt;..\sys\share;..\win\share;%(AdditionalIncludeDirectories) + TILES;MSWIN_GRAPHICS;WIN32;WIN32CON;DLB;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + true + true + MultiThreadedDebug + true + .\Debug/NetHack.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + + + .\Release/NetHack.pdb + true + .\Release/NetHack.map + Console + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;winmm.lib;Winmm.lib;%(AdditionalDependencies) + /SAFESEH:NO %(AdditionalOptions) + + + true + .\Debug/NetHack.bsc + + + Install exe + + if NOT exist ..\binary\*.* mkdir ..\binary + copy $(OutDir)NetHack.exe ..\binary + copy ..\dat\nhdat ..\binary + copy ..\dat\license ..\binary + copy ..\dat\symbols ..\binary + if exist tiles.bmp copy tiles.bmp ..\binary + if NOT exist ..\binary\sysconf copy ..\sys\winnt\sysconf ..\binary\sysconf + if exist ..\doc\Guidebook.txt copy ..\doc\Guidebook.txt ..\binary\Guidebook.txt + if exist ..\doc\nethack.txt copy ..\doc\nethack.txt ..\binary\NetHack.txt + copy ..\sys\winnt\defaults.nh ..\binary\defaults.nh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GUISTUB;NDEBUG;WIN32;WIN32CON;DLB;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + GUISTUB;WIN32;WIN32CON;DLB;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + GUISTUB;WIN32;WIN32CON;DLB;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + GUISTUB;WIN32;WIN32CON;DLB;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/win/win32/vs2013/NetHackW.vcxproj b/win/win32/vs2013/NetHackW.vcxproj new file mode 100644 index 000000000..9776c3842 --- /dev/null +++ b/win/win32/vs2013/NetHackW.vcxproj @@ -0,0 +1,508 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {CEC5D360-8804-454F-8591-002184C23499} + NetHackW + + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + false + false + .\Debug\ + .\Debug\ + .\Debug\$(ProjectName)\ + .\Debug\$(ProjectName)\ + true + true + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Release/NetHackW.tlb + + + + + /Gs /Oi- /FS %(AdditionalOptions) + Disabled + OnlyExplicitInline + Speed + true + ..\win\win32;..\include;..\sys\winnt;..\sys\share;..\win\share;%(AdditionalIncludeDirectories) + TILES;MSWIN_GRAPHICS;WIN32CONNDEBUG;WIN32;_WINDOWS;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/NetHackW.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MAPINFO:EXPORTS %(AdditionalOptions) + comctl32.lib;winmm.lib;%(AdditionalDependencies) + true + true + .\Release/NetHackW.pdb + true + .\Release/NetHackW.map + Windows + false + + + MachineX86 + + + true + .\Release/NetHackW.bsc + + + Install exe + copy $(OutDir)NetHackW.exe ..\binary +copy ..\dat\nhdat ..\binary +copy ..\dat\license ..\binary +if exist ..\src\tiles.bmp copy ..\src\tiles.bmp ..\binary +if NOT exist ..\binary\sysconf copy ..\sys\winnt\sysconf ..\binary\sysconf +if exist ..\doc\Guidebook.txt copy ..\doc\Guidebook.txt ..\binary\Guidebook.txt +if exist ..\doc\nethack.txt copy ..\doc\nethack.txt ..\binary\NetHack.txt +copy ..\sys\winnt\defaults.nh ..\binary\defaults.nh + + + + + + NDEBUG;%(PreprocessorDefinitions) + true + true + .\Release/NetHackW.tlb + + + + + /Gs /Oi- /FS %(AdditionalOptions) + Disabled + OnlyExplicitInline + Speed + true + ..\win\win32;..\include;..\sys\winnt;..\sys\share;..\win\share;%(AdditionalIncludeDirectories) + TILES;MSWIN_GRAPHICS;WIN32CONNDEBUG;WIN32;_WINDOWS;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/NetHackW.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + /MAPINFO:EXPORTS %(AdditionalOptions) + comctl32.lib;winmm.lib;%(AdditionalDependencies) + true + true + .\Release/NetHackW.pdb + true + .\Release/NetHackW.map + Windows + false + + + + + true + .\Release/NetHackW.bsc + + + Install exe + copy $(OutDir)NetHackW.exe ..\binary +copy ..\dat\nhdat ..\binary +copy ..\dat\license ..\binary +if exist ..\src\tiles.bmp copy ..\src\tiles.bmp ..\binary +if NOT exist ..\binary\sysconf copy ..\sys\winnt\sysconf ..\binary\sysconf +if exist ..\doc\Guidebook.txt copy ..\doc\Guidebook.txt ..\binary\Guidebook.txt +if exist ..\doc\nethack.txt copy ..\doc\nethack.txt ..\binary\NetHack.txt +copy ..\sys\winnt\defaults.nh ..\binary\defaults.nh + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + Win32 + .\Debug/NetHackW.tlb + + + + + Disabled + ..\win\win32;..\include;..\sys\winnt;..\sys\share;..\win\share;%(AdditionalIncludeDirectories) + TILES;MSWIN_GRAPHICS;WIN32CON_DEBUG;WIN32;_WINDOWS;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/NetHackW.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /Gs /Oi- /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + comctl32.lib;winmm.lib;%(AdditionalDependencies) + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Windows + false + + + MachineX86 + /SAFESEH:NO %(AdditionalOptions) + + + true + .\Debug/NetHackW.bsc + + + Install exe + if NOT exist ..\binary\*.* mkdir ..\binary +copy $(OutDir)NetHackW.exe ..\binary +copy ..\dat\nhdat ..\binary +copy ..\dat\license ..\binary +copy ..\dat\symbols ..\binary +if exist ..\src\tiles.bmp copy ..\src\tiles.bmp ..\binary +if NOT exist ..\binary\sysconf copy ..\sys\winnt\sysconf ..\binary\sysconf +if exist ..\doc\Guidebook.txt copy ..\doc\Guidebook.txt ..\binary\Guidebook.txt +if exist ..\doc\nethack.txt copy ..\doc\nethack.txt ..\binary\NetHack.txt +copy ..\sys\winnt\defaults.nh ..\binary\defaults.nh + + + + + + _DEBUG;%(PreprocessorDefinitions) + true + true + .\Debug/NetHackW.tlb + + + + + Disabled + ..\win\win32;..\include;..\sys\winnt;..\sys\share;..\win\share;%(AdditionalIncludeDirectories) + TILES;MSWIN_GRAPHICS;WIN32CON_DEBUG;WIN32;_WINDOWS;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + .\Debug/NetHackW.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + ProgramDatabase + false + /Gs /Oi- /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + comctl32.lib;winmm.lib;%(AdditionalDependencies) + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Windows + false + + + /SAFESEH:NO %(AdditionalOptions) + + + true + .\Debug/NetHackW.bsc + + + Install exe + if NOT exist ..\binary\*.* mkdir ..\binary +copy $(OutDir)NetHackW.exe ..\binary +copy ..\dat\nhdat ..\binary +copy ..\dat\license ..\binary +copy ..\dat\symbols ..\binary +if exist ..\src\tiles.bmp copy ..\src\tiles.bmp ..\binary +if NOT exist ..\binary\sysconf copy ..\sys\winnt\sysconf ..\binary\sysconf +if exist ..\doc\Guidebook.txt copy ..\doc\Guidebook.txt ..\binary\Guidebook.txt +if exist ..\doc\nethack.txt copy ..\doc\nethack.txt ..\binary\NetHack.txt +copy ..\sys\winnt\defaults.nh ..\binary\defaults.nh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TTYSTUB; _DEBUG;WIN32;_WINDOWS;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + TTYSTUB;NDEBUG;WIN32;_WINDOWS;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + TTYSTUB; _DEBUG;WIN32;_WINDOWS;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + TTYSTUB;NDEBUG;WIN32;_WINDOWS;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + {8a3f81c7-2968-49a8-86bf-2669412ad7de} + false + + + {0303a585-3f83-4bb7-af6b-1e12c8fb54ac} + false + + + {9dd9c52e-e8c9-4533-bd22-83c055c0aaba} + false + + + {ba3dd34c-04b7-40d0-b373-9329aa9e8945} + false + + + {93f10526-209e-41d7-bbea-775787876895} + false + + + {55946465-fc65-47b3-bb48-742c7694c0d6} + false + + + {63f9b82b-f589-4082-abe5-d4f0682050ab} + false + + + + + + + + + \ No newline at end of file diff --git a/win/win32/vs2013/dgncomp.vcxproj b/win/win32/vs2013/dgncomp.vcxproj new file mode 100644 index 000000000..85a3655a0 --- /dev/null +++ b/win/win32/vs2013/dgncomp.vcxproj @@ -0,0 +1,399 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8A3F81C7-2968-49A8-86BF-2669412AD7DE} + + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\..\util\ + .\..\util\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + false + false + .\..\util\ + .\..\util\ + .\Debug\$(ProjectName)\ + .\Debug\$(ProjectName)\ + true + true + + + + .\..\util/dgncomp.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/dgncomp.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + .\..\util/dgncomp.pdb + Console + false + + + MachineX86 + + + true + .\..\util/dgncomp.bsc + + + dgncomp + echo Building dungeon +echo chdir ..\dat +chdir ..\dat +echo ..\util\dgncomp.exe dungeon.pdf +..\util\dgncomp.exe dungeon.pdf +echo chdir ..\build +chdir ..\build + + + + + + .\..\util/dgncomp.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/dgncomp.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + .\..\util/dgncomp.pdb + Console + false + + + + + true + .\..\util/dgncomp.bsc + + + dgncomp + echo Building dungeon +echo chdir ..\dat +chdir ..\dat +echo ..\util\dgncomp.exe dungeon.pdf +..\util\dgncomp.exe dungeon.pdf +echo chdir ..\build +chdir ..\build + + + + + + .\..\util/dgncomp.tlb + + + + + Disabled + ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/dgncomp.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + MachineX86 + /SAFESEH:NO %(AdditionalOptions) + + + true + .\..\util/dgncomp.bsc + + + dgncomp + echo Building dungeon +echo chdir ..\dat +chdir ..\dat +echo ..\util\dgncomp.exe dungeon.pdf +..\util\dgncomp.exe dungeon.pdf +echo chdir ..\build +chdir ..\build + + + + + + .\..\util/dgncomp.tlb + + + + + Disabled + ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + .\Debug/dgncomp.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + /SAFESEH:NO %(AdditionalOptions) + + + true + .\..\util/dgncomp.bsc + + + dgncomp + echo Building dungeon +echo chdir ..\dat +chdir ..\dat +echo ..\util\dgncomp.exe dungeon.pdf +..\util\dgncomp.exe dungeon.pdf +echo chdir ..\build +chdir ..\build + + + + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {b9e02f2c-8851-442b-bf2a-3581802b78d4} + false + + + + + + \ No newline at end of file diff --git a/win/win32/vs2013/dgnstuff.vcxproj b/win/win32/vs2013/dgnstuff.vcxproj new file mode 100644 index 000000000..48d33786e --- /dev/null +++ b/win/win32/vs2013/dgnstuff.vcxproj @@ -0,0 +1,124 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B9E02F2C-8851-442B-BF2A-3581802B78D4} + MakeFileProj + + + + Makefile + false + v120 + + + Makefile + false + v120 + + + Makefile + false + v120 + + + Makefile + false + v120 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\dgnstuff___Win32_Debug\ + .\dgnstuff___Win32_Debug\ + .\Debug\ + .\Debug\ + nmake /f "dgnstuff.mak" + nmake /f "dgnstuff.mak" + nmake /f "dgnstuff.mak" /a + nmake /f "dgnstuff.mak" /a + + + ..\util\dgncomp.exe + ..\util\dgncomp.exe + $(NMakePreprocessorDefinitions) + $(NMakePreprocessorDefinitions) + $(NMakeIncludeSearchPath) + $(NMakeIncludeSearchPath) + $(NMakeForcedIncludes) + $(NMakeForcedIncludes) + $(NMakeAssemblySearchPath) + $(NMakeAssemblySearchPath) + $(NMakeForcedUsingAssemblies) + $(NMakeForcedUsingAssemblies) + .\Release\ + .\Release\ + .\Release\ + .\Release\ + nmake /f "dgnstuff.mak" + nmake /f "dgnstuff.mak" + nmake /f "dgnstuff.mak" /a + nmake /f "dgnstuff.mak" /a + + + ..\util\dgncomp.exe + ..\util\dgncomp.exe + $(NMakePreprocessorDefinitions) + $(NMakePreprocessorDefinitions) + $(NMakeIncludeSearchPath) + $(NMakeIncludeSearchPath) + $(NMakeForcedIncludes) + $(NMakeForcedIncludes) + $(NMakeAssemblySearchPath) + $(NMakeAssemblySearchPath) + $(NMakeForcedUsingAssemblies) + $(NMakeForcedUsingAssemblies) + + + + + + {ba3dd34c-04b7-40d0-b373-9329aa9e8945} + false + + + + + + diff --git a/win/win32/vs2013/dlb_main.vcxproj b/win/win32/vs2013/dlb_main.vcxproj new file mode 100644 index 000000000..3d52cae32 --- /dev/null +++ b/win/win32/vs2013/dlb_main.vcxproj @@ -0,0 +1,435 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {0303A585-3F83-4BB7-AF6B-1E12C8FB54AC} + + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\..\util\ + .\..\util\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + false + false + .\..\util\ + .\..\util\ + .\Debug\$(ProjectName)\ + .\Debug\$(ProjectName)\ + true + true + + + + .\Release/dlb_main.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;..\sys\winnt;..\win\share;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;DLB;WIN32CON;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/dlb_main.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + .\Release/dlb_main.pdb + Console + false + + + MachineX86 + + + true + .\Release/dlb_main.bsc + + + Packaging via DLB + echo chdir ..\dat +chdir ..\dat +chdir +echo data >dlb.lst +echo oracles >>dlb.lst +if exist options echo options >>dlb.lst +if exist ttyoptions echo ttyoptions >>dlb.lst +if exist guioptions echo guioptions >>dlb.lst +if NOT exist porthelp copy ..\sys\winnt\porthelp porthelp +if exist porthelp echo porthelp >>dlb.lst +echo quest.dat >>dlb.lst +echo rumors >>dlb.lst +echo tribute >>dlb.lst +echo help >>dlb.lst +echo hh >>dlb.lst +echo cmdhelp >>dlb.lst +echo history >>dlb.lst +echo opthelp >>dlb.lst +echo wizhelp >>dlb.lst +echo dungeon >>dlb.lst +echo license >>dlb.lst +for %%N in (*.lev) do echo %%N >>dlb.lst +..\util\dlb_main.exe cIf dlb.lst nhdat +echo chdir ..\build +chdir ..\build +echo if NOT exist ..\binary\*.* mkdir ..\binary +if NOT exist ..\binary\*.* mkdir ..\binary + + + + + + .\Release/dlb_main.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;..\sys\winnt;..\win\share;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;DLB;WIN32CON;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/dlb_main.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + .\Release/dlb_main.pdb + Console + false + + + + + true + .\Release/dlb_main.bsc + + + Packaging via DLB + echo chdir ..\dat +chdir ..\dat +chdir +echo data >dlb.lst +echo oracles >>dlb.lst +if exist options echo options >>dlb.lst +if exist ttyoptions echo ttyoptions >>dlb.lst +if exist guioptions echo guioptions >>dlb.lst +if NOT exist porthelp copy ..\sys\winnt\porthelp porthelp +if exist porthelp echo porthelp >>dlb.lst +echo quest.dat >>dlb.lst +echo rumors >>dlb.lst +echo tribute >>dlb.lst +echo help >>dlb.lst +echo hh >>dlb.lst +echo cmdhelp >>dlb.lst +echo history >>dlb.lst +echo opthelp >>dlb.lst +echo wizhelp >>dlb.lst +echo dungeon >>dlb.lst +echo license >>dlb.lst +for %%N in (*.lev) do echo %%N >>dlb.lst +..\util\dlb_main.exe cIf dlb.lst nhdat +echo chdir ..\build +chdir ..\build +echo if NOT exist ..\binary\*.* mkdir ..\binary +if NOT exist ..\binary\*.* mkdir ..\binary + + + + + + .\Debug/dlb_main.tlb + + + + + Disabled + ..\include;..\sys\winnt;..\win\share;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;DLB;WIN32CON;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/dlb_main.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + MachineX86 + /SAFESEH:NO %(AdditionalOptions) + + + true + .\Debug/dlb_main.bsc + + + Packaging via dlb + echo chdir ..\dat +chdir ..\dat +chdir +echo data >dlb.lst +echo oracles >>dlb.lst +if exist options echo options >>dlb.lst +if exist ttyoptions echo ttyoptions >>dlb.lst +if exist guioptions echo guioptions >>dlb.lst +if NOT exist porthelp copy ..\sys\winnt\porthelp porthelp +if exist porthelp echo porthelp >>dlb.lst +echo quest.dat >>dlb.lst +echo rumors >>dlb.lst +echo tribute >>dlb.lst +echo help >>dlb.lst +echo hh >>dlb.lst +echo cmdhelp >>dlb.lst +echo history >>dlb.lst +echo opthelp >>dlb.lst +echo wizhelp >>dlb.lst +echo dungeon >>dlb.lst +echo license >>dlb.lst +for %%N in (*.lev) do echo %%N >>dlb.lst +..\util\dlb_main.exe cIf dlb.lst nhdat +echo chdir ..\build +chdir ..\build +echo if NOT exist ..\binary\*.* mkdir ..\binary +if NOT exist ..\binary\*.* mkdir ..\binary + + + + + + .\Debug/dlb_main.tlb + + + + + Disabled + ..\include;..\sys\winnt;..\win\share;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;DLB;WIN32CON;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + .\Debug/dlb_main.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + /SAFESEH:NO %(AdditionalOptions) + + + true + .\Debug/dlb_main.bsc + + + Packaging via dlb + echo chdir ..\dat +chdir ..\dat +chdir +echo data >dlb.lst +echo oracles >>dlb.lst +if exist options echo options >>dlb.lst +if exist ttyoptions echo ttyoptions >>dlb.lst +if exist guioptions echo guioptions >>dlb.lst +if NOT exist porthelp copy ..\sys\winnt\porthelp porthelp +if exist porthelp echo porthelp >>dlb.lst +echo quest.dat >>dlb.lst +echo rumors >>dlb.lst +echo tribute >>dlb.lst +echo help >>dlb.lst +echo hh >>dlb.lst +echo cmdhelp >>dlb.lst +echo history >>dlb.lst +echo opthelp >>dlb.lst +echo wizhelp >>dlb.lst +echo dungeon >>dlb.lst +echo license >>dlb.lst +for %%N in (*.lev) do echo %%N >>dlb.lst +..\util\dlb_main.exe cIf dlb.lst nhdat +echo chdir ..\build +chdir ..\build +echo if NOT exist ..\binary\*.* mkdir ..\binary +if NOT exist ..\binary\*.* mkdir ..\binary + + + + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + {8a3f81c7-2968-49a8-86bf-2669412ad7de} + false + + + {9dd9c52e-e8c9-4533-bd22-83c055c0aaba} + false + + + {ba3dd34c-04b7-40d0-b373-9329aa9e8945} + false + + + + + + \ No newline at end of file diff --git a/win/win32/vs2013/levcomp.vcxproj b/win/win32/vs2013/levcomp.vcxproj new file mode 100644 index 000000000..4ea54170d --- /dev/null +++ b/win/win32/vs2013/levcomp.vcxproj @@ -0,0 +1,581 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {9DD9C52E-E8C9-4533-BD22-83C055C0AABA} + + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\..\util\ + .\..\util\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + false + false + .\..\util\ + .\..\util\ + .\Debug\$(ProjectName)\ + .\Debug\$(ProjectName)\ + true + true + + + + .\..\util/levcomp.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;YY_NO_UNISTD_H;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/levcomp.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + .\..\util/levcomp.pdb + Console + false + + + MachineX86 + + + true + .\..\util/levcomp.bsc + + + levcomp + echo Building special levels +echo chdir ..\dat +chdir ..\dat +echo arch.des +..\util\levcomp.exe arch.des +echo barb.des +..\util\levcomp.exe barb.des +echo bigroom.des +..\util\levcomp.exe bigroom.des +echo castle.des +..\util\levcomp.exe castle.des +echo caveman.des +..\util\levcomp.exe caveman.des +echo endgame.des +..\util\levcomp.exe endgame.des +echo gehennom.des +..\util\levcomp.exe gehennom.des +echo healer.des +..\util\levcomp.exe healer.des +echo knight.des +..\util\levcomp.exe knight.des +echo knox.des +..\util\levcomp.exe knox.des +echo medusa.des +..\util\levcomp.exe medusa.des +echo mines.des +..\util\levcomp.exe mines.des +echo monk.des +..\util\levcomp.exe monk.des +echo oracle.des +..\util\levcomp.exe oracle.des +echo priest.des +..\util\levcomp.exe priest.des +echo ranger.des +..\util\levcomp.exe ranger.des +echo rogue.des +..\util\levcomp.exe rogue.des +echo samurai.des +..\util\levcomp.exe samurai.des +echo sokoban.des +..\util\levcomp.exe sokoban.des +echo tourist.des +..\util\levcomp.exe tourist.des +echo tower.des +..\util\levcomp.exe tower.des +echo valkyrie.des +..\util\levcomp.exe valkyrie.des +echo wizard .des +..\util\levcomp.exe wizard.des +echo yendor.des +..\util\levcomp.exe yendor.des +echo chdir ..\build +chdir ..\build + + + + + + .\..\util/levcomp.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;YY_NO_UNISTD_H;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/levcomp.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + .\..\util/levcomp.pdb + Console + false + + + + + true + .\..\util/levcomp.bsc + + + levcomp + echo Building special levels +echo chdir ..\dat +chdir ..\dat +echo arch.des +..\util\levcomp.exe arch.des +echo barb.des +..\util\levcomp.exe barb.des +echo bigroom.des +..\util\levcomp.exe bigroom.des +echo castle.des +..\util\levcomp.exe castle.des +echo caveman.des +..\util\levcomp.exe caveman.des +echo endgame.des +..\util\levcomp.exe endgame.des +echo gehennom.des +..\util\levcomp.exe gehennom.des +echo healer.des +..\util\levcomp.exe healer.des +echo knight.des +..\util\levcomp.exe knight.des +echo knox.des +..\util\levcomp.exe knox.des +echo medusa.des +..\util\levcomp.exe medusa.des +echo mines.des +..\util\levcomp.exe mines.des +echo monk.des +..\util\levcomp.exe monk.des +echo oracle.des +..\util\levcomp.exe oracle.des +echo priest.des +..\util\levcomp.exe priest.des +echo ranger.des +..\util\levcomp.exe ranger.des +echo rogue.des +..\util\levcomp.exe rogue.des +echo samurai.des +..\util\levcomp.exe samurai.des +echo sokoban.des +..\util\levcomp.exe sokoban.des +echo tourist.des +..\util\levcomp.exe tourist.des +echo tower.des +..\util\levcomp.exe tower.des +echo valkyrie.des +..\util\levcomp.exe valkyrie.des +echo wizard .des +..\util\levcomp.exe wizard.des +echo yendor.des +..\util\levcomp.exe yendor.des +echo chdir ..\build +chdir ..\build + + + + + + .\..\util/levcomp.tlb + + + + + Disabled + ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/levcomp.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + MachineX86 + /SAFESEH:NO %(AdditionalOptions) + + + true + .\..\util/levcomp.bsc + + + levcomp + echo Building special levels +echo chdir ..\dat +chdir ..\dat +echo arch.des +..\util\levcomp.exe arch.des +echo barb.des +..\util\levcomp.exe barb.des +echo bigroom.des +..\util\levcomp.exe bigroom.des +echo castle.des +..\util\levcomp.exe castle.des +echo caveman.des +..\util\levcomp.exe caveman.des +echo endgame.des +..\util\levcomp.exe endgame.des +echo gehennom.des +..\util\levcomp.exe gehennom.des +echo healer.des +..\util\levcomp.exe healer.des +echo knight.des +..\util\levcomp.exe knight.des +echo knox.des +..\util\levcomp.exe knox.des +echo medusa.des +..\util\levcomp.exe medusa.des +echo mines.des +..\util\levcomp.exe mines.des +echo monk.des +..\util\levcomp.exe monk.des +echo oracle.des +..\util\levcomp.exe oracle.des +echo priest.des +..\util\levcomp.exe priest.des +echo ranger.des +..\util\levcomp.exe ranger.des +echo rogue.des +..\util\levcomp.exe rogue.des +echo samurai.des +..\util\levcomp.exe samurai.des +echo sokoban.des +..\util\levcomp.exe sokoban.des +echo tourist.des +..\util\levcomp.exe tourist.des +echo tower.des +..\util\levcomp.exe tower.des +echo valkyrie.des +..\util\levcomp.exe valkyrie.des +echo wizard .des +..\util\levcomp.exe wizard.des +echo yendor.des +..\util\levcomp.exe yendor.des +echo chdir ..\build +chdir ..\build + + + + + + .\..\util/levcomp.tlb + + + + + Disabled + ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + .\Debug/levcomp.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + /SAFESEH:NO %(AdditionalOptions) + + + true + .\..\util/levcomp.bsc + + + levcomp + echo Building special levels +echo chdir ..\dat +chdir ..\dat +echo arch.des +..\util\levcomp.exe arch.des +echo barb.des +..\util\levcomp.exe barb.des +echo bigroom.des +..\util\levcomp.exe bigroom.des +echo castle.des +..\util\levcomp.exe castle.des +echo caveman.des +..\util\levcomp.exe caveman.des +echo endgame.des +..\util\levcomp.exe endgame.des +echo gehennom.des +..\util\levcomp.exe gehennom.des +echo healer.des +..\util\levcomp.exe healer.des +echo knight.des +..\util\levcomp.exe knight.des +echo knox.des +..\util\levcomp.exe knox.des +echo medusa.des +..\util\levcomp.exe medusa.des +echo mines.des +..\util\levcomp.exe mines.des +echo monk.des +..\util\levcomp.exe monk.des +echo oracle.des +..\util\levcomp.exe oracle.des +echo priest.des +..\util\levcomp.exe priest.des +echo ranger.des +..\util\levcomp.exe ranger.des +echo rogue.des +..\util\levcomp.exe rogue.des +echo samurai.des +..\util\levcomp.exe samurai.des +echo sokoban.des +..\util\levcomp.exe sokoban.des +echo tourist.des +..\util\levcomp.exe tourist.des +echo tower.des +..\util\levcomp.exe tower.des +echo valkyrie.des +..\util\levcomp.exe valkyrie.des +echo wizard .des +..\util\levcomp.exe wizard.des +echo yendor.des +..\util\levcomp.exe yendor.des +echo chdir ..\build +chdir ..\build + + + + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + {ff144dfb-83a5-4d26-a598-715a2b354782} + false + + + + + + diff --git a/win/win32/vs2013/levstuff.vcxproj b/win/win32/vs2013/levstuff.vcxproj new file mode 100644 index 000000000..f7bb276f4 --- /dev/null +++ b/win/win32/vs2013/levstuff.vcxproj @@ -0,0 +1,124 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {FF144DFB-83A5-4D26-A598-715A2B354782} + MakeFileProj + + + + Makefile + false + v120 + + + Makefile + false + v120 + + + Makefile + false + v120 + + + Makefile + false + v120 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\Release\ + .\Release\ + .\Release\ + .\Release\ + nmake /f "levstuff.mak" + nmake /f "levstuff.mak" + nmake /f "levstuff.mak" /a + nmake /f "levstuff.mak" /a + + + ..\util\lev_lex.c + ..\util\lev_lex.c + $(NMakePreprocessorDefinitions) + $(NMakePreprocessorDefinitions) + $(NMakeIncludeSearchPath) + $(NMakeIncludeSearchPath) + $(NMakeForcedIncludes) + $(NMakeForcedIncludes) + $(NMakeAssemblySearchPath) + $(NMakeAssemblySearchPath) + $(NMakeForcedUsingAssemblies) + $(NMakeForcedUsingAssemblies) + .\levstuff___Win32_Debug0\ + .\levstuff___Win32_Debug0\ + .\levstuff___Win32_Debug0\ + .\levstuff___Win32_Debug0\ + nmake /f "levstuff.mak" + nmake /f "levstuff.mak" + nmake /f "levstuff.mak" /a + nmake /f "levstuff.mak" /a + + + ..\util\lev_lex.c + ..\util\lev_lex.c + $(NMakePreprocessorDefinitions) + $(NMakePreprocessorDefinitions) + $(NMakeIncludeSearchPath) + $(NMakeIncludeSearchPath) + $(NMakeForcedIncludes) + $(NMakeForcedIncludes) + $(NMakeAssemblySearchPath) + $(NMakeAssemblySearchPath) + $(NMakeForcedUsingAssemblies) + $(NMakeForcedUsingAssemblies) + + + + + + {ba3dd34c-04b7-40d0-b373-9329aa9e8945} + false + + + + + + diff --git a/win/win32/vs2013/makedefs.vcxproj b/win/win32/vs2013/makedefs.vcxproj new file mode 100644 index 000000000..b977ec5f8 --- /dev/null +++ b/win/win32/vs2013/makedefs.vcxproj @@ -0,0 +1,452 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {BA3DD34C-04B7-40D0-B373-9329AA9E8945} + + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\..\util\ + .\..\util\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + false + false + .\..\util\ + .\..\util\ + .\Debug\$(ProjectName)\ + .\Debug\$(ProjectName)\ + true + true + + + + .\..\util/makedefs.tlb + + + + + MaxSpeed + OnlyExplicitInline + .;..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/makedefs.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\..\util/makedefs.pdb + Console + false + + + MachineX86 + + + true + .\..\util/makedefs.bsc + + + Running makedefs + echo chdir ..\util +chdir ..\util +chdir +echo makedefs.exe -v +makedefs.exe -v +echo makedefs.exe -o +makedefs.exe -o +echo makedefs.exe -p +makedefs.exe -p +echo makedefs.exe -m +makedefs.exe -m +echo makedefs.exe -z +makedefs.exe -z +echo chdir ..\dat +chdir ..\dat +chdir +echo Generating NetHack database +echo ..\util\makedefs.exe -d +..\util\makedefs.exe -d +echo Generating rumors +echo ..\util\makedefs.exe -r +..\util\makedefs.exe -r +echo Generating quests +echo ..\util\makedefs.exe -q +..\util\makedefs.exe -q +echo Generating oracles +echo ..\util\makedefs.exe -h +..\util\makedefs.exe -h +echo Generating dungeon.pdf +echo ..\util\makedefs.exe -e +..\util\makedefs.exe -e +echo chdir ..\build +chdir ..\build +copy ..\win\share\tilemap.c ..\win\share\tiletxt.c + + + + + + .\..\util/makedefs.tlb + + + + + MaxSpeed + OnlyExplicitInline + .;..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/makedefs.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\..\util/makedefs.pdb + Console + false + + + + + true + .\..\util/makedefs.bsc + + + Running makedefs + echo chdir ..\util +chdir ..\util +chdir +echo makedefs.exe -v +makedefs.exe -v +echo makedefs.exe -o +makedefs.exe -o +echo makedefs.exe -p +makedefs.exe -p +echo makedefs.exe -m +makedefs.exe -m +echo makedefs.exe -z +makedefs.exe -z +echo chdir ..\dat +chdir ..\dat +chdir +echo Generating NetHack database +echo ..\util\makedefs.exe -d +..\util\makedefs.exe -d +echo Generating rumors +echo ..\util\makedefs.exe -r +..\util\makedefs.exe -r +echo Generating quests +echo ..\util\makedefs.exe -q +..\util\makedefs.exe -q +echo Generating oracles +echo ..\util\makedefs.exe -h +..\util\makedefs.exe -h +echo Generating dungeon.pdf +echo ..\util\makedefs.exe -e +..\util\makedefs.exe -e +echo chdir ..\build +chdir ..\build +copy ..\win\share\tilemap.c ..\win\share\tiletxt.c + + + + + + .\..\util/makedefs.tlb + + + + + Disabled + .;..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/makedefs.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + MachineX86 + /SAFESEH:NO %(AdditionalOptions) + + + true + .\..\util/makedefs.bsc + + + Running makedefs + echo chdir ..\util +chdir ..\util +chdir +echo makedefs.exe -v +makedefs.exe -v +echo makedefs.exe -o +makedefs.exe -o +echo makedefs.exe -p +makedefs.exe -p +echo makedefs.exe -m +makedefs.exe -m +echo makedefs.exe -z +makedefs.exe -z +echo chdir ..\dat +chdir ..\dat +chdir +echo Generating NetHack database +echo ..\util\makedefs.exe -d +..\util\makedefs.exe -d +echo Generating rumors +echo ..\util\makedefs.exe -r +..\util\makedefs.exe -r +echo Generating quests +echo ..\util\makedefs.exe -q +..\util\makedefs.exe -q +echo Generating oracles +echo ..\util\makedefs.exe -h +..\util\makedefs.exe -h +echo Generating dungeon.pdf +echo ..\util\makedefs.exe -e +..\util\makedefs.exe -e +echo chdir ..\build +chdir ..\build +copy ..\win\share\tilemap.c ..\win\share\tiletxt.c + + + + + + .\..\util/makedefs.tlb + + + + + Disabled + .;..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + .\Debug/makedefs.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + /SAFESEH:NO %(AdditionalOptions) + + + true + .\..\util/makedefs.bsc + + + Running makedefs + echo chdir ..\util +chdir ..\util +chdir +echo makedefs.exe -v +makedefs.exe -v +echo makedefs.exe -o +makedefs.exe -o +echo makedefs.exe -p +makedefs.exe -p +echo makedefs.exe -m +makedefs.exe -m +echo makedefs.exe -z +makedefs.exe -z +echo chdir ..\dat +chdir ..\dat +chdir +echo Generating NetHack database +echo ..\util\makedefs.exe -d +..\util\makedefs.exe -d +echo Generating rumors +echo ..\util\makedefs.exe -r +..\util\makedefs.exe -r +echo Generating quests +echo ..\util\makedefs.exe -q +..\util\makedefs.exe -q +echo Generating oracles +echo ..\util\makedefs.exe -h +..\util\makedefs.exe -h +echo Generating dungeon.pdf +echo ..\util\makedefs.exe -e +..\util\makedefs.exe -e +echo chdir ..\build +chdir ..\build +copy ..\win\share\tilemap.c ..\win\share\tiletxt.c + + + + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/win/win32/vs2013/nhdefkey.vcxproj b/win/win32/vs2013/nhdefkey.vcxproj new file mode 100644 index 000000000..9d5d01666 --- /dev/null +++ b/win/win32/vs2013/nhdefkey.vcxproj @@ -0,0 +1,197 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {6813477F-64B6-4B97-B230-438D0D233385} + Win32Proj + nhdefkey + + + + DynamicLibrary + true + v120 + NotSet + + + DynamicLibrary + true + v120 + NotSet + + + DynamicLibrary + false + v120 + true + NotSet + + + DynamicLibrary + false + v120 + true + NotSet + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + WIN32;WIN32CON;_DEBUG;_WINDOWS;_USRDLL;NHDEFKEY_EXPORTS;%(PreprocessorDefinitions) + $(ProjectDir)..\include;$(ProjectDir)..\sys\winnt;%(AdditionalIncludeDirectories) + false + + + Windows + true + $(ProjectDir)..\build\nhdefkey.def + true + true + + + copy $(TargetPath) ..\binary & if exist $(TargetDir)$(TargetName).PDB copy $(TargetDir)$(TargetName).PDB ..\binary + + + + + + + + + + + Level3 + Disabled + WIN32;WIN32CON;_DEBUG;_WINDOWS;_USRDLL;NHDEFKEY_EXPORTS;%(PreprocessorDefinitions) + $(ProjectDir)..\include;$(ProjectDir)..\sys\winnt;%(AdditionalIncludeDirectories) + false + + + Windows + true + $(ProjectDir)..\build\nhdefkey64.def + + + copy $(TargetPath) ..\binary & if exist $(TargetDir)$(TargetName).PDB copy $(TargetDir)$(TargetName).PDB ..\binary + + + + + + + + + Level3 + + + MaxSpeed + true + true + WIN32;WIN32CON;NDEBUG;_WINDOWS;_USRDLL;NHDEFKEY_EXPORTS;%(PreprocessorDefinitions) + $(ProjectDir)..\include;$(ProjectDir)..\sys\winnt;%(AdditionalIncludeDirectories) + false + + + Windows + true + true + true + $(ProjectDir)..\build\nhdefkey.def + true + true + + + copy $(TargetPath) ..\binary & if exist $(TargetDir)$(TargetName).PDB copy $(TargetDir)$(TargetName).PDB ..\binary + + + + + + + + + Level3 + + + MaxSpeed + true + true + WIN32;WIN32CON;NDEBUG;_WINDOWS;_USRDLL;NHDEFKEY_EXPORTS;%(PreprocessorDefinitions) + $(ProjectDir)..\include;$(ProjectDir)..\sys\winnt;%(AdditionalIncludeDirectories) + false + + + Windows + true + true + true + $(ProjectDir)..\build\nhdefkey64.def + + + copy $(TargetPath) ..\binary & if exist $(TargetDir)$(TargetName).PDB copy $(TargetDir)$(TargetName).PDB ..\binary + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/win/win32/vs2013/recover.vcxproj b/win/win32/vs2013/recover.vcxproj new file mode 100644 index 000000000..6320feaa0 --- /dev/null +++ b/win/win32/vs2013/recover.vcxproj @@ -0,0 +1,306 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {2F35F228-6733-4FE5-9B46-B3AA10D4BC2E} + + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\..\util\ + .\..\util\ + .\Debug\$(ProjectName)\ + .\Debug\$(ProjectName)\ + true + true + .\..\util\ + .\..\util\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + false + false + + + + .\Debug/recover.tlb + + + + + Disabled + ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/recover.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + MachineX86 + /SAFESEH:NO %(AdditionalOptions) + + + true + .\Debug/recover.bsc + + + install exe + copy $(OutDir)recover.exe ..\binary +if exist ..\doc\recover.txt copy ..\doc\recover.txt ..\binary\recover.txt + + + + + + .\Debug/recover.tlb + + + + + Disabled + ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + .\Debug/recover.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + /SAFESEH:NO %(AdditionalOptions) + + + true + .\Debug/recover.bsc + + + install exe + copy $(OutDir)recover.exe ..\binary +if exist ..\doc\recover.txt copy ..\doc\recover.txt ..\binary\recover.txt + + + + + + .\Release/recover.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/recover.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + .\Release/recover.pdb + Console + false + + + MachineX86 + + + true + .\Release/recover.bsc + + + copy $(OutDir)recover.exe ..\binary +if exist ..\doc\recover.txt copy ..\doc\recover.txt ..\binary\recover.txt + + + + + + .\Release/recover.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;..\sys\winnt;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/recover.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + .\Release/recover.pdb + Console + false + + + + + true + .\Release/recover.bsc + + + copy $(OutDir)recover.exe ..\binary +if exist ..\doc\recover.txt copy ..\doc\recover.txt ..\binary\recover.txt + + + + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + {0303a585-3f83-4bb7-af6b-1e12c8fb54ac} + false + + + {ba3dd34c-04b7-40d0-b373-9329aa9e8945} + false + + + + + + \ No newline at end of file diff --git a/win/win32/vs2013/tile2bmp.vcxproj b/win/win32/vs2013/tile2bmp.vcxproj new file mode 100644 index 000000000..710d7be7c --- /dev/null +++ b/win/win32/vs2013/tile2bmp.vcxproj @@ -0,0 +1,324 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {642BC75D-ABAF-403E-8224-7C725FD4CB42} + + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\..\util\ + .\..\util\ + .\Debug\$(ProjectName)\ + .\Debug\$(ProjectName)\ + true + true + .\..\util\ + .\..\util\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + false + false + + + + .\Debug/tile2bmp.tlb + + + + + Disabled + ..\include;..\sys\winnt;..\win\share;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/tile2bmp.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + ProgramDatabase + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + MachineX86 + /SAFESEH:NO %(AdditionalOptions) + + + true + .\Debug/tile2bmp.bsc + + + + + .\Debug/tile2bmp.tlb + + + + + Disabled + ..\include;..\sys\winnt;..\win\share;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + .\Debug/tile2bmp.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + ProgramDatabase + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + /SAFESEH:NO %(AdditionalOptions) + + + true + .\Debug/tile2bmp.bsc + + + + + .\Release/tile2bmp.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;..\sys\winnt;..\win\share;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/tile2bmp.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + .\Release/tile2bmp.pdb + Console + false + + + MachineX86 + + + true + .\Release/tile2bmp.bsc + + + + + .\Release/tile2bmp.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;..\sys\winnt;..\win\share;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/tile2bmp.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + .\Release/tile2bmp.pdb + Console + false + + + + + true + .\Release/tile2bmp.bsc + + + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + PACKED_FILE;%(PreprocessorDefinitions) + PACKED_FILE;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + TILETEXT;%(PreprocessorDefinitions) + TILETEXT;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + TILETEXT;%(PreprocessorDefinitions) + TILETEXT;%(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/win/win32/vs2013/tilemap.vcxproj b/win/win32/vs2013/tilemap.vcxproj new file mode 100644 index 000000000..f381613af --- /dev/null +++ b/win/win32/vs2013/tilemap.vcxproj @@ -0,0 +1,345 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {93F10526-209E-41D7-BBEA-775787876895} + + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\..\util\ + .\..\util\ + .\Debug\$(ProjectName)\ + .\Debug\$(ProjectName)\ + true + true + .\..\util\ + .\..\util\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + false + false + + + + .\Debug/tilemap.tlb + + + + + Disabled + ..\include;..\sys\winnt\include;..\win\share;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/tilemap.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + MachineX86 + /SAFESEH:NO %(AdditionalOptions) + + + true + .\Debug/tilemap.bsc + + + Generating src\tile.c + echo chdir ..\src +chdir ..\src +..\util\tilemap.exe +echo chdir ..\build +chdir ..\build + + + + + + .\Debug/tilemap.tlb + + + + + Disabled + ..\include;..\sys\winnt\include;..\win\share;%(AdditionalIncludeDirectories) + _DEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + .\Debug/tilemap.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + /SAFESEH:NO %(AdditionalOptions) + + + true + .\Debug/tilemap.bsc + + + Generating src\tile.c + echo chdir ..\src +chdir ..\src +..\util\tilemap.exe +echo chdir ..\build +chdir ..\build + + + + + + .\Release/tilemap.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;..\sys\winnt\include;..\win\share;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/tilemap.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + .\Release/tilemap.pdb + Console + false + + + MachineX86 + + + true + .\Release/tilemap.bsc + + + Generating src\tile.c + echo chdir ..\src +chdir ..\src +..\util\tilemap.exe +echo chdir ..\build +chdir ..\build + + + + + + .\Release/tilemap.tlb + + + + + MaxSpeed + OnlyExplicitInline + ..\include;..\sys\winnt\include;..\win\share;%(AdditionalIncludeDirectories) + NDEBUG;WIN32;_CONSOLE;WIN32CON;DLB;MSWIN_GRAPHICS;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/tilemap.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x1009 + + + true + .\Release/tilemap.pdb + Console + false + + + + + true + .\Release/tilemap.bsc + + + Generating src\tile.c + echo chdir ..\src +chdir ..\src +..\util\tilemap.exe +echo chdir ..\build +chdir ..\build + + + + + + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + %(AdditionalIncludeDirectories) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/win/win32/vs2013/tiles.vcxproj b/win/win32/vs2013/tiles.vcxproj new file mode 100644 index 000000000..f617646f0 --- /dev/null +++ b/win/win32/vs2013/tiles.vcxproj @@ -0,0 +1,124 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {55946465-FC65-47B3-BB48-742C7694C0D6} + MakeFileProj + + + + Makefile + false + v120 + + + Makefile + false + v120 + + + Makefile + false + v120 + + + Makefile + false + v120 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\..\util\ + .\..\util\ + .\Debug\ + .\Debug\ + nmake /f "tiles.mak" + nmake /f "tiles.mak" + nmake /f "tiles.mak" /a + nmake /f "tiles.mak" /a + + + ..\win\win32\tiles.bmp + ..\win\win32\tiles.bmp + $(NMakePreprocessorDefinitions) + $(NMakePreprocessorDefinitions) + $(NMakeIncludeSearchPath) + $(NMakeIncludeSearchPath) + $(NMakeForcedIncludes) + $(NMakeForcedIncludes) + $(NMakeAssemblySearchPath) + $(NMakeAssemblySearchPath) + $(NMakeForcedUsingAssemblies) + $(NMakeForcedUsingAssemblies) + .\..\util\ + .\..\util\ + .\Release\ + .\Release\ + nmake /f "tiles.mak" + nmake /f "tiles.mak" + nmake /f "tiles.mak" /a + nmake /f "tiles.mak" /a + + + ..\win\win32\tiles.bmp + ..\win\win32\tiles.bmp + $(NMakePreprocessorDefinitions) + $(NMakePreprocessorDefinitions) + $(NMakeIncludeSearchPath) + $(NMakeIncludeSearchPath) + $(NMakeForcedIncludes) + $(NMakeForcedIncludes) + $(NMakeAssemblySearchPath) + $(NMakeAssemblySearchPath) + $(NMakeForcedUsingAssemblies) + $(NMakeForcedUsingAssemblies) + + + + + + {642bc75d-abaf-403e-8224-7c725fd4cb42} + false + + + + + + diff --git a/win/win32/vs2013/uudecode.vcxproj b/win/win32/vs2013/uudecode.vcxproj new file mode 100644 index 000000000..7887565b1 --- /dev/null +++ b/win/win32/vs2013/uudecode.vcxproj @@ -0,0 +1,336 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {63F9B82B-F589-4082-ABE5-D4F0682050AB} + + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + Application + false + MultiByte + v120 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + .\..\util\ + .\..\util\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + false + false + .\Debug\$(ProjectName)\ + .\Debug\$(ProjectName)\ + true + true + .\..\util\ + .\..\util\ + + + + .\Release/uudecode.tlb + + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/uudecode.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Release/uudecode.pdb + Console + false + + + MachineX86 + + + true + .\Release/uudecode.bsc + + + echo chdir ..\win\win32 +chdir ..\win\win32 +echo decoding icon (nhico.uu to NetHack.ico) +..\..\util\uudecode.exe ../../sys/winnt/nhico.uu +echo decoding mnsel (mnsel.uu to mnsel.bmp) +..\..\util\uudecode.exe mnsel.uu +echo decoding mnselcnt (mnselcnt.uu to mnselcnt.bmp) +..\..\util\uudecode.exe mnselcnt.uu +echo decoding mnunsel (mnunsel.uu to mnunsel.bmp) +..\..\util\uudecode.exe mnunsel.uu +echo decoding petmark (petmark.uu to petmark.bmp) +..\..\util\uudecode.exe petmark.uu +echo decoding splash (splash.uu to splash.bmp) +..\..\util\uudecode.exe splash.uu +echo decoding tombstone (rip.uu to rip.bmp) +..\..\util\uudecode.exe rip.uu +chdir ..\..\binary + + + + + + .\Release/uudecode.tlb + + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + true + MultiThreaded + true + .\Release/uudecode.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + false + /FS %(AdditionalOptions) + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + .\Release/uudecode.pdb + Console + false + + + + + true + .\Release/uudecode.bsc + + + echo chdir ..\win\win32 +chdir ..\win\win32 +echo decoding icon (nhico.uu to NetHack.ico) +..\..\util\uudecode.exe ../../sys/winnt/nhico.uu +echo decoding mnsel (mnsel.uu to mnsel.bmp) +..\..\util\uudecode.exe mnsel.uu +echo decoding mnselcnt (mnselcnt.uu to mnselcnt.bmp) +..\..\util\uudecode.exe mnselcnt.uu +echo decoding mnunsel (mnunsel.uu to mnunsel.bmp) +..\..\util\uudecode.exe mnunsel.uu +echo decoding petmark (petmark.uu to petmark.bmp) +..\..\util\uudecode.exe petmark.uu +echo decoding splash (splash.uu to splash.bmp) +..\..\util\uudecode.exe splash.uu +echo decoding tombstone (rip.uu to rip.bmp) +..\..\util\uudecode.exe rip.uu +chdir ..\..\binary + + + + + + .\Debug/uudecode.tlb + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + .\Debug/uudecode.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + MachineX86 + /SAFESEH:NO %(AdditionalOptions) + + + true + .\Debug/uudecode.bsc + + + echo chdir ..\win\win32 +chdir ..\win\win32 +echo decoding icon (nhico.uu to NetHack.ico) +..\..\util\uudecode.exe ../../sys/winnt/nhico.uu +echo decoding mnsel (mnsel.uu to mnsel.bmp) +..\..\util\uudecode.exe mnsel.uu +echo decoding mnselcnt (mnselcnt.uu to mnselcnt.bmp) +..\..\util\uudecode.exe mnselcnt.uu +echo decoding mnunsel (mnunsel.uu to mnunsel.bmp) +..\..\util\uudecode.exe mnunsel.uu +echo decoding petmark (petmark.uu to petmark.bmp) +..\..\util\uudecode.exe petmark.uu +echo decoding splash (splash.uu to splash.bmp) +..\..\util\uudecode.exe splash.uu +echo decoding tombstone (rip.uu to rip.bmp) +..\..\util\uudecode.exe rip.uu +chdir ..\..\binary + + + + + + .\Debug/uudecode.tlb + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + .\Debug/uudecode.pch + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + .\$(ConfigurationName)\$(ProjectName)\ + Level3 + true + EditAndContinue + false + /FS %(AdditionalOptions) + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + true + .\$(ConfigurationName)\$(ProjectName)\ + Console + false + + + /SAFESEH:NO %(AdditionalOptions) + + + true + .\Debug/uudecode.bsc + + + echo chdir ..\win\win32 +chdir ..\win\win32 +echo decoding icon (nhico.uu to NetHack.ico) +..\..\util\uudecode.exe ../../sys/winnt/nhico.uu +echo decoding mnsel (mnsel.uu to mnsel.bmp) +..\..\util\uudecode.exe mnsel.uu +echo decoding mnselcnt (mnselcnt.uu to mnselcnt.bmp) +..\..\util\uudecode.exe mnselcnt.uu +echo decoding mnunsel (mnunsel.uu to mnunsel.bmp) +..\..\util\uudecode.exe mnunsel.uu +echo decoding petmark (petmark.uu to petmark.bmp) +..\..\util\uudecode.exe petmark.uu +echo decoding splash (splash.uu to splash.bmp) +..\..\util\uudecode.exe splash.uu +echo decoding tombstone (rip.uu to rip.bmp) +..\..\util\uudecode.exe rip.uu +chdir ..\..\binary + + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + \ No newline at end of file diff --git a/win/win32/winMS.h b/win/win32/winMS.h index 3656ee608..419dd429c 100644 --- a/win/win32/winMS.h +++ b/win/win32/winMS.h @@ -164,6 +164,17 @@ void mswin_preference_update(const char *pref); char *mswin_getmsghistory(BOOLEAN_P init); void mswin_putmsghistory(const char * msg,BOOLEAN_P); +#ifdef STATUS_VIA_WINDOWPORT +void mswin_status_init(void); +void mswin_status_finish(void); +void mswin_status_enablefield(int fieldidx, const char *nm, const char *fmt, boolean enable); +void mswin_status_update(int idx, genericptr_t ptr, int chg, int percent); + +# ifdef STATUS_HILITES +void mswin_status_threshold(int fldidx, int thresholdtype, anything threshold, int behavior, int under, int over); +# endif /* STATUS_HILITES */ +#endif /*STATUS_VIA_WINDOWPORT*/ + /* helper function */ HWND mswin_hwnd_from_winid(winid wid); winid mswin_winid_from_type(int type); @@ -211,9 +222,10 @@ extern COLORREF message_fg_color; #define SYSCLR_TO_BRUSH(x) ((HBRUSH)((x) + 1)) /* unicode stuff */ -#ifdef UNICODE +#define NH_CODEPAGE (SYMHANDLING(H_IBM)?GetOEMCP():GetACP()) +#ifdef _UNICODE #define NH_W2A(w, a, cb) ( WideCharToMultiByte( \ - CP_ACP, \ + NH_CODEPAGE, \ 0, \ (w), \ -1, \ @@ -223,7 +235,7 @@ extern COLORREF message_fg_color; NULL), (a) ) #define NH_A2W(a, w, cb) ( MultiByteToWideChar( \ - CP_ACP, \ + NH_CODEPAGE, \ 0, \ (a), \ -1, \ diff --git a/win/win32/winhack.c b/win/win32/winhack.c index ff5e9b73b..ec707c2f6 100644 --- a/win/win32/winhack.c +++ b/win/win32/winhack.c @@ -15,9 +15,8 @@ #include "mhmain.h" #include "mhmap.h" -#ifndef __BORLANDC__ -#include -#else /* Borland redefines "boolean" in shlwapi.h so just use the little bit we need */ +/* Borland and MinGW redefine "boolean" in shlwapi.h, + so just use the little bit we need */ typedef struct _DLLVERSIONINFO { DWORD cbSize; @@ -34,7 +33,7 @@ typedef struct _DLLVERSIONINFO typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *); -#endif +/* end of shlwapi.h */ /* Minimal common control library version Version _WIN_32IE Platform/IE @@ -84,6 +83,9 @@ int APIENTRY WinMain(HINSTANCE hInstance, DWORD major, minor; boolean resuming; + UNREFERENCED_PARAMETER(hPrevInstance); + UNREFERENCED_PARAMETER(lpCmdLine); + UNREFERENCED_PARAMETER(nCmdShow); /* ensure that we don't access violate on a panic() */ windowprocs.win_raw_print = mswin_raw_print; diff --git a/win/win32/winhack.rc b/win/win32/winhack.rc index 10e4c2410..4533a6781 100644 --- a/win/win32/winhack.rc +++ b/win/win32/winhack.rc @@ -121,13 +121,13 @@ BEGIN END IDD_NHTEXT DIALOGEX 0, 0, 172, 178 -STYLE DS_SETFOREGROUND | WS_CHILD | WS_THICKFRAME -EXSTYLE WS_EX_CLIENTEDGE +STYLE WS_CHILD | WS_CLIPSIBLINGS | WS_THICKFRAME +EXSTYLE WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT FONT 8, "MS Sans Serif", 0, 0 BEGIN - DEFPUSHBUTTON "OK",IDOK,54,163,50,14 EDITTEXT IDC_TEXT_CONTROL,0,0,172,160,ES_MULTILINE | - ES_OEMCONVERT | ES_READONLY | WS_VSCROLL | WS_HSCROLL + ES_OEMCONVERT | ES_READONLY | WS_VSCROLL | WS_HSCROLL | NOT WS_TABSTOP + DEFPUSHBUTTON "OK",IDOK,54,163,50,14,BS_FLAT | NOT WS_TABSTOP END IDD_MENU DIALOGEX 0, 0, 187, 153 @@ -135,11 +135,11 @@ STYLE WS_CHILD | WS_CLIPSIBLINGS | WS_THICKFRAME EXSTYLE WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT FONT 8, "MS Sans Serif", 0, 0 BEGIN - DEFPUSHBUTTON "OK",IDOK,7,132,50,14,BS_FLAT | NOT WS_TABSTOP - PUSHBUTTON "Cancel",IDCANCEL,130,132,50,14,BS_FLAT | NOT WS_TABSTOP LISTBOX IDC_MENU_LIST,10,10,170,55,LBS_SORT EDITTEXT IDC_MENU_TEXT,10,70,170,60,ES_MULTILINE | ES_OEMCONVERT | ES_READONLY | WS_VSCROLL | WS_HSCROLL | NOT WS_TABSTOP + DEFPUSHBUTTON "OK",IDOK,7,132,50,14,BS_FLAT | NOT WS_TABSTOP + PUSHBUTTON "Cancel",IDCANCEL,130,132,50,14,BS_FLAT | NOT WS_TABSTOP END IDD_GETLIN DIALOG DISCARDABLE 0, 0, 131, 29