Commit Graph

113 Commits

Author SHA1 Message Date
Pasi Kallinen
b7537e0fbf Add new parameters to makedefs: --debug and --make
"makedefs --debug --make q" is equivalent to "makedefs -q" with
DEBUG defined.
2015-02-27 19:34:34 -05:00
Sean Hunt
17ea9ff9ab Fix some warnings on the unconditionals branch. 2015-02-27 19:34:31 -05:00
Sean Hunt
7c09285a8c Make EXP_ON_BOTL unconditional. 2015-02-27 19:34:26 -05:00
Sean Hunt
0001534d04 Make REDO unconditional. 2015-02-27 19:33:52 -05:00
Sean Hunt
74e741bbbc Make AUTOPICKUP_EXCEPTIONS unconditional. 2015-02-27 19:33:50 -05:00
Sean Hunt
b138d380ea Make BARGETHROUGH unconditional. 2015-02-27 19:33:48 -05:00
Sean Hunt
6e9fa71b05 Make SEDUCE unconditional. 2015-02-27 19:33:48 -05:00
Sean Hunt
ac108cd365 Make GOLDOBJ unconditional. 2015-02-27 19:33:40 -05:00
Sean Hunt
4f59f5c6fd Make WIZARD unconditional. 2015-02-27 19:33:22 -05:00
Sean Hunt
ad82ca80f3 Make DUNGEON_OVERVIEW unconditional. 2015-02-27 19:33:20 -05:00
Sean Hunt
1edadd1d48 Make REINCARNATION unconditional.
There is a lot of code affected by this, and Pat Rankin correctly
observes that it would be better to store roguelike as a level flag
rather than just using Is_rogue_level. A note for the future.
2015-02-27 19:33:16 -05:00
Sean Hunt
260f7ea860 Make TOURIST unconditional. 2015-02-27 19:33:12 -05:00
Sean Hunt
5ee71d2757 Make SINKS unconditional. 2015-02-27 19:33:06 -05:00
Sean Hunt
b066b7c170 Make KOPS unconditional. 2015-02-27 19:33:04 -05:00
Sean Hunt
9e65758947 Make STEED unconditional. 2015-02-27 19:33:01 -05:00
Sean Hunt
264dc66129 Make ELBERETH unconditional. 2015-02-27 19:32:53 -05:00
keni
b598c83767 Update .gitignore files. 2015-02-26 16:35:55 -05:00
keni
03140969ee Bulk recovery of file CVS headers and addition of NHDT- headers. 2015-02-26 09:19:03 -05:00
keni
3266234ecc Convert mdgrep from cvs to git. 2015-02-13 20:32:09 -05:00
keni
b7ea921ea0 Set up mdgrep for git instead of cvs. 2015-02-13 17:54:15 -05:00
nethack.rankin
c0743f478a dlb capacity (trunk only)
From the newsgroup:  if someone adds too many new special levels, dlb
creation during install will give a warning but still exit with success,
and the subsequent installation won't know that the excess files need to be
placed in the playground separately.  The result is that some files will
be missing when nethack tries to access them.  The newsgroup thread states
that slash'em increased dlb's default limit of 200 files to 300, and the
unnethack variant increased it to 250 and also changed the overflow message
into an error that causes 'make' to quit.  (The thread was initiated by
someone working on his own, not affiliated with either variant, who asked
for help figuring out why nethack couldn't find files at the end of the
alphabet.  My answer didn't help much; I thought he was working with
separate files rather than with a DLB container.)

     I started to go with the too-many-files-is-an-error fix, but instead
went the GNU route ("no arbitrary limits") and made the number of allowed
files become dynamic.  It starts at 200 and expands by increments of 40
when necessary.
2012-01-16 03:56:08 +00:00
nethack.rankin
141653625d rumors & oracles & data.base vs "%lx" format (trunk only)
For text data processed by makedefs at install time, change all
printf and scanf calls that use %lx format to deal with unsigned long
variables, replacing the makedefs hack of a few days ago.  It's not as
clean as I would have liked (quite a few casts), because the values
involved are derived from ftell and/or passed to fseek, which deal in
signed longs.  But it clears up a few format check warnings by gcc in
rumors.c and pager.c in addition to the previous one in makedefs.c and
uses the right data type even in the places where no warning was issued.
2012-01-15 09:27:06 +00:00
nethack.rankin
eec34e4144 supress lev_main.c diagnostic (trunk only)
gcc warned about comparing signed with unsigned for one particular
write() that used an expression for the size argument, and there was already
conditional code to try to handle it for a couple of other compilers.  But
this simpler fix should handle it for everybody.
2012-01-12 04:48:12 +00:00
nethack.rankin
5506be3b91 suppress makedefs.c diagnostic (trunk only)
gcc doesn't complain about using %lx to write out a signed long, but
it does complain about using it to read into a signed long.  Technically
it's right about the latter, so fix this properly rather than just suppress
the message with a cast.
2012-01-12 04:01:08 +00:00
keni
6120c3dd0b can we commit across directories? src/detect.c and util/makedefs.c 2011-12-29 23:29:43 +00:00
keni
4e5e720334 display version and build info at startup (trunk only)
Tested on the unix port; I've updated as many other ports as I can figure
out but they're not tested.  See window.doc for info on the changed banner
lines.  Also adds the ability to override the generic "Unix" port - used now to get
"MacOSX" into the version line instead of "Unix" (so we don't scare people who don't
know what's going on).
2011-10-11 02:37:31 +00:00
nethack.rankin
cd8eefb622 more makedefs dat/options (trunk only)
More dat/options:  include "and" in front of the final entry in
the comma separated lists of options and windowing systems.  For the
multi-line options list, fill the paragraph better by splitting lines at
individual words within options rather than at whole option strings.

     Also, tweak yesterday's check for DEFAULT_WINDOW_SYS being undefined
so that it actually works as intended.
2011-09-23 23:20:36 +00:00
nethack.rankin
795c0a3a8d 'makedefs' handling for DEFAULT_WINDOW_SYS (trunk only)
Change the windowing system section of generated file dat/options
to omit "with a default of <foo>" when it has listed just one enabled
windowing system.

     This also adds checks to make sure DEFAULT_WINDOW_SYS is defined,
at least one xxx_GRAPHICS option is enabled, and that the default matches
[one of] the enabled xxx_GRAPHICS.
2011-09-23 02:05:43 +00:00
keni
e04caf9a27 makedefs manpage, conditionals, and related bits
Add a man page for makedefs so mdgrep is documented better.
Add missing INSURANCE to mdgrep.h. (yes, LIFE leaks in as well)
Add makefile bits to build makedefs.txt.
Pass dungeon.def through mdgrep internally to makedefs - this will make
it possible to commit the LIFE patch and have config.h actually turn it
all the way off (by skipping bigrm-6).
2010-05-01 20:57:17 +00:00
keni
5c0a627ce2 makedefs internal version formatter
Add -svs so the Makefile can get "343" or "3.4.3" (etc) when automating
package builds.
2009-12-17 19:46:42 +00:00
keni
4036a6727c Add RCS version lines 2009-05-06 10:55:43 +00:00
keni
8593cf6547 Add recordfile control to SYSCF.
Add sys/unix/sysconf, a sample sysconf file.
Move defines from topten.c to config.h so they can be seen globally.
Add persmax, pers_is_uid, entrymax, and pointsmin to struct sysopt, use
 in topten.c, populate in files.c
Warning cleanup in files.c.
BUGFIX: don't crash in unixmain.c if WIZARDS left unspecified.
hints/macosx10.5: don't hardcode "keni"; install sample sysconf; install
 sample ~/nethackrc
makedefs: add "system configuration" to compiled-with options list.
BUGFIX: if a game doesn't meet the criteria for making the record file it's
 shown to the user as having zero points because t1->points is set to zero
 to indicate that it doesn't get written back; display u.urexp instead.
2009-05-03 14:08:15 +00:00
nethack.rankin
a86187b398 summary text for block messages (trunk only)
[Make use of recent message history changes.]

     Add support to makedefs and the core for including a line of summary
text with quest messages that don't use pline() delivery.  The multi-line
record structure of quest.txt begins each entry with %C and ends with %E.
makedefs now examines the %E lines looking for "[anything]" and adds that
to quest.dat where deliver_by_window() can find it.  The square brackets
are required in the input and intentionally carried along to the output.
putmsghistory() is used to put the summary text into the message history
buffer for use by ^P, without being displayed first.  (So this is a no-op
for interfaces which haven't implemented putmsghistory yet.  Maybe
genl_putmsghistory() should pass such text to pline() as a quick hack?)

     This adds a few summary lines to quest.txt so that the feature can
be tested.  Most of them were written by <Someone> nearly three years
ago.  I'm planning to add a couple of new control codes that'll allow some
of them to expand into shorter text.  (The one where the Archeologist
leader tells you that the nemesis stole the artifact so your mission is
to find the goal level, defeat the nemesis, and return with the artifact
ends up being roughly 160 characters long.)
2009-04-06 02:50:41 +00:00
keni
bb43b56eac first conditionalized docs (TRUNK ONLY)
plus various related missing bits and tids
2008-06-26 15:08:54 +00:00
keni
ff14fa7120 regenerate mdgrep.h (TRUNK ONLY)
now that this should have the right version numbers in it, save the new file
2008-06-25 19:04:38 +00:00
keni
bf3501d9d2 mdgrep.pl tids (TRUNK ONLY)
aka "try again before the wireless drains my laptop battery"
2008-06-25 19:02:38 +00:00
keni
41479c040a makedefs --grep prep, misc cleanup (TRUNK ONLY)
use makedefs --grep in Makefile.doc
call make clean in doc from make clean in top
add commented out rule to produce mdgrep.h from mdgrep.pl
macosx1.5: don't chown/chgrp for single-user install
unixmain.c: work around C90 warning for Mac-specific code, fix last fix
makedefs.c: temporarily disallow blank after control introducer until docs
 catch up
mdgrep.pl: add ALLDOCS, clean up generated file's header
2008-06-25 18:56:47 +00:00
nethack.allison
91016cff99 makedefs build on non-C99 compilers follow up
Pat Rankin wrote:
>      That patch looks incorrect.  `CONSUME' increments argv,
> so now a different value is being passed to the function when
> initializing that variable than was passed before.
2008-05-21 02:15:09 +00:00
nethack.allison
3a75bf5ab7 makedefs build on non-C99 compilers
..\util\makedefs.c(426) : error C2143: syntax error : missing ';' before 'type'
..\util\makedefs.c(427) : error C2065: 'p' : undeclared identifier
..\util\makedefs.c(428) : error C2065: 'p' : undeclared identifier
2008-05-13 11:38:46 +00:00
keni
4fb08f1366 mdgrep.pl tid
Use the right name for the output file in all places.
Thanks Pat.
2008-04-23 10:48:04 +00:00
keni
c7858a6d37 more warning cleanup, makedefs grep bits (trunk only)
drop -Wcast-qual
warning cleanup (lev_comp)
comment bits
makedefs grep cleanup: drop magic constant, add --grep-define, --grep-undef,
 #ifdef out code not needed yet, update mdgrep.h, mdgrep.pl
2008-04-22 23:20:44 +00:00
keni
7b2fb4d0b5 more warning cleanup (trunk only)
More warning bits that never got committed.
More appropriate compiler flags for warning checks (macosx only for the moment).
The changes in dgn*[lc] just rename line_number to nh_line_number to avoid a
clash, so no need to regenerate the lex output.
2008-04-18 17:37:33 +00:00
keni
d175a3f7fe makedefs conditional grep (trunk only)
This code (except for some of the argument parsing changes) is not used yet.
mdgrep.pl generates mdgrep.h; like the lex and yacc files we ship mdgrep.h
 pre-generated; there is no need for perl on end-user/end-compiler systems.
 (In fact mdgrep.h is so simple mdgrep.pl is probably overkill.)
mdgrep.h creates an array reflecting the compiler options in effect
The changes to makedefs break the Mac OS9 compile; if necessary the fix is
 simple and documented (but I think that port is permanently dead).
With that port out of the way, makedefs can be allowed to take real options;
 none of the current options have been changed.  Instead, a second sub-main
 routine has been added to handle options starting with two hyphens and all
 the new options start with two hyphens:
--input specifies the input file (- is stdin)
--output specifies the output file (- is stdout)
--grep causes the input file to be filtered into the output file
--grep-showvars dumps the info from the array in mdgrep.h
--grep-trace turns on tracing of the grep filtering
Docs for the filtering language are in the source.
2008-04-06 00:48:40 +00:00
nethack.rankin
a675cc6ed7 vms file access
Fix the problem From a bug report.  His system has a logical name "DATA" pointing at some disk, and
when the dlb utility tried to open "data" for inclusion in the library
being built at install time, it attempted to access the wrong thing and
failed.  He then attempted to fix it in a manner which let dlb finish, by
modifying dlb_main.c to append "." to file names that lack a dot, but
then nethack couldn't access "dungeon" in the library because string
comparison didn't match the altered dlb directory entry of "dungeon.".

     NetHack was working around this unintended interaction with the
environment issue in fopen_datafile(), and dlb was doing so for fopen()
but not open().  This moves nethack's fixup out of src/files.c and into
sys/vms/vmsfiles.c, adds another routine there so that both open() and
fopen() are covered, and updates the vms Makefiles so that the various
utility programs all link with vmsfiles.  (The build script vmsbuild.com
puts object files into a library and gets that last bit for free.)
2007-10-28 09:37:56 +00:00
nethack.rankin
4c83db0294 fix #H1232 - hole in ice is described as moat [1 of 2] (trunk only)
From a bug report, when ice on the Valkyrie
quest home level was melted and a boulder filled the resulting pool, that
pool was described as a moat.  This was actually a terrain issue rather
than a formatting glitch, so instead of tweaking waterbody_name() with an
extra special case, extend the level compiler to allow specifying ice as
frozen pool instead of always being frozen moat.  There's no provision
for having both types of ice on the same level, just a level-wide flag to
control which of the two applies for ice on that level.

     This change has a side-effect for the V quest levels:  once ice has
been melted, a second blast of fire will now boil away the pool and leave
a pit.  The unfrozen water locations on the home level already behaved
that way (ie, they are pools rather than moats) so this should be ok.  I
also added <Someone>'s suggestion to make one of the two drawbridges
on the goal level start in random state instead of always being open.
2007-08-03 01:05:50 +00:00
nethack.rankin
9e7d032c79 random initial drawbridge state (trunk only)
Suggested by <Someone>:  in the special level compiler, support
"random" in addition to "open" and "closed" for a drawbridge's inital
state.  Drawbridge shares code with door, so the necessary parsing was
already present.  This just treats random as valid for drawbridge instead
of explicitly rejecting it, and makes the special level loader process it.

     He also suggested that the two drawbridges on the bottom level of
the Valk's quest be changed from open to random, but this patch doesn't
go that far.  I think it's a good idea, but since the player can't use a
musicial instrument on those bridges, this has more impact on game play
than it might at first seem.  I don't really want to see Valkyries be
required to use magic for occasions where both bridges start out closed.
2007-04-21 01:54:56 +00:00
nethack.rankin
697ec97812 hangup hangup bit (trunk only)
Accidentally left out  of the previous patch.
2007-01-18 05:12:36 +00:00
nethack.rankin
176a59bb0a SELECTSAVED in #version (trunk only)
makedefs wasn't including this optional feature in dat/options for
display via ``#version''.  It doesn't affect save and bones files but it
is something that may be of interest to users.  This change won't work for
UNIX+QT_GRAPHICS because that config is defining SELECTSAVED in files.c
instead of in unixconf.h.

     I think there are some other new things which are missing here too.
2006-12-10 05:30:23 +00:00
keni
951e0d87fa Pad rumors to improve distribution of delivered rumors. 2006-10-12 00:17:17 +00:00
nethack.allison
fcf38a5e35 recover (trunk only)
Bring recover process up to date with current save file contents
(self_recover and external recover)
2006-08-04 03:58:46 +00:00