Merge branch 'NetHack-3.7' into to500

This commit is contained in:
nhmall
2026-04-30 17:09:02 -04:00
22 changed files with 242 additions and 189 deletions
+43 -43
View File
@@ -292,46 +292,46 @@ particularly intriguing modification to help out with the game. The
NetHack Development Team sometimes makes note of the names of the worst
of these miscreants in this, the list of Dungeoneers:
Adam Aronow Izchak Miller Mike Stephenson
Alex Kompel J. Ali Harlow Mikko Juola
Alex Smith Janet Walz Nathan Eady
Andreas Dorn Janne Salmijarvi Norm Meluch
Andy Church Jean-Christophe Collet Olaf Seibert
Andy Swanson Jeff Bailey Pasi Kallinen
Andy Thomson Jochen Erwied Pat Rankin
Ari Huttunen John Kallen Patric Mueller
Bart 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 Karl Garrison Richard P. Hughey
Carl Schelin Keizo Yamamoto Rob Menke
Chris Russo Keith Simpson Robin Bandy
David Cohrs Ken Arnold Robin Johnson
David Damerell Ken Arromdee Roderick Schertler
David Gentzel Ken Lorber Roland McGrath
David Hairston Ken Washikita Ron Van Iwaarden
Dean Luick Kevin Darcy Ronnen Miller
Del Lamb Kevin Hugo Ross Brown
Derek S. Ray Kevin Sitze Sascha Wostmann
Deron Meranda Kevin Smolkowski Scott Bigham
Dion Nicolaas Kevin Sweet Scott R. Turner
Dylan O'Donnell Lars Huttar Sean Hunt
Eric Backus Leon Arnott Stephen Spackman
Eric Hendrickson M. Drew Streib Stefan Thielscher
Eric R. Smith Malcolm Ryan Stephen White
Eric S. Raymond Mark Gooderum Steve Creps
Erik Andersen Mark Modrall Steve Linhart
Fredrik Ljungdahl Marvin Bressler Steve VanDevender
Frederick Roeber Matthew Day Teemu Suikki
G. Branden Robinson Merlyn LeRoy Tim Lennan
Gil Neiger Michael Allison Timo Hakulinen
Greg Laskin Michael Feir Tom Almy
Greg Olson Michael Hamel Tom West
Gregg Wonderly Michael Meyer Warren Cheung
Hao-yang Wang Michael Sokolov Warwick Allison
Helge Hafting Mike Engber Yitzhak Sapir
Ingo Paschke Mike Gallop
Irina Rempt-Drijfhout Mike Passaretti
Adam Aronow Irina Rempt-Drijfhout Mike Gallop
Alex Kompel Izchak Miller Mike Passaretti
Alex Smith J. Ali Harlow Mike Stephenson
Andreas Dorn Janet Walz Mikko Juola
Andy Church Janne Salmijarvi Nathan Eady
Andy Swanson Jean-Christophe Collet Norm Meluch
Andy Thomson Jeff Bailey Olaf Seibert
Ari Huttunen Jochen Erwied Pasi Kallinen
Bart House John Kallen Pat Rankin
Benson I. Margulies John Rupley Patric Mueller
Bill Dyer John S. Bien Paul Winner
Boudewijn Waijers Johnny Lee Pierre Martineau
Bruce Cox Jon W{tte Ralf Brown
Bruce Holloway Jonathan Handler Ray Chason
Bruce Mewborne Joshua Delahunty Richard Addison
Cameron Root Karl Garrison Richard Beigel
Carl Schelin Keizo Yamamoto Richard P. Hughey
Chris Russo Keith Simpson Rob Menke
David Cohrs Ken Arnold Robin Bandy
David Damerell Ken Arromdee Robin Johnson
David Gentzel Ken Lorber Roderick Schertler
David Hairston Ken Washikita Roland McGrath
Dean Luick Kestrel Gregorich-Trevor Ron Van Iwaarden
Del Lamb Kevin Darcy Ronnen Miller
Derek S. Ray Kevin Hugo Ross Brown
Deron Meranda Kevin Sitze Sascha Wostmann
Dion Nicolaas Kevin Smolkowski Scott Bigham
Dylan O'Donnell Kevin Sweet Scott R. Turner
Eric Backus Lars Huttar Sean Hunt
Eric Hendrickson Leon Arnott Stephen Spackman
Eric R. Smith M. Drew Streib Stefan Thielscher
Eric S. Raymond Malcolm Ryan Stephen White
Erik Andersen Mark Gooderum Steve Creps
Fredrik Ljungdahl Mark Modrall Steve Linhart
Frederick Roeber Marvin Bressler Steve VanDevender
G. Branden Robinson Matthew Day Teemu Suikki
Gil Neiger Merlyn LeRoy Tim Lennan
Greg Laskin Michael Allison Timo Hakulinen
Greg Olson Michael Feir Tom Almy
Gregg Wonderly Michael Hamel Tom West
Hao-yang Wang Michael Meyer Warren Cheung
Helge Hafting Michael Sokolov Warwick Allison
Ingo Paschke Mike Engber Yitzhak Sapir
+43 -43
View File
@@ -6811,49 +6811,49 @@ miscreants in this, the list of Dungeoneers:
center;
c2 c2 c.
.\"TABLE_START
Adam Aronow Izchak Miller Mike Stephenson
Alex Kompel J. Ali Harlow Mikko Juola
Alex Smith Janet Walz Nathan Eady
Andreas Dorn Janne Salmijarvi Norm Meluch
Andy Church Jean-Christophe Collet Olaf Seibert
Andy Swanson Jeff Bailey Pasi Kallinen
Andy Thomson Jochen Erwied Pat Rankin
Ari Huttunen John Kallen Patric Mueller
Bart 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 Karl Garrison Richard P. Hughey
Carl Schelin Keizo Yamamoto Rob Menke
Chris Russo Keith Simpson Robin Bandy
David Cohrs Ken Arnold Robin Johnson
David Damerell Ken Arromdee Roderick Schertler
David Gentzel Ken Lorber Roland McGrath
David Hairston Ken Washikita Ron Van Iwaarden
Dean Luick Kevin Darcy Ronnen Miller
Del Lamb Kevin Hugo Ross Brown
Derek S. Ray Kevin Sitze Sascha Wostmann
Deron Meranda Kevin Smolkowski Scott Bigham
Dion Nicolaas Kevin Sweet Scott R. Turner
Dylan O'Donnell Lars Huttar Sean Hunt
Eric Backus Leon Arnott Stephen Spackman
Eric Hendrickson M. Drew Streib Stefan Thielscher
Eric R. Smith Malcolm Ryan Stephen White
Eric S. Raymond Mark Gooderum Steve Creps
Erik Andersen Mark Modrall Steve Linhart
Fredrik Ljungdahl Marvin Bressler Steve VanDevender
Frederick Roeber Matthew Day Teemu Suikki
G. Branden Robinson Merlyn LeRoy Tim Lennan
Gil Neiger Michael Allison Timo Hakulinen
Greg Laskin Michael Feir Tom Almy
Greg Olson Michael Hamel Tom West
Gregg Wonderly Michael Meyer Warren Cheung
Hao-yang Wang Michael Sokolov Warwick Allison
Helge Hafting Mike Engber Yitzhak Sapir
Ingo Paschke Mike Gallop
Irina Rempt-Drijfhout Mike Passaretti
Adam Aronow Irina Rempt-Drijfhout Mike Gallop
Alex Kompel Izchak Miller Mike Passaretti
Alex Smith J. Ali Harlow Mike Stephenson
Andreas Dorn Janet Walz Mikko Juola
Andy Church Janne Salmijarvi Nathan Eady
Andy Swanson Jean-Christophe Collet Norm Meluch
Andy Thomson Jeff Bailey Olaf Seibert
Ari Huttunen Jochen Erwied Pasi Kallinen
Bart House John Kallen Pat Rankin
Benson I. Margulies John Rupley Patric Mueller
Bill Dyer John S. Bien Paul Winner
Boudewijn Waijers Johnny Lee Pierre Martineau
Bruce Cox Jon W{tte Ralf Brown
Bruce Holloway Jonathan Handler Ray Chason
Bruce Mewborne Joshua Delahunty Richard Addison
Cameron Root Karl Garrison Richard Beigel
Carl Schelin Keizo Yamamoto Richard P. Hughey
Chris Russo Keith Simpson Rob Menke
David Cohrs Ken Arnold Robin Bandy
David Damerell Ken Arromdee Robin Johnson
David Gentzel Ken Lorber Roderick Schertler
David Hairston Ken Washikita Roland McGrath
Dean Luick Kestrel Gregorich-Trevor Ron Van Iwaarden
Del Lamb Kevin Darcy Ronnen Miller
Derek S. Ray Kevin Hugo Ross Brown
Deron Meranda Kevin Sitze Sascha Wostmann
Dion Nicolaas Kevin Smolkowski Scott Bigham
Dylan O'Donnell Kevin Sweet Scott R. Turner
Eric Backus Lars Huttar Sean Hunt
Eric Hendrickson Leon Arnott Stephen Spackman
Eric R. Smith M. Drew Streib Stefan Thielscher
Eric S. Raymond Malcolm Ryan Stephen White
Erik Andersen Mark Gooderum Steve Creps
Fredrik Ljungdahl Mark Modrall Steve Linhart
Frederick Roeber Marvin Bressler Steve VanDevender
G. Branden Robinson Matthew Day Teemu Suikki
Gil Neiger Merlyn LeRoy Tim Lennan
Greg Laskin Michael Allison Timo Hakulinen
Greg Olson Michael Feir Tom Almy
Gregg Wonderly Michael Hamel Tom West
Hao-yang Wang Michael Meyer Warren Cheung
Helge Hafting Michael Sokolov Warwick Allison
Ingo Paschke Mike Engber Yitzhak Sapir
.\"TABLE_END Do not delete this line.
.TE
.BR 1
+43 -43
View File
@@ -7555,49 +7555,49 @@ of these miscreants in this, the list of Dungeoneers:
\begin{center}
\begin{tabular}{llll}
%TABLE_START
Adam Aronow & Izchak Miller & Mike Stephenson\\
Alex Kompel & J. Ali Harlow & Mikko Juola\\
Alex Smith & Janet Walz & Nathan Eady\\
Andreas Dorn & Janne Salmij\"{a}rvi & Norm Meluch\\
Andy Church & Jean-Christophe Collet & Olaf Seibert\\
Andy Swanson & Jeff Bailey & Pasi Kallinen\\
Andy Thomson & Jochen Erwied & Pat Rankin\\
Ari Huttunen & John Kallen & Patric Mueller\\
Bart 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 & Karl Garrison & Richard P. Hughey\\
Carl Schelin & Keizo Yamamoto & Rob Menke\\
Chris Russo & Keith Simpson & Robin Bandy\\
David Cohrs & Ken Arnold & Robin Johnson\\
David Damerell & Ken Arromdee & Roderick Schertler\\
David Gentzel & Ken Lorber & Roland McGrath\\
David Hairston & Ken Washikita & Ron Van Iwaarden\\
Dean Luick & Kevin Darcy & Ronnen Miller\\
Del Lamb & Kevin Hugo & Ross Brown\\
Derek S. Ray & Kevin Sitze & Sascha Wostmann\\
Deron Meranda & Kevin Smolkowski & Scott Bigham\\
Dion Nicolaas & Kevin Sweet & Scott R. Turner\\
Dylan O'Donnell & Lars Huttar & Sean Hunt\\
Eric Backus & Leon Arnott & Stephen Spackman\\
Eric Hendrickson & M. Drew Streib & Stefan Thielscher\\
Eric R. Smith & Malcolm Ryan & Stephen White\\
Eric S. Raymond & Mark Gooderum & Steve Creps\\
Erik Andersen & Mark Modrall & Steve Linhart\\
Fredrik Ljungdahl & Marvin Bressler & Steve VanDevender\\
Frederick Roeber & Matthew Day & Teemu Suikki\\
G. Branden Robinson & Merlyn LeRoy & Tim Lennan\\
Gil Neiger & Michael Allison & Timo Hakulinen\\
Greg Laskin & Michael Feir & Tom Almy\\
Greg Olson & Michael Hamel & Tom West\\
Gregg Wonderly & Michael Meyer & Warren Cheung\\
Hao-yang Wang & Michael Sokolov & Warwick Allison\\
Helge Hafting & Mike Engber & Yitzhak Sapir\\
Ingo Paschke & Mike Gallop\\
Irina Rempt-Drijfhout & Mike Passaretti
Adam Aronow & Irina Rempt-Drijfhout & Mike Gallop\\
Alex Kompel & Izchak Miller & Mike Passaretti\\
Alex Smith & J. Ali Harlow & Mike Stephenson\\
Andreas Dorn & Janet Walz & Mikko Juola\\
Andy Church & Janne Salmij\"{a}rvi & Nathan Eady\\
Andy Swanson & Jean-Christophe Collet & Norm Meluch\\
Andy Thomson & Jeff Bailey & Olaf Seibert\\
Ari Huttunen & Jochen Erwied & Pasi Kallinen\\
Bart House & John Kallen & Pat Rankin\\
Benson I. Margulies & John Rupley & Patric Mueller\\
Bill Dyer & John S. Bien & Paul Winner\\
Boudewijn Waijers & Johnny Lee & Pierre Martineau\\
Bruce Cox & Jon W\{tte & Ralf Brown\\
Bruce Holloway & Jonathan Handler & Ray Chason\\
Bruce Mewborne & Joshua Delahunty & Richard Addison\\
Cameron Root & Karl Garrison & Richard Beigel\\
Carl Schelin & Keizo Yamamoto & Richard P. Hughey\\
Chris Russo & Keith Simpson & Rob Menke\\
David Cohrs & Ken Arnold & Robin Bandy\\
David Damerell & Ken Arromdee & Robin Johnson\\
David Gentzel & Ken Lorber & Roderick Schertler\\
David Hairston & Ken Washikita & Roland McGrath\\
Dean Luick & Kestrel Gregorich-Trevor & Ron Van Iwaarden\\
Del Lamb & Kevin Darcy & Ronnen Miller\\
Derek S. Ray & Kevin Hugo & Ross Brown\\
Deron Meranda & Kevin Sitze & Sascha Wostmann\\
Dion Nicolaas & Kevin Smolkowski & Scott Bigham\\
Dylan O'Donnell & Kevin Sweet & Scott R. Turner\\
Eric Backus & Lars Huttar & Sean Hunt\\
Eric Hendrickson & Leon Arnott & Stephen Spackman\\
Eric R. Smith & M. Drew Streib & Stefan Thielscher\\
Eric S. Raymond & Malcolm Ryan & Stephen White\\
Erik Andersen & Mark Gooderum & Steve Creps\\
Fredrik Ljungdahl & Mark Modrall & Steve Linhart\\
Frederick Roeber & Marvin Bressler & Steve VanDevender\\
G. Branden Robinson & Matthew Day & Teemu Suikki\\
Gil Neiger & Merlyn LeRoy & Tim Lennan\\
Greg Laskin & Michael Allison & Timo Hakulinen\\
Greg Olson & Michael Feir & Tom Almy\\
Gregg Wonderly & Michael Hamel & Tom West\\
Hao-yang Wang & Michael Meyer & Warren Cheung\\
Helge Hafting & Michael Sokolov & Warwick Allison\\
Ingo Paschke & Mike Engber & Yitzhak Sapir
%TABLE_END Do not delete this line.
\end{tabular}
\end{center}
+1
View File
@@ -1603,6 +1603,7 @@ when starting a new game as a monk, newsym(0,0) was being called (adjabil ->
became level 1; seen 'monster' was the hero who hadn't been placed
on the map yet)
incorporate a fix to prevent segfault due to rolling boulder trap
wands of digging generate less often lategame
Fixes to 5.0.0-x General Problems Exposed Via git Repository
+1 -1
View File
@@ -1175,7 +1175,7 @@ struct instance_globals_saved_n {
/* dungeon.c */
int n_dgns; /* number of dungeons (also used in mklev.c and do.c) */
/* files.c */
char nhuuid[37];
char nhuuid[NHUUIDSZ];
/* mkroom.c */
int nroom;
/* region.c */
+3
View File
@@ -709,6 +709,8 @@ enum nhcb_calls {
NUM_NHCB
};
#define NHUUIDSZ 37
struct plinemsg_type {
xint16 msgtype; /* one of MSGTYP_foo */
struct nhregex *regex;
@@ -798,6 +800,7 @@ struct sinfo {
int config_error_ready; /* config_error_add is ready, available */
int beyond_savefile_load; /* set when past savefile loading */
int savefile_completed; /* savefile has completed writing */
int reading_bonesfile; /* in the midst of trying to read bones file */
#ifdef PANICLOG
int in_paniclog; /* writing a panicloc entry */
#endif
+1
View File
@@ -64,6 +64,7 @@ enum m_ap_types {
#define MON_ENDGAME_FREE 0x20
#define MON_ENDGAME_MIGR 0x40
#define MON_OBLITERATE 0x80
#define MON_STILL_ARRIVING 0x100
#define M_AP_TYPMASK 0x7
#define M_AP_F_DKNOWN 0x8
+4 -4
View File
@@ -1453,7 +1453,7 @@ WAND("secret door detection",
WAN_SECRET_DOOR_DETECTION),
WAND("enlightenment", "crystal", 15, 150, 1, NODIR, GLASS, HI_GLASS,
WAN_ENLIGHTENMENT),
WAND("create monster", "maple", 45, 200, 1, NODIR, WOOD, HI_WOOD,
WAND("create monster", "maple", 50, 200, 1, NODIR, WOOD, HI_WOOD,
WAN_CREATE_MONSTER),
WAND("wishing", "pine", 5, 500, 1, NODIR, WOOD, HI_WOOD,
WAN_WISHING),
@@ -1477,13 +1477,13 @@ WAND("cancellation", "platinum", 45, 200, 1, IMMEDIATE, PLATINUM, CLR_WHITE,
WAN_CANCELLATION),
WAND("teleportation", "iridium", 45, 200, 1, IMMEDIATE, METAL,
CLR_BRIGHT_CYAN, WAN_TELEPORTATION),
WAND("opening", "zinc", 25, 150, 1, IMMEDIATE, METAL, HI_METAL,
WAND("opening", "zinc", 30, 150, 1, IMMEDIATE, METAL, HI_METAL,
WAN_OPENING),
WAND("locking", "aluminum", 25, 150, 1, IMMEDIATE, METAL, HI_METAL,
WAND("locking", "aluminum", 30, 150, 1, IMMEDIATE, METAL, HI_METAL,
WAN_LOCKING),
WAND("probing", "uranium", 30, 150, 1, IMMEDIATE, METAL, HI_METAL,
WAN_PROBING),
WAND("digging", "iron", 55, 150, 1, RAY, IRON, HI_METAL,
WAND("digging", "iron", 40, 150, 1, RAY, IRON, HI_METAL,
WAN_DIGGING),
/* magic missile ... lightning must be in this order; see buzz() */
WAND("magic missile", "steel", 50, 150, 1, RAY, IRON, HI_METAL,
+6 -6
View File
@@ -659,19 +659,19 @@ getbones(void)
return 0;
}
restoreinfo.mread_flags = 1; /* return despite error for a bones file */
program_state.reading_bonesfile = 1;
if (validate(nhfp, gb.bones, FALSE) != SF_UPTODATE) {
if (!wizard)
pline("Discarding unusable bones; no need to panic...");
ok = FALSE;
restoreinfo.mread_flags = 0;
program_state.reading_bonesfile = 0;
} else {
ok = TRUE;
if (wizard) {
if (y_n("Get bones?") == 'n') {
close_nhfile(nhfp);
compress_bonesfile();
restoreinfo.mread_flags = 0;
program_state.reading_bonesfile = 0;
return 0;
}
}
@@ -687,7 +687,7 @@ getbones(void)
close_nhfile(nhfp);
compress_bonesfile();
/* ToDo: maybe unlink these problematic bones? */
restoreinfo.mread_flags = 0;
program_state.reading_bonesfile = 0;
return 0;
}
if (strcmp(bonesid, oldbonesid) != 0) {
@@ -699,7 +699,7 @@ getbones(void)
pline1(errbuf);
ok = FALSE; /* won't die of trickery */
}
restoreinfo.mread_flags = 0;
program_state.reading_bonesfile = 0;
trickery(errbuf);
} else {
struct monst *mtmp;
@@ -731,8 +731,8 @@ getbones(void)
fix_shop_damage();
}
}
restoreinfo.mread_flags = 0;
close_nhfile(nhfp);
program_state.reading_bonesfile = 0;
sanitize_engravings();
u.uroleplay.numbones++;
+2
View File
@@ -1505,6 +1505,8 @@ see_monsters(void)
for (mon = fmon; mon; mon = mon->nmon) {
if (DEADMONSTER(mon))
continue;
if ((mon->mstate & MON_STILL_ARRIVING) != 0)
continue;
newsym(mon->mx, mon->my);
if (mon->wormno)
see_wsegs(mon);
+4
View File
@@ -427,6 +427,7 @@ mon_arrive(struct monst *mtmp, int when)
stairway *stway;
d_level fromdlev;
mtmp->mstate |= MON_STILL_ARRIVING;
mtmp->nmon = fmon;
fmon = mtmp;
if (mtmp->isshk)
@@ -475,6 +476,7 @@ mon_arrive(struct monst *mtmp, int when)
rloc_to(mtmp, u.ux, u.uy);
else
mnexto(mtmp, RLOC_NOMSG);
mtmp->mstate &= ~MON_STILL_ARRIVING;
return;
} else if (when == Wiz_arrive) {
/* resurrect() is bringing existing wizard to harass the hero */
@@ -604,6 +606,7 @@ mon_arrive(struct monst *mtmp, int when)
mtmp->mx = 0; /*(already is 0)*/
mtmp->my = xyflags;
if (xlocale)
failed_to_place = !mnearto(mtmp, xlocale, ylocale, FALSE, RLOC_NOMSG);
else
@@ -616,6 +619,7 @@ mon_arrive(struct monst *mtmp, int when)
else /* when==Wiz_arrive => not being called by losedogs() */
m_into_limbo(mtmp);
}
mtmp->mstate &= ~MON_STILL_ARRIVING;
}
/* heal monster for time spent elsewhere */
+1 -1
View File
@@ -738,7 +738,7 @@ m_initinv(struct monst *mtmp)
break;
case S_GIANT:
if (ptr == &mons[PM_MINOTAUR]) {
if (!rn2(3) || (gi.in_mklev && Is_earthlevel(&u.uz)))
if (!rn2(8) || (gi.in_mklev && Is_earthlevel(&u.uz)))
(void) mongets(mtmp, WAN_DIGGING);
} else if (is_giant(ptr)) {
for (cnt = rn2((int) (mtmp->m_lev / 2)); cnt; cnt--) {
+3 -1
View File
@@ -1673,9 +1673,11 @@ doname_base(
nochrg ? "contents" : "for sale", pricebuf);
} else if (nochrg > 0) {
Concat(bp, 0, " (no charge)");
} else {
append_price_quote(bp, &bp_eos, obj->otyp);
}
if (price)
if (price > 0L)
record_price_quote(obj->otyp, price / obj->quan, TRUE);
} else if (iflags.pricequotes && !objects[obj->otyp].oc_name_known) {
append_price_quote(bp, &bp_eos, obj->otyp);
+1
View File
@@ -1408,6 +1408,7 @@ rehumanize(void)
disp.botl = TRUE;
gv.vision_full_recalc = 1;
encumber_msg();
update_inventory();
if (was_flying && !Flying && u.usteed)
You("and %s return gently to the %s.",
mon_nam(u.usteed), surface(u.ux, u.uy));
+2 -1
View File
@@ -572,7 +572,8 @@ mread(int fd, genericptr_t buf, unsigned len)
/* Not perfect, but we don't have ssize_t available. */
rlen = (readLenType) read(fd, buf, (readLenType) len);
if ((readLenType) rlen != (readLenType) len) {
if (restoreinfo.mread_flags == 1) { /* means "return anyway" */
if ((restoreinfo.mread_flags == 1) /* means "return anyway" */
|| (program_state.reading_bonesfile == 1)) {
restoreinfo.mread_flags = -1;
return;
} else {
+7 -2
View File
@@ -954,14 +954,19 @@ abon(void)
if (Upolyd)
return (adj_lev(&mons[u.umonnum]) - 3);
/* this used to be '<= 18/50' for bonus of 1 but got changed to '< 18/50'
so that '18/50' gives a bonus of 2; gnome and orc player characters
have max Str of 18/50 and giving an extra bonus at that break point
provides an incentive for them to max out that characteristic */
if (str < 6)
sbon = -2;
else if (str < 8)
sbon = -1;
else if (str < 17)
sbon = 0;
else if (str <= STR18(50))
sbon = 1; /* up to 18/50 */
else if (str < STR18(50))
sbon = 1; /* up to 18/49 */
else if (str < STR18(100))
sbon = 2;
else
@@ -209,6 +209,7 @@
F5857AA22DED026700A8CB4F /* version.c in Sources */ = {isa = PBXBuildFile; fileRef = 31B8A32721A238010055BD01 /* version.c */; };
F5857AA42DED032D00A8CB4F /* cfgfiles.c in Sources */ = {isa = PBXBuildFile; fileRef = F5857AA32DED032C00A8CB4F /* cfgfiles.c */; };
F5857AA62DED03BB00A8CB4F /* sfbase.c in Sources */ = {isa = PBXBuildFile; fileRef = F5857AA52DED03BB00A8CB4F /* sfbase.c */; };
F5E1A4CF2FA2F74C0014D115 /* macuuid.m in Sources */ = {isa = PBXBuildFile; fileRef = F5E1A4CE2FA2F74C0014D115 /* macuuid.m */; };
F5E66A222F7D4B30000E30B7 /* earlyarg.c in Sources */ = {isa = PBXBuildFile; fileRef = F5E66A212F7D4B30000E30B7 /* earlyarg.c */; };
/* End PBXBuildFile section */
@@ -635,6 +636,7 @@
F54C1AE42E43D22A006CAA8E /* sfprocs.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = sfprocs.h; path = ../../include/include/sfprocs.h; sourceTree = "<group>"; };
F5857AA32DED032C00A8CB4F /* cfgfiles.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = cfgfiles.c; path = ../../src/cfgfiles.c; sourceTree = "<group>"; };
F5857AA52DED03BB00A8CB4F /* sfbase.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = sfbase.c; path = ../../src/sfbase.c; sourceTree = "<group>"; };
F5E1A4CE2FA2F74C0014D115 /* macuuid.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = macuuid.m; sourceTree = "<group>"; };
F5E66A212F7D4B30000E30B7 /* earlyarg.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = earlyarg.c; path = ../../src/earlyarg.c; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -695,6 +697,7 @@
3189576821A1FCC100FB2ABE = {
isa = PBXGroup;
children = (
F5E1A4CE2FA2F74C0014D115 /* macuuid.m */,
F5E66A212F7D4B30000E30B7 /* earlyarg.c */,
F50818302F6F564300D2AAFA /* iactions.c */,
F515A73B2DED0B47006E1F63 /* hacklib.c */,
@@ -1883,6 +1886,7 @@
31B8A38621A238060055BD01 /* mondata.c in Sources */,
31B8A41921A244940055BD01 /* objects.c in Sources */,
31B8A3AA21A238060055BD01 /* wizard.c in Sources */,
F5E1A4CF2FA2F74C0014D115 /* macuuid.m in Sources */,
31B8A3D021A238060055BD01 /* explode.c in Sources */,
31B8A3DE21A238060055BD01 /* sys.c in Sources */,
31B8A38021A238060055BD01 /* sit.c in Sources */,
@@ -2190,6 +2194,7 @@
"DEBUG=1",
"$(inherited)",
);
"GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = "NHUUID=1";
GCC_WARN_64_TO_32_BIT_CONVERSION = NO;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_PEDANTIC = YES;
@@ -2318,6 +2323,10 @@
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 5J8MP36Y73;
GCC_C_LANGUAGE_STANDARD = c99;
"GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = (
"DEBUG=1",
"$(inherited)",
);
INSTALL_PATH = "$(NH_INSTALL_DIR)";
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
@@ -2351,6 +2360,7 @@
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 5J8MP36Y73;
GCC_C_LANGUAGE_STANDARD = c99;
"GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = "NHUUID=1";
INSTALL_PATH = "$(NH_INSTALL_DIR)";
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
OTHER_CFLAGS = (
-4
View File
@@ -168,10 +168,6 @@ CPLUSPLUS_NEED_DEPSUPPRESS = 1
endif # WANT_WIN_QT6
endif # WANT_WIN_QT
ifdef WANT_NHUUID
USE_UUIDLIB=1
endif
ifeq "$(GIT)" "1"
ifndef GITSUBMODULES
GITSUBMODULES=1
+38 -3
View File
@@ -227,11 +227,46 @@ ifdef MAKEFILE_SRC
ifdef CURSESLIB
WINLIB += $(CURSESLIB)
endif #CURSESLIB
ifdef WANT_NHUUID
ifneq "$(NO_NHUUID)" "1"
UUID_LIB_CHECK := $(shell echo `/sbin/ldconfig -p | grep libuuid`)
#$(info UUID_LIB_CHECK=$(UUID_LIB_CHECK))
ifneq "$(UUID_LIB_CHECK)" ""
UUID_LIB=1
else
UUID_LIB=0
endif
#$(info UUID_LIB=$(UUID_LIB))
#
# check for uuid development headers
UUID_HEADERS_CHECK := $(wildcard /usr/include/uuid/uuid.h)
#$(info UUID_HEADERS_CHECK=$(UUID_HEADERS_CHECK))
ifneq "$(UUID_HEADERS_CHECK)" ""
UUID_HEADERS = 1
else
UUID_HEADERS = 0
endif
#$(info UUID_HEADERS=$(UUID_HEADERS))
ifeq "$(UUID_LIB)" "1"
ifeq "$(UUID_HEADERS)" "1"
ifndef WANT_NHUUID
WANT_NHUUID=1
endif
endif
endif
else # NO_NHUUID
WANT_NHUUID=0
endif # NO_NHUUID
ifeq "$(WANT_NHUUID)" "1"
#$(info NHUUID support will be included)
CFLAGS+= -DNHUUID
LIBS+=-luuid
endif #NHUUID
endif #MAKEFILE_SRC
else # WANT_NHUUID
$(info Attention - No NHUUID support will be included)
endif # WANT_NHUUID
endif # MAKEFILE_SRC
ifdef WANT_WIN_X11
USE_XPM=1
+9 -1
View File
@@ -216,11 +216,19 @@ LFLAGS += -framework AVFoundation
endif
ifdef MAKEFILE_SRC
ifndef NO_NHUUID
# macOS doesn't need any extra prerequisite libraries
# so do this unconditionally, unless NO_NHUUID=1 is
# passed on the Make command line.
WANT_NHUUID=1
endif #NO_NHUUID
ifdef WANT_NHUUID
CFLAGS += -DNHUUID
UUIDOBJ = macuuid.o
LFLAGS += -framework Foundation
endif
endif
endif #MAKEFILE_SRC
#
#-INCLUDE multisnd1-pre.500
+12 -20
View File
@@ -4,8 +4,7 @@
#include "hack.h"
void free_macos_uuid(void);
const char *get_macos_uuid(void);
void get_macos_uuid(char *);
#ifdef DEBUG
#undef DEBUG
@@ -14,30 +13,23 @@ const char *get_macos_uuid(void);
/* #import <Foundation/Foundation.h> */
#import <AppKit/AppKit.h>
static const char *macos_uuid = 0;
void
free_macos_uuid(void)
{
if (macos_uuid) {
free((genericptr_t) macos_uuid);
macos_uuid = 0;
}
}
const char *
get_macos_uuid(void)
get_macos_uuid(char *target)
{
NSString *uuidString = [[NSUUID UUID] UUIDString];
const char *str_uuid;
if (macos_uuid)
free_macos_uuid();
int i;
/* str_uuid = [uuidString cStringUsingEncoding:NSUTF8StringEncoding]; */
str_uuid = [uuidString cStringUsingEncoding:NSASCIIStringEncoding];
macos_uuid = dupstr(str_uuid);
return macos_uuid;
if (str_uuid && target) {
for (i = 0; i < (NHUUIDSZ -1 ); ++i) {
target[i] = str_uuid[i];
}
target[(NHUUIDSZ - 1)] = '\0';
}
return;
}
+8 -16
View File
@@ -842,19 +842,14 @@ sys_random_seed(void)
}
#if defined(MACOS) && defined(NHUUID)
extern char *get_macos_uuid(char **); /* sys/unix/macuuid.m */
extern void free_macos_uuid(void); /* sys/unix/macuuid.m */
extern void get_macos_uuid(char *); /* sys/unix/macuuid.m */
#endif
void
get_nhuuid(void)
{
#if !defined(MACOS)
#if defined(NHUUID)
char struuid[37] = { 0 };
#endif
#endif
char *struuidptr = NULL;
char struuid[NHUUIDSZ] = { 0 };
#if defined(LINUX) && defined(NHUUID)
uuid_t binuuid;
#endif
@@ -862,20 +857,17 @@ get_nhuuid(void)
if (svn.nhuuid[0])
return;
#if defined(MACOS) && defined(NHUUID)
get_macos_uuid(&struuidptr);
#elif defined(LINUX) && defined(NHUUID)
#if defined(MACOS)
get_macos_uuid(&struuid[0]);
#elif defined(LINUX)
uuid_generate_random(binuuid);
uuid_unparse(binuuid, struuid);
struuidptr = &struuid[0];
#endif /* MACOS || LINUX */
if (struuidptr)
Snprintf(svn.nhuuid, sizeof svn.nhuuid, "%s", struuidptr);
if (struuid[0])
Snprintf(svn.nhuuid, sizeof svn.nhuuid, "%s", struuid);
#if defined(MACOS) && defined(NHUUID)
free_macos_uuid();
#endif
#endif /* NHUUID */
}
void