Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2

This commit is contained in:
nhmall
2018-11-29 21:08:28 -05:00
17 changed files with 922 additions and 626 deletions

View File

@@ -229,44 +229,44 @@ particularly intriguing modification to help out with the game. The gods
of the dungeon sometimes make note of the names of the worst of these
miscreants in this, the list of Dungeoneers:
Adam Aronow J. Ali Harlow Mikko Juola
Alex Kompel Janet Walz Nathan Eady
Alex Smith Janne Salmijarvi Norm Meluch
Andreas Dorn Jean-Christophe Collet Olaf Seibert
Andy Church Jeff Bailey Pasi Kallinen
Andy Swanson Jochen Erwied Pat Rankin
Ari Huttunen John Kallen Patric Mueller
Barton House John Rupley Paul Winner
Benson I. Margulies John S. Bien Pierre Martineau
Bill Dyer Johnny Lee Ralf Brown
Boudewijn Waijers Jon W{tte Ray Chason
Bruce Cox Jonathan Handler Richard Addison
Bruce Holloway Joshua Delahunty Richard Beigel
Bruce Mewborne Keizo Yamamoto Richard P. Hughey
Carl Schelin Ken Arnold Rob Menke
Chris Russo Ken Arromdee Robin Bandy
David Cohrs Ken Lorber Robin Johnson
David Damerell Ken Washikita Roderick Schertler
David Gentzel Kevin Darcy Roland McGrath
David Hairston Kevin Hugo Ron Van Iwaarden
Dean Luick Kevin Sitze Ronnen Miller
Del Lamb Kevin Smolkowski Ross Brown
Derek S. Ray Kevin Sweet Sascha Wostmann
Deron Meranda Lars Huttar Scott Bigham
Dion Nicolaas Leon Arnott Scott R. Turner
Dylan O'Donnell M. Drew Streib Sean Hunt
Eric Backus Malcolm Ryan Stephen Spackman
Eric Hendrickson Mark Gooderum Stefan Thielscher
Eric R. Smith Mark Modrall Stephen White
Eric S. Raymond Marvin Bressler Steve Creps
Erik Andersen Matthew Day Steve Linhart
Frederick Roeber Merlyn LeRoy Steve VanDevender
Gil Neiger Michael Allison Teemu Suikki
Greg Laskin Michael Feir Tim Lennan
Greg Olson Michael Hamel Timo Hakulinen
Gregg Wonderly Michael Sokolov Tom Almy
Hao-yang Wang Mike Engber Tom West
Helge Hafting Mike Gallop Warren Cheung
Irina Rempt-Drijfhout Mike Passaretti Warwick Allison
Izchak Miller Mike Stephenson Yitzhak Sapir
Adam Aronow Janet Walz Nathan Eady
Alex Kompel Janne Salmijarvi Norm Meluch
Alex Smith Jean-Christophe Collet Olaf Seibert
Andreas Dorn Jeff Bailey Pasi Kallinen
Andy Church Jochen Erwied Pat Rankin
Andy Swanson John Kallen Patric Mueller
Ari Huttunen John Rupley Paul Winner
Barton House John S. Bien Pierre Martineau
Benson I. Margulies Johnny Lee Ralf Brown
Bill Dyer Jon W{tte Ray Chason
Boudewijn Waijers Jonathan Handler Richard Addison
Bruce Cox Joshua Delahunty Richard Beigel
Bruce Holloway Karl Garrison Richard P. Hughey
Bruce Mewborne Keizo Yamamoto Rob Menke
Carl Schelin Ken Arnold Robin Bandy
Chris Russo Ken Arromdee Robin Johnson
David Cohrs Ken Lorber Roderick Schertler
David Damerell Ken Washikita Roland McGrath
David Gentzel Kevin Darcy Ron Van Iwaarden
David Hairston Kevin Hugo Ronnen Miller
Dean Luick Kevin Sitze Ross Brown
Del Lamb Kevin Smolkowski Sascha Wostmann
Derek S. Ray Kevin Sweet Scott Bigham
Deron Meranda Lars Huttar Scott R. Turner
Dion Nicolaas Leon Arnott Sean Hunt
Dylan O'Donnell M. Drew Streib Stephen Spackman
Eric Backus Malcolm Ryan Stefan Thielscher
Eric Hendrickson Mark Gooderum Stephen White
Eric R. Smith Mark Modrall Steve Creps
Eric S. Raymond Marvin Bressler Steve Linhart
Erik Andersen Matthew Day Steve VanDevender
Frederick Roeber Merlyn LeRoy Teemu Suikki
Gil Neiger Michael Allison Tim Lennan
Greg Laskin Michael Feir Timo Hakulinen
Greg Olson Michael Hamel Tom Almy
Gregg Wonderly Michael Sokolov Tom West
Hao-yang Wang Mike Engber Warren Cheung
Helge Hafting Mike Gallop Warwick Allison
Irina Rempt-Drijfhout Mike Passaretti Yitzhak Sapir
Izchak Miller Mike Stephenson
J. Ali Harlow Mikko Juola

View File

@@ -24,7 +24,7 @@
.ds vr "NetHack 3.6
.ds f0 "\*(vr
.ds f1
.ds f2 "November 27, 2018
.ds f2 "November 29, 2018
.
.\" A note on some special characters:
.\" \(lq = left double quote
@@ -4950,46 +4950,47 @@ in this, the list of Dungeoneers:
center;
c c c.
.\"TABLE_START
Adam Aronow J. Ali Harlow Mikko Juola
Alex Kompel Janet Walz Nathan Eady
Alex Smith Janne Salmijarvi Norm Meluch
Andreas Dorn Jean-Christophe Collet Olaf Seibert
Andy Church Jeff Bailey Pasi Kallinen
Andy Swanson Jochen Erwied Pat Rankin
Ari Huttunen John Kallen Patric Mueller
Barton House John Rupley Paul Winner
Benson I. Margulies John S. Bien Pierre Martineau
Bill Dyer Johnny Lee Ralf Brown
Boudewijn Waijers Jon W{tte Ray Chason
Bruce Cox Jonathan Handler Richard Addison
Bruce Holloway Joshua Delahunty Richard Beigel
Bruce Mewborne Keizo Yamamoto Richard P. Hughey
Carl Schelin Ken Arnold Rob Menke
Chris Russo Ken Arromdee Robin Bandy
David Cohrs Ken Lorber Robin Johnson
David Damerell Ken Washikita Roderick Schertler
David Gentzel Kevin Darcy Roland McGrath
David Hairston Kevin Hugo Ron Van Iwaarden
Dean Luick Kevin Sitze Ronnen Miller
Del Lamb Kevin Smolkowski Ross Brown
Derek S. Ray Kevin Sweet Sascha Wostmann
Deron Meranda Lars Huttar Scott Bigham
Dion Nicolaas Leon Arnott Scott R. Turner
Dylan O'Donnell M. Drew Streib Sean Hunt
Eric Backus Malcolm Ryan Stephen Spackman
Eric Hendrickson Mark Gooderum Stefan Thielscher
Eric R. Smith Mark Modrall Stephen White
Eric S. Raymond Marvin Bressler Steve Creps
Erik Andersen Matthew Day Steve Linhart
Frederick Roeber Merlyn LeRoy Steve VanDevender
Gil Neiger Michael Allison Teemu Suikki
Greg Laskin Michael Feir Tim Lennan
Greg Olson Michael Hamel Timo Hakulinen
Gregg Wonderly Michael Sokolov Tom Almy
Hao-yang Wang Mike Engber Tom West
Helge Hafting Mike Gallop Warren Cheung
Irina Rempt-Drijfhout Mike Passaretti Warwick Allison
Izchak Miller Mike Stephenson Yitzhak Sapir
Adam Aronow Janet Walz Nathan Eady
Alex Kompel Janne Salmijarvi Norm Meluch
Alex Smith Jean-Christophe Collet Olaf Seibert
Andreas Dorn Jeff Bailey Pasi Kallinen
Andy Church Jochen Erwied Pat Rankin
Andy Swanson John Kallen Patric Mueller
Ari Huttunen John Rupley Paul Winner
Barton House John S. Bien Pierre Martineau
Benson I. Margulies Johnny Lee Ralf Brown
Bill Dyer Jon W{tte Ray Chason
Boudewijn Waijers Jonathan Handler Richard Addison
Bruce Cox Joshua Delahunty Richard Beigel
Bruce Holloway Karl Garrison Richard P. Hughey
Bruce Mewborne Keizo Yamamoto Rob Menke
Carl Schelin Ken Arnold Robin Bandy
Chris Russo Ken Arromdee Robin Johnson
David Cohrs Ken Lorber Roderick Schertler
David Damerell Ken Washikita Roland McGrath
David Gentzel Kevin Darcy Ron Van Iwaarden
David Hairston Kevin Hugo Ronnen Miller
Dean Luick Kevin Sitze Ross Brown
Del Lamb Kevin Smolkowski Sascha Wostmann
Derek S. Ray Kevin Sweet Scott Bigham
Deron Meranda Lars Huttar Scott R. Turner
Dion Nicolaas Leon Arnott Sean Hunt
Dylan O'Donnell M. Drew Streib Stephen Spackman
Eric Backus Malcolm Ryan Stefan Thielscher
Eric Hendrickson Mark Gooderum Stephen White
Eric R. Smith Mark Modrall Steve Creps
Eric S. Raymond Marvin Bressler Steve Linhart
Erik Andersen Matthew Day Steve VanDevender
Frederick Roeber Merlyn LeRoy Teemu Suikki
Gil Neiger Michael Allison Tim Lennan
Greg Laskin Michael Feir Timo Hakulinen
Greg Olson Michael Hamel Tom Almy
Gregg Wonderly Michael Sokolov Tom West
Hao-yang Wang Mike Engber Warren Cheung
Helge Hafting Mike Gallop Warwick Allison
Irina Rempt-Drijfhout Mike Passaretti Yitzhak Sapir
Izchak Miller Mike Stephenson
J. Ali Harlow Mikko Juola
.\"TABLE_END Do not delete this line.
.TE
.pg

View File

@@ -45,7 +45,7 @@
%.au
\author{Original version - Eric S. Raymond\\
(Edited and expanded for 3.6 by Mike Stephenson and others)}
\date{November 27, 2018}
\date{November 29, 2018}
\maketitle
@@ -5523,46 +5523,47 @@ in this, the list of Dungeoneers:
\begin{center}
\begin{tabular}{llll}
%TABLE_START
Adam Aronow & J. Ali Harlow & Mikko Juola\\
Alex Kompel & Janet Walz & Nathan Eady\\
Alex Smith & Janne Salmij\"{a}rvi & Norm Meluch\\
Andreas Dorn & Jean-Christophe Collet & Olaf Seibert\\
Andy Church & Jeff Bailey & Pasi Kallinen\\
Andy Swanson & Jochen Erwied & Pat Rankin\\
Ari Huttunen & John Kallen & Patric Mueller\\
Barton House & John Rupley & Paul Winner\\
Benson I. Margulies & John S. Bien & Pierre Martineau\\
Bill Dyer & Johnny Lee & Ralf Brown\\
Boudewijn Waijers & Jon W\{tte & Ray Chason\\
Bruce Cox & Jonathan Handler & Richard Addison\\
Bruce Holloway & Joshua Delahunty & Richard Beigel\\
Bruce Mewborne & Keizo Yamamoto & Richard P. Hughey\\
Carl Schelin & Ken Arnold & Rob Menke\\
Chris Russo & Ken Arromdee & Robin Bandy\\
David Cohrs & Ken Lorber & Robin Johnson\\
David Damerell & Ken Washikita & Roderick Schertler\\
David Gentzel & Kevin Darcy & Roland McGrath\\
David Hairston & Kevin Hugo & Ron Van Iwaarden\\
Dean Luick & Kevin Sitze & Ronnen Miller\\
Del Lamb & Kevin Smolkowski & Ross Brown\\
Derek S. Ray & Kevin Sweet & Sascha Wostmann\\
Deron Meranda & Lars Huttar & Scott Bigham\\
Dion Nicolaas & Leon Arnott & Scott R. Turner\\
Dylan O'Donnell & M. Drew Streib & Sean Hunt\\
Eric Backus & Malcolm Ryan & Stephen Spackman\\
Eric Hendrickson & Mark Gooderum & Stefan Thielscher\\
Eric R. Smith & Mark Modrall & Stephen White\\
Eric S. Raymond & Marvin Bressler & Steve Creps\\
Erik Andersen & Matthew Day & Steve Linhart\\
Frederick Roeber & Merlyn LeRoy & Steve VanDevender\\
Gil Neiger & Michael Allison & Teemu Suikki\\
Greg Laskin & Michael Feir & Tim Lennan\\
Greg Olson & Michael Hamel & Timo Hakulinen\\
Gregg Wonderly & Michael Sokolov & Tom Almy\\
Hao-yang Wang & Mike Engber & Tom West\\
Helge Hafting & Mike Gallop & Warren Cheung\\
Irina Rempt-Drijfhout & Mike Passaretti & Warwick Allison\\
Izchak Miller & Mike Stephenson & Yitzhak Sapir
Adam Aronow & Janet Walz & Nathan Eady\\
Alex Kompel & Janne Salmij\"{a}rvi & Norm Meluch\\
Alex Smith & Jean-Christophe Collet & Olaf Seibert\\
Andreas Dorn & Jeff Bailey & Pasi Kallinen\\
Andy Church & Jochen Erwied & Pat Rankin\\
Andy Swanson & John Kallen & Patric Mueller\\
Ari Huttunen & John Rupley & Paul Winner\\
Barton House & John S. Bien & Pierre Martineau\\
Benson I. Margulies & Johnny Lee & Ralf Brown\\
Bill Dyer & Jon W\{tte & Ray Chason\\
Boudewijn Waijers & Jonathan Handler & Richard Addison\\
Bruce Cox & Joshua Delahunty & Richard Beigel\\
Bruce Holloway & Karl Garrison & Richard P. Hughey\\
Bruce Mewborne & Keizo Yamamoto & Rob Menke\\
Carl Schelin & Ken Arnold & Robin Bandy\\
Chris Russo & Ken Arromdee & Robin Johnson\\
David Cohrs & Ken Lorber & Roderick Schertler\\
David Damerell & Ken Washikita & Roland McGrath\\
David Gentzel & Kevin Darcy & Ron Van Iwaarden\\
David Hairston & Kevin Hugo & Ronnen Miller\\
Dean Luick & Kevin Sitze & Ross Brown\\
Del Lamb & Kevin Smolkowski & Sascha Wostmann\\
Derek S. Ray & Kevin Sweet & Scott Bigham\\
Deron Meranda & Lars Huttar & Scott R. Turner\\
Dion Nicolaas & Leon Arnott & Sean Hunt\\
Dylan O'Donnell & M. Drew Streib & Stephen Spackman\\
Eric Backus & Malcolm Ryan & Stefan Thielscher\\
Eric Hendrickson & Mark Gooderum & Stephen White\\
Eric R. Smith & Mark Modrall & Steve Creps\\
Eric S. Raymond & Marvin Bressler & Steve Linhart\\
Erik Andersen & Matthew Day & Steve VanDevender\\
Frederick Roeber & Merlyn LeRoy & Teemu Suikki\\
Gil Neiger & Michael Allison & Tim Lennan\\
Greg Laskin & Michael Feir & Timo Hakulinen\\
Greg Olson & Michael Hamel & Tom Almy\\
Gregg Wonderly & Michael Sokolov & Tom West\\
Hao-yang Wang & Mike Engber & Warren Cheung\\
Helge Hafting & Mike Gallop & Warwick Allison\\
Irina Rempt-Drijfhout & Mike Passaretti & Yitzhak Sapir\\
Izchak Miller & Mike Stephenson\\
J. Ali Harlow & Mikko Juola
%TABLE_END Do not delete this line.
\end{tabular}
\end{center}

View File

@@ -225,6 +225,10 @@ scattering of objects might leave source location with wrong thing displayed
for configurations with 'long int' larger than 'int', lev_comp wrote some
garbage into the *.lev files, but nethack seemed unaffected by that
(at least on little-endian hardare) and loaded the levels successfully
stinking cloud placed near water could kill underwater creatures
applying--rather than wielding--a cursed polearm or weapon-tool didn't report
that it had become welded to hero's hand(s)
the message when riding a steed into a pit was composed but not shown
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
@@ -242,6 +246,8 @@ ensure tmp_at() structures are initialized for all code paths when swallowed
trapped-vs-levitation/flying change broke Sting releasing hero from web
life-saving while poly'd and Unchanging wasn't restoring u.mh (HP as monster)
change in searching stopped finding unseen monsters except hiders and eels
buliding with EXTRA_SANITY_CHECKS enabled would issue "no monster to remove"
warning if steed was killed out from under the hero
tty: turn off an optimization that is the suspected cause of Windows reported
partial status lines following level changes
tty: ensure that current status fields are always copied to prior status
@@ -263,6 +269,8 @@ windows-gui: In nethackw, there could be conflicts between menu accelerators
and an extra choice accelerator to fix H7132.
windows-gui: recognize new BL_RESET in status_update; no change in behavior yet
windows-gui: align hpbar behavior at zero hit points with tty behavior
windows-gui: add support for status_hilites for the player condition field
such as stone, slime, strngl, blind, deaf, stun, conf, etc.
windows-tty: Specify both width and height when creating font for width testing
windows-tty: To counter lag problems that were occuring with the Win32 console
port, implement a console back buffer to reduce the number of calls
@@ -281,9 +289,14 @@ windows-tty: augment codepage850-to-Unicode mappings that are not displayable
with codepage437-to-Unicode mappings that are, to help ensure
that rogue-level characters in the status line match their appearance
on the map
windows-tty: add support for mouse_support:0 (disabled), mouse_support:1
(fully-functional including disabling QuickEdit on Windows console
because QuickEdit intercepts the mouse clicks so NetHack never sees
them), or mouse_support:2 (NetHack support on but QuickEdit left as is)
windows: Added ntassert() mechanism for Windows based port use
windows: heed OPTIONS=symset:default in config file if it is present
windows: add curses window port
windows: add curses window port which can co-exist with tty in exe and be
selectable in user config file via OPTIONS=windowtype:curses
tty: significant optimizations for performance and per field rendering
tty: use WC2_FLUSH_STATUS to buffer changes until BL_FLUSH is received
tty: support BL_RESET in status_update to force an update to all status fields

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mon.c $NHDT-Date: 1543100460 2018/11/24 23:01:00 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.271 $ */
/* NetHack 3.6 mon.c $NHDT-Date: 1543455827 2018/11/29 01:43:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.272 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -483,13 +483,18 @@ register struct monst *mtmp;
/* [what about ceiling clingers?] */
inpool = (is_pool(mtmp->mx, mtmp->my)
&& !(is_flyer(mtmp->data) || is_floater(mtmp->data)));
&& (!(is_flyer(mtmp->data) || is_floater(mtmp->data))
/* there's no "above the surface" on the plane of water */
|| Is_waterlevel(&u.uz)));
inlava = (is_lava(mtmp->mx, mtmp->my)
&& !(is_flyer(mtmp->data) || is_floater(mtmp->data)));
infountain = IS_FOUNTAIN(levl[mtmp->mx][mtmp->my].typ);
/* Flying and levitation keeps our steed out of the liquid */
/* (but not water-walking or swimming) */
/* Flying and levitation keeps our steed out of the liquid
(but not water-walking or swimming; note: if hero is in a
water location on the Plane of Water, flight and levitating
are blocked so this (Flying || Levitation) test fails there
and steed will be subject to water effects, as intended) */
if (mtmp == u.usteed && (Flying || Levitation))
return 0;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 region.c $NHDT-Date: 1542765361 2018/11/21 01:56:01 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.42 $ */
/* NetHack 3.6 region.c $NHDT-Date: 1543455828 2018/11/29 01:43:48 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.43 $ */
/* Copyright (c) 1996 by Jean-Christophe Collet */
/* NetHack may be freely redistributed. See license for details. */
@@ -947,10 +947,16 @@ genericptr_t p2;
struct monst *mtmp;
int dam;
/*
* Gas clouds can't be targetted at water locations, but they can
* start next to water and spread over it.
*/
reg = (NhRegion *) p1;
dam = reg->arg.a_int;
if (p2 == (genericptr_t) 0) { /* This means *YOU* Bozo! */
if (u.uinvulnerable || nonliving(youmonst.data) || Breathless)
if (u.uinvulnerable || nonliving(youmonst.data) || Breathless
|| Underwater)
return FALSE;
if (!Blind) {
Your("%s sting.", makeplural(body_part(EYE)));
@@ -973,6 +979,11 @@ genericptr_t p2;
adult green dragon is not affected by gas cloud, baby one is */
if (!(nonliving(mtmp->data) || is_vampshifter(mtmp))
&& !breathless(mtmp->data)
/* not is_swimmer(); assume that non-fish are swimming on
the surface and breathing the air above it periodically
unless located at water spot on plane of water */
&& !((mtmp->data->mlet == S_EEL || Is_waterlevel(&u.uz))
&& is_pool(mtmp->mx, mtmp->my))
/* exclude monsters with poison gas breath attack:
adult green dragon and Chromatic Dragon (and iron golem,
but nonliving() and breathless() tests also catch that) */

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 steed.c $NHDT-Date: 1542765364 2018/11/21 01:56:04 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.57 $ */
/* NetHack 3.6 steed.c $NHDT-Date: 1543522486 2018/11/29 20:14:46 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.58 $ */
/* Copyright (c) Kevin Hugo, 1998-1999. */
/* NetHack may be freely redistributed. See license for details. */
@@ -481,7 +481,7 @@ int reason; /* Player was thrown off etc. */
{
struct monst *mtmp;
struct obj *otmp;
coord cc;
coord cc, steedcc;
const char *verb = "fall";
boolean repair_leg_damage = (Wounded_legs != 0L);
unsigned save_utrap = u.utrap;
@@ -548,19 +548,44 @@ int reason; /* Player was thrown off etc. */
/* Release the steed and saddle */
u.usteed = 0;
u.ugallop = 0L;
/* Set player and steed's position. Try moving the player first
unless we're in the midst of creating a bones file. */
if (reason == DISMOUNT_BONES) {
/* move the steed to an adjacent square */
if (enexto(&cc, u.ux, u.uy, mtmp->data))
rloc_to(mtmp, cc.x, cc.y);
else /* evidently no room nearby; move steed elsewhere */
(void) rloc(mtmp, FALSE);
return;
/*
* rloc(), rloc_to(), and monkilled()->mondead()->m_detach() all
* expect mtmp to be on the map or else have mtmp->mx be 0, but
* setting the latter to 0 here would interfere with dropping
* the saddle. Prior to 3.6.2, being off the map didn't matter.
*
* place_monster() expects mtmp to be alive and not be u.usteed.
*
* Unfortunately, <u.ux,u.uy> (former steed's implicit location)
* might now be occupied by an engulfer, so we can't just put mtmp
* at that spot. An engulfer's previous spot will be unoccupied
* but we don't know where that was and even if we did, it might
* be hostile terrain.
*/
steedcc.x = u.ux, steedcc.y = u.uy;
if (m_at(u.ux, u.uy))
(void) enexto(&steedcc, u.ux, u.uy, mtmp->data);
if (!m_at(steedcc.x, steedcc.y)) {
if (mtmp->mhp < 1)
mtmp->mhp = 0; /* make sure it isn't negative */
mtmp->mhp++; /* force at least one hit point, possibly resurrecting */
place_monster(mtmp, steedcc.x, steedcc.y);
mtmp->mhp--; /* take the extra hit point away: cancel resurrection */
} else {
impossible("Dismounting: can't place former steed on map.");
}
if (!DEADMONSTER(mtmp)) {
place_monster(mtmp, u.ux, u.uy);
/* Set player and steed's position. Try moving the player first
unless we're in the midst of creating a bones file. */
if (reason == DISMOUNT_BONES) {
/* move the steed to an adjacent square */
if (enexto(&cc, u.ux, u.uy, mtmp->data))
rloc_to(mtmp, cc.x, cc.y);
else /* evidently no room nearby; move steed elsewhere */
(void) rloc(mtmp, FALSE);
return;
}
if (!u.uswallow && !u.ustuck && have_spot) {
struct permonst *mdat = mtmp->data;

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 trap.c $NHDT-Date: 1543100476 2018/11/24 23:01:16 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.311 $ */
/* NetHack 3.6 trap.c $NHDT-Date: 1543515862 2018/11/29 18:24:22 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.312 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1185,6 +1185,7 @@ unsigned trflags;
if (!Sokoban) {
char verbbuf[BUFSZ];
*verbbuf = '\0';
if (u.usteed) {
if ((trflags & RECURSIVETRAP) != 0)
Sprintf(verbbuf, "and %s fall",
@@ -1202,8 +1203,9 @@ unsigned trflags;
} else {
Strcpy(verbbuf,
!plunged ? "fall" : (Flying ? "dive" : "plunge"));
You("%s into %s pit!", verbbuf, a_your[trap->madeby_u]);
}
if (*verbbuf)
You("%s into %s pit!", verbbuf, a_your[trap->madeby_u]);
}
/* wumpus reference */
if (Role_if(PM_RANGER) && !trap->madeby_u && !trap->once

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 wield.c $NHDT-Date: 1525012623 2018/04/29 14:37:03 $ $NHDT-Branch: master $:$NHDT-Revision: 1.56 $ */
/* NetHack 3.6 wield.c $NHDT-Date: 1543492132 2018/11/29 11:48:52 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.58 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2009. */
/* NetHack may be freely redistributed. See license for details. */
@@ -575,8 +575,13 @@ const char *verb; /* "rub",&c */
} else {
struct obj *oldwep = uwep;
You("now wield %s.", doname(obj));
setuwep(obj);
if (will_weld(obj)) {
/* hope none of ready_weapon()'s early returns apply here... */
(void) ready_weapon(obj);
} else {
You("now wield %s.", doname(obj));
setuwep(obj);
}
if (flags.pushweapon && oldwep && uwep != oldwep)
setuswapwep(oldwep);
}

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 pcmain.c $NHDT-Date: 1524413707 2018/04/22 16:15:07 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.74 $ */
/* NetHack 3.6 pcmain.c $NHDT-Date: 1543465755 2018/11/29 04:29:15 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.101 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
@@ -177,7 +177,7 @@ _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR);*/
choose_windows(DEFAULT_WINDOW_SYS);
#else
choose_windows(default_window_sys);
if (argc > 1
if (argc >= 1
&& !strcmpi(default_window_sys, "mswin")
&& strstri(argv[0], "nethackw.exe"))
iflags.windowtype_locked = TRUE;

File diff suppressed because it is too large Load Diff

View File

@@ -71,11 +71,10 @@ DEBUGINFO = Y
#
# You'll have to set PDCURSES_H to the correct location of the
# PDCurses header (.h) files and PDCURSES_C to the location
# of your PDCurses C files which must already be resident on
# your machine.
# of your PDCurses C files.
#
ADD_CURSES=Y
PDCURSES_TOP=..\..\pdcurses
#ADD_CURSES=Y
#PDCURSES_TOP=..\..\pdcurses
#
#==============================================================================
# This marks the end of the BUILD DECISIONS section.
@@ -90,9 +89,13 @@ PDCURSES_TOP=..\..\pdcurses
# Nothing below here should have to be changed.#
# #
################################################
#
#==============================================================================
# Set the gamedir according to your preference.
# If not present prior to compilation it gets created.
#
# Source directories. Makedefs hardcodes these, don't change them.
#
@@ -119,6 +122,11 @@ cc=cl
link=link
rc=Rc
#
#==========================================
# Exe File Info.
#==========================================
#
#
# Optional high-quality BSD random number generation routines
@@ -272,7 +280,7 @@ 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+
# 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
@@ -298,19 +306,19 @@ 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
VOBJ11 = $(O)mcastu.o $(O)mhitm.o $(O)mhitu.o $(O)minion.o
VOBJ12 = $(O)mklev.o $(O)mkmap.o $(O)mkmaze.o $(O)mkobj.o
VOBJ13 = $(O)mkroom.o $(O)mon.o $(O)mondata.o $(O)monmove.o
VOBJ14 = $(O)monst.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
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)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
@@ -354,8 +362,7 @@ GUIHDR = $(MSWIN)\mhaskyn.h $(MSWIN)\mhdlg.h $(MSWIN)\mhfont.h \
COMCTRL = comctl32.lib
KEYDLLS = $(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll \
$(GAMEDIR)\nhraykey.dll
KEYDLLS = $(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll $(GAMEDIR)\nhraykey.dll
TILEUTIL16 = $(UTIL)\tile2bmp.exe
TILEBMP16 = $(SRC)\tiles.bmp
@@ -392,7 +399,7 @@ PDCLIBOBJS = $(O)addch.o $(O)addchstr.o $(O)addstr.o $(O)attr.o $(O)beep.o
PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o $(O)pdcscrn.o \
$(O)pdcsetsc.o $(O)pdcutil.o
PDCLIB = $(O)pdcurses.lib
PDCLIB = $(O)\pdcurses.lib
PDCINCL = /I$(PDCURSES_TOP) /I$(PDCSRC) /I$(PDCWINCON)
@@ -445,23 +452,12 @@ DATABASE = $(DAT)\data.base
!IF "$(ADD_CURSES)" == "Y"
#CURSESDEF=-D"PDC_DLL_BUILD" -D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
CURSESDEF=-D"CURSES_GRAPHICS" -D"CURSES_BRIEF_INCLUDE"
CURSESINCL=..\win\curses
!ELSE
CURSDEF=
CURSESLIB=
CURSESINCL=
!ENDIF
!IFNDEF ADD_CURSES
INCLDIR= /I..\include /I..\sys\winnt
!ELSE
INCLDIR= /I..\include /I..\sys\winnt /I$(CURSESINCL)
!ENDIF
#===========================================
#---- start of Visual Studio Specific macros
#===========================================
ccommon= -c -nologo -D"_CONSOLE" -D"_CRT_NONSTDC_NO_DEPRECATE" -D"_CRT_SECURE_NO_DEPRECATE" \
-D"_LIB" -D"_SCL_SECURE_NO_DEPRECATE" -D"_VC80_UPGRADE=0x0600" -D"DLB" -D"_MBCS" \
-DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -D"NDEBUG" -D"YY_NO_UNISTD_H" $(CURSESDEF) \
@@ -531,6 +527,12 @@ conlibs = $(baselibs)
guilibs = $(winlibs)
#
!IFNDEF ADD_CURSES
INCLDIR= /I..\include /I..\sys\winnt
!ELSE
INCLDIR= /I..\include /I..\sys\winnt /I$(CURSESINCL)
!ENDIF
#==========================================
# Util builds
#==========================================
@@ -550,10 +552,6 @@ DLB = nhdat
DLB =
! ENDIF
#==========================================
#---- end of Visual Studio Specific macros
#==========================================
#==========================================
#================ RULES ==================
#==========================================
@@ -632,6 +630,9 @@ DLB =
{$(WCURSES)}.c{$(OBJ)}.o:
@$(cc) $(PDCINCL) $(cflagsBuild) -Fo$@ $<
#{$(WCURSES)}.txt{$(DAT)}.txt:
# @copy $< $@
#==========================================
# Rules for files in PDCurses
#==========================================
@@ -683,12 +684,10 @@ $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \
if exist $(DAT)\symbols copy $(DAT)\symbols $(GAMEDIR)
if exist $(DOC)\guidebook.txt copy $(DOC)\guidebook.txt $(GAMEDIR)\Guidebook.txt
if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt
$(U)makedefs -c
-if not exist $(GAMEDIR)\defaults.nh copy fixed_defaults.nh $(GAMEDIR)\defaults.nh
-if not exist $(GAMEDIR)\defaults.nh copy $(MSWSYS)\defaults.nh $(GAMEDIR)\defaults.nh
-if not exist $(GAMEDIR)\record. goto>$(GAMEDIR)\record.
@if exist $(GAMEDIR)\NetHack.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHack.PDB to conserve space
@if exist $(GAMEDIR)\NetHackW.PDB echo NOTE: You may want to remove $(GAMEDIR:\=/)/NetHackW.PDB to conserve space
-if not exist $(GAMEDIR)\defaults.nh copy $(MSWSYS)\defaults.nh $(GAMEDIR)\defaults.nh
-if not exist $(GAMEDIR)\record. goto>$(GAMEDIR)\record.
echo install done > $@
# copy $(MSWSYS)\winnt.hlp $(GAMEDIR)
@@ -753,10 +752,10 @@ $(O)console.res: $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico
@$(rc) -r -fo$@ -i$(MSWSYS) -dNDEBUG $(MSWSYS)\console.rc
#==========================================================================
#==========================================
# The game targets.
#==========================================================================
#[VS-start] Visual C
#==========================================
# The section for linking the NetHack image looks a little strange at
# first, especially if you are used to UNIX makes, or NDMAKE. It is
# Microsoft nmake specific, and it gets around the problem of the
@@ -778,8 +777,6 @@ $(O)console.res: $(MSWSYS)\console.rc $(MSWSYS)\NetHack.ico
# with ^ as we have done below. Every occurence
# of a <tab> in $(ALLOBJ) is replaced by
# <+><return><tab>.
#[VS-end]
#==========================================================================
GAMEOBJ=$(ALLOBJ:^ =^
)
@@ -898,14 +895,20 @@ $(GAMEDIR)\nhraykey.dll : $(O)$(@B).o $(O)gamedir.tag $(O)$(@B).def
/PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).map" /DEF:$(O)$(@B).def \
/IMPLIB:$(O)$(@B).lib -out:$@ $(O)$(@B).o
#==========================================
#=========== SECONDARY TARGETS ============
#==========================================
#
# Secondary Targets.
#
#==========================================
# Makedefs Stuff
#==========================================
$(U)nhsizes.exe: $(O)nhsizes.o
@echo Linking $(@:\=/)
$(link) $(lflagsBuild) -out:$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o
$(O)nhsizes.o: $(CONFIG_H) nhsizes.c
@$(cc) $(cflagsBuild) -Fo$@ nhsizes.c
$(U)makedefs.exe: $(MAKEOBJS)
@echo Linking $(@:\=/)
@$(link) $(lflagsBuild) /PDB:"$(O)$(@B).PDB" /MAP:"$(O)$(@B).MAP" -out:$@ $(MAKEOBJS)
@@ -1057,24 +1060,6 @@ $(U)dgncomp.exe: $(DGNCOMPOBJS)
)
<<
#=================================================
# For a couple of devteam utilities
#=================================================
$(U)nhsizes.exe: $(O)nhsizes.o
@echo Linking $(@:\=/)
$(link) $(lflagsBuild) -out:$@ $(O)nhsizes.o $(O)panic.o $(O)alloc.o
$(U)nhsizes2.exe: $(O)nhsizes2.o
@echo Linking $(@:\=/)
$(link) $(lflagsBuild) -out:$@ $(O)nhsizes2.o $(O)panic.o $(O)alloc.o
$(O)nhsizes.o: $(CONFIG_H) nhsizes.c
@$(cc) $(cflagsBuild) -Fo$@ nhsizes.c
$(O)nhsizes2.o: $(CONFIG_H) nhsizes2.c
@$(cc) $(cflagsBuild) -Fo$@ nhsizes2.c
#=================================================
# Create directory for holding object files
#=================================================
@@ -1084,6 +1069,34 @@ $(O)obj.tag:
@if not exist $(OBJ)\*.* mkdir $(OBJ)
@echo directory created >$@
#==========================================
# Notify of any CL environment variables
# in effect since they change the compiler
# options.
#==========================================
$(O)envchk.tag: $(O)obj.tag
! IF "$(TARGET_CPU)"=="x64"
@echo Windows x64 64-bit target build
! ELSE
@echo Windows x86 32-bit target build
! ENDIF
!IFDEF TTYOBJ
@echo tty window support included
! IF "$(ADD_CURSES)"=="Y"
@echo curses window support also included
! ENDIF
!ENDIF
! IF "$(CL)"!=""
# @echo Warning, the CL Environment variable is defined:
# @echo CL=$(CL)
! ENDIF
echo envchk >$@
#==========================================
#=========== SECONDARY TARGETS ============
#==========================================
#==========================================
# DLB utility and nhdat file creation
#==========================================
@@ -1245,36 +1258,12 @@ $(O)til2bm32.o: $(WSHR)\tile2bmp.c $(HACK_H) $(TILE_H) $(MSWSYS)\win32api.h
@$(cc) $(cflagsBuild) -I$(WSHR) /DPACKED_FILE /DTILE_X=32 /DTILE_Y=32 /Fo$@ $(WSHR)\tile2bmp.c
#==========================================
# PDCurses Library
# PDCurses
#==========================================
$(O)pdcurses.lib : $(PDCLIBOBJS) $(PDCOBJS)
$(O)\pdcurses.lib : $(PDCLIBOBJS) $(PDCOBJS)
lib -nologo /out:$@ $(PDCLIBOBJS) $(PDCOBJS)
#==========================================
# Notify of any CL environment variables
# in effect since they change the compiler
# options.
#==========================================
$(O)envchk.tag: $(O)obj.tag
! IF "$(TARGET_CPU)"=="x64"
@echo Windows x64 64-bit target build
! ELSE
@echo Windows x86 32-bit target build
! ENDIF
!IFDEF TTYOBJ
@echo tty window support included
! IF "$(ADD_CURSES)"=="Y"
@echo curses window support also included
! ENDIF
!ENDIF
! IF "$(CL)"!=""
# @echo Warning, the CL Environment variable is defined:
# @echo CL=$(CL)
! ENDIF
echo envchk >$@
#==========================================
# Housekeeping
#==========================================
@@ -1370,7 +1359,6 @@ 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 $(SRC)\fixed_defaults.nh del $(SRC)\fixed_defaults.nh
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
@@ -1480,8 +1468,6 @@ $(O)winhack.o: $(HACK_H) $(MSWIN)\winhack.c
$(O)ttystub.o: $(HACK_H) $(MSWSYS)\stubs.c
@$(cc) $(cflagsBuild) -DTTYSTUB -Fo$@ $(MSWSYS)\stubs.c
$(O)tile.o: $(SRC)\tile.c $(HACK_H)
#
# util dependencies
#
@@ -1495,21 +1481,18 @@ $(O)panic.o: $(U)panic.c $(CONFIG_H)
(O)cppregex.o: $(O)cppregex.cpp $(HACK_H)
@$(CC) $(cflagsBuild) -Fo$@ ..\sys\share\cppregex.cpp
#
# Other dependencies needed by some ports
#
# curses window port dependencies
$(O)cursdial.o: $(WCURSES)\cursdial.c $(WCURSES)\cursdial.h $(INCL)\wincurs.h
$(O)cursinit.c: $(WCURSES)\cursinit.c $(WCURSES)\cursinit.h $(INCL)\wincurs.h
$(O)cursinvt.c: $(WCURSES)\cursinvt.c $(WCURSES)\cursinvt.h $(INCL)\wincurs.h
$(O)cursmain.c: $(WCURSES)\cursmain.c $(WCURSES)\cursmain.h $(INCL)\wincurs.h
$(O)cursmesg.c: $(WCURSES)\cursmesg.c $(WCURSES)\cursmesg.h $(INCL)\wincurs.h
$(O)cursmisc.c: $(WCURSES)\cursmisc.c $(WCURSES)\cursmisc.h $(INCL)\wincurs.h
$(O)cursstat.c: $(WCURSES)\cursstat.c $(WCURSES)\cursstat.h $(INCL)\wincurs.h
$(O)curswins.c: $(WCURSES)\curswins.c $(WCURSES)\curswins.h $(INCL)\wincurs.h
#
$(O)\cursdial.o: $(WCURSES)\cursdial.c $(WCURSES)\cursdial.h $(INCL)\wincurs.h
$(O)\cursinit.c: $(WCURSES)\cursinit.c $(WCURSES)\cursinit.h $(INCL)\wincurs.h
$(O)\cursinvt.c: $(WCURSES)\cursinvt.c $(WCURSES)\cursinvt.h $(INCL)\wincurs.h
$(O)\cursmain.c: $(WCURSES)\cursmain.c $(WCURSES)\cursmain.h $(INCL)\wincurs.h
$(O)\cursmesg.c: $(WCURSES)\cursmesg.c $(WCURSES)\cursmesg.h $(INCL)\wincurs.h
$(O)\cursmisc.c: $(WCURSES)\cursmisc.c $(WCURSES)\cursmisc.h $(INCL)\wincurs.h
$(O)\cursstat.c: $(WCURSES)\cursstat.c $(WCURSES)\cursstat.h $(INCL)\wincurs.h
$(O)\curswins.c: $(WCURSES)\curswins.c $(WCURSES)\curswins.h $(INCL)\wincurs.h
#
# The rest are stolen from sys/unix/Makefile.src,
# with the following changes:
@@ -1582,6 +1565,7 @@ $(O)wintext.o: ..\win\X11\wintext.c $(HACK_H) $(INCL)\winX.h $(INCL)\xwindow.h
@$(CC) $(cflagsBuild) -Fo$@ ..\win\X11\wintext.c
$(O)winval.o: ..\win\X11\winval.c $(HACK_H) $(INCL)\winX.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) $(cflagsBuild) $(GNOMEINC) -Fo$@ ..\win\gnome\gnaskstr.c

View File

@@ -0,0 +1,93 @@
# $NHDT-Date: 1524689255 2018/04/25 20:47:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $
# Copyright (c) 2018 by Michael Allison
# NetHack may be freely redistributed. See license for details.
# 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
SHELL=cmd.exe
default: all
all: tools ../util/dgn_yacc.c ../util/dgn_lex.c
rebuild: clean all
clean:
-del ..\util\dgn_lex.c
-del ..\util\dgn_yacc.c
-del ..\include\dgn_comp.h
tools:
ifneq "$(YACC)" ""
@echo Yacc-alike set to $(YACC)
@echo YTABC set to $(YTABC)
@echo YTABH set to $(YTABH)
endif
ifneq "$(LEX)" ""
@echo Lex-alike set to $(LEX)
@echo LEXYYC set to $(LEXYYC)
endif
#==========================================
# Dungeon Compiler Stuff
#==========================================
../include/dgn_comp.h : ../util/dgn_comp.y
ifeq "$(YACC)" ""
@echo Using pre-built dgn_comp.h
chdir ..\include
copy /y ..\sys\share\dgn_comp.h
copy /b dgn_comp.h+,,
chdir ..\src
else
chdir ..\util
$(YACC) -d dgn_comp.y
copy $(YTABC) $@
copy $(YTABH) ..\include\dgn_comp.h
@del $(YTABC)
@del $(YTABH)
chdir ..\build
endif
../util/dgn_yacc.c : ../util/dgn_comp.y
ifeq "$(YACC)" ""
@echo Using pre-built dgn_yacc.c
chdir ..\util
copy /y ..\sys\share\dgn_yacc.c
copy /b dgn_yacc.c+,,
chdir ..\src
else
chdir ..\util
$(YACC) -d dgn_comp.y
copy $(YTABC) $@
copy $(YTABH) ..\include\dgn_comp.h
@del $(YTABC)
@del $(YTABH)
chdir ..\build
endif
../util/dgn_lex.c: ../util/dgn_comp.l
ifeq "$(LEX)" ""
@echo Using pre-built dgn_lex.c
chdir ..\util
copy /y ..\sys\share\dgn_lex.c
copy /b dgn_lex.c+,,
chdir ..\src
else
chdir ..\util
$(LEX) dgn_comp.l
copy $(LEXYYC) $@
@del $(LEXYYC)
chdir ..\build
endif

View File

@@ -0,0 +1,100 @@
# $NHDT-Date: 1524689255 2018/04/25 20:47:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.12 $
# Copyright (c) 2018 by Michael Allison
# NetHack may be freely redistributed. See license for details.
# 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
SHELL = cmd.exe
default: all
all: tools ../util/lev_yacc.c ../util/lev_lex.c
rebuild: clean all
clean:
-del ..\util\lev_lex.c
-del ..\util\lev_yacc.c
-del ..\include\lev_comp.h
tools:
ifneq "$(YACC)" ""
@echo Yacc-alike set to "$(YACC)"
@echo YTABC set to $(YTABC)
@echo YTABH set to $(YTABH)
endif
ifneq "$(LEX)" ""
@echo Lex-alike set to "$(LEX)"
@echo LEXYYC set to $(LEXYYC)
endif
#==========================================
# Level Compiler Stuff
#==========================================
../include/lev_comp.h: ../util/lev_comp.y
@echo Yacc-alike set to "$(YACC)"
ifeq "$(YACC)" ""
@echo Using pre-built lev_comp.h
chdir ..\include
copy /y ..\sys\share\lev_comp.h
copy /b lev_comp.h+,,
chdir ..\src
else
@echo Generating lev_yacc.c and lev_comp.h
chdir ..\util
$(YACC) -d lev_comp.y
copy $(YTABC) $@
copy $(YTABH) ..\include\lev_comp.h
@del $(YTABC)
@del $(YTABH)
chdir ..\src
endif
../util/lev_yacc.c: ../util/lev_comp.y
@echo Yacc-alike set to "$(YACC)"
ifeq "$(YACC)" ""
@echo Using pre-built lev_yacc.c
chdir ..\util
copy /y ..\sys\share\lev_yacc.c
copy /b lev_yacc.c+,,
chdir ..\src
else
@echo Generating lev_yacc.c and lev_comp.h
chdir ..\util
$(YACC) -d lev_comp.y
copy $(YTABC) $@
copy $(YTABH) ..\include\lev_comp.h
@del $(YTABC)
@del $(YTABH)
chdir ..\src
endif
../util/lev_lex.c: ../util/lev_comp.l
@echo Lex-alike set to "$(LEX)"
ifeq "$(LEX)" ""
@echo Using pre-built lev_lex.c
chdir ..\util
copy /y ..\sys\share\lev_lex.c
copy /b lev_lex.c+,,
chdir ..\src
else
@echo Generating lev_lex.c
chdir ..\util
$(LEX) lev_comp.l
copy $(LEXYYC) $@
@del $(LEXYYC)
chdir ..\src
endif

View File

@@ -0,0 +1,27 @@
#$NHDT-Date: 1524689255 2018/04/25 20:47:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.4 $
# Copyright (c) 2002 by Michael Allison
# NetHack may be freely redistributed. See license for details.
SHELL=cmd.exe
default: all
all: ../win/win32/tiles.bmp
clean:
-del ..\src\win\win32\tiles.bmp
-del ..\win\win32\tiles.bmp
#==========================================
# Building the tiles file tile.bmp
#==========================================
../src/tiles.bmp : ../win/share/monsters.txt ../win/share/objects.txt \
../win/share/other.txt
chdir ..\src
..\util\tile2bmp.exe tiles.bmp
chdir ..\build
..\win\win32\tiles.bmp: ..\src\tiles.bmp
@copy ..\src\tiles.bmp ..\win\win32\tiles.bmp

View File

@@ -31,7 +31,7 @@
<AdditionalDependencies>comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Manifest>
<AdditionalManifestFiles>NethackW.exe.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
<AdditionalManifestFiles>$(WinWin32Dir)NethackW.exe.manifest;%(AdditionalManifestFiles)</AdditionalManifestFiles>
</Manifest>
</ItemDefinitionGroup>
<ItemGroup>
@@ -184,4 +184,4 @@
<Target Name="AfterRebuild">
<MSBuild Projects="afternethack.proj" Targets="Build" Properties="Configuration=$(Configuration)" />
</Target>
</Project>
</Project>