From b1a7bbbbdbf366f0f404eb0d1e2c1d3418567f09 Mon Sep 17 00:00:00 2001 From: "Derek S. Ray" Date: Fri, 27 Feb 2015 21:25:00 -0500 Subject: [PATCH] pull in the recent unconditionals merge from master --- .gitattributes | 1 + dat/.gitattributes | 3 + dat/Arch.des | 3 +- dat/Barb.des | 3 +- dat/Caveman.des | 3 +- dat/Healer.des | 3 +- dat/Knight.des | 3 +- dat/Monk.des | 3 +- dat/Priest.des | 3 +- dat/Ranger.des | 3 +- dat/Rogue.des | 3 +- dat/Samurai.des | 3 +- dat/Tourist.des | 3 +- dat/Valkyrie.des | 3 +- dat/Wizard.des | 3 +- dat/bigroom.des | 3 +- dat/castle.des | 3 +- dat/data.base | 3 +- dat/dungeon.def | 7 +- dat/endgame.des | 3 +- dat/gehennom.des | 3 +- dat/knox.des | 3 +- dat/medusa.des | 3 +- dat/mines.des | 3 +- dat/oracle.des | 3 +- dat/oracles.txt | 4 +- dat/quest.txt | 3 +- dat/sokoban.des | 3 +- dat/symbols | 132 --------- dat/tower.des | 3 +- dat/yendor.des | 3 +- doc/.gitattributes | 5 + doc/.gitignore | 1 + doc/Guidebook.mn | 3 +- doc/dgn_comp.6 | 3 +- doc/dlb.6 | 3 +- doc/fixes30.0 | 3 +- doc/fixes34.1 | 3 +- doc/fixes34.2 | 3 +- doc/fixes34.3 | 3 +- doc/fixes35.0 | 3 +- doc/lev_comp.6 | 3 +- doc/makedefs.6 | 11 +- doc/nethack.6 | 3 +- doc/recover.6 | 3 +- doc/window.doc | 3 +- include/align.h | 3 +- include/amiconf.h | 3 +- include/artifact.h | 3 +- include/artilist.h | 5 +- include/attrib.h | 3 +- include/beconf.h | 3 +- include/botl.h | 3 +- include/color.h | 3 +- include/config.h | 38 +-- include/config1.h | 3 +- include/context.h | 3 +- include/coord.h | 3 +- include/decl.h | 19 +- include/def_os2.h | 3 +- include/dgn_file.h | 3 +- include/display.h | 15 +- include/dlb.h | 3 +- include/dungeon.h | 7 +- include/engrave.h | 3 +- include/extern.h | 105 +------ include/flag.h | 9 +- include/func_tab.h | 3 +- include/global.h | 44 +-- include/hack.h | 33 ++- include/lev.h | 3 +- include/mac-carbon.h | 3 +- include/mac-qt.h | 3 +- include/mac-term.h | 3 +- include/macconf.h | 3 +- include/macpopup.h | 3 +- include/mactty.h | 3 +- include/macwin.h | 3 +- include/mail.h | 3 +- include/mextra.h | 3 +- include/mfndpos.h | 5 +- include/micro.h | 3 +- include/mkroom.h | 3 +- include/monattk.h | 4 +- include/mondata.h | 5 +- include/monflag.h | 6 +- include/monst.h | 6 +- include/monsym.h | 3 +- include/mttypriv.h | 3 +- include/ntconf.h | 13 +- include/obj.h | 13 +- include/objclass.h | 3 +- include/os2conf.h | 8 +- include/patchlevel.h | 3 +- include/pcconf.h | 8 +- include/permonst.h | 3 +- include/prop.h | 11 +- include/qt_clust.h | 3 +- include/qt_kde0.h | 3 +- include/qt_win.h | 3 +- include/qtext.h | 3 +- include/qttableview.h | 3 +- include/quest.h | 3 +- include/rect.h | 3 +- include/region.h | 3 +- include/rm.h | 37 +-- include/skills.h | 7 +- include/sp_lev.h | 3 +- include/spell.h | 3 +- include/sys.h | 10 +- include/system.h | 3 +- include/tcap.h | 3 +- include/tile2x11.h | 3 +- include/timeout.h | 3 +- include/tosconf.h | 3 +- include/tradstdc.h | 12 +- include/trampoli.h | 5 +- include/trap.h | 3 +- include/unixconf.h | 6 +- include/vision.h | 3 +- include/vmsconf.h | 17 +- include/wceconf.h | 10 +- include/winGnome.h | 3 +- include/winX.h | 3 +- include/winami.h | 3 +- include/wingem.h | 3 +- include/winprocs.h | 3 +- include/wintty.h | 20 +- include/wintype.h | 3 +- include/xwindow.h | 3 +- include/xwindowp.h | 3 +- include/you.h | 11 +- include/youprop.h | 11 +- src/allmain.c | 19 +- src/alloc.c | 3 +- src/apply.c | 77 +----- src/artifact.c | 14 +- src/attrib.c | 62 +---- src/ball.c | 8 +- src/bones.c | 46 +--- src/botl.c | 21 +- src/cmd.c | 149 ++-------- src/dbridge.c | 103 ++----- src/decl.c | 14 +- src/detect.c | 44 +-- src/dig.c | 45 +-- src/display.c | 39 +-- src/dlb.c | 3 +- src/do.c | 73 +---- src/do_name.c | 15 +- src/do_wear.c | 82 +----- src/dog.c | 26 +- src/dogmove.c | 54 +--- src/dokick.c | 22 +- src/dothrow.c | 38 +-- src/drawing.c | 41 +-- src/dungeon.c | 51 +--- src/eat.c | 96 +------ src/end.c | 32 +-- src/engrave.c | 9 +- src/exper.c | 5 +- src/explode.c | 7 +- src/extralev.c | 6 +- src/files.c | 134 +-------- src/fountain.c | 16 +- src/hack.c | 109 ++------ src/hacklib.c | 191 +------------ src/invent.c | 280 +------------------ src/light.c | 19 +- src/lock.c | 57 +--- src/mail.c | 3 +- src/makemon.c | 70 +---- src/mapglyph.c | 62 ++--- src/mcastu.c | 3 +- src/mhitm.c | 26 +- src/mhitu.c | 82 +----- src/minion.c | 20 +- src/mklev.c | 57 +--- src/mkmap.c | 3 +- src/mkmaze.c | 13 +- src/mkobj.c | 40 +-- src/mkroom.c | 18 +- src/mon.c | 87 +----- src/mondata.c | 7 +- src/monmove.c | 60 +--- src/monst.c | 23 +- src/mplayer.c | 9 +- src/mthrowu.c | 10 +- src/muse.c | 33 +-- src/music.c | 5 +- src/o_init.c | 5 +- src/objects.c | 24 +- src/objnam.c | 53 +--- src/options.c | 157 ++--------- src/pager.c | 13 +- src/pickup.c | 148 +--------- src/pline.c | 20 +- src/polyself.c | 9 +- src/potion.c | 63 +---- src/pray.c | 27 +- src/priest.c | 32 +-- src/quest.c | 7 +- src/questpgr.c | 21 +- src/read.c | 35 +-- src/rect.c | 5 +- src/region.c | 3 +- src/restore.c | 67 +---- src/rip.c | 7 +- src/rnd.c | 23 +- src/role.c | 9 +- src/rumors.c | 14 +- src/save.c | 41 +-- src/shk.c | 150 +--------- src/shknam.c | 9 +- src/sit.c | 23 +- src/sounds.c | 29 +- src/sp_lev.c | 18 +- src/spell.c | 3 +- src/steal.c | 156 ++--------- src/steed.c | 12 +- src/sys.c | 10 +- src/teleport.c | 76 +----- src/timeout.c | 19 +- src/topten.c | 3 +- src/track.c | 3 +- src/trap.c | 135 +-------- src/u_init.c | 63 +---- src/uhitm.c | 39 +-- src/vault.c | 45 +-- src/version.c | 3 +- src/vision.c | 17 +- src/weapon.c | 40 +-- src/were.c | 3 +- src/wield.c | 26 +- src/windows.c | 3 +- src/wizard.c | 3 +- src/worm.c | 3 +- src/worn.c | 27 +- src/write.c | 3 +- src/zap.c | 58 +--- sys/amiga/.gitattributes | 1 + sys/amiga/amidos.c | 3 +- sys/amiga/amidos.p | 3 +- sys/amiga/amigst.c | 3 +- sys/amiga/amimenu.c | 3 +- sys/amiga/amirip.c | 10 +- sys/amiga/amisnd.c | 3 +- sys/amiga/amistack.c | 3 +- sys/amiga/amitty.c | 3 +- sys/amiga/amiwind.c | 3 +- sys/amiga/amiwind.p | 3 +- sys/amiga/cvtsnd.c | 3 +- sys/amiga/txt2iff.c | 3 +- sys/amiga/winami.c | 11 +- sys/amiga/winami.p | 3 +- sys/amiga/winchar.c | 3 +- sys/amiga/windefs.h | 3 +- sys/amiga/winext.h | 3 +- sys/amiga/winfuncs.c | 13 +- sys/amiga/winkey.c | 3 +- sys/amiga/winmenu.c | 3 +- sys/amiga/winproto.h | 3 +- sys/amiga/winreq.c | 3 +- sys/amiga/winstr.c | 3 +- sys/amiga/xpm2iff.c | 3 +- sys/atari/tos.c | 3 +- sys/be/bemain.c | 9 +- sys/mac/.gitattributes | 1 + sys/mac/NHDeflts | 3 +- sys/mac/dprintf.c | 3 +- sys/mac/maccurs.c | 3 +- sys/mac/macerrs.c | 3 +- sys/mac/macfile.c | 3 +- sys/mac/macmain.c | 7 +- sys/mac/macmenu.c | 18 +- sys/mac/macsnd.c | 3 +- sys/mac/mactopl.c | 3 +- sys/mac/mactty.c | 3 +- sys/mac/macunix.c | 3 +- sys/mac/macwin.c | 3 +- sys/mac/mgetline.c | 3 +- sys/mac/mmodal.c | 3 +- sys/mac/mrecover.c | 3 +- sys/mac/mttymain.c | 3 +- sys/msdos/.gitattributes | 4 + sys/msdos/Install.dos | 3 +- sys/msdos/Makefile.BC | 3 +- sys/msdos/Makefile.GCC | 3 +- sys/msdos/Makefile.MSC | 3 +- sys/msdos/msdos.c | 3 +- sys/msdos/ovlinit.c | 3 +- sys/msdos/pckeys.c | 19 +- sys/msdos/pctiles.c | 3 +- sys/msdos/pctiles.h | 3 +- sys/msdos/pcvideo.h | 3 +- sys/msdos/portio.h | 3 +- sys/msdos/schema1.BC | 3 +- sys/msdos/schema2.BC | 3 +- sys/msdos/setup.bat | 3 +- sys/msdos/sound.c | 3 +- sys/msdos/tile2bin.c | 3 +- sys/msdos/video.c | 3 +- sys/msdos/vidtxt.c | 3 +- sys/msdos/vidvga.c | 13 +- sys/os2/.gitattributes | 1 + sys/os2/Makefile.os2 | 3 +- sys/os2/os2.c | 3 +- sys/share/.gitattributes | 1 + sys/share/Makefile.lib | 3 +- sys/share/NetHack.cnf | 3 + sys/share/ioctl.c | 3 +- sys/share/nhlan.c | 3 +- sys/share/pcmain.c | 25 +- sys/share/pcsys.c | 5 +- sys/share/pctty.c | 3 +- sys/share/pcunix.c | 3 +- sys/share/random.c | 3 + sys/share/tclib.c | 3 +- sys/share/unixtty.c | 5 +- sys/share/uudecode.c | 2 + sys/unix/.gitattributes | 1 + sys/unix/Makefile.dat | 3 +- sys/unix/Makefile.doc | 3 +- sys/unix/Makefile.src | 3 +- sys/unix/Makefile.top | 3 +- sys/unix/Makefile.utl | 3 +- sys/unix/README.linux | 3 + sys/unix/depend.awk | 2 + sys/unix/hints/.gitattributes | 1 + sys/unix/hints/linux | 3 +- sys/unix/hints/linux-x11 | 3 +- sys/unix/hints/macosx | 3 +- sys/unix/hints/macosx.sh | 3 +- sys/unix/hints/macosx10.5 | 3 +- sys/unix/hints/macosx10.7 | 3 +- sys/unix/hints/unix | 3 +- sys/unix/mkmkfile.sh | 3 +- sys/unix/nethack.sh | 3 +- sys/unix/setup.sh | 3 +- sys/unix/sysconf | 8 +- sys/unix/unixmain.c | 18 +- sys/unix/unixres.c | 3 +- sys/unix/unixunix.c | 5 +- sys/vms/.gitattributes | 1 + sys/vms/Makefile.dat | 3 +- sys/vms/Makefile.doc | 3 +- sys/vms/Makefile.src | 3 +- sys/vms/Makefile.top | 3 +- sys/vms/Makefile.utl | 3 +- sys/vms/install.com | 3 + sys/vms/lev_lex.h | 3 +- sys/vms/nethack.com | 3 + sys/vms/oldcrtl.c | 3 +- sys/vms/spec_lev.com | 3 + sys/vms/vmsbuild.com | 2 + sys/vms/vmsfiles.c | 3 +- sys/vms/vmsmail.c | 3 +- sys/vms/vmsmain.c | 24 +- sys/vms/vmsmisc.c | 3 +- sys/vms/vmstty.c | 3 +- sys/vms/vmsunix.c | 5 +- sys/wince/.gitattributes | 3 + sys/wince/Install.ce | 3 +- sys/wince/bootstrp.mak | 3 +- sys/wince/celib.c | 3 +- sys/wince/cesetup.bat | 3 +- sys/wince/cesound.c | 6 +- sys/wince/mhaskyn.c | 3 +- sys/wince/mhaskyn.h | 3 +- sys/wince/mhcmd.c | 7 +- sys/wince/mhcolor.c | 3 +- sys/wince/mhcolor.h | 3 +- sys/wince/mhdlg.c | 3 +- sys/wince/mhdlg.h | 3 +- sys/wince/mhfont.c | 3 +- sys/wince/mhfont.h | 3 +- sys/wince/mhinput.c | 3 +- sys/wince/mhinput.h | 3 +- sys/wince/mhmain.c | 5 +- sys/wince/mhmain.h | 3 +- sys/wince/mhmap.c | 9 +- sys/wince/mhmap.h | 3 +- sys/wince/mhmenu.h | 4 + sys/wince/mhmsg.h | 3 +- sys/wince/mhmsgwnd.c | 3 +- sys/wince/mhmsgwnd.h | 3 +- sys/wince/mhrip.c | 3 +- sys/wince/mhrip.h | 3 +- sys/wince/mhstatus.c | 9 +- sys/wince/mhstatus.h | 3 +- sys/wince/mhtext.c | 3 +- sys/wince/mhtext.h | 3 +- sys/wince/mhtxtbuf.c | 3 +- sys/wince/mhtxtbuf.h | 3 +- sys/wince/mswproc.c | 5 +- sys/wince/winMS.h | 3 +- sys/wince/winhack.c | 5 +- sys/wince/winmain.c | 3 + sys/winnt/.gitattributes | 4 + sys/winnt/Install.nt | 3 +- sys/winnt/Makefile.bcc | 3 +- sys/winnt/Makefile.gcc | 3 +- sys/winnt/Makefile.msc | 3 +- sys/winnt/console.rc | 6 +- sys/winnt/defaults.nh | 3 + sys/winnt/nh340key.c | 6 +- sys/winnt/nhdefkey.c | 6 +- sys/winnt/nhraykey.c | 6 +- sys/winnt/nhsetup.bat | 3 +- sys/winnt/ntsound.c | 6 +- sys/winnt/nttty.c | 92 ++----- sys/winnt/win32api.h | 6 +- sys/winnt/winnt.c | 8 +- util/.gitignore | 2 + util/dgn_comp.l | 3 +- util/dgn_comp.y | 3 +- util/dgn_main.c | 3 +- util/dlb_main.c | 3 +- util/lev_comp.l | 3 +- util/lev_comp.y | 3 +- util/lev_main.c | 8 +- util/makedefs.c | 132 ++------- util/mdgrep.h | 7 +- util/mdgrep.pl | 7 +- util/panic.c | 3 +- util/recover.c | 3 +- win/Qt/Install.Qt | 2 + win/Qt/qt_clust.cpp | 3 +- win/Qt/qt_win.cpp | 25 +- win/Qt/qttableview.cpp | 3 +- win/Qt/tileedit.cpp | 3 +- win/Qt/tileedit.h | 3 +- win/X11/Install.X11 | 2 + win/X11/NetHack.ad | 3 + win/X11/Window.c | 3 +- win/X11/dialogs.c | 3 + win/X11/nethack.rc | 2 + win/X11/nh32icon | 3 +- win/X11/nh56icon | 3 +- win/X11/nh72icon | 3 +- win/X11/tile2x11.c | 3 + win/X11/winX.c | 3 +- win/X11/winmap.c | 14 +- win/X11/winmenu.c | 3 +- win/X11/winmesg.c | 3 +- win/X11/winmisc.c | 3 +- win/X11/winstat.c | 20 +- win/X11/wintext.c | 7 +- win/X11/winval.c | 3 +- win/chain/wc_chainin.c | 3 +- win/chain/wc_chainout.c | 3 +- win/chain/wc_trace.c | 3 +- win/gem/Install.gem | 3 + win/gem/bitmfile.c | 4 + win/gem/gr_rect.c | 3 +- win/gem/gr_rect.h | 4 + win/gem/load_img.c | 4 + win/gem/tile2img.c | 3 +- win/gem/wingem.c | 15 +- win/gem/wingem1.c | 3 +- win/gem/xpm2img.c | 3 +- win/gnome/gn_xpms.h | 3 +- win/gnome/gnaskstr.c | 3 +- win/gnome/gnaskstr.h | 3 +- win/gnome/gnbind.c | 10 +- win/gnome/gnbind.h | 3 +- win/gnome/gnglyph.c | 3 +- win/gnome/gnglyph.h | 3 +- win/gnome/gnmain.c | 5 +- win/gnome/gnmain.h | 3 +- win/gnome/gnmap.c | 3 +- win/gnome/gnmap.h | 3 +- win/gnome/gnmenu.c | 3 +- win/gnome/gnmenu.h | 3 +- win/gnome/gnmesg.c | 3 +- win/gnome/gnmesg.h | 3 +- win/gnome/gnomeprv.h | 3 +- win/gnome/gnopts.c | 3 +- win/gnome/gnopts.h | 3 +- win/gnome/gnplayer.c | 3 +- win/gnome/gnplayer.h | 3 +- win/gnome/gnsignal.c | 3 +- win/gnome/gnsignal.h | 3 +- win/gnome/gnstatus.c | 20 +- win/gnome/gnstatus.h | 3 +- win/gnome/gntext.c | 3 +- win/gnome/gntext.h | 3 +- win/gnome/gnworn.c | 15 +- win/gnome/gnworn.h | 4 + win/gnome/gnyesno.c | 3 +- win/gnome/gnyesno.h | 3 +- win/macosx/NetHackGuidebook.applescript | 3 +- win/macosx/NetHackRecover.applescript | 3 +- win/macosx/NetHackTerm.applescript | 3 +- win/macosx/recover.pl | 3 +- win/share/gifread.c | 4 + win/share/ppmwrite.c | 3 +- win/share/thintile.c | 3 +- win/share/tile.doc | 3 +- win/share/tile.h | 3 +- win/share/tile2bmp.c | 3 +- win/share/tilemap.c | 49 +--- win/share/tiletext.c | 3 +- win/tty/getline.c | 73 ++--- win/tty/termcap.c | 3 +- win/tty/topl.c | 166 +++++------- win/tty/wintty.c | 347 +++--------------------- win/win32/dgnstuff.mak | 3 + win/win32/levstuff.mak | 2 + win/win32/mhaskyn.c | 3 +- win/win32/mhaskyn.h | 3 +- win/win32/mhdlg.c | 3 +- win/win32/mhdlg.h | 3 +- win/win32/mhfont.c | 3 +- win/win32/mhfont.h | 3 +- win/win32/mhinput.c | 3 +- win/win32/mhinput.h | 3 +- win/win32/mhmain.c | 5 +- win/win32/mhmain.h | 3 +- win/win32/mhmap.c | 9 +- win/win32/mhmap.h | 3 +- win/win32/mhmenu.c | 3 +- win/win32/mhmenu.h | 3 +- win/win32/mhmsg.h | 3 +- win/win32/mhmsgwnd.c | 3 +- win/win32/mhmsgwnd.h | 3 +- win/win32/mhrip.c | 3 +- win/win32/mhrip.h | 3 +- win/win32/mhsplash.c | 3 +- win/win32/mhsplash.h | 4 + win/win32/mhstatus.c | 3 +- win/win32/mhstatus.h | 3 +- win/win32/mhtext.c | 3 +- win/win32/mhtext.h | 3 +- win/win32/mswproc.c | 9 +- win/win32/tiles.mak | 3 + win/win32/winMS.h | 3 +- win/win32/winhack.c | 3 +- 538 files changed, 1715 insertions(+), 5685 deletions(-) create mode 100644 dat/.gitattributes create mode 100644 doc/.gitattributes create mode 100644 doc/.gitignore create mode 100644 sys/amiga/.gitattributes create mode 100644 sys/mac/.gitattributes create mode 100644 sys/msdos/.gitattributes create mode 100644 sys/os2/.gitattributes create mode 100644 sys/share/.gitattributes create mode 100644 sys/unix/.gitattributes create mode 100644 sys/unix/hints/.gitattributes create mode 100644 sys/vms/.gitattributes create mode 100644 sys/wince/.gitattributes create mode 100644 sys/winnt/.gitattributes diff --git a/.gitattributes b/.gitattributes index 72533dbce..894a91c8e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,5 @@ *.[ch] filter=NHtext merge=NHsubst +*.sh filter=NHtext merge=NHsubst * text=auto *.hqx -text *.sln -text diff --git a/dat/.gitattributes b/dat/.gitattributes new file mode 100644 index 000000000..72aa05edd --- /dev/null +++ b/dat/.gitattributes @@ -0,0 +1,3 @@ +*.def filter=NHtext merge=NHsubst +*.des filter=NHtext merge=NHsubst +*.txt filter=NHtext merge=NHsubst diff --git a/dat/Arch.des b/dat/Arch.des index ef9f551d5..3c1ccfaf0 100644 --- a/dat/Arch.des +++ b/dat/Arch.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Arch.des $Date$ $Revision$ +# NetHack 3.5 Arch.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Arch.des $Date: 2009/05/06 10:44:15 $ $Revision: 1.6 $ # SCCS Id: @(#)Arch.des 3.5 1997/01/31 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991 by M. Stephenson diff --git a/dat/Barb.des b/dat/Barb.des index 8f65d8986..29a612015 100644 --- a/dat/Barb.des +++ b/dat/Barb.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Barb.des $Date$ $Revision$ +# NetHack 3.5 Barb.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Barb.des $Date: 2009/05/06 10:44:15 $ $Revision: 1.4 $ # SCCS Id: @(#)Barb.des 3.5 1991/12/22 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991 by M. Stephenson diff --git a/dat/Caveman.des b/dat/Caveman.des index 1dcdbe537..f9617c86f 100644 --- a/dat/Caveman.des +++ b/dat/Caveman.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Caveman.des $Date$ $Revision$ +# NetHack 3.5 Caveman.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Caveman.des $Date: 2009/05/06 10:44:15 $ $Revision: 1.4 $ # SCCS Id: @(#)Caveman.des 3.5 1995/10/07 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991 by M. Stephenson diff --git a/dat/Healer.des b/dat/Healer.des index b394c39c9..3a93adc4f 100644 --- a/dat/Healer.des +++ b/dat/Healer.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Healer.des $Date$ $Revision$ +# NetHack 3.5 Healer.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Healer.des $Date: 2009/05/06 10:44:16 $ $Revision: 1.5 $ # SCCS Id: @(#)Healer.des 3.5 1995/04/16 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991, 1993 by M. Stephenson, P. Winner diff --git a/dat/Knight.des b/dat/Knight.des index 9b166652c..2be72af7d 100644 --- a/dat/Knight.des +++ b/dat/Knight.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Knight.des $Date$ $Revision$ +# NetHack 3.5 Knight.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Knight.des $Date: 2009/05/06 10:44:16 $ $Revision: 1.4 $ # SCCS Id: @(#)Knight.des 3.5 1995/04/16 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991,92 by M. Stephenson diff --git a/dat/Monk.des b/dat/Monk.des index 6c70125bd..fe75301d9 100644 --- a/dat/Monk.des +++ b/dat/Monk.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Monk.des $Date$ $Revision$ +# NetHack 3.5 Monk.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Monk.des $Date: 2009/05/06 10:44:16 $ $Revision: 1.6 $ # SCCS Id: @(#)Monk.des 3.5 2002/04/08 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991-2 by M. Stephenson diff --git a/dat/Priest.des b/dat/Priest.des index 92f7074fe..ea4aef3c5 100644 --- a/dat/Priest.des +++ b/dat/Priest.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Priest.des $Date$ $Revision$ +# NetHack 3.5 Priest.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Priest.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.5 $ # SCCS Id: @(#)Priest.des 3.5 2002/04/08 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991-2 by M. Stephenson diff --git a/dat/Ranger.des b/dat/Ranger.des index 10c88cde2..d36559cb6 100644 --- a/dat/Ranger.des +++ b/dat/Ranger.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Ranger.des $Date$ $Revision$ +# NetHack 3.5 Ranger.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Ranger.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.4 $ # SCCS Id: @(#)Ranger.des 3.5 2001/02/01 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991 by M. Stephenson diff --git a/dat/Rogue.des b/dat/Rogue.des index d6f35cd16..2d2c6a202 100644 --- a/dat/Rogue.des +++ b/dat/Rogue.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Rogue.des $Date$ $Revision$ +# NetHack 3.5 Rogue.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Rogue.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.6 $ # SCCS Id: @(#)Rogue.des 3.5 2002/02/15 # Copyright (c) 1992 by Dean Luick # NetHack may be freely redistributed. See license for details. diff --git a/dat/Samurai.des b/dat/Samurai.des index 73f150566..565a2ed67 100644 --- a/dat/Samurai.des +++ b/dat/Samurai.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Samurai.des $Date$ $Revision$ +# NetHack 3.5 Samurai.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Samurai.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.6 $ # SCCS Id: @(#)Samurai.des 3.5 2002/04/08 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991-92 by M. Stephenson, P. Winner diff --git a/dat/Tourist.des b/dat/Tourist.des index e446fb47c..e9b1658e9 100644 --- a/dat/Tourist.des +++ b/dat/Tourist.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Tourist.des $Date$ $Revision$ +# NetHack 3.5 Tourist.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Tourist.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.4 $ # SCCS Id: @(#)Tourist.des 3.5 1992/09/26 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991,92 by M. Stephenson, P. Winner diff --git a/dat/Valkyrie.des b/dat/Valkyrie.des index 4361ea155..04c401bde 100644 --- a/dat/Valkyrie.des +++ b/dat/Valkyrie.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Valkyrie.des $Date$ $Revision$ +# NetHack 3.5 Valkyrie.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Valkyrie.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.6 $ # SCCS Id: @(#)Valkyrie.des 3.5 2007/08/01 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1991-2 by M. Stephenson diff --git a/dat/Wizard.des b/dat/Wizard.des index cdcf9184a..dae831ed4 100644 --- a/dat/Wizard.des +++ b/dat/Wizard.des @@ -1,4 +1,5 @@ -# NetHack 3.5 Wizard.des $Date$ $Revision$ +# NetHack 3.5 Wizard.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Wizard.des $Date: 2009/05/06 10:44:17 $ $Revision: 1.5 $ # SCCS Id: @(#)Wizard.des 3.5 1992/07/11 # Copyright (c) 1992 by David Cohrs # NetHack may be freely redistributed. See license for details. diff --git a/dat/bigroom.des b/dat/bigroom.des index aeaed8bb7..00ea47f32 100644 --- a/dat/bigroom.des +++ b/dat/bigroom.des @@ -1,4 +1,5 @@ -# NetHack 3.5 bigroom.des $Date$ $Revision$ +# NetHack 3.5 bigroom.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 bigroom.des $Date: 2009/05/06 10:44:18 $ $Revision: 1.4 $ # SCCS Id: @(#)bigroom.des 3.5 1990/04/15 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1990 by M. Stephenson diff --git a/dat/castle.des b/dat/castle.des index 95653fa4e..1dd4fda78 100644 --- a/dat/castle.des +++ b/dat/castle.des @@ -1,4 +1,5 @@ -# NetHack 3.5 castle.des $Date$ $Revision$ +# NetHack 3.5 castle.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 castle.des $Date: 2009/05/06 10:44:18 $ $Revision: 1.5 $ # SCCS Id: @(#)castle.des 3.5 2002/05/02 # Copyright (c) 1989 by Jean-Christophe Collet # NetHack may be freely redistributed. See license for details. diff --git a/dat/data.base b/dat/data.base index c832a4780..67fca7aba 100644 --- a/dat/data.base +++ b/dat/data.base @@ -1,4 +1,5 @@ -# NetHack 3.5 data.base $Date$ $Revision$ +# NetHack 3.5 data.base $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 data.base $Date: 2014/10/09 02:04:43 $ $Revision: 1.50 $ # Copyright (c) 1994, 1995, 1996 by the NetHack Development Team # Copyright (c) 1994 by Boudewijn Wayers # NetHack may be freely redistributed. See license for details. diff --git a/dat/dungeon.def b/dat/dungeon.def index 203ece10a..bccd31b85 100644 --- a/dat/dungeon.def +++ b/dat/dungeon.def @@ -1,4 +1,5 @@ -# NetHack 3.5 dungeon.def $Date$ $Revision$ +# NetHack 3.5 dungeon.def $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 dungeon.def $Date: 2009/05/06 10:44:21 $ $Revision: 1.6 $ # SCCS Id: @(#)dungeon.def 3.5 2006/03/18 # Copyright (c) 1990-95 by M. Stephenson # NetHack may be freely redistributed. See license for details. @@ -18,8 +19,8 @@ DUNGEON: "The Dungeons of Doom" "D" (25, 5) ALIGNMENT: unaligned BRANCH: "The Gnomish Mines" @ (2, 3) -%REINCARNATION LEVEL: "rogue" "R" @ (15, 4) -%REINCARNATION LEVELDESC: roguelike +LEVEL: "rogue" "R" @ (15, 4) +LEVELDESC: roguelike LEVEL: "oracle" "O" @ (5, 5) LEVALIGN: neutral CHAINBRANCH: "Sokoban" "oracle" + (1, 0) up diff --git a/dat/endgame.des b/dat/endgame.des index d037a650d..4758ff518 100644 --- a/dat/endgame.des +++ b/dat/endgame.des @@ -1,4 +1,5 @@ -# NetHack 3.5 endgame.des $Date$ $Revision$ +# NetHack 3.5 endgame.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 endgame.des $Date: 2009/05/06 10:44:22 $ $Revision: 1.6 $ # SCCS Id: @(#)endgame.des 3.5 2007/03/02 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992,1993 by Izchak Miller, David Cohrs, diff --git a/dat/gehennom.des b/dat/gehennom.des index c85fc0931..daba7f532 100644 --- a/dat/gehennom.des +++ b/dat/gehennom.des @@ -1,4 +1,5 @@ -# NetHack 3.5 gehennom.des $Date$ $Revision$ +# NetHack 3.5 gehennom.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 gehennom.des $Date: 2009/05/06 10:44:23 $ $Revision: 1.5 $ # SCCS Id: @(#)gehennom.des 3.5 2005/02/02 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992 by M. Stephenson and Izchak Miller diff --git a/dat/knox.des b/dat/knox.des index e398fd443..d9d1a2d4d 100644 --- a/dat/knox.des +++ b/dat/knox.des @@ -1,4 +1,5 @@ -# NetHack 3.5 knox.des $Date$ $Revision$ +# NetHack 3.5 knox.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 knox.des $Date: 2009/05/06 10:44:23 $ $Revision: 1.5 $ # SCCS Id: @(#)knox.des 3.5 2006/03/20 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992 by Izchak Miller diff --git a/dat/medusa.des b/dat/medusa.des index 2e9ec44a2..ae65ff6d5 100644 --- a/dat/medusa.des +++ b/dat/medusa.des @@ -1,4 +1,5 @@ -# NetHack 3.5 medusa.des $Date$ $Revision$ +# NetHack 3.5 medusa.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 medusa.des $Date: 2009/05/06 10:44:23 $ $Revision: 1.5 $ # SCCS Id: @(#)medusa.des 3.5 1996/05/11 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1990, 1991 by M. Stephenson diff --git a/dat/mines.des b/dat/mines.des index a23c80850..8408bbd9d 100644 --- a/dat/mines.des +++ b/dat/mines.des @@ -1,4 +1,5 @@ -# NetHack 3.5 mines.des $Date$ $Revision$ +# NetHack 3.5 mines.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 mines.des $Date: 2009/05/06 10:44:23 $ $Revision: 1.17 $ # SCCS Id: @(#)mines.des 3.5 2002/05/02 # Copyright (c) 1989-95 by Jean-Christophe Collet # Copyright (c) 1991-95 by M. Stephenson diff --git a/dat/oracle.des b/dat/oracle.des index 970117ec2..72da0401f 100644 --- a/dat/oracle.des +++ b/dat/oracle.des @@ -1,4 +1,5 @@ -# NetHack 3.5 oracle.des $Date$ $Revision$ +# NetHack 3.5 oracle.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 oracle.des $Date: 2009/05/06 10:44:23 $ $Revision: 1.4 $ # SCCS Id: @(#)oracle.des 3.5 1995/10/07 # NetHack may be freely redistributed. See license for details. # diff --git a/dat/oracles.txt b/dat/oracles.txt index bee2b4b30..d4d5ae250 100644 --- a/dat/oracles.txt +++ b/dat/oracles.txt @@ -48,7 +48,7 @@ It is well known that wily shopkeepers raise their prices whene'er they espy the garish apparel of the approaching tourist or the countenance of a disfavored patron. They favor the gentle of manner and the fair of face. The boor may expect unprofitable transactions. ------ SINKS +----- The cliche of the kitchen sink swallowing any unfortunate rings that contact its pernicious surface reflecteth greater truth than many homilies, yet even so, few have developed the skill to identify enchanted rings by the @@ -96,7 +96,7 @@ The gods are said to be pleased when offerings are given to the priests who attend their temples, and they may grant various favors to those who do so. But beware! To be young and frugal is better than to be old and miserly. ------ ELBERETH +----- The name of Elbereth may strike fear into the hearts of thine enemies, if thou dost write it upon the ground at thy feet. If thou maintainest the utmost calm, thy safety will be aided greatly, but beware lest thy clumsy diff --git a/dat/quest.txt b/dat/quest.txt index c74be18fa..98e8de382 100644 --- a/dat/quest.txt +++ b/dat/quest.txt @@ -1,4 +1,5 @@ -# NetHack 3.5 quest.txt $Date$ $Revision$ +# NetHack 3.5 quest.txt $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 quest.txt $Date: 2009/05/06 10:44:23 $ $Revision: 1.23 $ # SCCS Id: @(#)quest.txt 3.5 2005/12/03 # Copyright (c) 1991 by M. Stephenson # NetHack may be freely redistributed. See license for details. diff --git a/dat/sokoban.des b/dat/sokoban.des index d0e5a1507..21eb63de5 100644 --- a/dat/sokoban.des +++ b/dat/sokoban.des @@ -1,4 +1,5 @@ -# NetHack 3.5 sokoban.des $Date$ $Revision$ +# NetHack 3.5 sokoban.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 sokoban.des $Date: 2009/05/06 10:44:24 $ $Revision: 1.5 $ # SCCS Id: @(#)sokoban.des 3.5 1999/03/15 # Copyright (c) 1998-1999 by Kevin Hugo # NetHack may be freely redistributed. See license for details. diff --git a/dat/symbols b/dat/symbols index 8f396582b..108d761d1 100644 --- a/dat/symbols +++ b/dat/symbols @@ -201,10 +201,6 @@ start: RogueEpyx S_food: \x05 # club (as in cards) S_potion: \xad # upside down '!' S_scroll: \x0e # musical note -# S_armor: \x5b -# S_ring: \x3d -# S_amulet: \x0c -# S_tool: \x28 S_wand: \xe7 # greek tau S_coin: \x0f # yes it's the same as gems S_gem: \x0f # fancy '*' @@ -397,131 +393,3 @@ start: NHAccess S_explode9: \047 finish -start: Unicode_US - Description: Unicode symbols similar to code page 437 - Restrictions: Unicode - S_vwall: U+2502 # box drawings light vertical - S_hwall: U+2500 # box drawings light horizontal - S_tlcorn: U+250C # box drawings light down and right - S_trcorn: U+2510 # box drawings light down and left - S_blcorn: U+2514 # box drawings light up and right - S_brcorn: U+2518 # box drawings light up and left - S_crwall: U+253C # box drawings light up and left - S_tuwall: U+2534 # box drawings light up and horizontal - S_tdwall: U+252C # box drawings light down and horizontal - S_tlwall: U+2524 # box drawings light vertical and left - S_trwall: U+251C # box drawings light vertical and right - S_ndoor: U+2556 # box drawings down double and left single - S_vodoor: U+25A0 # black square - S_hodoor: U+25A0 # black square - S_bars: U+2261 # identical to - S_tree: U+00B1 # plus-minus sign - S_room: U+00B7 # middle dot - S_corr: U+2591 # light shade - S_litcorr: U+2592 # medium shade - S_fountain: U+2320 # top half integral - S_pool: U+2248 # almost equal to - S_ice: U+00B7 # middle dot - S_lava: U+2248 # almost equal to - S_vodbridge: U+00B7 # middle dot - S_hodbridge: U+00B7 # middle dot - S_water: U+2248 # almost equal to - S_vbeam: U+2502 # box drawings light vertical - S_hbeam: U+2500 # box drawings light horizontal - S_sw_ml: U+2502 # box drawings light vertical - S_sw_mr: U+2502 # box drawings light vertical - S_explode4: U+2502 # box drawings light vertical - S_explode6: U+2502 # box drawings light vertical -finish - -start: Unicode_non_US - Description: If default OEM CP for non-Unicode programs is not 437 or 850 - Restrictions: Unicode - S_vwall: U+2502 # box drawings light vertical - S_hwall: U+2500 # box drawings light horizontal - S_tlcorn: U+250C # box drawings light down and right - S_trcorn: U+2510 # box drawings light down and left - S_blcorn: U+2514 # box drawings light up and right - S_brcorn: U+2518 # box drawings light up and left - S_crwall: U+253C # box drawings light up and left - S_tuwall: U+2534 # box drawings light up and horizontal - S_tdwall: U+252C # box drawings light down and horizontal - S_tlwall: U+2524 # box drawings light vertical and left - S_trwall: U+251C # box drawings light vertical and right - S_vodoor: U+25A0 # black square - S_hodoor: U+25A0 # black square - S_corr: U+2591 # light shade - S_litcorr: U+2592 # medium shade - S_vbeam: U+2502 # box drawings light vertical - S_hbeam: U+2500 # box drawings light horizontal - S_sw_ml: U+2502 # box drawings light vertical - S_sw_mr: U+2502 # box drawings light vertical - S_explode4: U+2502 # box drawings light vertical - S_explode6: U+2502 # box drawings light vertical - S_coin: U+20AC # euro -finish - -start: UnicodeRogueEpyx - Description: Unicode Rogue level symbols - Restrictions: Unicode - Restrictions: Rogue - Color: Yes - S_weapon: U+2191 # up arrow - S_armor: U+25d9 # Vert rect with o - S_ring: U+2642 # circle with arrow - S_amulet: U+2640 # "female" symbol - S_food: U+2663 # club (as in cards) - S_potion: U+00a1 # upside down '!' - S_scroll: U+266a # musical note - S_wand: U+03c4 # greek tau - S_coin: U+263c # yes it's the same as gems - S_gem: U+263c # fancy '*' - S_rock: U+0060 # grave accent - S_ball: U+0030 # digit 0 - S_chain: U+005f # low line - S_venom: U+002e # full stop - S_book: U+002b # + sign - S_vwall: U+2551 # all walls now use - S_hwall: U+2550 # double line graphics - S_tlcorn: U+2554 # box drawing double down and right - S_trcorn: U+2557 # box drawing double down and left - S_blcorn: U+255a # box drawing double up and right - S_brcorn: U+255d # box drawing double up and left - S_crwall: U+256c # box drawing double vertical and horizontal - S_tuwall: U+2569 # box drawing double up and horizontal - S_tdwall: U+2566 # box drawing double down and horizontal - S_tlwall: U+2563 # box drawing double vertical and left - S_trwall: U+2560 # box drawing double vertical and right - S_ndoor: U+256c # box drawing double vertical and horizontal - S_vodoor: U+256c # box drawing double vertical and horizontal - S_hodoor: U+256c # box drawing double vertical and horizontal - S_room: U+00b7 # centered dot - S_corr: U+2592 # medium shade - S_litcorr: U+2593 # dark shade - S_upstair: U+001e # Greek Xi - S_dnstair: U+001f - S_arrow_trap: U+2666 # diamond (cards) - S_dart_trap: U+2666 - S_falling_rock_trap: U+2666 - S_squeaky_board: U+2666 - S_bear_trap: U+2666 - S_land_mine: U+2666 - S_rolling_boulder_trap: U+2666 - S_sleeping_gas_trap: U+2666 - S_rust_trap: U+2666 - S_fire_trap: U+2666 - S_pit: U+2666 - S_spiked_pit: U+2666 - S_hole: U+2666 - S_trap_door: U+2666 - S_teleportation_trap: U+2666 - S_level_teleporter: U+2666 - S_magic_portal: U+2666 - S_web: U+2666 - S_statue_trap: U+2666 - S_magic_trap: U+2666 - S_anti_magic_trap: U+2666 - S_polymorph_trap: U+2666 - S_human: U+263a # face -finish - diff --git a/dat/tower.des b/dat/tower.des index 6b3894ddb..eb017247d 100644 --- a/dat/tower.des +++ b/dat/tower.des @@ -1,4 +1,5 @@ -# NetHack 3.5 tower.des $Date$ $Revision$ +# NetHack 3.5 tower.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 tower.des $Date: 2009/05/06 10:44:25 $ $Revision: 1.4 $ # SCCS Id: @(#)tower.des 3.5 1990/02/26 # Copyright (c) 1989 by Jean-Christophe Collet # NetHack may be freely redistributed. See license for details. diff --git a/dat/yendor.des b/dat/yendor.des index f29f99513..6bef30231 100644 --- a/dat/yendor.des +++ b/dat/yendor.des @@ -1,4 +1,5 @@ -# NetHack 3.5 yendor.des $Date$ $Revision$ +# NetHack 3.5 yendor.des $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 yendor.des $Date: 2009/05/06 10:44:25 $ $Revision: 1.5 $ # SCCS Id: @(#)yendor.des 3.5 1996/10/20 # Copyright (c) 1989 by Jean-Christophe Collet # Copyright (c) 1992 by M. Stephenson and Izchak Miller diff --git a/doc/.gitattributes b/doc/.gitattributes new file mode 100644 index 000000000..9ca881076 --- /dev/null +++ b/doc/.gitattributes @@ -0,0 +1,5 @@ +*.mn filter=NHtext merge=NHsubst +*.6 filter=NHtext merge=NHsubst +fixes.* filter=NHtext merge=NHsubst +window.doc filter=NHtext merge=NHsubst + diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 000000000..7bdb35836 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +Guidebook diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 432c00999..cf8196b3a 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -1,4 +1,5 @@ -.\" $Revision$ $Date$ +.\" $NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +.\" $Revision: 1.130 $ $Date: 2012/05/02 00:38:30 $ .ds h0 "NetHack Guidebook .ds h1 .ds h2 % diff --git a/doc/dgn_comp.6 b/doc/dgn_comp.6 index 3db65ac06..7f30da6b4 100644 --- a/doc/dgn_comp.6 +++ b/doc/dgn_comp.6 @@ -1,5 +1,6 @@ .TH DGN_COMP 6 "12 Dec 1995" -.\" NetHack 3.5 dgn_comp.6 $Date$ $Revision$ +.\" NetHack 3.5 dgn_comp.6 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +.\" NetHack 3.5 dgn_comp.6 $Date: 2009/05/06 10:44:28 $ $Revision: 1.2 $ .UC 4 .SH NAME dgn_comp \- NetHack dungeon compiler diff --git a/doc/dlb.6 b/doc/dlb.6 index e3b762f89..6a41e5458 100644 --- a/doc/dlb.6 +++ b/doc/dlb.6 @@ -1,5 +1,6 @@ .TH DLB 6 "28 Oct 1993" -.\" NetHack 3.5 dlb.6 $Date$ $Revision$ +.\" NetHack 3.5 dlb.6 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +.\" NetHack 3.5 dlb.6 $Date: 2009/05/06 10:44:28 $ $Revision: 1.3 $ .UC 4 .SH NAME dlb \- NetHack data librarian diff --git a/doc/fixes30.0 b/doc/fixes30.0 index 5a2088ae8..26b289b44 100644 --- a/doc/fixes30.0 +++ b/doc/fixes30.0 @@ -1,4 +1,5 @@ -$RCSfile$ $Revision$ $Date$ +$NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +$RCSfile: fixes30.0,v $ $Revision: 1.2 $ $Date: 2003/05/11 15:09:24 $ [This is a partial list supplied by Ken Arromdee long after the fact] diff --git a/doc/fixes34.1 b/doc/fixes34.1 index d69aeae53..f44271c48 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -1,4 +1,5 @@ -$RCSfile$ $Revision$ $Date$ +$NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +$RCSfile: fixes34.1,v $ $Revision: 1.331 $ $Date: 2003/02/20 00:19:46 $ General Fixes and Modified Features ----------------------------------- diff --git a/doc/fixes34.2 b/doc/fixes34.2 index 1b9b3ecbb..59214ac25 100644 --- a/doc/fixes34.2 +++ b/doc/fixes34.2 @@ -1,4 +1,5 @@ -$RCSfile$ $Revision$ $Date$ +$NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +$RCSfile: fixes34.2,v $ $Revision: 1.132 $ $Date: 2003/08/26 15:11:58 $ General Fixes and Modified Features ----------------------------------- diff --git a/doc/fixes34.3 b/doc/fixes34.3 index 9f3487e93..591b2eb75 100644 --- a/doc/fixes34.3 +++ b/doc/fixes34.3 @@ -1,4 +1,5 @@ -$RCSfile$ $Revision$ $Date$ +$NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +$RCSfile: fixes34.3,v $ $Revision: 1.103 $ $Date: 2003/12/06 14:08:46 $ General Fixes and Modified Features ----------------------------------- diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 5aaa60013..6721eb0bb 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -1,4 +1,5 @@ -$rcsfile: fixes35.0,v $ $Revision$ $Date$ +$NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +$rcsfile: fixes35.0,v $ $Revision: 1.445 $ $Date: 2014/11/18 03:10:36 $ General Fixes and Modified Features ----------------------------------- diff --git a/doc/lev_comp.6 b/doc/lev_comp.6 index e5db11c84..2420fa22e 100644 --- a/doc/lev_comp.6 +++ b/doc/lev_comp.6 @@ -1,5 +1,6 @@ .TH LEV_COMP 6 "16 May 1996" -.\" NetHack 3.5 lev_comp.6 $Date$ $Revision$ +.\" NetHack 3.5 lev_comp.6 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +.\" NetHack 3.5 lev_comp.6 $Date: 2009/05/06 10:44:28 $ $Revision: 1.2 $ .UC 4 .SH NAME lev_comp \- NetHack special levels compiler diff --git a/doc/makedefs.6 b/doc/makedefs.6 index 3c42ca26b..7b850108c 100644 --- a/doc/makedefs.6 +++ b/doc/makedefs.6 @@ -1,5 +1,6 @@ .TH MAKEDEFS 6 "29 Apr 2010" -.\" NetHack 3.5 makedefs.6 $Date$ $Revision$ +.\" NetHack 3.5 makedefs.6 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +.\" NetHack 3.5 makedefs.6 $Date: 2010/05/01 20:57:12 $ $Revision: 1.1 $ .UC 4 .SH NAME makedefs \- NetHack miscellaneous build-time functions @@ -117,6 +118,14 @@ and .IR vis_tab.h . .SH LONG COMMANDS .TP +.BI --debug +Show debugging output. +.br +.TP +.B --make \fR[\fIcommand\fR] +Execute a short command. Command is given without preceding dash. +.br +.TP .BI --input " file" Specify the input .I file diff --git a/doc/nethack.6 b/doc/nethack.6 index a3a1f862c..548e885d0 100644 --- a/doc/nethack.6 +++ b/doc/nethack.6 @@ -1,5 +1,6 @@ .TH NETHACK 6 "6 March 2004" -.\" NetHack 3.5 nethack.6 $Date$ $Revision$ +.\" NetHack 3.5 nethack.6 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +.\" NetHack 3.5 nethack.6 $Date: 2009/05/06 10:44:28 $ $Revision: 1.7 $ .SH NAME nethack \- Exploring The Mazes of Menace .SH SYNOPSIS diff --git a/doc/recover.6 b/doc/recover.6 index d54299c36..b5a2708cc 100644 --- a/doc/recover.6 +++ b/doc/recover.6 @@ -1,5 +1,6 @@ .TH RECOVER 6 "9 January 1993" -.\" NetHack 3.5 recover.6 $Date$ $Revision$ +.\" NetHack 3.5 recover.6 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +.\" NetHack 3.5 recover.6 $Date: 2009/05/06 10:44:29 $ $Revision: 1.3 $ .UC 4 .SH NAME recover \- recover a NetHack game interrupted by disaster diff --git a/doc/window.doc b/doc/window.doc index 5e4842f08..411d73de9 100644 --- a/doc/window.doc +++ b/doc/window.doc @@ -1,4 +1,5 @@ -NetHack 3.5 window.doc $Date$ $Revision$ +NetHack 3.5 window.doc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +NetHack 3.5 window.doc $Date: 2012/01/23 10:41:55 $ $Revision: 1.36 $ Introduction diff --git a/include/align.h b/include/align.h index 7495fe718..7af1eb433 100644 --- a/include/align.h +++ b/include/align.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 align.h $Date$ $Revision$ */ +/* NetHack 3.5 align.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 align.h $Date: 2009/05/06 10:44:33 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)align.h 3.5 1991/12/29 */ /* Copyright (c) Mike Stephenson, Izchak Miller 1991. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/amiconf.h b/include/amiconf.h index b6503add9..9c326653c 100644 --- a/include/amiconf.h +++ b/include/amiconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 amiconf.h $Date$ $Revision$ */ +/* NetHack 3.5 amiconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amiconf.h $Date: 2012/01/10 17:47:16 $ $Revision: 1.8 $ */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1990, 1991, 1992, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/artifact.h b/include/artifact.h index 0fbdc9a42..1cee87887 100644 --- a/include/artifact.h +++ b/include/artifact.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 artifact.h $Date$ $Revision$ */ +/* NetHack 3.5 artifact.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 artifact.h $Date: 2011/04/07 18:10:44 $ $Revision: 1.6 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/artilist.h b/include/artilist.h index 0996b1fe0..b13a91abd 100644 --- a/include/artilist.h +++ b/include/artilist.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 artilist.h $Date$ $Revision$ */ +/* NetHack 3.5 artilist.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 artilist.h $Date: 2011/04/07 18:10:44 $ $Revision: 1.8 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -214,13 +215,11 @@ A("The Tsurugi of Muramasa", TSURUGI, PHYS(0,8), NO_DFNS, NO_CARY, 0, A_LAWFUL, PM_SAMURAI, NON_PM, 4500L ), -#ifdef TOURIST A("The Platinum Yendorian Express Card", CREDIT_CARD, (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_DEFN), (SPFX_ESP|SPFX_HSPDAM), 0, NO_ATTK, NO_DFNS, CARY(AD_MAGM), CHARGE_OBJ, A_NEUTRAL, PM_TOURIST, NON_PM, 7000L ), -#endif A("The Orb of Fate", CRYSTAL_BALL, (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL|SPFX_LUCK), diff --git a/include/attrib.h b/include/attrib.h index 7eae006ff..1c93e9cff 100644 --- a/include/attrib.h +++ b/include/attrib.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 attrib.h $Date$ $Revision$ */ +/* NetHack 3.5 attrib.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 attrib.h $Date: 2009/05/06 10:44:34 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)attrib.h 3.5 1990/22/02 */ /* Copyright 1988, Mike Stephenson */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/beconf.h b/include/beconf.h index e1b930e5b..ee3605564 100644 --- a/include/beconf.h +++ b/include/beconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 beconf.h $Date$ $Revision$ */ +/* NetHack 3.5 beconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 beconf.h $Date: 2009/05/06 10:44:34 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)beconf.h 3.5 1998/07/08 */ /* Copyright (c) Dean Luick 1996. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/botl.h b/include/botl.h index 4f0a93616..7a9d8aaa6 100644 --- a/include/botl.h +++ b/include/botl.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 botl.h $Date$ $Revision$ */ +/* NetHack 3.5 botl.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 botl.h $Date: 2012/01/10 17:47:16 $ $Revision: 1.6 $ */ /* Copyright (c) Michael Allison, 2003 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/color.h b/include/color.h index 2a983341f..ab6fe0462 100644 --- a/include/color.h +++ b/include/color.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 color.h $Date$ $Revision$ */ +/* NetHack 3.5 color.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 color.h $Date: 2009/05/06 10:44:34 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)color.h 3.5 1992/02/02 */ /* Copyright (c) Steve Linhart, Eric Raymond, 1989. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/config.h b/include/config.h index 13adba0d4..c13b2dd01 100644 --- a/include/config.h +++ b/include/config.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 config.h $Date$ $Revision$ */ +/* NetHack 3.5 config.h $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.51 $ */ +/* NetHack 3.5 config.h $Date: 2012/01/27 20:15:26 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -171,16 +172,12 @@ * GDBPATH (the path to the system gdb(1) program) */ -#ifndef WIZARD /* allow for compile-time or Makefile changes */ -# ifndef KR1ED -# define WIZARD "wizard" /* the person allowed to use the -D option */ +#ifndef WIZARD_NAME /* allow for compile-time or Makefile changes */ +# define WIZARD_NAME "wizard" +#endif + /* #define SYSCF */ /* use a global configuration */ /* #define SYSCF_FILE "sysconf" */ /* global configuration is in a file */ -# else -# define WIZARD -# define WIZARD_NAME "wizard" -# endif -#endif #ifndef GDBPATH # define GDBPATH "/usr/bin/gdb" @@ -318,10 +315,6 @@ */ #endif /* CHDIR */ -/* - * Enable some UNICODE support. - */ -/*#define UNICODE_SUPPORT */ /* master on/off for any unicode support */ /* @@ -415,34 +408,19 @@ typedef unsigned char uchar; */ /* display features */ -#define LOADSYMSETS /* loadable symbol sets; only default symbols w/o this */ /* dungeon features */ -#define SINKS /* Kitchen sinks - Janet Walz */ /* dungeon levels */ #define WALLIFIED_MAZE /* Fancy mazes - Jean-Christophe Collet */ -#define REINCARNATION /* Special Rogue-like levels */ /* monsters & objects */ -#define KOPS /* Keystone Kops by Scott R. Turner */ -#define SEDUCE /* Succubi/incubi seduction, by KAA, suggested by IM */ -#define STEED /* Riding steeds */ -#define TOURIST /* Tourist players with cameras and Hawaiian shirts */ -/* difficulty */ -#define ELBERETH /* Engraving the E-word repels monsters */ /* I/O */ -#define REDO /* support for redoing last command - DGK */ #if !defined(MAC) # if !defined(NOCLIPPING) # define CLIPPING /* allow smaller screens -- ERS */ # endif #endif -#define AUTOPICKUP_EXCEPTIONS /* exceptions to autopickup */ -#define BARGETHROUGH /* allow some monsters to move others out of their way */ -#ifdef REDO -# define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */ -#endif +#define DOAGAIN '\001' /* ^A, the "redo" key used in cmd.c and getline.c */ -#define EXP_ON_BOTL /* Show experience on bottom line */ /* #define SCORE_ON_BOTL */ /* added by Gary Erickson (erickson@ucivax) */ /* @@ -453,10 +431,8 @@ typedef unsigned char uchar; * bugs left here. */ -/*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ #define STATUS_VIA_WINDOWPORT /* re-work of the status line updating process */ #define STATUS_HILITES /* support hilites of status fields */ -#define DUNGEON_OVERVIEW /* dungeon overview by Hojita Discordia */ /* #define WINCHAIN*/ /* stacked window systems */ /* End of Section 5 */ diff --git a/include/config1.h b/include/config1.h index f0a75ae9f..dee60ce95 100644 --- a/include/config1.h +++ b/include/config1.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 config1.h $Date$ $Revision$ */ +/* NetHack 3.5 config1.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 config1.h $Date: 2011/05/23 03:27:07 $ $Revision: 1.13 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/context.h b/include/context.h index 7e2e7007f..ebfe1ada7 100644 --- a/include/context.h +++ b/include/context.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 context.h $Date$ $Revision$ */ +/* NetHack 3.5 context.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 context.h $Date: 2012/01/10 17:47:16 $ $Revision: 1.15 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/coord.h b/include/coord.h index 3b2e2179d..973ec1d89 100644 --- a/include/coord.h +++ b/include/coord.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 coord.h $Date$ $Revision$ */ +/* NetHack 3.5 coord.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 coord.h $Date: 2012/01/10 17:47:16 $ $Revision: 1.5 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/decl.h b/include/decl.h index e371c977f..f9d4a7b7c 100644 --- a/include/decl.h +++ b/include/decl.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 decl.h $Date$ $Revision$ */ +/* NetHack 3.5 decl.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.50 $ */ +/* NetHack 3.5 decl.h $Date: 2011/12/29 20:06:27 $ $Revision: 1.44 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -38,16 +39,12 @@ E NEARDATA int warn_obj_cnt; /* count of monsters meeting criteria */ E int x_maze_max, y_maze_max; E int otg_temp; -#ifdef REDO E NEARDATA int in_doagain; -#endif E struct dgn_topology { /* special dungeon levels for speed */ d_level d_oracle_level; d_level d_bigroom_level; /* unused */ -#ifdef REINCARNATION d_level d_rogue_level; -#endif d_level d_medusa_level; d_level d_stronghold_level; d_level d_valley_level; @@ -74,9 +71,7 @@ E struct dgn_topology { /* special dungeon levels for speed */ /* macros for accesing the dungeon levels by their old names */ #define oracle_level (dungeon_topology.d_oracle_level) #define bigroom_level (dungeon_topology.d_bigroom_level) -#ifdef REINCARNATION #define rogue_level (dungeon_topology.d_rogue_level) -#endif #define medusa_level (dungeon_topology.d_medusa_level) #define stronghold_level (dungeon_topology.d_stronghold_level) #define valley_level (dungeon_topology.d_valley_level) @@ -154,9 +149,7 @@ E NEARDATA struct sinfo { #ifdef PANICLOG int in_paniclog; #endif -#ifdef WIZARD int wizkit_wishing; -#endif } program_state; E boolean restoring; @@ -185,9 +178,7 @@ E NEARDATA struct kinfo { char name[BUFSZ]; /* actual killer name */ } killer; -#ifdef GOLDOBJ E long done_money; -#endif E const char *configfile; E NEARDATA char plname[PL_NSIZ]; E NEARDATA char dogname[]; @@ -233,9 +224,7 @@ E uchar monsyms[MAXMCLASSES]; /* current class symbols */ #include "obj.h" E NEARDATA struct obj *invent, *uarm, *uarmc, *uarmh, *uarms, *uarmg, *uarmf, -#ifdef TOURIST *uarmu, /* under-wear, so to speak */ -#endif *uskin, *uamul, *uleft, *uright, *ublindf, *uwep, *uswapwep, *uquiver; @@ -331,7 +320,6 @@ E NEARDATA winid WIN_MESSAGE; E NEARDATA winid WIN_STATUS; #endif E NEARDATA winid WIN_MAP, WIN_INVEN; -E nhwchar toplines[]; /* pline (et al) for a single string argument (suppress compiler warning) */ #define pline1(cstr) pline("%s", cstr) @@ -342,6 +330,7 @@ E nhwchar toplines[]; #define Sprintf1(buf, cstr) Sprintf(buf, "%s", cstr) #define panic1(cstr) panic("%s", cstr) +E char toplines[]; #ifndef TCAP_H E struct tc_gbl_data { /* also declared in tcap.h */ char *tc_AS, *tc_AE; /* graphics start and end (tty font swapping) */ @@ -390,13 +379,11 @@ E char *fqn_prefix_names[PREFIX_COUNT]; E NEARDATA struct savefile_info sfcap, sfrestinfo, sfsaveinfo; -#ifdef AUTOPICKUP_EXCEPTIONS struct autopickup_exception { char *pattern; boolean grab; struct autopickup_exception *next; }; -#endif /* AUTOPICKUP_EXCEPTIONS */ #ifdef PANICTRACE E char *ARGV0; diff --git a/include/def_os2.h b/include/def_os2.h index c66425337..2a5b6fa6c 100644 --- a/include/def_os2.h +++ b/include/def_os2.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 def_os2.h $Date$ $Revision$ */ +/* NetHack 3.5 def_os2.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 def_os2.h $Date: 2009/05/06 10:44:37 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)def_os2.h 3.5 1993/01/19 */ /* Copyright (c) Timo Hakulinen, 1990, 1991, 1992, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/dgn_file.h b/include/dgn_file.h index 9ea79526c..b10972394 100644 --- a/include/dgn_file.h +++ b/include/dgn_file.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 dgn_file.h $Date$ $Revision$ */ +/* NetHack 3.5 dgn_file.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dgn_file.h $Date: 2009/05/06 10:44:38 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)dgn_file.h 3.5 1993/01/17 */ /* Copyright (c) 1989 by M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/display.h b/include/display.h index a18a878cc..5be06d08a 100644 --- a/include/display.h +++ b/include/display.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 display.h $Date$ $Revision$ */ +/* NetHack 3.5 display.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 display.h $Date: 2009/05/06 10:44:38 $ $Revision: 1.14 $ */ /* SCCS Id: @(#)display.h 3.5 2005/06/21 */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ @@ -15,9 +16,13 @@ #include "mondata.h" /* for mindless() */ #endif -#ifndef INVISIBLE_OBJECTS +/* + * vobj_at() + * + * Returns the head of the list of objects that the player can see + * at location (x,y). + */ #define vobj_at(x,y) (level.objects[x][y]) -#endif /* * sensemon() @@ -197,12 +202,8 @@ * Display the hero. It is assumed that all checks necessary to determine * _if_ the hero can be seen have already been done. */ -#ifdef STEED #define maybe_display_usteed (u.usteed && mon_visible(u.usteed)) ? \ ridden_mon_to_glyph(u.usteed) : -#else -#define maybe_display_usteed /* empty */ -#endif #define display_self() \ show_glyph(u.ux, u.uy, \ diff --git a/include/dlb.h b/include/dlb.h index 3c16c97c8..5ab7b10e2 100644 --- a/include/dlb.h +++ b/include/dlb.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 dlb.h $Date$ $Revision$ */ +/* NetHack 3.5 dlb.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dlb.h $Date: 2009/05/06 10:44:38 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)dlb.h 3.5 1997/07/29 */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/dungeon.h b/include/dungeon.h index 707ac6cf7..f2bf75ef6 100644 --- a/include/dungeon.h +++ b/include/dungeon.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 dungeon.h $Date$ $Revision$ */ +/* NetHack 3.5 dungeon.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dungeon.h $Date: 2012/04/14 08:31:03 $ $Revision: 1.11 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -168,7 +169,6 @@ struct linfo { #endif /* MFLOPPY */ }; -#ifdef DUNGEON_OVERVIEW /* types and structures for dungeon map recording * * It is designed to eliminate the need for an external notes file for some of @@ -231,9 +231,7 @@ typedef struct mapseen { Bitfield(valley, 1); Bitfield(msanctum, 1); Bitfield(ludios, 1); -# ifdef REINCARNATION Bitfield(roguelevel, 1); -# endif } flags; /* custom naming */ char *custom; @@ -246,5 +244,4 @@ typedef struct mapseen { struct cemetery *final_resting_place; /* same as level.bonesinfo */ } mapseen; -#endif /* DUNGEON_OVERVIEW */ #endif /* DUNGEON_H */ diff --git a/include/engrave.h b/include/engrave.h index 336065b7f..429a5881a 100644 --- a/include/engrave.h +++ b/include/engrave.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 engrave.h $Date$ $Revision$ */ +/* NetHack 3.5 engrave.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 engrave.h $Date: 2009/05/06 10:44:39 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)engrave.h 3.5 1991/07/31 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/extern.h b/include/extern.h index 13600247d..39a42641c 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 extern.h $Date$ $Revision$ */ +/* NetHack 3.5 extern.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.390 $ */ +/* NetHack 3.5 extern.h $Date: 2013/11/05 00:57:53 $ $Revision: 1.380 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -171,7 +172,6 @@ E int NDECL(domonability); E int NDECL(doprev_message); E int NDECL(timed_occupation); E int NDECL(doattributes); -# ifdef WIZARD E int NDECL(wiz_detect); E int NDECL(wiz_genesis); E int NDECL(wiz_identify); @@ -179,18 +179,13 @@ E int NDECL(wiz_level_tele); E int NDECL(wiz_map); E int NDECL(wiz_where); E int NDECL(wiz_wish); -# endif /* WIZARD */ #endif /* USE_TRAMPOLI */ E void NDECL(reset_occupations); E void FDECL(set_occupation, (int (*)(void),const char *,int)); -#ifdef REDO E char NDECL(pgetchar); E void FDECL(pushch, (CHAR_P)); E void FDECL(savech, (CHAR_P)); -#endif -#ifdef WIZARD E void NDECL(add_debug_extended_commands); -#endif /* WIZARD */ E void FDECL(reset_commands, (BOOLEAN_P)); E void FDECL(rhack, (char *)); E int NDECL(doextlist); @@ -214,9 +209,7 @@ E void FDECL(hangup, (int)); E void NDECL(end_of_input); #endif E char NDECL(readchar); -#ifdef WIZARD E void NDECL(sanity_check); -#endif E char FDECL(yn_function, (const char *, const char *, CHAR_P)); E boolean FDECL(paranoid_query, (BOOLEAN_P,const char *)); @@ -302,9 +295,6 @@ E void FDECL(bury_obj, (struct obj *)); /* ### display.c ### */ -#ifdef INVISIBLE_OBJECTS -E struct obj * FDECL(vobj_at, (XCHAR_P,XCHAR_P)); -#endif /* INVISIBLE_OBJECTS */ E void FDECL(magic_map_background, (XCHAR_P,XCHAR_P,int)); E void FDECL(map_background, (XCHAR_P,XCHAR_P,int)); E void FDECL(map_trap, (struct trap *,int)); @@ -398,9 +388,7 @@ E char *FDECL(distant_monnam, (struct monst *,int,char *)); E const char *NDECL(rndmonnam); E const char *FDECL(hcolor, (const char *)); E const char *NDECL(rndcolor); -#ifdef REINCARNATION E const char *NDECL(roguename); -#endif E struct obj *FDECL(realloc_obj, (struct obj *, int, genericptr_t, int, const char *)); E char *FDECL(coyotename, (struct monst *,char *)); @@ -428,9 +416,7 @@ E int NDECL(Gloves_off); E int NDECL(Boots_off); E int NDECL(Cloak_off); E int NDECL(Shield_off); -#ifdef TOURIST E int NDECL(Shirt_off); -#endif E void NDECL(Amulet_off); E void FDECL(Ring_on, (struct obj *)); E void FDECL(Ring_off, (struct obj *)); @@ -520,20 +506,14 @@ E int FDECL(def_char_to_monclass, (CHAR_P)); #if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C) E void FDECL(switch_symbols, (int)); E void FDECL(assign_graphics, (int)); -#ifdef REINCARNATION E void NDECL(init_r_symbols); -#endif E void NDECL(init_symbols); E void NDECL(init_showsyms); E void NDECL(init_l_symbols); -#ifdef LOADSYMSETS E void FDECL(clear_symsetentry, (int,BOOLEAN_P)); E void FDECL(update_l_symset, (struct symparse *,int)); E void FDECL(update_r_symset, (struct symparse *,int)); -#endif -#ifdef BARGETHROUGH E boolean FDECL(cursed_object_at, (int, int)); -#endif /* ### dungeon.c ### */ @@ -583,10 +563,7 @@ E int FDECL(induced_align, (int)); E boolean FDECL(Invocation_lev, (d_level *)); E xchar NDECL(level_difficulty); E schar FDECL(lev_by_name, (const char *)); -#ifdef WIZARD E schar FDECL(print_dungeon, (BOOLEAN_P,schar *,xchar *)); -#endif -#ifdef DUNGEON_OVERVIEW E int NDECL(donamelevel); E int NDECL(dooverview); E void FDECL(show_overview, (int,int)); @@ -597,7 +574,6 @@ E void FDECL(mapseen_temple, (struct monst *)); E void FDECL(room_discovered, (int)); E void FDECL(recbranch_mapseen, (d_level *, d_level *)); E void FDECL(remdun_mapseen, (int)); -#endif /* DUNGEON_OVERVIEW */ /* ### eat.c ### */ @@ -669,9 +645,7 @@ E void FDECL(cant_reach_floor, (int,int,BOOLEAN_P,BOOLEAN_P)); E const char *FDECL(surface, (int,int)); E const char *FDECL(ceiling, (int,int)); E struct engr *FDECL(engr_at, (XCHAR_P,XCHAR_P)); -#ifdef ELBERETH E int FDECL(sengr_at, (const char *,XCHAR_P,XCHAR_P)); -#endif E void FDECL(u_wipe_engr, (int)); E void FDECL(wipe_engr_at, (XCHAR_P,XCHAR_P,XCHAR_P)); E void FDECL(read_engr_at, (int,int)); @@ -705,11 +679,9 @@ E void FDECL(explode_oil, (struct obj *,int,int)); /* ### extralev.c ### */ -#ifdef REINCARNATION E void NDECL(makeroguerooms); E void FDECL(corr, (int,int)); E void NDECL(makerogueghost); -#endif /* ### files.c ### */ @@ -737,7 +709,7 @@ E void FDECL(set_savefile_name, (BOOLEAN_P)); #ifdef INSURANCE E void FDECL(save_savefile_name, (int)); #endif -#if defined(WIZARD) && !defined(MICRO) +#ifndef MICRO E void NDECL(set_error_savefile); #endif E int NDECL(create_savefile); @@ -753,14 +725,9 @@ E boolean FDECL(can_read_file, (const char *)); #endif E boolean FDECL(read_config_file, (const char *, int)); E void FDECL(check_recordfile, (const char *)); -#if defined(WIZARD) E void NDECL(read_wizkit); -#endif -#ifdef LOADSYMSETS E int FDECL(read_sym_file, (int)); E int FDECL(parse_sym_line, (char *,int)); -E int FDECL(sym_val, (const char *)); -#endif E void FDECL(paniclog, (const char *, const char *)); E int FDECL(validate_prefix_locations, (char *)); #ifdef SELECTSAVED @@ -785,10 +752,8 @@ E void FDECL(gush, (int,int,genericptr_t)); E void FDECL(dryup, (XCHAR_P,XCHAR_P, BOOLEAN_P)); E void NDECL(drinkfountain); E void FDECL(dipfountain, (struct obj *)); -#ifdef SINKS E void FDECL(breaksink, (int,int)); E void NDECL(drinksink); -#endif /* ### hack.c ### */ @@ -826,9 +791,7 @@ E int FDECL(calc_capacity, (int)); E int NDECL(max_capacity); E boolean FDECL(check_capacity, (const char *)); E int FDECL(inv_cnt, (BOOLEAN_P)); -#ifdef GOLDOBJ E long FDECL(money_cnt, (struct obj *)); -#endif /* ### hacklib.c ### */ @@ -879,20 +842,6 @@ E int NDECL(phase_of_the_moon); E boolean NDECL(friday_13th); E int NDECL(night); E int NDECL(midnight); -#ifdef UNICODE_WIDEWINPORT -E nhwchar *FDECL(nhwstrncpy, (nhwchar *,const char *,size_t)); -E nhwchar *FDECL(nhwncpy, (nhwchar *,const nhwchar *,size_t)); -E nhwchar *FDECL(nhwcpy, (nhwchar *,const nhwchar *)); -E nhwchar *FDECL(nhwstrcpy, (nhwchar *,const char *)); -E char *FDECL(strnhwcpy, (char *,const nhwchar *)); -E nhwchar *FDECL(nhwstrcat, (nhwchar *,const char *)); -E nhwchar *FDECL(nhwcat, (nhwchar *,const nhwchar *)); -E nhwchar *FDECL(nhwindex, (const nhwchar *,int)); -E size_t FDECL(nhwlen, (const nhwchar *)); -E int FDECL(nhwcmp, (const nhwchar *,const nhwchar *)); -E int FDECL(nhwncmp, (const nhwchar *,const nhwchar *,int)); -E int FDECL(nhwstrcmp, (const nhwchar *,const char *)); -#endif /* ### invent.c ### */ @@ -923,11 +872,6 @@ E boolean FDECL(obj_here, (struct obj *,int,int)); E boolean NDECL(wearing_armor); E boolean FDECL(is_worn, (struct obj *)); E struct obj *FDECL(g_at, (int,int)); -#ifndef GOLDOBJ -E struct obj *FDECL(mkgoldobj, (long)); -E struct obj *FDECL(insert_gold_into_invent, (BOOLEAN_P)); -E void NDECL(remove_gold_from_invent); -#endif E struct obj *FDECL(getobj, (const char *,const char *)); E int FDECL(ggetobj, (const char *,int (*)(OBJ_P),int,BOOLEAN_P,unsigned *)); E int FDECL(askchain, (struct obj **,const char *,int,int (*)(OBJ_P), @@ -1000,9 +944,7 @@ E void FDECL(obj_adjust_light_radius, (struct obj *,int)); E int FDECL(candle_light_range, (struct obj *)); E int FDECL(arti_light_radius, (struct obj *)); E const char *FDECL(arti_light_description, (struct obj *)); -#ifdef WIZARD E int NDECL(wiz_light_sources); -#endif /* ### lock.c ### */ @@ -1101,9 +1043,7 @@ E void FDECL(freemcorpsenm, (struct monst *)); E void FDECL(set_mimic_sym, (struct monst *)); E int FDECL(mbirth_limit, (int)); E void FDECL(mimic_hit_msg, (struct monst *, SHORT_P)); -#ifdef GOLDOBJ E void FDECL(mkmonmoney, (struct monst *, long)); -#endif E int FDECL(bagotricks, (struct obj *,BOOLEAN_P,int *)); E boolean FDECL(propagate, (int, BOOLEAN_P,BOOLEAN_P)); E boolean FDECL(usmellmon, (struct permonst *)); @@ -1124,9 +1064,7 @@ E int FDECL(buzzmu, (struct monst *,struct attack *)); E int FDECL(fightm, (struct monst *)); E int FDECL(mattackm, (struct monst *,struct monst *)); E boolean FDECL(engulf_target, (struct monst *,struct monst *)); -#ifdef BARGETHROUGH E int FDECL(mdisplacem, (struct monst *,struct monst *,BOOLEAN_P)); -#endif E void FDECL(paralyze_monst, (struct monst *,int)); E int FDECL(sleep_monst, (struct monst *,int,int)); E void FDECL(slept_monst, (struct monst *)); @@ -1146,9 +1084,7 @@ E boolean NDECL(gulp_blnd_check); E int FDECL(gazemu, (struct monst *,struct attack *)); E void FDECL(mdamageu, (struct monst *,int)); E int FDECL(could_seduce, (struct monst *,struct monst *,struct attack *)); -#ifdef SEDUCE E int FDECL(doseduce, (struct monst *)); -#endif /* ### minion.c ### */ @@ -1273,9 +1209,7 @@ E void FDECL(dealloc_obj, (struct obj *)); E void FDECL(obj_ice_effects, (int, int, BOOLEAN_P)); E long FDECL(peek_at_iced_corpse_age, (struct obj *)); E int FDECL(hornoplenty, (struct obj *,BOOLEAN_P)); -#ifdef WIZARD E void NDECL(obj_sanity_check); -#endif /* ### mkroom.c ### */ @@ -1412,11 +1346,9 @@ E boolean FDECL(accessible, (int,int)); E void FDECL(set_apparxy, (struct monst *)); E boolean FDECL(can_ooze, (struct monst *)); E boolean FDECL(can_fog, (struct monst *)); -#ifdef BARGETHROUGH E boolean FDECL(should_displace, (struct monst *,coord *,long *,int, XCHAR_P,XCHAR_P)); E boolean FDECL(undesirable_disp, (struct monst *,XCHAR_P,XCHAR_P)); -#endif /* ### monst.c ### */ @@ -1631,16 +1563,13 @@ E void FDECL(set_duplicate_opt_detection, (int)); E void FDECL(set_wc_option_mod_status, (unsigned long, int)); E void FDECL(set_wc2_option_mod_status, (unsigned long, int)); E void FDECL(set_option_mod_status, (const char *,int)); -#ifdef AUTOPICKUP_EXCEPTIONS E int FDECL(add_autopickup_exception, (const char *)); E void NDECL(free_autopickup_exceptions); -#endif /* AUTOPICKUP_EXCEPTIONS */ -#ifdef LOADSYMSETS E int FDECL(load_symset, (const char *,int)); E void FDECL(parsesymbols, (char *)); E struct symparse *FDECL(match_sym, (char *)); -#endif E void NDECL(set_playmode); +E int FDECL(sym_val, (char *)); /* ### pager.c ### */ @@ -1706,13 +1635,8 @@ E void NDECL(getlock); /* ### pickup.c ### */ -#ifdef GOLDOBJ E int FDECL(collect_obj_classes, (char *,struct obj *,BOOLEAN_P,boolean FDECL((*),(OBJ_P)), int *)); -#else -E int FDECL(collect_obj_classes, - (char *,struct obj *,BOOLEAN_P,BOOLEAN_P,boolean FDECL((*),(OBJ_P)), int *)); -#endif E boolean FDECL(rider_corpse_revival, (struct obj *,BOOLEAN_P)); E void FDECL(add_valid_menu_class, (int)); E boolean FDECL(allow_all, (struct obj *)); @@ -1736,9 +1660,7 @@ E boolean FDECL(container_gone, (int (*)(OBJ_P))); E int FDECL(use_container, (struct obj **,int)); E int FDECL(loot_mon, (struct monst *,int *,boolean *)); E int NDECL(dotip); -#ifdef AUTOPICKUP_EXCEPTIONS E boolean FDECL(is_autopickup_exception, (struct obj *, BOOLEAN_P)); -#endif /* AUTOPICKUP_EXCEPTIONS */ /* ### pline.c ### */ @@ -1909,9 +1831,7 @@ E void FDECL(do_genocide, (int)); E void FDECL(punish, (struct obj *)); E void NDECL(unpunish); E boolean FDECL(cant_revive, (int *,BOOLEAN_P,struct obj *)); -#ifdef WIZARD E boolean NDECL(create_particular); -#endif /* ### rect.c ### */ @@ -1955,9 +1875,6 @@ E int FDECL(validate, (int,const char *)); E void NDECL(reset_restpref); E void FDECL(set_restpref, (const char *)); E void FDECL(set_savepref, (const char *)); -#ifndef GOLDOBJ -E void FDECL(put_gold_back, (struct monst *)); -#endif /* ### rip.c ### */ @@ -2013,9 +1930,7 @@ E void FDECL(outoracle, (BOOLEAN_P, BOOLEAN_P)); E void FDECL(save_oracles, (int,int)); E void FDECL(restore_oracles, (int)); E int FDECL(doconsult, (struct monst *)); -#ifdef WIZARD E void NDECL(rumor_check); -#endif /* ### save.c ### */ @@ -2050,10 +1965,8 @@ E void FDECL(store_savefileinfo, (int)); /* ### shk.c ### */ -#ifdef GOLDOBJ E long FDECL(money2mon, (struct monst *, long)); E void FDECL(money2u, (struct monst *, long)); -#endif E void FDECL(shkgone, (struct monst *)); E void FDECL(set_residency, (struct monst *,BOOLEAN_P)); E void FDECL(replshk, (struct monst *,struct monst *)); @@ -2186,11 +2099,7 @@ E void FDECL(initialspell, (struct obj *)); #ifdef USE_TRAMPOLI E int NDECL(stealarm); #endif -#ifdef GOLDOBJ E long FDECL(somegold, (long)); -#else -E long NDECL(somegold); -#endif E void FDECL(stealgold, (struct monst *)); E void FDECL(remove_worn_item, (struct obj *,BOOLEAN_P)); E int FDECL(steal, (struct monst *, char *)); @@ -2200,13 +2109,10 @@ E void FDECL(maybe_absorb_item, (struct monst *,struct obj *,int,int)); E void FDECL(mdrop_obj, (struct monst *,struct obj *,BOOLEAN_P)); E void FDECL(mdrop_special_objs, (struct monst *)); E void FDECL(relobj, (struct monst *,int,BOOLEAN_P)); -#ifdef GOLDOBJ E struct obj *FDECL(findgold, (struct obj *)); -#endif /* ### steed.c ### */ -#ifdef STEED E void NDECL(rider_cant_reach); E boolean FDECL(can_saddle, (struct monst *)); E int FDECL(use_saddle, (struct obj *)); @@ -2218,7 +2124,6 @@ E void NDECL(kick_steed); E void FDECL(dismount_steed, (int)); E void FDECL(place_monster, (struct monst *,int,int)); E boolean FDECL(stucksteed, (BOOLEAN_P)); -#endif /* ### teleport.c ### */ @@ -2278,10 +2183,8 @@ E boolean FDECL(obj_is_local, (struct obj *)); E void FDECL(save_timers, (int,int,int)); E void FDECL(restore_timers, (int,int,BOOLEAN_P,long)); E void FDECL(relink_timers, (BOOLEAN_P)); -#ifdef WIZARD E int NDECL(wiz_timeout_queue); E void NDECL(timer_sanity_check); -#endif /* ### topten.c ### */ diff --git a/include/flag.h b/include/flag.h index 07febf306..de2b63e84 100644 --- a/include/flag.h +++ b/include/flag.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 flag.h $Date$ $Revision$ */ +/* NetHack 3.5 flag.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.60 $ */ +/* NetHack 3.5 flag.h $Date: 2012/04/09 02:56:32 $ $Revision: 1.59 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -173,10 +174,8 @@ struct instance_flags { coord travelcc; /* coordinates for travel_cache */ boolean window_inited; /* true if init_nhwindows() completed */ boolean vision_inited; /* true if vision is ready */ -#ifdef WIZARD boolean sanity_check; /* run sanity checks */ boolean mon_polycontrol; /* debug: control monster polymorphs */ -#endif /* stuff that is related to options and/or user or platform preferences */ unsigned msg_history; /* hint: # of top lines to save */ int menu_headings; /* ATR for menu headings */ @@ -199,8 +198,6 @@ struct instance_flags { boolean rlecomp; /* run-length comp of levels when writing savefile */ uchar num_pad_mode; boolean echo; /* 1 to echo characters */ - boolean unicodecapable; /* unicode support is possible on platform */ - boolean unicodedisp; /* unicode support is turned on */ #if 0 boolean DECgraphics; /* use DEC VT-xxx extended character set */ boolean IBMgraphics; /* use IBM extended character set */ @@ -298,11 +295,9 @@ struct instance_flags { boolean cmdassist; /* provide detailed assistance for some commands */ boolean clicklook; /* allow right-clicking for look */ boolean obsolete; /* obsolete options can point at this, it isn't used */ -#ifdef AUTOPICKUP_EXCEPTIONS struct autopickup_exception *autopickup_exceptions[2]; #define AP_LEAVE 0 #define AP_GRAB 1 -#endif #ifdef WIN32CON #define MAX_ALTKEYHANDLER 25 char altkeyhandler[MAX_ALTKEYHANDLER]; diff --git a/include/func_tab.h b/include/func_tab.h index 56e463526..607a0ba99 100644 --- a/include/func_tab.h +++ b/include/func_tab.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 func_tab.h $Date$ $Revision$ */ +/* NetHack 3.5 func_tab.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 func_tab.h $Date: 2009/05/06 10:44:44 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)func_tab.h 3.5 1992/04/03 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/global.h b/include/global.h index 3eb12b86c..6179409bb 100644 --- a/include/global.h +++ b/include/global.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 global.h $Date$ $Revision$ */ +/* NetHack 3.5 global.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 global.h $Date: 2012/01/29 03:00:14 $ $Revision: 1.31 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -10,6 +11,8 @@ #define BETA /* development or beta testing [MRS] */ +#define DEBUG + /* * Files expected to exist in the playground directory. */ @@ -62,41 +65,10 @@ typedef xchar boolean; /* 0 or 1 */ #endif /* - * UNICODE_SUPPORT - * Unicode/wide character related support. + * type nhsym: loadable symbols go into this type */ -#ifdef UNICODE_SUPPORT -# define UNICODE_DRAWING /* store drawing symbols in wchar_t data type */ -# define UNICODE_WIDEWINPORT /* store and render wide chars in window port */ -/*# define UNICODE_PLAYERTEXT*/ /* not implemented - player input in wide chars */ -#include -#include -#else -# undef UNICODE_DRAWING -# undef UNICODE_WIDEWINPORT -# undef UNICODE_PLAYERTEXT -#endif - -#if defined(UNICODE_DRAWING) -typedef wchar_t nhsym; /* nhsym is wide char */ -#else typedef uchar nhsym; -#endif -#if defined(UNICODE_WIDEWINPORT) -typedef wchar_t nhwchar; /* nhwchar (window port char) is wide char */ -#else -typedef char nhwchar; -#endif - -#if 0 -/* Not Implemented presently */ -#if defined(UNICODE_PLAYERTEXT) -typedef wchar_t nhptext; /* player input is wide char */ -#else -typedef char nhptext; -#endif -#endif #ifndef STRNCMPI # ifndef __SASC_60 /* SAS/C already shifts to stricmp */ @@ -131,12 +103,6 @@ typedef char nhptext; */ #define LARGEST_INT 32767 - -#ifdef REDO -#define Getchar pgetchar -#endif - - #include "coord.h" /* * Automatic inclusions for the subsidiary files. diff --git a/include/hack.h b/include/hack.h index 2ade6d60d..0ace170e5 100644 --- a/include/hack.h +++ b/include/hack.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 hack.h $Date$ $Revision$ */ +/* NetHack 3.5 hack.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 hack.h $Date: 2009/05/06 10:44:46 $ $Revision: 1.49 $ */ /* SCCS Id: @(#)hack.h 3.5 2008/03/19 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -10,9 +11,31 @@ #include "config.h" #endif -/* For debugging beta code. */ -#ifdef BETA -#define Dpline pline +#ifdef DEBUG +/* due to strstr(), mon.c matches makemon.c */ +# define showdebug() (sysopt.debugfiles && \ + ((sysopt.debugfiles[0] == '*') || \ + (strstr( __FILE__ , sysopt.debugfiles)))) + +/* GCC understands this syntax */ +# ifdef __GNUC__ +/* ... but whines about it anyway without these pragmas. */ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wvariadic-macros" +# define debugpline(args...) \ + do { if (showdebug()) pline( args ); } while(0); +# pragma GCC diagnostic pop +# endif + +/* and Visual Studio understands this one */ +# ifdef _MSC_VER +# define debugpline(...) \ + do { if (showdebug()) pline(__VA_ARGS__); } while(0); +# endif + +#else +# define showdebug() (0) +# define debugpline(...) #endif #define TELL 1 @@ -37,7 +60,6 @@ #define BY_PAPER 2 #define BY_OTHER 9 -#ifdef STEED /* Macros for why you are no longer riding */ #define DISMOUNT_GENERIC 0 #define DISMOUNT_FELL 1 @@ -46,7 +68,6 @@ #define DISMOUNT_ENGULFED 4 #define DISMOUNT_BONES 5 #define DISMOUNT_BYCHOICE 6 -#endif /* Special returns from mapglyph() */ #define MG_CORPSE 0x01 diff --git a/include/lev.h b/include/lev.h index b0d69de34..e3e05ec9a 100644 --- a/include/lev.h +++ b/include/lev.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 lev.h $Date$ $Revision$ */ +/* NetHack 3.5 lev.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lev.h $Date: 2009/05/06 10:44:48 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)lev.h 3.5 2006/07/08 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mac-carbon.h b/include/mac-carbon.h index 99750c9dd..576068a25 100644 --- a/include/mac-carbon.h +++ b/include/mac-carbon.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mac-carbon.h $Date$ $Revision$ */ +/* NetHack 3.5 mac-carbon.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mac-carbon.h $Date: 2009/05/06 10:44:49 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mac-carbon.h 3.5 2003/06/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mac-qt.h b/include/mac-qt.h index 457dd86b6..eb7f9554e 100644 --- a/include/mac-qt.h +++ b/include/mac-qt.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mac-qt.h $Date$ $Revision$ */ +/* NetHack 3.5 mac-qt.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mac-qt.h $Date: 2009/05/06 10:44:50 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mac-qt.h 3.5 2003/06/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mac-term.h b/include/mac-term.h index efef9dfec..7bb1257e0 100644 --- a/include/mac-term.h +++ b/include/mac-term.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mac-term.h $Date$ $Revision$ */ +/* NetHack 3.5 mac-term.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mac-term.h $Date: 2009/05/06 10:44:50 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mac-term.h 3.5 2003/06/01 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/macconf.h b/include/macconf.h index 817baca1e..c3ad1290c 100644 --- a/include/macconf.h +++ b/include/macconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 macconf.h $Date$ $Revision$ */ +/* NetHack 3.5 macconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macconf.h $Date: 2009/05/06 10:44:51 $ $Revision: 1.8 $ */ /* SCCS Id: @(#)macconf.h 3.5 1999/10/25 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/macpopup.h b/include/macpopup.h index b8a736657..b10f554b0 100644 --- a/include/macpopup.h +++ b/include/macpopup.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 macpopup.h $Date$ $Revision$ */ +/* NetHack 3.5 macpopup.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macpopup.h $Date: 2009/05/06 10:44:51 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)macpopup.h 3.5 1999/10/25 */ /* Copyright (c) Nethack Develpment Team, 1999. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mactty.h b/include/mactty.h index 9c7f1336d..fc90e44f2 100644 --- a/include/mactty.h +++ b/include/mactty.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mactty.h $Date$ $Revision$ */ +/* NetHack 3.5 mactty.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mactty.h $Date: 2009/05/06 10:44:51 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)mactty.h 3.5 1993/03/01 */ /* Copyright (c) Jon W{tte 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/macwin.h b/include/macwin.h index 0c4146c86..9f89eee54 100644 --- a/include/macwin.h +++ b/include/macwin.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 macwin.h $Date$ $Revision$ */ +/* NetHack 3.5 macwin.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macwin.h $Date: 2009/05/06 10:44:52 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)macwin.h 3.5 1996/01/15 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mail.h b/include/mail.h index d663c13b9..8a971477d 100644 --- a/include/mail.h +++ b/include/mail.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mail.h $Date$ $Revision$ */ +/* NetHack 3.5 mail.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mail.h $Date: 2009/05/06 10:44:52 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mail.h 3.5 1991/10/11 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mextra.h b/include/mextra.h index 3caa6ff61..9f857270c 100644 --- a/include/mextra.h +++ b/include/mextra.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mextra.h $Date$ $Revision$ */ +/* NetHack 3.5 mextra.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mextra.h $Date: 2011/04/15 01:55:40 $ $Revision: 1.12 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mfndpos.h b/include/mfndpos.h index 5be92231d..00406798d 100644 --- a/include/mfndpos.h +++ b/include/mfndpos.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mfndpos.h $Date$ $Revision$ */ +/* NetHack 3.5 mfndpos.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mfndpos.h $Date: 2009/05/06 10:44:53 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)mfndpos.h 3.5 2002/04/06 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -6,9 +7,7 @@ #ifndef MFNDPOS_H #define MFNDPOS_H -#ifdef BARGETHROUGH #define ALLOW_MDISP 0x00001000L /* can displace a monster out of its way */ -#endif #define ALLOW_TRAPS 0x00020000L /* can enter traps */ #define ALLOW_U 0x00040000L /* can attack you */ #define ALLOW_M 0x00080000L /* can attack other monsters */ diff --git a/include/micro.h b/include/micro.h index 044bd8e31..2af114cb7 100644 --- a/include/micro.h +++ b/include/micro.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 micro.h $Date$ $Revision$ */ +/* NetHack 3.5 micro.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 micro.h $Date: 2009/05/06 10:44:53 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)micro.h 3.5 1990/02/22 */ /* micro.h - function declarations for various microcomputers */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mkroom.h b/include/mkroom.h index 993f7028f..e9952ddfa 100644 --- a/include/mkroom.h +++ b/include/mkroom.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mkroom.h $Date$ $Revision$ */ +/* NetHack 3.5 mkroom.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mkroom.h $Date: 2012/02/15 01:55:31 $ $Revision: 1.8 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/monattk.h b/include/monattk.h index 609d4e23d..1bd7ff616 100644 --- a/include/monattk.h +++ b/include/monattk.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 monattk.h $Date$ $Revision$ */ +/* NetHack 3.5 monattk.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 monattk.h $Date: 2009/05/06 10:44:54 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)monattk.h 3.5 2002/03/24 */ /* NetHack may be freely redistributed. See license for details. */ /* Copyright 1988, M. Stephenson */ @@ -71,7 +72,6 @@ #define AD_DISE 33 /* confers diseases */ #define AD_DCAY 34 /* decays organics (brown Pudding) */ #define AD_SSEX 35 /* Succubus seduction (extended) */ - /* If no SEDUCE then same as AD_SEDU */ #define AD_HALU 36 /* causes hallucination */ #define AD_DETH 37 /* for Death only */ #define AD_PEST 38 /* for Pestilence only */ diff --git a/include/mondata.h b/include/mondata.h index 423ac655e..e5c7332ea 100644 --- a/include/mondata.h +++ b/include/mondata.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mondata.h $Date$ $Revision$ */ +/* NetHack 3.5 mondata.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mondata.h $Date: 2009/05/06 10:44:54 $ $Revision: 1.18 $ */ /* SCCS Id: @(#)mondata.h 3.5 2007/04/27 */ /* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ @@ -130,9 +131,7 @@ #define is_covetous(ptr) ((ptr->mflags3 & M3_COVETOUS)) #define infravision(ptr) ((ptr->mflags3 & M3_INFRAVISION)) #define infravisible(ptr) ((ptr->mflags3 & M3_INFRAVISIBLE)) -#ifdef BARGETHROUGH #define is_displacer(ptr) (((ptr)->mflags3 & M3_DISPLACES) != 0L) -#endif #define is_mplayer(ptr) (((ptr) >= &mons[PM_ARCHEOLOGIST]) && \ ((ptr) <= &mons[PM_WIZARD])) #define is_rider(ptr) ((ptr) == &mons[PM_DEATH] || \ diff --git a/include/monflag.h b/include/monflag.h index c080e2f5c..df703dc3d 100644 --- a/include/monflag.h +++ b/include/monflag.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 monflag.h $Date$ $Revision$ */ +/* NetHack 3.5 monflag.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 monflag.h $Date: 2009/05/06 10:44:54 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)monflag.h 3.5 1996/05/04 */ /* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ @@ -28,9 +29,7 @@ #define MS_IMITATE 19 /* imitates others (leocrotta) */ #define MS_ORC MS_GRUNT /* intelligent brutes */ #define MS_HUMANOID 20 /* generic traveling companion */ -#ifdef KOPS #define MS_ARREST 21 /* "Stop in the name of the law!" (Kops) */ -#endif #define MS_SOLDIER 22 /* army and watchmen expressions */ #define MS_GUARD 23 /* "Please drop that gold and follow me." */ #define MS_DJINNI 24 /* "Thank you for freeing me!" */ @@ -162,7 +161,6 @@ #define M3_INFRAVISION 0x0100 /* has infravision */ #define M3_INFRAVISIBLE 0x0200 /* visible by infravision */ -/* define the bit even if BARGETHROUGH is not defined for savefile compat. */ #define M3_DISPLACES 0x0400 /* moves monsters out of its way */ #define MZ_TINY 0 /* < 2' */ diff --git a/include/monst.h b/include/monst.h index 708643dba..39e62f3e4 100644 --- a/include/monst.h +++ b/include/monst.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 monst.h $Date$ $Revision$ */ +/* NetHack 3.5 monst.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 monst.h $Date: 2009/05/06 10:44:55 $ $Revision: 1.14 $ */ /* SCCS Id: @(#)monst.h 3.5 2006/09/06 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -134,9 +135,6 @@ struct monst { long mtrapseen; /* bitmap of traps we've been trapped in */ long mlstmv; /* for catching up with lost time */ long mspare1; -#ifndef GOLDOBJ -#define mgold mspare1 -#endif struct obj *minvent; struct obj *mw; diff --git a/include/monsym.h b/include/monsym.h index 792568701..8081d5959 100644 --- a/include/monsym.h +++ b/include/monsym.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 monsym.h $Date$ $Revision$ */ +/* NetHack 3.5 monsym.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 monsym.h $Date: 2009/05/06 10:44:55 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)monsym.h 3.5 2007/04/07 */ /* Monster symbols and creation information rev 1.0 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/mttypriv.h b/include/mttypriv.h index 32ed11be7..6e50eccf3 100644 --- a/include/mttypriv.h +++ b/include/mttypriv.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mttypriv.h $Date$ $Revision$ */ +/* NetHack 3.5 mttypriv.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mttypriv.h $Date: 2009/05/06 10:44:55 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mttypriv.h 3.5 1993/03/01 */ /* Copyright (c) Jon W{tte 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/ntconf.h b/include/ntconf.h index c4813d2d1..95a506635 100644 --- a/include/ntconf.h +++ b/include/ntconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 ntconf.h $Date$ $Revision$ */ +/* NetHack 3.5 ntconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 ntconf.h $Date: 2012/01/15 19:11:38 $ $Revision: 1.35 $ */ /* SCCS Id: @(#)ntconf.h 3.5 2002/03/10 */ /* Copyright (c) NetHack PC Development Team 1993, 1994. */ /* NetHack may be freely redistributed. See license for details. */ @@ -192,11 +193,6 @@ extern void NDECL(toggle_mouse_support); extern void FDECL(map_subkeyvalue, (char *)); extern void NDECL(load_keyboard_handler); extern void NDECL(raw_clear_screen); -# ifdef UNICODE_WIDEWINPORT -extern void FDECL(xputc, (NHWCHAR_P)); -# else -extern void FDECL(xputc, (int)); -# endif #endif #include @@ -228,11 +224,6 @@ int _RTLENTRY _EXPFUNC read (int __handle, void _FAR *__buf, unsigned __len); #define ALLOCA_HACK /* used in util/panic.c */ #endif -#ifndef REDO -#undef Getchar -#define Getchar nhgetch -#endif - extern int FDECL(set_win32_option, (const char *, const char *)); #ifdef WIN32CON #define LEFTBUTTON FROM_LEFT_1ST_BUTTON_PRESSED diff --git a/include/obj.h b/include/obj.h index 94e2a82d5..dc522b338 100644 --- a/include/obj.h +++ b/include/obj.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 obj.h $Date$ $Revision$ */ +/* NetHack 3.5 obj.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 obj.h $Date: 2012/01/10 17:47:16 $ $Revision: 1.31 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -93,11 +94,7 @@ struct obj { Bitfield(recharged,3); /* number of times it's been recharged */ #define on_ice recharged /* corpse on ice */ Bitfield(lamplit,1); /* a light-source -- can be lit */ -#ifdef INVISIBLE_OBJECTS - Bitfield(oinvis,1); /* invisible */ -#else - Bitfield(oreserved1,1); -#endif + Bitfield(oreserved1,1); /* was the placeholder for invisible objects, free for use */ Bitfield(greased,1); /* covered with grease */ Bitfield(nomerge,1); /* set temporarily to prevent merging */ Bitfield(was_thrown,1); /* thrown by hero since last picked up */ @@ -311,12 +308,8 @@ struct obj { (obj)->otyp == TOUCHSTONE) /* misc */ -#ifdef KOPS #define is_flimsy(otmp) (objects[(otmp)->otyp].oc_material <= LEATHER || \ (otmp)->otyp == RUBBER_HOSE) -#else -#define is_flimsy(otmp) (objects[(otmp)->otyp].oc_material <= LEATHER) -#endif /* helpers, simple enough to be macros */ #define is_plural(o) ((o)->quan > 1 || \ diff --git a/include/objclass.h b/include/objclass.h index b6aada93b..46009e4d0 100644 --- a/include/objclass.h +++ b/include/objclass.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 objclass.h $Date$ $Revision$ */ +/* NetHack 3.5 objclass.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 objclass.h $Date: 2009/05/06 10:44:58 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)objclass.h 3.5 1996/06/16 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/os2conf.h b/include/os2conf.h index 0bb959262..1c24c10fd 100644 --- a/include/os2conf.h +++ b/include/os2conf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 os2conf.h $Date$ $Revision$ */ +/* NetHack 3.5 os2conf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 os2conf.h $Date: 2009/05/06 10:44:58 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)os2conf.h 3.5 2007/01/08 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Timo Hakulinen, 1990, 1991, 1992, 1993, 1996. */ @@ -99,11 +100,6 @@ #define sethanguphandler(foo) (void)signal(SIGHUP, (SIG_RET_TYPE)foo) #endif -#ifndef REDO -# undef Getchar -# define Getchar nhgetch -#endif - void hangup(int i); #endif /* OS2CONF_H */ #endif /* OS2 */ diff --git a/include/patchlevel.h b/include/patchlevel.h index bb398bd4f..2399ca5b0 100644 --- a/include/patchlevel.h +++ b/include/patchlevel.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 patchlevel.h $Date$ $Revision$ */ +/* NetHack 3.5 patchlevel.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 patchlevel.h $Date: 2012/04/14 08:31:03 $ $Revision: 1.93 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/pcconf.h b/include/pcconf.h index cb8846bda..77a496dac 100644 --- a/include/pcconf.h +++ b/include/pcconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 pcconf.h $Date$ $Revision$ */ +/* NetHack 3.5 pcconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pcconf.h $Date: 2009/05/06 10:45:00 $ $Revision: 1.11 $ */ /* SCCS Id: @(#)pcconf.h 3.5 1995/10/11 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -248,11 +249,6 @@ #include -#ifndef REDO -# undef Getchar -# define Getchar nhgetch -#endif - #ifdef MSDOS # define TEXTCOLOR /* */ # define PORT_HELP "msdoshlp.txt" /* msdos port specific help file */ diff --git a/include/permonst.h b/include/permonst.h index 12e9f254c..7f48955fb 100644 --- a/include/permonst.h +++ b/include/permonst.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 permonst.h $Date$ $Revision$ */ +/* NetHack 3.5 permonst.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 permonst.h $Date: 2009/05/06 10:45:00 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)permonst.h 3.5 2006/01/04 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/prop.h b/include/prop.h index d0a8a8772..89728fa9f 100644 --- a/include/prop.h +++ b/include/prop.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 prop.h $Date$ $Revision$ */ +/* NetHack 3.5 prop.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 prop.h $Date: 2011/10/01 00:25:52 $ $Revision: 1.7 $ */ /* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ @@ -95,12 +96,8 @@ struct prop { # define W_ARMS 0x00000008L /* Shield */ # define W_ARMG 0x00000010L /* Gloves/gauntlets */ # define W_ARMF 0x00000020L /* Footwear */ -#ifdef TOURIST # define W_ARMU 0x00000040L /* Undershirt */ # define W_ARMOR (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF | W_ARMU) -#else -# define W_ARMOR (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF) -#endif /* Weapons and artifacts */ # define W_WEP 0x00000100L /* Wielded weapon */ # define W_QUIVER 0x00000200L /* Quiver for (f)iring ammo */ @@ -113,9 +110,7 @@ struct prop { # define W_RINGR 0x00040000L /* Right ring */ # define W_RING (W_RINGL | W_RINGR) # define W_TOOL 0x00080000L /* Eyewear */ -#ifdef STEED # define W_SADDLE 0x00100000L /* KMH -- For riding monsters */ -#endif # define W_BALL 0x00200000L /* Punishment ball */ # define W_CHAIN 0x00400000L /* Punishment chain */ @@ -150,8 +145,6 @@ struct prop { #define WORN_BOOTS W_ARMF #define WORN_AMUL W_AMUL #define WORN_BLINDF W_TOOL -#ifdef TOURIST #define WORN_SHIRT W_ARMU -#endif #endif /* PROP_H */ diff --git a/include/qt_clust.h b/include/qt_clust.h index f186c78cc..466e6da8b 100644 --- a/include/qt_clust.h +++ b/include/qt_clust.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 qt_clust.h $Date$ $Revision$ */ +/* NetHack 3.5 qt_clust.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 qt_clust.h $Date: 2009/05/06 10:45:01 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)qt_clust.h 3.5 1999/11/19 */ /* Copyright (c) Warwick Allison, 1999. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/qt_kde0.h b/include/qt_kde0.h index 335c8a8be..6bd8b4452 100644 --- a/include/qt_kde0.h +++ b/include/qt_kde0.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 qt_kde0.h $Date$ $Revision$ */ +/* NetHack 3.5 qt_kde0.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 qt_kde0.h $Date: 2009/05/06 10:45:01 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)qt_kde0.h 3.5 1999/11/19 */ /* Copyright (c) Warwick Allison, 1999. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/qt_win.h b/include/qt_win.h index f430ff25b..98de67688 100644 --- a/include/qt_win.h +++ b/include/qt_win.h @@ -1,4 +1,5 @@ -// NetHack 3.5 qt_win.h $Date$ $Revision$ +// NetHack 3.5 qt_win.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +// NetHack 3.5 qt_win.h $Date: 2012/01/24 04:26:17 $ $Revision: 1.11 $ // Copyright (c) Warwick Allison, 1999. // NetHack may be freely redistributed. See license for details. // diff --git a/include/qtext.h b/include/qtext.h index 8e2486fe0..18eaeaa53 100644 --- a/include/qtext.h +++ b/include/qtext.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 qtext.h $Date$ $Revision$ */ +/* NetHack 3.5 qtext.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 qtext.h $Date: 2009/05/06 10:45:02 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)qtext.h 3.5 1997/02/02 */ /* Copyright (c) Mike Stephenson 1991. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/qttableview.h b/include/qttableview.h index 7aca4271c..07ecea7f6 100644 --- a/include/qttableview.h +++ b/include/qttableview.h @@ -1,5 +1,6 @@ /********************************************************************** -** $Id$ +** $NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$ +** $Id: qttableview.h,v 1.2 2002/03/09 03:13:13 jwalz Exp $ ** ** Definition of QtTableView class ** diff --git a/include/quest.h b/include/quest.h index 10cc49ed7..4c2cd4087 100644 --- a/include/quest.h +++ b/include/quest.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 quest.h $Date$ $Revision$ */ +/* NetHack 3.5 quest.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 quest.h $Date: 2009/05/06 10:45:03 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)quest.h 3.5 1992/11/15 */ /* Copyright (c) Mike Stephenson 1991. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/rect.h b/include/rect.h index 4e29fd345..7fa6c2c8f 100644 --- a/include/rect.h +++ b/include/rect.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 rect.h $Date$ $Revision$ */ +/* NetHack 3.5 rect.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 rect.h $Date: 2009/05/06 10:45:03 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)rect.h 3.5 1990/02/22 */ /* Copyright (c) 1990 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/region.h b/include/region.h index a3eab5b2e..9af1176ec 100644 --- a/include/region.h +++ b/include/region.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 region.h $Date$ $Revision$ */ +/* NetHack 3.5 region.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 region.h $Date: 2009/05/06 10:45:04 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)region.h 3.5 2006/06/27 */ /* Copyright (c) 1996 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/rm.h b/include/rm.h index 01a4f418f..c007f6a4f 100644 --- a/include/rm.h +++ b/include/rm.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 rm.h $Date$ $Revision$ */ +/* NetHack 3.5 rm.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 rm.h $Date: 2012/02/16 23:06:00 $ $Revision: 1.23 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -226,13 +227,6 @@ struct symdef { #endif }; -/* - * Graphics sets for display symbols - */ -#define PRIMARY 0 /* primary graphics */ -#define ROGUESET 1 /* rogue graphics */ -#define NUM_GRAPHICS 2 - struct symparse { unsigned range; #define SYM_CONTROL 1 /* start/finish markers */ @@ -259,30 +253,33 @@ struct symsetentry { Bitfield(nocolor,1); /* don't use color if set */ Bitfield(primary,1); /* restricted for use as primary set */ Bitfield(rogue,1); /* restricted for use as rogue lev set */ - Bitfield(unicode,1); /* restricted for use as a unicode set */ /* 5 free bits */ }; +/* + * Graphics sets for display symbols + */ +#define DEFAULT_GRAPHICS 0 /* regular characters: '-', '+', &c */ +#define PRIMARY 0 /* primary graphics set */ +#define ROGUESET 1 /* rogue graphics set */ +#define NUM_GRAPHICS 2 + /* * special symbol set handling types ( for invoking callbacks, etc.) * Must match the order of the known_handlers strings * in drawing.c */ -#define H_UNK 0 -#define H_IBM 1 -#define H_DEC 2 +#define H_UNK 0 +#define H_IBM 1 +#define H_DEC 2 extern const struct symdef defsyms[MAXPCHARS]; /* defaults */ extern const struct symdef def_warnsyms[WARNCOUNT]; extern int currentgraphics; /* from drawing.c */ extern nhsym showsyms[]; -#ifdef LOADSYMSETS extern struct symsetentry symset[NUM_GRAPHICS]; /* from drawing.c */ #define SYMHANDLING(ht) (symset[currentgraphics].handling == (ht)) -#else -#define SYMHANDLING(ht) ((ht) == H_UNK) -#endif /* * The 5 possible states of doors @@ -505,11 +502,9 @@ struct cemetery { char how[100 + 1]; /* [DTHSZ+1] */ /* date+time in string of digits rather than binary */ char when[4+2+2 + 2+2+2 + 1]; /* "YYYYMMDDhhmmss\0" */ -#ifdef DUNGEON_OVERVIEW /* final resting place spot */ schar frpx, frpy; boolean bonesknown; -#endif }; struct levelflags { @@ -563,9 +558,7 @@ typedef struct } dlevel_t; -#ifdef DUNGEON_OVERVIEW extern schar lastseentyp[COLNO][ROWNO]; /* last seen/touched dungeon typ */ -#endif /* DUNGEON_OVERVIEW */ extern dlevel_t level; /* structure describing the current level */ @@ -592,10 +585,6 @@ extern dlevel_t level; /* structure describing the current level */ !(level.monsters[x][y])->mburied) #define MON_BURIED_AT(x,y) (level.monsters[x][y] != (struct monst *)0 && \ (level.monsters[x][y])->mburied) -#ifndef STEED -#define place_monster(m,x,y) ((m)->mx=(x),(m)->my=(y),\ - level.monsters[(m)->mx][(m)->my]=(m)) -#endif #define place_worm_seg(m,x,y) level.monsters[x][y] = m #define remove_monster(x,y) level.monsters[x][y] = (struct monst *)0 #define m_at(x,y) (MON_AT(x,y) ? level.monsters[x][y] : \ diff --git a/include/skills.h b/include/skills.h index c82e06290..df5105e1b 100644 --- a/include/skills.h +++ b/include/skills.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 skills.h $Date$ $Revision$ */ +/* NetHack 3.5 skills.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 skills.h $Date: 2009/05/06 10:45:05 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)skills.h 3.5 2006/12/14 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */ /* NetHack may be freely redistributed. See license for details. */ @@ -67,12 +68,8 @@ #define P_BARE_HANDED_COMBAT 36 /* actually weaponless; gloves are ok */ #define P_MARTIAL_ARTS P_BARE_HANDED_COMBAT /* Role distinguishes */ #define P_TWO_WEAPON_COMBAT 37 /* Finally implemented */ -#ifdef STEED #define P_RIDING 38 /* How well you control your steed */ #define P_LAST_H_TO_H P_RIDING -#else -#define P_LAST_H_TO_H P_TWO_WEAPON_COMBAT -#endif #define P_FIRST_H_TO_H P_BARE_HANDED_COMBAT #define P_NUM_SKILLS (P_LAST_H_TO_H+1) diff --git a/include/sp_lev.h b/include/sp_lev.h index f58ac6d87..0a1d22173 100644 --- a/include/sp_lev.h +++ b/include/sp_lev.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 sp_lev.h $Date$ $Revision$ */ +/* NetHack 3.5 sp_lev.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sp_lev.h $Date: 2009/05/06 10:45:06 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)sp_lev.h 3.5 2007/08/01 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/spell.h b/include/spell.h index 59a43bd22..6fd12aa8e 100644 --- a/include/spell.h +++ b/include/spell.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 spell.h $Date$ $Revision$ */ +/* NetHack 3.5 spell.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 spell.h $Date: 2009/05/06 10:45:09 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)spell.h 3.5 2006/02/11 */ /* Copyright 1986, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/sys.h b/include/sys.h index 24d27daa7..713e33a55 100644 --- a/include/sys.h +++ b/include/sys.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 sys.h $Date$ $Revision$ */ +/* NetHack 3.5 sys.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sys.h $Date: 2012/01/27 20:15:26 $ $Revision: 1.9 $ */ /* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -14,6 +15,7 @@ struct sysopt { char *recover; /* how to run recover - may be overridden by win port */ char *wizards; char *shellers; /* like wizards, for ! command (-DSHELL) */ + char *debugfiles; /* files to show debugplines in. '*' is all. */ int maxplayers; /* record file */ int persmax; @@ -33,11 +35,7 @@ struct sysopt { }; E struct sysopt sysopt; -#ifdef SEDUCE -# define SYSOPT_SEDUCE sysopt.seduce -#else -# define SYSOPT_SEDUCE 0 -#endif +#define SYSOPT_SEDUCE sysopt.seduce #endif /* SYS_H */ diff --git a/include/system.h b/include/system.h index 5e23feda5..9b7592a67 100644 --- a/include/system.h +++ b/include/system.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 system.h $Date$ $Revision$ */ +/* NetHack 3.5 system.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 system.h $Date: 2009/05/06 10:45:10 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)system.h 3.5 2003/11/30 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/tcap.h b/include/tcap.h index c66e5ab38..35c2da314 100644 --- a/include/tcap.h +++ b/include/tcap.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 tcap.h $Date$ $Revision$ */ +/* NetHack 3.5 tcap.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tcap.h $Date: 2009/05/06 10:45:11 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)tcap.h 3.5 1992/10/21 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1989. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/tile2x11.h b/include/tile2x11.h index 7e8ed23f6..4aa64f48e 100644 --- a/include/tile2x11.h +++ b/include/tile2x11.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 tile2x11.h $Date$ $Revision$ */ +/* NetHack 3.5 tile2x11.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tile2x11.h $Date: 2009/05/06 10:45:11 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)tile2x11.h 3.5 1995/01/25 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/timeout.h b/include/timeout.h index 1d4171ea7..26d47c17d 100644 --- a/include/timeout.h +++ b/include/timeout.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 timeout.h $Date$ $Revision$ */ +/* NetHack 3.5 timeout.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 timeout.h $Date: 2009/05/06 10:45:12 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)timeout.h 3.5 1999/02/13 */ /* Copyright 1994, Dean Luick */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/tosconf.h b/include/tosconf.h index 3213e28c4..6571945a7 100644 --- a/include/tosconf.h +++ b/include/tosconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 tosconf.h $Date$ $Revision$ */ +/* NetHack 3.5 tosconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tosconf.h $Date: 2009/05/06 10:45:12 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)tosconf.h 3.5 1990/02/22 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/tradstdc.h b/include/tradstdc.h index 1cd0adb82..dc75bc393 100644 --- a/include/tradstdc.h +++ b/include/tradstdc.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 tradstdc.h $Date$ $Revision$ */ +/* NetHack 3.5 tradstdc.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tradstdc.h $Date: 2012/01/11 18:23:26 $ $Revision: 1.15 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -256,7 +257,6 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */ # define BOOLEAN_P boolean # endif # define ALIGNTYP_P aligntyp -# define NHWCHAR_P nhwchar #else # ifdef WIDENED_PROTOTYPES # define CHAR_P int @@ -266,14 +266,6 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */ # define SHORT_P int # define BOOLEAN_P int # define ALIGNTYP_P int -# if defined(UNICODE_WIDEWINPORT) && defined(WCHAR_MAX) -# if WCHAR_MAX >= INT_MAX -# define NHWCHAR_P nhwchar -# endif -# endif -# ifndef NHWCHAR_P -# define NHWCHAR_P int -# endif # else /* Neither widened nor unwidened prototypes. Argument list expansion * by FDECL/VDECL always empty; all xxx_P vanish so defs aren't needed. */ diff --git a/include/trampoli.h b/include/trampoli.h index 8cc04dfea..076b16d2f 100644 --- a/include/trampoli.h +++ b/include/trampoli.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 trampoli.h $Date$ $Revision$ */ +/* NetHack 3.5 trampoli.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 trampoli.h $Date: 2009/05/06 10:45:13 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)trampoli.h 3.5 1995/06/01 */ /* Copyright (c) 1989, by Norm Meluch and Stephen Spackman */ /* NetHack may be freely redistributed. See license for details. */ @@ -27,7 +28,6 @@ #define doprev_message() doprev_message_() #define timed_occupation() timed_occupation_() #define wiz_attributes() wiz_attributes_() -#ifdef WIZARD #define wiz_detect() wiz_detect_() #define wiz_genesis() wiz_genesis_() #define wiz_identify() wiz_identify_() @@ -35,7 +35,6 @@ #define wiz_map() wiz_map_() #define wiz_where() wiz_where_() #define wiz_wish() wiz_wish_() -#endif /* ### display.c ### */ #define doredraw() doredraw_() diff --git a/include/trap.h b/include/trap.h index 2f13bb351..310e118b8 100644 --- a/include/trap.h +++ b/include/trap.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 trap.h $Date$ $Revision$ */ +/* NetHack 3.5 trap.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 trap.h $Date: 2009/05/06 10:45:14 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)trap.h 3.5 2000/08/30 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/unixconf.h b/include/unixconf.h index 6d0642ef7..c85611c2a 100644 --- a/include/unixconf.h +++ b/include/unixconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 unixconf.h $Date$ $Revision$ */ +/* NetHack 3.5 unixconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 unixconf.h $Date: 2011/04/19 02:02:06 $ $Revision: 1.15 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -280,9 +281,6 @@ #define HLOCK "perm" /* an empty file used for locking purposes */ -#ifndef REDO -#define Getchar nhgetch -#endif #define tgetch getchar #ifndef NOSHELL diff --git a/include/vision.h b/include/vision.h index 2e8fc9032..7b731e34a 100644 --- a/include/vision.h +++ b/include/vision.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 vision.h $Date$ $Revision$ */ +/* NetHack 3.5 vision.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vision.h $Date: 2009/05/06 10:45:15 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)vision.h 3.5 2007/05/11 */ /* Copyright (c) Dean Luick, with acknowledgements to Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/vmsconf.h b/include/vmsconf.h index 713cebdba..f3045bed7 100644 --- a/include/vmsconf.h +++ b/include/vmsconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmsconf.h $Date$ $Revision$ */ +/* NetHack 3.5 vmsconf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmsconf.h $Date: 2011/09/01 01:46:55 $ $Revision: 1.14 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -29,20 +30,11 @@ #ifdef HACKDIR # undef HACKDIR #endif -#ifdef WIZARD -# undef WIZARD -#endif #ifdef WIZARD_NAME # undef WIZARD_NAME #endif #define HACKDIR Local_HACKDIR -#ifndef KR1ED -# define WIZARD Local_WIZARD -# define WIZARD_NAME WIZARD -#else -# define WIZARD 1 -# define WIZARD_NAME Local_WIZARD -#endif +#define WIZARD_NAME Local_WIZARD #ifndef SYSCF # define SYSCF #endif @@ -242,9 +234,6 @@ typedef __mode_t mode_t; # define O_TRUNC 0x400 #endif -#ifndef REDO -# define Getchar nhgetch -#endif #define tgetch vms_getchar #include "system.h" diff --git a/include/wceconf.h b/include/wceconf.h index 1df61faf8..52ad4d1f1 100644 --- a/include/wceconf.h +++ b/include/wceconf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 wceconf.h $Date$ $Revision$ */ +/* NetHack 3.5 wceconf.h $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.12 $ */ +/* NetHack 3.5 wceconf.h $Date: 2009/10/22 02:59:14 $ $Revision: 1.12 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ @@ -43,8 +44,6 @@ #define USER_SOUNDS -#define AUTOPICKUP_EXCEPTIONS - /* * ----------------------------------------------------------------- * The remaining code shouldn't need modification. @@ -186,11 +185,6 @@ extern void NDECL(toggle_mouse_support); #define ALLOCA_HACK /* used in util/panic.c */ #endif -#ifndef REDO -#undef Getchar -#define Getchar nhgetch -#endif - #ifdef _MSC_VER #if 0 #pragma warning(disable:4018) /* signed/unsigned mismatch */ diff --git a/include/winGnome.h b/include/winGnome.h index 7fb166fd3..38d32040e 100644 --- a/include/winGnome.h +++ b/include/winGnome.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winGnome.h $Date$ $Revision$ */ +/* NetHack 3.5 winGnome.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winGnome.h $Date: 2009/05/06 10:45:16 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)winGnome.h 3.4. 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* Copyright (C) 1998 by Anthony Taylor */ diff --git a/include/winX.h b/include/winX.h index 9ceea5fee..b80c6e245 100644 --- a/include/winX.h +++ b/include/winX.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winX.h $Date$ $Revision$ */ +/* NetHack 3.5 winX.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winX.h $Date: 2012/01/24 04:26:18 $ $Revision: 1.9 $ */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/winami.h b/include/winami.h index 73df178ba..dc9a98394 100644 --- a/include/winami.h +++ b/include/winami.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winami.h $Date$ $Revision$ */ +/* NetHack 3.5 winami.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winami.h $Date: 2009/05/06 10:45:17 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)winami.h 3.5 1993/01/17 */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991. */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1992, 1993. */ diff --git a/include/wingem.h b/include/wingem.h index 7eb57b6ff..d395aea66 100644 --- a/include/wingem.h +++ b/include/wingem.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 wingem.h $Date$ $Revision$ */ +/* NetHack 3.5 wingem.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wingem.h $Date: 2012/01/24 04:26:18 $ $Revision: 1.7 $ */ /* Copyright (c) Christian Bressler, 1999 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/winprocs.h b/include/winprocs.h index d7c5c5f89..72dad2315 100644 --- a/include/winprocs.h +++ b/include/winprocs.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winprocs.h $Date$ $Revision$ */ +/* NetHack 3.5 winprocs.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winprocs.h $Date: 2012/01/23 10:45:26 $ $Revision: 1.29 $ */ /* Copyright (c) David Cohrs, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/wintty.h b/include/wintty.h index baff7c2ff..507804a9f 100644 --- a/include/wintty.h +++ b/include/wintty.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 wintty.h $Date$ $Revision$ */ +/* NetHack 3.5 wintty.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wintty.h $Date: 2012/01/23 10:45:26 $ $Revision: 1.12 $ */ /* Copyright (c) David Cohrs, 1991,1992 */ /* NetHack may be freely redistributed. See license for details. */ @@ -34,8 +35,8 @@ struct WinDesc { /* maxcol is also used by WIN_MESSAGE for */ /* tracking the ^P command */ short *datlen; /* allocation size for *data */ - nhwchar **data; /* window data [row][column] */ - nhwchar *morestr; /* string to display instead of default */ + char **data; /* window data [row][column] */ + char *morestr; /* string to display instead of default */ tty_menu_item *mlist; /* menu information (MENU) */ tty_menu_item **plist; /* menu page pointers (MENU) */ short plist_size; /* size of allocated plist (MENU) */ @@ -87,7 +88,7 @@ extern struct WinDesc *wins[MAXWIN]; extern struct DisplayDesc *ttyDisplay; /* the tty display descriptor */ extern char morc; /* last character typed to xwaitforspace */ -extern nhwchar defmorestr[]; /* default --more-- prompt */ +extern char defmorestr[]; /* default --more-- prompt */ /* port specific external function references */ @@ -108,9 +109,7 @@ E void NDECL(tty_shutdown); * actually would be expanded. So here, we have to make an exception. */ E void FDECL(xputc, (int)); #else -# ifndef WIN32CON E void FDECL(xputc, (CHAR_P)); -# endif #endif E void FDECL(xputs, (const char *)); #if defined(SCREEN_VGA) || defined(SCREEN_8514) @@ -153,10 +152,10 @@ E int FDECL(has_color,(int color)); /* ### topl.c ### */ -E void FDECL(addtopl, (const nhwchar *)); +E void FDECL(addtopl, (const char *)); E void NDECL(more); -E void FDECL(update_topl, (const nhwchar *)); -E void FDECL(putsyms, (const nhwchar *)); +E void FDECL(update_topl, (const char *)); +E void FDECL(putsyms, (const char*)); /* ### wintty.c ### */ #ifdef CLIPPING @@ -166,9 +165,6 @@ E void FDECL(docorner, (int, int)); E void NDECL(end_glyphout); E void FDECL(g_putch, (int)); E void FDECL(win_tty_init, (int)); -#ifdef UNICODE_WIDEWINPORT -E void FDECL(u_putch, (nhwchar)); -#endif /* external declarations */ E void FDECL(tty_init_nhwindows, (int *, char **)); diff --git a/include/wintype.h b/include/wintype.h index 5d31dbfda..960a0d656 100644 --- a/include/wintype.h +++ b/include/wintype.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 wintype.h $Date$ $Revision$ */ +/* NetHack 3.5 wintype.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wintype.h $Date: 2009/05/06 10:45:19 $ $Revision: 1.10 $ */ /* SCCS Id: @(#)wintype.h 3.5 2006/07/08 */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/xwindow.h b/include/xwindow.h index 7a9b134b6..033ea9213 100644 --- a/include/xwindow.h +++ b/include/xwindow.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 xwindow.h $Date$ $Revision$ */ +/* NetHack 3.5 xwindow.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 xwindow.h $Date: 2009/05/06 10:45:19 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)xwindow.h 3.5 1992/03/07 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/xwindowp.h b/include/xwindowp.h index 0010038b4..0ee10fb49 100644 --- a/include/xwindowp.h +++ b/include/xwindowp.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 xwindowp.h $Date$ $Revision$ */ +/* NetHack 3.5 xwindowp.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 xwindowp.h $Date: 2009/05/06 10:45:19 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)xwindowp.h 3.5 1992/03/07 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/include/you.h b/include/you.h index 4b79f7fc5..0c343b3c4 100644 --- a/include/you.h +++ b/include/you.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 you.h $Date$ $Revision$ */ +/* NetHack 3.5 you.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 you.h $Date: 2012/04/14 08:31:03 $ $Revision: 1.13 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -46,9 +47,7 @@ struct u_event { Bitfield(invoked,1); /* invoked Gate to the Sanctum level */ Bitfield(gehennom_entered,1); /* entered Gehennom via Valley */ -#ifdef ELBERETH Bitfield(uhand_of_elbereth,2); /* became Hand of Elbereth */ -#endif Bitfield(udemigod,1); /* killed the wiz */ Bitfield(uvibrated,1); /* stepped on "vibrating square" */ Bitfield(ascended,1); /* has offered the Amulet */ @@ -340,20 +339,14 @@ struct you { int ublessed, ublesscnt; /* blessing/duration from #pray */ long umoney0; long uspare1; -#ifndef GOLDOBJ -#define ugold uspare1 -#define ugold0 umoney0 -#endif long uexp, urexp; long ucleansed; /* to record moves when player was cleansed */ long usleep; /* sleeping; monstermove you last started */ int uinvault; struct monst *ustuck; -#ifdef STEED struct monst *usteed; long ugallop; int urideturns; -#endif int umortality; /* how many times you died */ int ugrave_arise; /* you die and become something aside from a ghost */ int weapon_slots; /* unused skill slots */ diff --git a/include/youprop.h b/include/youprop.h index be82f0af9..a29e20bf8 100644 --- a/include/youprop.h +++ b/include/youprop.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 youprop.h $Date$ $Revision$ */ +/* NetHack 3.5 youprop.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 youprop.h $Date: 2011/10/15 03:00:42 $ $Revision: 1.13 $ */ /* Copyright (c) 1989 Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ @@ -228,13 +229,9 @@ #define HFlying u.uprops[FLYING].intrinsic #define EFlying u.uprops[FLYING].extrinsic #define BFlying u.uprops[FLYING].blocked -#ifdef STEED # define Flying ((HFlying || EFlying || \ (u.usteed && is_flyer(u.usteed->data))) && \ !BFlying) -#else -# define Flying ((HFlying || EFlying) && !BFlying) -#endif /* May touch surface; does not override any others */ #define Wwalking (u.uprops[WWALKING].extrinsic && \ @@ -244,12 +241,8 @@ #define HSwimming u.uprops[SWIMMING].intrinsic #define ESwimming u.uprops[SWIMMING].extrinsic /* [Tom] */ -#ifdef STEED # define Swimming (HSwimming || ESwimming || \ (u.usteed && is_swimmer(u.usteed->data))) -#else -# define Swimming (HSwimming || ESwimming) -#endif /* Get wet, don't go under water unless if amphibious */ #define HMagical_breathing u.uprops[MAGICAL_BREATHING].intrinsic diff --git a/src/allmain.c b/src/allmain.c index 1742a302c..2bb1c4240 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 allmain.c $Date$ $Revision$ */ +/* NetHack 3.5 allmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 allmain.c $Date: 2012/05/16 01:47:18 $ $Revision: 1.43 $ */ /* SCCS Id: @(#)allmain.c 3.5 2007/03/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -34,9 +35,7 @@ boolean resuming; monstr_init(); /* monster strengths */ objects_init(); -#ifdef WIZARD if (wizard) add_debug_extended_commands(); -#endif /* if a save file created in normal mode is now being restored in explore mode, treat it as normal restore followed by 'X' command @@ -117,12 +116,10 @@ boolean resuming; (void) makemon((struct permonst *)0, 0, 0, NO_MM_FLAGS); /* calculate how much time passed. */ -#ifdef STEED if (u.usteed && u.umoved) { /* your speed doesn't augment steed's speed */ moveamt = mcalcmove(u.usteed); } else -#endif { moveamt = youmonst.data->mmove; @@ -249,11 +246,9 @@ boolean resuming; if (!next_to_u()) { check_leash(old_ux, old_uy); } -#ifdef REDO /* clear doagain keystrokes */ pushch(0); savech(0); -#endif } } /* delayed change may not be valid anymore */ @@ -358,12 +353,10 @@ boolean resuming; #if defined(MICRO) || defined(WIN32) abort_lev = 0; if (kbhit()) { - if ((ch = Getchar()) == ABORT) + if ((ch = pgetchar()) == ABORT) abort_lev++; -# ifdef REDO else pushch(ch); -# endif /* REDO */ } if (!abort_lev && (*occupation)() == 0) #else @@ -385,10 +378,8 @@ boolean resuming; continue; } -#ifdef WIZARD if (iflags.sanity_check) sanity_check(); -#endif #ifdef CLIPPING /* just before rhack */ @@ -444,10 +435,8 @@ stop_occupation() You("stop %s.", occtxt); occupation = 0; context.botl = 1; /* in case u.uhs changed */ -#ifdef REDO nomul(0); pushch(0); -#endif } } @@ -526,9 +515,7 @@ newgame() mklev(); u_on_upstairs(); -#ifdef WIZARD if (wizard) obj_delivery(FALSE); /* finish wizkit */ -#endif vision_reset(); /* set up internals for level (after mklev) */ check_special_room(FALSE); diff --git a/src/alloc.c b/src/alloc.c index 08066565b..dc866063f 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 alloc.c $Date$ $Revision$ */ +/* NetHack 3.5 alloc.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 alloc.c $Date: 2012/01/29 03:00:17 $ $Revision: 1.8 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/apply.c b/src/apply.c index 77608b38e..2ac4088dd 100644 --- a/src/apply.c +++ b/src/apply.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 apply.c $Date$ $Revision$ */ +/* NetHack 3.5 apply.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 apply.c $Date: 2012/05/01 02:22:32 $ $Revision: 1.168 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -6,9 +7,7 @@ extern boolean notonhead; /* for long worms */ -#ifdef TOURIST STATIC_DCL int FDECL(use_camera, (struct obj *)); -#endif STATIC_DCL int FDECL(use_towel, (struct obj *)); STATIC_DCL boolean FDECL(its_dead, (int,int,int *)); STATIC_DCL int FDECL(use_stethoscope, (struct obj *)); @@ -43,7 +42,6 @@ void FDECL( amii_speaker, ( struct obj *, char *, int ) ); static const char no_elbow_room[] = "don't have enough elbow-room to maneuver."; -#ifdef TOURIST STATIC_OVL int use_camera(obj) struct obj *obj; @@ -81,7 +79,6 @@ use_camera(obj) } return 1; } -#endif STATIC_OVL int use_towel(obj) @@ -301,7 +298,6 @@ use_stethoscope(obj) context.stethoscope_move = moves; context.stethoscope_movement = youmonst.movement; -#ifdef STEED if (u.usteed && u.dz > 0) { if (interference) { pline("%s interferes.", Monnam(u.ustuck)); @@ -310,7 +306,6 @@ use_stethoscope(obj) mstatusline(u.usteed); return res; } else -#endif if (u.uswallow && (u.dx || u.dy || u.dz)) { mstatusline(u.ustuck); return res; @@ -441,11 +436,9 @@ struct obj *obj; for(mtmp = fmon; mtmp; mtmp = nextmon) { nextmon = mtmp->nmon; /* trap might kill mon */ if (DEADMONSTER(mtmp)) continue; -#ifdef STEED /* steed is already at your location, so not affected; this avoids trap issues if you're on a trap location */ if (mtmp == u.usteed) continue; -#endif if (mtmp->mtame) { if (mtmp->mtrapped) { /* no longer in previous trap (affects mintrap) */ @@ -549,13 +542,11 @@ struct obj *obj; if(!get_adjacent_loc((char *)0, (char *)0, u.ux, u.uy, &cc)) return; if((cc.x == u.ux) && (cc.y == u.uy)) { -#ifdef STEED if (u.usteed && u.dz > 0) { mtmp = u.usteed; spotmon = 1; goto got_target; } -#endif pline("Leash yourself? Very funny..."); return; } @@ -566,9 +557,7 @@ struct obj *obj; } spotmon = canspotmon(mtmp); -#ifdef STEED got_target: -#endif if(!mtmp->mtame) { if(!spotmon) @@ -647,10 +636,8 @@ next_to_u() } } } -#ifdef STEED /* no pack mules for the Amulet */ if (u.usteed && mon_has_amulet(u.usteed)) return FALSE; -#endif return(TRUE); } @@ -728,9 +715,6 @@ struct obj *obj; if(!getdir((char *)0)) return 0; invis_mirror = Invis; -#ifdef INVISIBLE_OBJECTS - if (obj->oinvis) invis_mirror = TRUE; -#endif useeit = !Blind && (!invis_mirror || See_invisible); uvisage = (ACURR(A_CHA) > 14) ? (poly_gender() == 1 ? "beautiful" : "handsome") : "ugly"; @@ -1387,12 +1371,10 @@ int magic; /* 0=Physical, otherwise skill level */ } else if (!magic && !Jumping) { You_cant("jump very far."); return 0; -#ifdef STEED /* if steed is immobile, can't do physical jump but can do spell one */ } else if (!magic && u.usteed && stucksteed(FALSE)) { /* stucksteed gave " won't move" message */ return 0; -#endif } else if (u.uswallow) { if (magic) { You("bounce around a little."); @@ -1437,23 +1419,19 @@ int magic; /* 0=Physical, otherwise skill level */ const char *bp = body_part(LEG); if (wl == BOTH_SIDES) bp = makeplural(bp); -#ifdef STEED if (u.usteed) pline("%s is in no shape for jumping.", Monnam(u.usteed)); else -#endif - Your("%s%s %s in no shape for jumping.", - (wl == LEFT_SIDE) ? "left " : - (wl == RIGHT_SIDE) ? "right " : "", - bp, (wl == BOTH_SIDES) ? "are" : "is"); + Your("%s%s %s in no shape for jumping.", + (wl == LEFT_SIDE) ? "left " : + (wl == RIGHT_SIDE) ? "right " : "", + bp, (wl == BOTH_SIDES) ? "are" : "is"); return 0; } -#ifdef STEED else if (u.usteed && u.utrap) { pline("%s is stuck in a trap.", Monnam(u.usteed)); return (0); } -#endif pline("Where do you want to jump?"); cc.x = u.ux; @@ -1792,9 +1770,7 @@ long timeout; char monnambuf[BUFSZ], carriedby[BUFSZ]; if (!figurine) { -#ifdef DEBUG - pline("null figurine in fig_transform()"); -#endif + debugpline("null figurine in fig_transform()"); return; } silent = (timeout != monstermoves); /* happened while away */ @@ -2045,9 +2021,6 @@ struct obj *tstone; static const char scritch[] = "\"scritch, scritch\""; static const char allowall[3] = { COIN_CLASS, ALL_CLASSES, 0 }; static const char coins_gems[3] = { COIN_CLASS, GEM_CLASS, 0 }; -#ifndef GOLDOBJ - struct obj goldobj; -#endif /* in case it was acquired while blinded */ if (!Blind) tstone->dknown = 1; @@ -2058,17 +2031,6 @@ struct obj *tstone; Sprintf(stonebuf, "rub on the stone%s", plur(tstone->quan)); if ((obj = getobj(choices, stonebuf)) == 0) return; -#ifndef GOLDOBJ - if (obj->oclass == COIN_CLASS) { - u.ugold += obj->quan; /* keep botl up to date */ - goldobj = *obj; - goldobj.oextra = (struct oextra *)0; /* dealloc_obj(obj) will invalidate - the target of this copied ptr - here, so clear it out */ - dealloc_obj(obj); - obj = &goldobj; - } -#endif if (obj == tstone && obj->quan == 1L) { You_cant("rub %s on itself.", the(xname(obj))); @@ -2085,9 +2047,6 @@ struct obj *tstone; else pline("A sharp crack shatters %s%s.", (obj->quan > 1L) ? "one of " : "", the(xname(obj))); -#ifndef GOLDOBJ - /* assert(obj != &goldobj); */ -#endif useup(obj); return; } @@ -2236,7 +2195,6 @@ struct obj *otmp; trapinfo.time_needed += (tmp > 12) ? 1 : (tmp > 7) ? 2 : 4; /*[fumbling and/or confusion and/or cursed object check(s) should be incorporated here instead of in set_trap]*/ -#ifdef STEED if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) { boolean chance; @@ -2266,7 +2224,6 @@ struct obj *otmp; return; } } -#endif You("begin setting %s%s.", shk_your(buf, otmp), defsyms[trap_to_defsym(what_trap(ttyp))].explanation); @@ -2368,19 +2325,13 @@ struct obj *obj; } else if ((!u.dx && !u.dy) || (u.dz > 0)) { int dam; -#ifdef STEED /* Sometimes you hit your steed by mistake */ if (u.usteed && !rn2(proficient + 2)) { You("whip %s!", mon_nam(u.usteed)); kick_steed(); return 1; } -#endif - if (Levitation -#ifdef STEED - || u.usteed -#endif - ) { + if (Levitation || u.usteed) { /* Have a shot at snaring something on the floor */ otmp = level.objects[u.ux][u.uy]; if (otmp && otmp->otyp == CORPSE && otmp->corpsenm == PM_HORSE) { @@ -3177,9 +3128,7 @@ doapply() use_grease(obj); break; case LOCK_PICK: -#ifdef TOURIST case CREDIT_CARD: -#endif case SKELETON_KEY: res = (pick_lock(obj) != 0); break; @@ -3193,11 +3142,9 @@ doapply() case LEASH: use_leash(obj); break; -#ifdef STEED case SADDLE: res = use_saddle(obj); break; -#endif case MAGIC_WHISTLE: use_magic_whistle(obj); break; @@ -3248,11 +3195,9 @@ doapply() case POT_OIL: light_cocktail(obj); break; -#ifdef TOURIST case EXPENSIVE_CAMERA: res = use_camera(obj); break; -#endif case TOWEL: res = use_towel(obj); break; @@ -3335,11 +3280,7 @@ unfixable_trouble_count(is_horn) if (Stoned) unfixable_trbl++; if (Strangled) unfixable_trbl++; - if (Wounded_legs -#ifdef STEED - && !u.usteed -#endif - ) unfixable_trbl++; + if (Wounded_legs && !u.usteed) unfixable_trbl++; if (Slimed) unfixable_trbl++; /* lycanthropy is not desirable, but it doesn't actually make you feel bad */ diff --git a/src/artifact.c b/src/artifact.c index 52ebef02d..c9baaf365 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 artifact.c $Date$ $Revision$ */ +/* NetHack 3.5 artifact.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 artifact.c $Date: 2013/11/07 01:03:16 $ $Revision: 1.77 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1686,14 +1687,7 @@ long *abil; long wornbits; long wornmask = (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF | W_WEP | W_QUIVER | W_SWAPWEP | W_ART | W_ARTI | W_AMUL | - W_RINGL | W_RINGR | W_TOOL | W_BALL | W_CHAIN -#ifdef STEED - | W_SADDLE -#endif -#ifdef TOURIST - | W_ARMU -#endif - ); + W_RINGL | W_RINGR | W_TOOL | W_BALL | W_CHAIN | W_SADDLE | W_ARMU); dtyp = abil_to_adtyp(abil); spfx = abil_to_spfx(abil); @@ -1867,7 +1861,6 @@ int dropflag; /* 0==don't drop, 1==drop all, 2==drop weapon */ /* check primary weapon next so that they're handled together */ if (uwep) (void)untouchable(uwep, dropit); -#ifdef STEED /* in case someone is daft enough to add artifact or silver saddle */ if (u.usteed && (obj = which_armor(u.usteed, W_SADDLE)) != 0) { /* untouchable() calls retouch_object() which expects an object in @@ -1875,7 +1868,6 @@ int dropflag; /* 0==don't drop, 1==drop all, 2==drop weapon */ saddle and we're suppressing drop, so this works as intended */ if (untouchable(obj, FALSE)) dismount_steed(DISMOUNT_THROWN); } -#endif /* * TODO? Force off gloves if either or both rings are going to * become unworn; force off cloak [suit] before suit [shirt]. diff --git a/src/attrib.c b/src/attrib.c index 02c8babcb..8bba3d61c 100644 --- a/src/attrib.c +++ b/src/attrib.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 attrib.c $Date$ $Revision$ */ +/* NetHack 3.5 attrib.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 attrib.c $Date: 2011/10/01 00:25:55 $ $Revision: 1.30 $ */ /* Copyright 1988, 1989, 1990, 1992, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ @@ -7,8 +8,6 @@ #include "hack.h" #include -/* #define DEBUG */ /* uncomment for debugging info */ - /* part of the output on gain or loss of attribute */ static const char * const plusattr[] = { @@ -348,9 +347,7 @@ exercise(i, inc_or_dec) int i; boolean inc_or_dec; { -#ifdef DEBUG - pline("Exercise:"); -#endif + debugpline("Exercise:"); if (i == A_INT || i == A_CHA) return; /* can't exercise these */ /* no physical exercise while polymorphed; the body's temporary */ @@ -367,12 +364,10 @@ boolean inc_or_dec; * Note: *YES* ACURR is the right one to use. */ AEXE(i) += (inc_or_dec) ? (rn2(19) > ACURR(i)) : -rn2(2); -#ifdef DEBUG - pline("%s, %s AEXE = %d", + debugpline("%s, %s AEXE = %d", (i == A_STR) ? "Str" : (i == A_WIS) ? "Wis" : (i == A_DEX) ? "Dex" : "Con", (inc_or_dec) ? "inc" : "dec", AEXE(i)); -#endif } if (moves > 0 && (i == A_STR || i == A_CON)) (void)encumber_msg(); } @@ -397,9 +392,7 @@ exerper() (u.uhunger > 50) ? HUNGRY : (u.uhunger > 0) ? WEAK : FAINTING; -#ifdef DEBUG - pline("exerper: Hunger checks"); -#endif + debugpline("exerper: Hunger checks"); switch (hs) { case SATIATED: exercise(A_DEX, FALSE); if (Role_if(PM_MONK)) @@ -415,9 +408,7 @@ exerper() } /* Encumberance Checks */ -#ifdef DEBUG - pline("exerper: Encumber checks"); -#endif + debugpline("exerper: Encumber checks"); switch (near_capacity()) { case MOD_ENCUMBER: exercise(A_STR, TRUE); break; case HVY_ENCUMBER: exercise(A_STR, TRUE); @@ -430,20 +421,15 @@ exerper() /* status checks */ if(!(moves % 5)) { -#ifdef DEBUG - pline("exerper: Status checks"); -#endif + debugpline("exerper: Status checks"); if ((HClairvoyant & (INTRINSIC|TIMEOUT)) && !BClairvoyant) exercise(A_WIS, TRUE); if (HRegeneration) exercise(A_STR, TRUE); if(Sick || Vomiting) exercise(A_CON, FALSE); if(Confusion || Hallucination) exercise(A_WIS, FALSE); - if((Wounded_legs -#ifdef STEED - && !u.usteed -#endif - ) || Fumbling || HStun) exercise(A_DEX, FALSE); + if((Wounded_legs && !u.usteed) || Fumbling || HStun) + exercise(A_DEX, FALSE); } } @@ -466,15 +452,11 @@ exerchk() /* Check out the periodic accumulations */ exerper(); -#ifdef DEBUG if(moves >= context.next_attrib_check) - pline("exerchk: ready to test. multi = %d.", multi); -#endif + debugpline("exerchk: ready to test. multi = %d.", multi); /* Are we ready for a test? */ if(moves >= context.next_attrib_check && !multi) { -#ifdef DEBUG - pline("exerchk: testing."); -#endif + debugpline("exerchk: testing."); /* * Law of diminishing returns (Part II): * @@ -501,13 +483,11 @@ exerchk() exercise/abuse gradually wears off without impact then */ if (Upolyd && i != A_WIS) goto nextattrib; -#ifdef DEBUG - pline("exerchk: testing %s (%d).", + debugpline("exerchk: testing %s (%d).", (i == A_STR) ? "Str" : (i == A_INT) ? "Int?" : (i == A_WIS) ? "Wis" : (i == A_DEX) ? "Dex" : (i == A_CON) ? "Con" : (i == A_CHA) ? "Cha?" : "???", ax); -#endif /* * Law of diminishing returns (Part III): * @@ -517,13 +497,9 @@ exerchk() if (rn2(AVAL) > ((i != A_WIS) ? (abs(ax) * 2 / 3) : abs(ax))) goto nextattrib; -#ifdef DEBUG - pline("exerchk: changing %d.", i); -#endif + debugpline("exerchk: changing %d.", i); if(adjattrib(i, mod_val, -1)) { -#ifdef DEBUG - pline("exerchk: changed %d.", i); -#endif + debugpline("exerchk: changed %d.", i); /* if you actually changed an attrib - zero accumulation */ AEXE(i) = ax = 0; /* then print an explanation */ @@ -537,9 +513,7 @@ exerchk() AEXE(i) = (abs(ax) / 2) * mod_val; } context.next_attrib_check += rn1(200,800); -#ifdef DEBUG - pline("exerchk: next check at %ld.", context.next_attrib_check); -#endif + debugpline("exerchk: next check at %ld.", context.next_attrib_check); } } @@ -641,9 +615,7 @@ long frommask; case PM_RANGER: abil = ran_abil; break; case PM_ROGUE: abil = rog_abil; break; case PM_SAMURAI: abil = sam_abil; break; -#ifdef TOURIST case PM_TOURIST: abil = tou_abil; break; -#endif case PM_VALKYRIE: abil = val_abil; break; case PM_WIZARD: abil = wiz_abil; break; default: break; @@ -702,7 +674,6 @@ int propidx; /* special cases can have negative values */ /* * Restrict the source of the attributes just to debug mode for now */ -#ifdef WIZARD if (wizard) { static NEARDATA const char because_of[] = " because of %s"; @@ -749,7 +720,6 @@ int propidx; /* special cases can have negative values */ } } /*wizard*/ -#endif return buf; } @@ -771,9 +741,7 @@ int oldlevel, newlevel; case PM_RANGER: abil = ran_abil; break; case PM_ROGUE: abil = rog_abil; break; case PM_SAMURAI: abil = sam_abil; break; -#ifdef TOURIST case PM_TOURIST: abil = tou_abil; break; -#endif case PM_VALKYRIE: abil = val_abil; break; case PM_WIZARD: abil = wiz_abil; break; default: abil = 0; break; diff --git a/src/ball.c b/src/ball.c index 84972fd4b..b3513f7b5 100644 --- a/src/ball.c +++ b/src/ball.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 ball.c $Date$ $Revision$ */ +/* NetHack 3.5 ball.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 ball.c $Date: 2011/08/30 22:13:26 $ $Revision: 1.17 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -691,10 +692,7 @@ xchar x, y; register long side = rn2(3) ? LEFT_SIDE : RIGHT_SIDE; pline(pullmsg, "bear trap"); set_wounded_legs(side, rn1(1000, 500)); -#ifdef STEED - if (!u.usteed) -#endif - { + if (!u.usteed) { Your("%s %s is severely damaged.", (side == LEFT_SIDE) ? "left" : "right", body_part(LEG)); diff --git a/src/bones.c b/src/bones.c index 4b9738d3a..926b9079e 100644 --- a/src/bones.c +++ b/src/bones.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 bones.c $Date$ $Revision$ */ +/* NetHack 3.5 bones.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 bones.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.39 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */ /* NetHack may be freely redistributed. See license for details. */ @@ -228,16 +229,6 @@ int x, y; else place_object(otmp, x, y); } -#ifndef GOLDOBJ - if(u.ugold) { - long ugold = u.ugold; - - if (mtmp) mtmp->mgold = ugold; - else if (cont) (void) add_to_container(cont, mkgoldobj(ugold)); - else (void)mkgold(ugold, x, y); - u.ugold = ugold; /* undo mkgoldobj()'s removal */ - } -#endif if (cont) cont->owt = weight(cont); } @@ -311,10 +302,7 @@ can_make_bones() if(depth(&u.uz) <= 0 || /* bulletproofing for endgame */ (!rn2(1 + (depth(&u.uz)>>2)) /* fewer ghosts on low levels */ -#ifdef WIZARD - && !wizard -#endif - )) return FALSE; + && !wizard)) return FALSE; /* don't let multiple restarts generate multiple copies of objects * in bones files */ if (discover) return FALSE; @@ -343,23 +331,19 @@ struct obj *corpse; fd = open_bonesfile(&u.uz, &bonesid); if (fd >= 0) { (void) close(fd); -#ifdef WIZARD if (wizard) { if (yn("Bones file already exists. Replace it?") == 'y') { if (delete_bonesfile(&u.uz)) goto make_bones; else pline("Cannot unlink old bones."); } } -#endif /* compression can change the file's name, so must wait until after any attempt to delete this file */ compress_bonesfile(); return; } -#ifdef WIZARD make_bones: -#endif unleash_all(); /* in case these characters are not in their home bases */ for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { @@ -371,9 +355,7 @@ struct obj *corpse; (mptr == &mons[PM_ORACLE] && !fixuporacle(mtmp))) mongone(mtmp); } -#ifdef STEED if (u.usteed) dismount_steed(DISMOUNT_BONES); -#endif dmonsfree(); /* discard dead or gone monsters */ /* mark all fruits as nonexistent; when we come to them we'll mark @@ -458,9 +440,7 @@ struct obj *corpse; levl[x][y].seenv = 0; levl[x][y].waslit = 0; levl[x][y].glyph = cmap_to_glyph(S_stone); -#ifdef DUNGEON_OVERVIEW lastseentyp[x][y] = 0; -#endif } /* Attach bones info to the current level before saving. */ @@ -477,11 +457,9 @@ struct obj *corpse; aligns[1 - u.ualign.type].filecode); formatkiller(newbones->how, sizeof newbones->how, how); Strcpy(newbones->when, yyyymmddhhmmss(when)); -#ifdef DUNGEON_OVERVIEW /* final resting place, used to decide when bones are discovered */ newbones->frpx = u.ux, newbones->frpy = u.uy; newbones->bonesknown = FALSE; -#endif /* if current character died on a bones level, the cememtery list will have multiple entries, most recent (this dead hero) first */ newbones->next = level.bonesinfo; @@ -493,10 +471,8 @@ struct obj *corpse; fd = create_bonesfile(&u.uz, &bonesid, whynot); if(fd < 0) { -#ifdef WIZARD if(wizard) pline1(whynot); -#endif /* bones file creation problems are silent to the player. * Keep it that way, but place a clue into the paniclog. */ @@ -525,10 +501,8 @@ struct obj *corpse; savefruitchn(fd, COUNT_SAVE); bflush(fd); if (bytes_counted > freediskspace(bones)) { /* not enough room */ -# ifdef WIZARD if (wizard) pline("Insufficient space to create bones file."); -# endif (void) close(fd); cancel_bonesfile(); return; @@ -561,23 +535,18 @@ getbones() /* wizard check added by GAN 02/05/87 */ if(rn2(3) /* only once in three times do we find bones */ -#ifdef WIZARD && !wizard -#endif ) return(0); if(no_bones_level(&u.uz)) return(0); fd = open_bonesfile(&u.uz, &bonesid); if (fd < 0) return(0); if (validate(fd, bones) != 0) { -#ifdef WIZARD if (!wizard) -#endif pline("Discarding unuseable bones; no need to panic..."); ok = FALSE; } else { ok = TRUE; -#ifdef WIZARD if(wizard) { if(yn("Get bones?") == 'n') { (void) close(fd); @@ -585,7 +554,6 @@ getbones() return(0); } } -#endif mread(fd, (genericptr_t) &c, sizeof c); /* length incl. '\0' */ mread(fd, (genericptr_t) oldbonesid, (unsigned) c); /* DD.nnn */ if (strcmp(bonesid, oldbonesid) != 0) { @@ -593,12 +561,10 @@ getbones() Sprintf(errbuf, "This is bones level '%s', not '%s'!", oldbonesid, bonesid); -#ifdef WIZARD if (wizard) { pline1(errbuf); ok = FALSE; /* won't die of trickery */ } -#endif trickery(errbuf); } else { register struct monst *mtmp; @@ -615,11 +581,9 @@ getbones() for(mtmp = fmon; mtmp; mtmp = mtmp->nmon) { if (has_mname(mtmp)) sanitize_name(MNAME(mtmp)); if (mtmp->mhpmax == DEFUNCT_MONSTER) { -#if defined(DEBUG) && defined(WIZARD) if (wizard) - pline("Removing defunct monster %s from bones.", + debugpline("Removing defunct monster %s from bones.", mtmp->data->mname); -#endif mongone(mtmp); } else /* to correctly reset named artifacts on the level */ @@ -632,14 +596,12 @@ getbones() (void) close(fd); sanitize_engravings(); -#ifdef WIZARD if(wizard) { if(yn("Unlink bones?") == 'n') { compress_bonesfile(); return(ok); } } -#endif if (!delete_bonesfile(&u.uz)) { /* When N games try to simultaneously restore the same * bones file, N-1 of them will fail to delete it diff --git a/src/botl.c b/src/botl.c index 7ad7224b1..76d16a8ff 100644 --- a/src/botl.c +++ b/src/botl.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 botl.c $Date$ $Revision$ */ +/* NetHack 3.5 botl.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.38 $ */ +/* NetHack 3.5 botl.c $Date: 2012/01/10 17:47:19 $ $Revision: 1.36 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -158,13 +159,8 @@ botl_score() long deepest = deepest_lev_reached(FALSE); long utotal; -#ifndef GOLDOBJ - utotal = u.ugold + hidden_gold(); - if ((utotal -= u.ugold0) < 0L) utotal = 0L; -#else utotal = money_cnt(invent) + hidden_gold(); if ((utotal -= u.umoney0) < 0L) utotal = 0L; -#endif utotal += u.urexp + (50 * (deepest - 1)) + (deepest > 30 ? 10000 : deepest > 20 ? 1000*(deepest - 20) : 0); if (utotal < u.urexp) utotal = LONG_MAX; /* wrap around */ @@ -267,19 +263,13 @@ bot2() Sprintf(nb = eos(newbot2), "%s:%-2ld HP:%d(%d) Pw:%d(%d) AC:%-2d", encglyph(objnum_to_glyph(GOLD_PIECE)), -#ifndef GOLDOBJ - u.ugold, -#else money_cnt(invent), -#endif hp, hpmax, u.uen, u.uenmax, u.uac); if (Upolyd) Sprintf(nb = eos(nb), " HD:%d", mons[u.umonnum].mlevel); -#ifdef EXP_ON_BOTL else if(flags.showexp) Sprintf(nb = eos(nb), " Xp:%u/%-1ld", u.ulevel,u.uexp); -#endif else Sprintf(nb = eos(nb), " Exp:%u", u.ulevel); @@ -708,12 +698,7 @@ bot() /* Gold */ - blstats[idx][BL_GOLD].a.a_long = -#ifndef GOLDOBJ - u.ugold; -#else - money_cnt(invent); -#endif + blstats[idx][BL_GOLD].a.a_long = money_cnt(invent); /* * The tty port needs to display the current symbol for gold * as a field header, so to accomodate that we pass gold with diff --git a/src/cmd.c b/src/cmd.c index 74d5a5db7..f7e858e01 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,10 +1,10 @@ -/* NetHack 3.5 cmd.c $Date$ $Revision$ */ +/* NetHack 3.5 cmd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 cmd.c $Date: 2013/03/16 01:44:28 $ $Revision: 1.162 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" #include "func_tab.h" -/* #define DEBUG */ /* uncomment for debugging */ #ifdef ALTMETA STATIC_VAR boolean alt_esc = FALSE; @@ -29,12 +29,8 @@ extern const char *enc_stat[]; /* encumbrance status from botl.c */ #define CMD_CLICKLOOK (char)0x8F #ifdef DEBUG -/* - * only one "wiz_debug_cmd" routine should be available (in whatever - * module you are trying to debug) or things are going to get rather - * hard to link :-) - */ -extern int NDECL(wiz_debug_cmd); +extern int NDECL(wiz_debug_cmd_bury); +extern int NDECL(wiz_debug_cmd_traveldisplay); #endif #ifdef DUMB /* stuff commented out in extern.h, but needed here */ @@ -122,12 +118,9 @@ STATIC_PTR int NDECL(doprev_message); STATIC_PTR int NDECL(timed_occupation); STATIC_PTR int NDECL(doextcmd); STATIC_PTR int NDECL(domonability); -#ifdef DUNGEON_OVERVIEW STATIC_PTR int NDECL(dooverview_or_wiz_where); -#endif /* DUNGEON_OVERVIEW */ STATIC_PTR int NDECL(dotravel); STATIC_PTR int NDECL(doterrain); -# ifdef WIZARD STATIC_PTR int NDECL(wiz_wish); STATIC_PTR int NDECL(wiz_identify); STATIC_PTR int NDECL(wiz_map); @@ -165,7 +158,6 @@ STATIC_DCL int NDECL(wiz_port_debug); # endif STATIC_PTR int NDECL(wiz_rumor_check); STATIC_DCL char FDECL(cmd_from_func, (int NDECL((*)))); -# endif /* WIZARD */ STATIC_PTR int NDECL(doattributes); STATIC_PTR int NDECL(doconduct); /**/ @@ -244,7 +236,6 @@ int xtime; return; } -#ifdef REDO STATIC_DCL char NDECL(popch); @@ -306,7 +297,6 @@ char ch; } return; } -#endif /* REDO */ STATIC_PTR int doextcmd(VOID_ARGS) /* here after # - now read a full-word command */ @@ -392,11 +382,11 @@ extcmd_via_menu() /* here after # - now show pick-list of possible commands */ Sprintf(fmtstr, "%%-%ds", biggest + 15); } if (++i > MAX_EXT_CMD) { -# if defined(DEBUG) || defined(BETA) +# if defined(BETA) impossible( "Exceeded %d extended commands in doextcmd() menu; 'extmenu' disabled.", MAX_EXT_CMD); -# endif /* DEBUG || BETA */ +# endif /* BETA */ iflags.extmenu = 0; return -1; } @@ -457,7 +447,7 @@ extcmd_via_menu() /* here after # - now show pick-list of possible commands */ if (n == 1) { if (matchlevel > (QBUFSZ - 2)) { free((genericptr_t)pick_list); -# if defined(DEBUG) || defined(BETA) +# if defined(BETA) impossible("Too many chars (%d) entered in extcmd_via_menu()", matchlevel); # endif @@ -515,9 +505,7 @@ int enter_explore_mode(VOID_ARGS) { if (wizard) { -#ifdef WIZARD You("are in debug mode."); -#endif } else if (discover) { You("are already in explore mode."); } else { @@ -536,21 +524,14 @@ enter_explore_mode(VOID_ARGS) return 0; } -#ifdef DUNGEON_OVERVIEW STATIC_PTR int dooverview_or_wiz_where(VOID_ARGS) { -#ifdef WIZARD if (wizard) return wiz_where(); - else -#endif - dooverview(); + else dooverview(); return 0; } -#endif /* DUNGEON_OVERVIEW */ -#ifdef WIZARD - /* ^W command - wish for something */ STATIC_PTR int wiz_wish(VOID_ARGS) /* Unlimited wishes for debug mode by Paul Polderman */ @@ -875,11 +856,9 @@ wiz_map_levltyp(VOID_ARGS) if (level.flags.nfountains) Sprintf(eos(dsc), " %c:%d", defsyms[S_fountain].sym, (int)level.flags.nfountains); -#ifdef SINKS if (level.flags.nsinks) Sprintf(eos(dsc), " %c:%d", defsyms[S_sink].sym, (int)level.flags.nsinks); -#endif if (level.flags.has_vault) Strcat(dsc, " vault"); if (level.flags.has_shop) Strcat(dsc, " shop"); if (level.flags.has_temple) Strcat(dsc, " temple"); @@ -1068,7 +1047,6 @@ wiz_rumor_check(VOID_ARGS) rumor_check(); return 0; } -#endif /* WIZARD */ /* #terrain command */ STATIC_PTR int @@ -1096,7 +1074,6 @@ doterrain(VOID_ARGS) add_menu(men, NO_GLYPH, &any, 0, 0, ATR_NONE, "full map without monsters, objects, and traps", MENU_UNSELECTED); -#ifdef WIZARD if (wizard) { any.a_int = 3; add_menu(men, NO_GLYPH, &any, 0, 0, ATR_NONE, @@ -1107,7 +1084,6 @@ doterrain(VOID_ARGS) "legend of base-36 levl[][].typ codes", MENU_UNSELECTED); } -#endif end_menu(men, "View which?"); n = select_menu(men, PICK_ONE, &sel); @@ -1126,10 +1102,8 @@ doterrain(VOID_ARGS) switch (which) { case 1: reveal_terrain(FALSE); break; /* known map */ case 2: reveal_terrain(TRUE); break; /* full map */ -#ifdef WIZARD case 3: wiz_map_levltyp(); break; /* map internals */ case 4: wiz_levltyp_legend(); break; /* internal details */ -#endif default: break; } return 0; /* no time elapses */ @@ -1527,7 +1501,6 @@ int final; boolean magic = (mode & MAGICENLIGHTENMENT) ? TRUE : FALSE; int cap; char buf[BUFSZ], youtoo[BUFSZ]; -#ifdef STEED boolean Riding = (u.usteed && /* if hero dies while dismounting, u.usteed will still be set; we want to ignore steed in that situation */ @@ -1539,7 +1512,6 @@ int final; (char *)0, (SUPPRESS_SADDLE | SUPPRESS_HALLUCINATION), FALSE); -#endif /*\ * Status (many are abbreviated on bottom line; others are or @@ -1552,7 +1524,6 @@ int final; /* not a traditional status but inherently obvious to player; more detail given below (attributes section) for magic enlightenment */ if (Upolyd) you_are("transformed", ""); -#ifdef STEED /* not a trouble, but we want to display riding status before maybe reporting steed as trapped or hero stuck to cursed saddle */ if (Riding) { @@ -1560,7 +1531,6 @@ int final; you_are(buf, ""); Sprintf(eos(youtoo), "and %s ", steedname); } -#endif /*STEED*/ /* other movement situations that hero should always know */ if (Levitation) { if (Lev_at_will && magic) @@ -1593,9 +1563,7 @@ int final; you_are("buried", ""); } else { Strcpy(buf, "being strangled"); -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%ld)", (Strangled & TIMEOUT)); -#endif you_are(buf, from_what(STRANGLED)); } } @@ -1638,21 +1606,17 @@ int final; Sprintf(eos(predicament), " in %s", an(defsyms[trap_to_defsym(t->ttyp)].explanation)); } -#ifdef STEED if (u.usteed) { /* not `Riding' here */ Sprintf(buf, "%s%s ", anchored ? "you and " : "", steedname); *buf = highc(*buf); enl_msg(buf, (anchored ? "are " : "is "), (anchored ? "were " : "was "), predicament, ""); } else -#endif /*STEED*/ you_are(predicament, ""); } /* (u.utrap) */ if (u.uswallow) { Sprintf(buf, "swallowed by %s", a_monnam(u.ustuck)); -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%u)", u.uswldtim); -#endif you_are(buf, ""); } else if (u.ustuck) { Sprintf(buf, "%s %s", @@ -1660,7 +1624,6 @@ int final; a_monnam(u.ustuck)); you_are(buf, ""); } -#ifdef STEED if (Riding) { struct obj *saddle = which_armor(u.usteed, W_SADDLE); @@ -1670,22 +1633,16 @@ int final; you_are(buf, ""); } } -#endif /*STEED*/ if (Wounded_legs) { -#ifdef STEED /* when mounted, Wounded_legs applies to steed rather than to hero; we only report steed's wounded legs in wizard mode */ if (u.usteed) { /* not `Riding' here */ -# ifdef WIZARD if (wizard) { Strcpy(buf, steedname); *buf = highc(*buf); enl_msg(buf, " has", " had", " wounded legs", ""); } -# endif - } else -#endif /*STEED*/ - { + } else { Sprintf(buf, "wounded %s", makeplural(body_part(LEG))); you_have(buf, ""); } @@ -1701,9 +1658,7 @@ int final; if (Sleepy) { if (magic || cause_known(SLEEPY)) { Strcpy(buf, from_what(SLEEPY)); -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%ld)", (HSleepy & TIMEOUT)); -#endif enl_msg("You ", "fall", "fell", " asleep uncontrollably", buf); } } @@ -1784,7 +1739,6 @@ int final; putstr(en_win, 0, ""); putstr(en_win, 0, final ? "Final Attributes:" : "Current Attributes:"); -#ifdef ELBERETH if (u.uevent.uhand_of_elbereth) { static const char * const hofe_titles[3] = { "the Hand of Elbereth", @@ -1793,7 +1747,6 @@ int final; }; you_are(hofe_titles[u.uevent.uhand_of_elbereth - 1],""); } -#endif /* note: piousness 20 matches MIN_QUEST_ALIGN (quest.h) */ if (u.ualign.record >= 20) you_are("piously aligned",""); @@ -1806,12 +1759,10 @@ int final; else if (u.ualign.record >= -3) you_have("strayed",""); else if (u.ualign.record >= -8) you_have("sinned",""); else you_have("transgressed",""); -#ifdef WIZARD if (wizard) { Sprintf(buf, " %d", u.ualign.record); enl_msg("Your alignment ", "is", "was", buf, ""); } -#endif /*** Resistances to troubles ***/ if (Invulnerable) you_are("invulnerable",from_what(INVULNERABLE)); @@ -1995,9 +1946,7 @@ int final; if (Upolyd) { if (u.umonnum == u.ulycn) Strcpy(buf, "in beast form"); else Sprintf(buf, "polymorphed into %s", an(youmonst.data->mname)); -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%d)", u.mtimedone); -#endif you_are(buf,""); if (lays_eggs(youmonst.data) && flags.female) you_can("lay eggs", ""); @@ -2018,14 +1967,9 @@ int final; Sprintf(buf, "%s%slucky", ltmp >= 10 ? "extremely " : ltmp >= 5 ? "very " : "", Luck < 0 ? "un" : ""); -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%d)", Luck); -#endif you_are(buf,""); - } -#ifdef WIZARD - else if (wizard) enl_msg("Your luck ", "is", "was", " zero",""); -#endif + } else if (wizard) enl_msg("Your luck ", "is", "was", " zero",""); if (u.moreluck > 0) you_have("extra luck",""); else if (u.moreluck < 0) you_have("reduced luck",""); if (carrying(LUCKSTONE) || stone_luck(TRUE)) { @@ -2039,9 +1983,7 @@ int final; if (u.ugangr) { Sprintf(buf, " %sangry with you", u.ugangr > 6 ? "extremely " : u.ugangr > 3 ? "very " : ""); -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%d)", u.ugangr); -#endif enl_msg(u_gname(), " is", " was", buf,""); } else /* @@ -2057,9 +1999,7 @@ int final; #else Sprintf(buf, "%ssafely pray", can_pray(FALSE) ? "" : "not "); #endif -#ifdef WIZARD if (wizard) Sprintf(eos(buf), " (%d)", u.ublesscnt); -#endif you_can(buf,""); } if (wizard) { @@ -2319,25 +2259,21 @@ int final; if (!u.uconduct.weaphit) you_have_never("hit with a wielded weapon"); -#ifdef WIZARD else if (wizard) { Sprintf(buf, "used a wielded weapon %ld time%s", u.uconduct.weaphit, plur(u.uconduct.weaphit)); you_have_X(buf); } -#endif if (!u.uconduct.killer) you_have_been("a pacifist"); if (!u.uconduct.literate) you_have_been("illiterate"); -#ifdef WIZARD else if (wizard) { Sprintf(buf, "read items or engraved %ld time%s", u.uconduct.literate, plur(u.uconduct.literate)); you_have_X(buf); } -#endif ngenocided = num_genocides(); if (ngenocided == 0) { @@ -2350,23 +2286,19 @@ int final; if (!u.uconduct.polypiles) you_have_never("polymorphed an object"); -#ifdef WIZARD else if (wizard) { Sprintf(buf, "polymorphed %ld item%s", u.uconduct.polypiles, plur(u.uconduct.polypiles)); you_have_X(buf); } -#endif if (!u.uconduct.polyselfs) you_have_never("changed form"); -#ifdef WIZARD else if (wizard) { Sprintf(buf, "changed form %ld time%s", u.uconduct.polyselfs, plur(u.uconduct.polyselfs)); you_have_X(buf); } -#endif if (!u.uconduct.wishes) you_have_X("used no wishes"); @@ -2399,36 +2331,24 @@ int final; static const struct func_tab cmdlist[] = { {C('d'), FALSE, dokick}, /* "D" is for door!...? Msg is in dokick.c */ -#ifdef WIZARD {C('e'), TRUE, wiz_detect}, {C('f'), TRUE, wiz_map}, {C('g'), TRUE, wiz_genesis}, {C('i'), TRUE, wiz_identify}, -#endif {C('l'), TRUE, doredraw}, /* if number_pad is set */ -#ifndef DUNGEON_OVERVIEW -#ifdef WIZARD - {C('o'), TRUE, wiz_where}, -#endif -#else {C('n'), TRUE, donamelevel}, /* if number_pad is set */ {C('o'), TRUE, dooverview_or_wiz_where}, /* depending on wizard status */ -#endif /* DUNGEON_OVERVIEW */ {C('p'), TRUE, doprev_message}, {C('r'), TRUE, doredraw}, {C('t'), TRUE, dotele}, -#ifdef WIZARD {C('v'), TRUE, wiz_level_tele}, {C('w'), TRUE, wiz_wish}, -#endif {C('x'), TRUE, doattributes}, {C('z'), TRUE, dosuspend_core}, {'a', FALSE, doapply}, {'A', FALSE, doddoremarm}, {M('a'), TRUE, doorganize}, -#ifdef DUNGEON_OVERVIEW {M('A'), TRUE, donamelevel}, /* #annotate */ -#endif /* 'b', 'B' : go sw */ {'c', FALSE, doclose}, {'C', TRUE, docallcmd}, @@ -2463,9 +2383,7 @@ static const struct func_tab cmdlist[] = { {'o', FALSE, doopen}, {'O', TRUE, doset}, {M('o'), FALSE, dosacrifice}, -#ifdef DUNGEON_OVERVIEW {M('O'), TRUE, dooverview}, /* #overview */ -#endif {'p', FALSE, dopay}, {'P', FALSE, doputon}, {M('p'), TRUE, dopray}, @@ -2475,9 +2393,7 @@ static const struct func_tab cmdlist[] = { {'r', FALSE, doread}, {'R', FALSE, doremring}, {M('r'), FALSE, dorub}, -#ifdef STEED {M('R'), FALSE, doride}, /* #ride */ -#endif {'s', TRUE, dosearch, "searching"}, {'S', TRUE, dosave}, {M('s'), FALSE, dosit}, @@ -2533,9 +2449,7 @@ static const struct func_tab cmdlist[] = { struct ext_func_tab extcmdlist[] = { {"adjust", "adjust inventory letters", doorganize, TRUE}, -#ifdef DUNGEON_OVERVIEW {"annotate", "name current level", donamelevel, TRUE}, -#endif /* DUNGEON_OVERVIEW */ {"chat", "talk to someone", dotalk, TRUE}, /* converse? */ {"conduct", "list voluntary challenges you have maintained", doconduct, TRUE}, @@ -2549,14 +2463,10 @@ struct ext_func_tab extcmdlist[] = { {"monster", "use a monster's special ability", domonability, TRUE}, {"name", "name a monster or an object", docallcmd, TRUE}, {"offer", "offer a sacrifice to the gods", dosacrifice, FALSE}, -#ifdef DUNGEON_OVERVIEW {"overview", "show an overview of the dungeon", dooverview, TRUE}, -#endif /* DUNGEON_OVERVIEW */ {"pray", "pray to the gods for help", dopray, TRUE}, {"quit", "exit without saving current game", done2, TRUE}, -#ifdef STEED {"ride", "ride (or stop riding) a monster", doride, FALSE}, -#endif {"rub", "rub a lamp or a stone", dorub, FALSE}, {"sit", "sit down", dosit, FALSE}, {"terrain", "show map without obstructions", doterrain, TRUE}, @@ -2568,7 +2478,6 @@ struct ext_func_tab extcmdlist[] = { doextversion, TRUE}, {"wipe", "wipe off your face", dowipe, FALSE}, {"?", "get this list of extended commands", doextlist, TRUE}, -#if defined(WIZARD) /* * There must be a blank entry here for every entry in the table * below. @@ -2591,15 +2500,14 @@ struct ext_func_tab extcmdlist[] = { {(char *)0, (char *)0, donull, TRUE}, /* vision */ {(char *)0, (char *)0, donull, TRUE}, /* wizsmell */ #ifdef DEBUG - {(char *)0, (char *)0, donull, TRUE}, /* wizdebug */ + {(char *)0, (char *)0, donull, TRUE}, /* wizdebug_traveldisplay */ + {(char *)0, (char *)0, donull, TRUE}, /* wizdebug_bury */ #endif {(char *)0, (char *)0, donull, TRUE}, /* wizrumorcheck */ {(char *)0, (char *)0, donull, TRUE}, /* wmode */ -#endif {(char *)0, (char *)0, donull, TRUE} /* sentinel */ }; -#ifdef WIZARD /* there must be a placeholder in the table above for every entry here */ static const struct ext_func_tab debug_extcmdlist[] = { {"levelchange", "change experience level", wiz_level_change, TRUE}, @@ -2620,7 +2528,8 @@ static const struct ext_func_tab debug_extcmdlist[] = { {"vision", "show vision array", wiz_show_vision, TRUE}, {"wizsmell", "smell monster", wiz_smell, TRUE}, #ifdef DEBUG - {"wizdebug", "wizard debug command", wiz_debug_cmd, TRUE}, + {"wizdebug_traveldisplay", "wizard debug: toggle travel display", wiz_debug_cmd_traveldisplay, TRUE}, + {"wizdebug_bury", "wizard debug: bury objs under and around you", wiz_debug_cmd_bury, TRUE}, #endif {"wizrumorcheck", "verify rumor boundaries", wiz_rumor_check, TRUE}, {"wmode", "show wall modes", wiz_show_wmodes, TRUE}, @@ -2918,8 +2827,6 @@ wiz_migrate_mons() } #endif -#endif /* WIZARD */ - #define unctrl(c) ((c) <= C('z') ? (0x60 | (c)) : (c)) #define unmeta(c) (0x7f & (c)) @@ -3041,7 +2948,6 @@ register char *cmd; context.move = FALSE; return; } -#ifdef REDO if (*cmd == DOAGAIN && !in_doagain && saveq[0]) { in_doagain = TRUE; stail = 0; @@ -3051,9 +2957,6 @@ register char *cmd; } /* Special case of *cmd == ' ' handled better below */ if(!*cmd || *cmd == (char)0377) -#else - if(!*cmd || *cmd == (char)0377 || (!flags.rest_on_space && *cmd == ' ')) -#endif { nhbell(); context.move = FALSE; @@ -3344,11 +3247,9 @@ const char *s; int is_mov; retry: -#ifdef REDO if (in_doagain || *readchar_queue) dirsym = readchar(); else -#endif dirsym = yn_function((s && *s != '^') ? s : "In what direction?", (char *)0, '\0'); /* remove the prompt string so caller won't have to */ @@ -3358,9 +3259,7 @@ const char *s; docrt(); /* redraw */ goto retry; } -#ifdef REDO savech(dirsym); -#endif if (dirsym == '.' || dirsym == 's') { u.dx = u.dy = u.dz = 0; @@ -3407,11 +3306,7 @@ const char *msg; sym = highc(sym); ctrl = (sym - 'A') + 1; if ((explain = dowhatdoes_core(ctrl, buf2)) - && (!index(wiz_only_list, sym) -#ifdef WIZARD - || wizard -#endif - )) { + && (!index(wiz_only_list, sym) || wizard)) { Sprintf(buf, "Are you trying to use ^%c%s?", sym, index(wiz_only_list, sym) ? "" : " as specified in the Guidebook"); @@ -3649,14 +3544,12 @@ parse() if (foo == '\033') { /* esc cancels count (TH) */ clear_nhwindow(WIN_MESSAGE); multi = last_multi = 0; -# ifdef REDO } else if (foo == DOAGAIN || in_doagain) { multi = last_multi; } else { last_multi = multi; savech(0); /* reset input queue */ savech((char)foo); -# endif } if (multi) { @@ -3684,9 +3577,7 @@ parse() if (foo == 'g' || foo == 'G' || foo == 'm' || foo == 'M' || foo == 'F' || (Cmd.num_pad && (foo == '5' || foo == '-'))) { foo = readchar(); -#ifdef REDO savech((char)foo); -#endif in_line[1] = foo; in_line[2] = 0; } @@ -3753,11 +3644,7 @@ readchar() if ( *readchar_queue ) sym = *readchar_queue++; else -#ifdef REDO - sym = in_doagain ? Getchar() : nh_poskey(&x, &y, &mod); -#else - sym = Getchar(); -#endif + sym = in_doagain ? pgetchar() : nh_poskey(&x, &y, &mod); #ifdef NR_OF_EOFS if (sym == EOF) { @@ -3769,7 +3656,7 @@ readchar() */ do { clearerr(stdin); /* omit if clearerr is undefined */ - sym = Getchar(); + sym = pgetchar(); } while (--cnt && sym == EOF); } #endif /* NR_OF_EOFS */ @@ -3782,7 +3669,7 @@ readchar() #ifdef ALTMETA } else if (sym == '\033' && alt_esc) { /* iflags.altmeta: treat two character ``ESC c'' as single `M-c' */ - sym = *readchar_queue ? *readchar_queue++ : Getchar(); + sym = *readchar_queue ? *readchar_queue++ : pgetchar(); if (sym == EOF || sym == 0) sym = '\033'; else if (sym != '\033') diff --git a/src/dbridge.c b/src/dbridge.c index c900be04e..316b2707f 100644 --- a/src/dbridge.c +++ b/src/dbridge.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dbridge.c $Date$ $Revision$ */ +/* NetHack 3.5 dbridge.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dbridge.c $Date: 2012/02/01 00:49:16 $ $Revision: 1.21 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -25,9 +26,6 @@ STATIC_DCL void FDECL(m_to_e, (struct monst *, int, int, struct entity *)); STATIC_DCL void FDECL(u_to_e, (struct entity *)); STATIC_DCL void FDECL(set_entity, (int, int, struct entity *)); STATIC_DCL const char *FDECL(e_nam, (struct entity *)); -#ifdef D_DEBUG -static const char *FDECL(Enam, (struct entity *)); /* unused */ -#endif STATIC_DCL const char *FDECL(E_phrase, (struct entity *, const char *)); STATIC_DCL boolean FDECL(e_survives_at, (struct entity *, int, int)); STATIC_DCL void FDECL(e_died, (struct entity *, int, int)); @@ -252,8 +250,8 @@ int x, y; (occupants[entitycnt].ex == x) && (occupants[entitycnt].ey == y)) break; + debugpline("entitycnt = %d", entitycnt); #ifdef D_DEBUG - pline("entitycnt = %d", entitycnt); wait_synch(); #endif return((entitycnt == ENTITIES)? @@ -318,19 +316,6 @@ struct entity *etmp; return(is_u(etmp)? "you" : mon_nam(etmp->emon)); } -#ifdef D_DEBUG -/* - * Enam is another unused utility routine: E_phrase is preferable. - */ - -static const char * -Enam(etmp) -struct entity *etmp; -{ - return(is_u(etmp)? "You" : Monnam(etmp->emon)); -} -#endif /* D_DEBUG */ - /* * Generates capitalized entity name, makes 2nd -> 3rd person conversion on * verb, where necessary. @@ -464,10 +449,8 @@ boolean chunks; { int misses; -#ifdef D_DEBUG if (chunks) - pline("Do chunks miss?"); -#endif + debugpline("Do chunks miss?"); if (automiss(etmp)) return(TRUE); @@ -487,9 +470,7 @@ boolean chunks; if (is_db_wall(etmp->ex, etmp->ey)) misses -= 3; /* less airspace */ -#ifdef D_DEBUG - pline("Miss chance = %d (out of 8)", misses); -#endif + debugpline("Miss chance = %d (out of 8)", misses); return((boolean)((misses >= rnd(8))? TRUE : FALSE)); } @@ -518,9 +499,7 @@ struct entity *etmp; if (is_db_wall(etmp->ex, etmp->ey)) tmp -= 2; /* less room to maneuver */ -#ifdef D_DEBUG - pline("%s to jump (%d chances in 10)", E_phrase(etmp, "try"), tmp); -#endif + debugpline("%s to jump (%d chances in 10)", E_phrase(etmp, "try"), tmp); return((boolean)((tmp >= rnd(10))? TRUE : FALSE)); } @@ -553,17 +532,13 @@ struct entity *etmp; if (at_portcullis) pline_The("portcullis misses %s!", e_nam(etmp)); -#ifdef D_DEBUG else - pline_The("drawbridge misses %s!", + debugpline("The drawbridge misses %s!", e_nam(etmp)); -#endif if (e_survives_at(etmp, oldx, oldy)) return; else { -#ifdef D_DEBUG - pline("Mon can't survive here"); -#endif + debugpline("Mon can't survive here"); if (at_portcullis) must_jump = TRUE; else @@ -582,9 +557,7 @@ struct entity *etmp; if (at_portcullis) { if (e_jumps(etmp)) { relocates = TRUE; -#ifdef D_DEBUG - pline("Jump succeeds!"); -#endif + debugpline("Jump succeeds!"); } else { if (e_inview) pline("%s crushed by the falling portcullis!", @@ -597,9 +570,7 @@ struct entity *etmp; } } else { /* tries to jump off bridge to original square */ relocates = !e_jumps(etmp); -#ifdef D_DEBUG - pline("Jump %s!", (relocates)? "fails" : "succeeds"); -#endif + debugpline("Jump %s!", (relocates)? "fails" : "succeeds"); } } @@ -609,17 +580,13 @@ struct entity *etmp; * would be inaccessible (i.e. etmp started on drawbridge square) or * unnecessary (i.e. etmp started here) in such a situation. */ -#ifdef D_DEBUG - pline("Doing relocation."); -#endif + debugpline("Doing relocation."); newx = oldx; newy = oldy; (void)find_drawbridge(&newx, &newy); if ((newx == oldx) && (newy == oldy)) get_wall_for_db(&newx, &newy); -#ifdef D_DEBUG - pline("Checking new square for occupancy."); -#endif + debugpline("Checking new square for occupancy."); if (relocates && (e_at(newx, newy))) { /* @@ -630,30 +597,24 @@ struct entity *etmp; struct entity *other; other = e_at(newx, newy); -#ifdef D_DEBUG - pline("New square is occupied by %s", e_nam(other)); -#endif + debugpline("New square is occupied by %s", e_nam(other)); if (e_survives_at(other, newx, newy) && automiss(other)) { relocates = FALSE; /* "other" won't budge */ -#ifdef D_DEBUG - pline("%s suicide.", E_phrase(etmp, "commit")); -#endif + debugpline("%s suicide.", E_phrase(etmp, "commit")); } else { -#ifdef D_DEBUG - pline("Handling %s", e_nam(other)); -#endif + debugpline("Handling %s", e_nam(other)); while ((e_at(newx, newy) != 0) && (e_at(newx, newy) != etmp)) do_entity(other); + debugpline("Checking existence of %s", e_nam(etmp)); #ifdef D_DEBUG - pline("Checking existence of %s", e_nam(etmp)); wait_synch(); #endif if (e_at(oldx, oldy) != etmp) { -#ifdef D_DEBUG - pline("%s moved or died in recursion somewhere", + debugpline("%s moved or died in recursion somewhere", E_phrase(etmp, "have")); +#ifdef D_DEBUG wait_synch(); #endif return; @@ -661,9 +622,7 @@ struct entity *etmp; } } if (relocates && !e_at(newx, newy)) {/* if e_at() entity = worm tail */ -#ifdef D_DEBUG - pline("Moving %s", e_nam(etmp)); -#endif + debugpline("Moving %s", e_nam(etmp)); if (!is_u(etmp)) { remove_monster(etmp->ex, etmp->ey); place_monster(etmp->emon, newx, newy); @@ -676,13 +635,13 @@ struct entity *etmp; etmp->ey = newy; e_inview = e_canseemon(etmp); } + debugpline("Final disposition of %s", e_nam(etmp)); #ifdef D_DEBUG - pline("Final disposition of %s", e_nam(etmp)); wait_synch(); #endif if (is_db_wall(etmp->ex, etmp->ey)) { + debugpline("%s in portcullis chamber", E_phrase(etmp, "are")); #ifdef D_DEBUG - pline("%s in portcullis chamber", E_phrase(etmp, "are")); wait_synch(); #endif if (e_inview) { @@ -702,13 +661,9 @@ struct entity *etmp; e_died(etmp, 0, CRUSHING); /* no message */ return; } -#ifdef D_DEBUG - pline("%s in here", E_phrase(etmp, "survive")); -#endif + debugpline("%s in here", E_phrase(etmp, "survive")); } else { -#ifdef D_DEBUG - pline("%s on drawbridge square", E_phrase(etmp, "are")); -#endif + debugpline("%s on drawbridge square", E_phrase(etmp, "are")); if (is_pool(etmp->ex, etmp->ey) && !e_inview) if (!Deaf) You_hear("a splash."); @@ -719,9 +674,7 @@ struct entity *etmp; E_phrase(etmp, "fall")); return; } -#ifdef D_DEBUG - pline("%s cannot survive on the drawbridge square",Enam(etmp)); -#endif + debugpline("%s cannot survive on the drawbridge square",E_phrase(etmp, NULL)); if (is_pool(etmp->ex, etmp->ey) || is_lava(etmp->ex, etmp->ey)) if (e_inview && !is_u(etmp)) { /* drown() will supply msgs if nec. */ @@ -937,9 +890,7 @@ int x,y; if (etmp1->edata) { e_inview = e_canseemon(etmp1); if (e_missed(etmp1, TRUE)) { -#ifdef D_DEBUG - pline("%s spared!", E_phrase(etmp1, "are")); -#endif + debugpline("%s spared!", E_phrase(etmp1, "are")); /* if there is water or lava here, fall in now */ if (is_u(etmp1)) spoteffects(FALSE); @@ -956,11 +907,9 @@ int x,y; } else { if (!Deaf && !is_u(etmp1) && !is_pool(x,y)) You_hear("a crushing sound."); -#ifdef D_DEBUG else - pline("%s from shrapnel", + debugpline("%s from shrapnel", E_phrase(etmp1, "die")); -#endif } killer.format = KILLED_BY_AN; Strcpy(killer.name, "collapsing drawbridge"); diff --git a/src/decl.c b/src/decl.c index 93036da34..6c83f0f14 100644 --- a/src/decl.c +++ b/src/decl.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 decl.c $Date$ $Revision$ */ +/* NetHack 3.5 decl.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 decl.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -30,9 +31,7 @@ int x_maze_max = (COLNO-1) & ~1, int otg_temp; /* used by object_to_glyph() [otg] */ -#ifdef REDO NEARDATA int in_doagain = 0; -#endif /* * The following structure will be initialized at startup time with @@ -48,9 +47,7 @@ NEARDATA int doorindex = 0; NEARDATA char *save_cm = 0; NEARDATA struct kinfo killer = DUMMY; -#ifdef GOLDOBJ NEARDATA long done_money = 0; -#endif const char *nomovemsg = 0; NEARDATA char plname[PL_NSIZ] = DUMMY; /* player name */ NEARDATA char pl_character[PL_CSIZ] = DUMMY; @@ -141,17 +138,13 @@ NEARDATA struct you u = DUMMY; NEARDATA time_t ubirthday = DUMMY; -#ifdef DUNGEON_OVERVIEW schar lastseentyp[COLNO][ROWNO] = {DUMMY}; /* last seen/touched dungeon typ */ -#endif /* DUNGEON_OVERVIEW */ NEARDATA struct obj *invent = (struct obj *)0, *uwep = (struct obj *)0, *uarm = (struct obj *)0, *uswapwep = (struct obj *)0, *uquiver = (struct obj *)0, /* quiver */ -#ifdef TOURIST *uarmu = (struct obj *)0, /* under-wear, so to speak */ -#endif *uskin = (struct obj *)0, /* dragon armor, if a dragon */ *uarmc = (struct obj *)0, *uarmh = (struct obj *)0, *uarms = (struct obj *)0, *uarmg = (struct obj *)0, @@ -269,8 +262,7 @@ NEARDATA winid WIN_MESSAGE = WIN_ERR; NEARDATA winid WIN_STATUS = WIN_ERR; #endif NEARDATA winid WIN_MAP = WIN_ERR, WIN_INVEN = WIN_ERR; -nhwchar toplines[TBUFSZ]; - +char toplines[TBUFSZ]; /* Windowing stuff that's really tty oriented, but present for all ports */ struct tc_gbl_data tc_gbl_data = { 0,0, 0,0 }; /* AS,AE, LI,CO */ diff --git a/src/detect.c b/src/detect.c index 6cd342eb7..ecc4d3878 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 detect.c $Date$ $Revision$ */ +/* NetHack 3.5 detect.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 detect.c $Date: 2012/04/16 02:05:40 $ $Revision: 1.47 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -90,12 +91,7 @@ unsigned material; /* there's some object shown here */ if (oclass == ALL_CLASSES) { return((boolean)( !(level.objects[x][y] || /* stale if nothing here */ - ((mtmp = m_at(x,y)) != 0 && - ( -#ifndef GOLDOBJ - mtmp->mgold || -#endif - mtmp->minvent))))); + ((mtmp = m_at(x,y)) != 0 && ( mtmp->minvent))))); } else { if (material && objects[glyph_to_obj(glyph)].oc_material == material) { /* the object shown here is of interest because material matches */ @@ -114,19 +110,10 @@ unsigned material; for (otmp = level.objects[x][y]; otmp; otmp = otmp->nexthere) if (o_in(otmp, oclass)) return FALSE; /* didn't find it; perhaps a monster is carrying it */ -#ifndef GOLDOBJ - if ((mtmp = m_at(x,y)) != 0) { - if (oclass == COIN_CLASS && mtmp->mgold) - return FALSE; - else for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj) - if (o_in(otmp, oclass)) return FALSE; - } -#else if ((mtmp = m_at(x,y)) != 0) { for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj) if (o_in(otmp, oclass)) return FALSE; } -#endif /* detection indicates removal of this object from the map */ return TRUE; } @@ -175,11 +162,7 @@ register struct obj *sobj; /* look for gold carried by monsters (might be in a container) */ for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { if (DEADMONSTER(mtmp)) continue; /* probably not needed in this case but... */ -#ifndef GOLDOBJ - if (mtmp->mgold || monsndx(mtmp->data) == PM_GOLD_GOLEM) { -#else if (findgold(mtmp->minvent) || monsndx(mtmp->data) == PM_GOLD_GOLEM) { -#endif known = TRUE; goto outgoldmap; /* skip further searching */ } else for (obj = mtmp->minvent; obj; obj = obj->nobj) @@ -211,12 +194,7 @@ register struct obj *sobj; if (youmonst.data == &mons[PM_GOLD_GOLEM]) { Sprintf(buf, "You feel like a million %s!", currency(2L)); - } else if (hidden_gold() || -#ifndef GOLDOBJ - u.ugold) -#else - money_cnt(invent)) -#endif + } else if (hidden_gold() || money_cnt(invent)) Strcpy(buf, "You feel worried about your future financial situation."); else @@ -253,11 +231,7 @@ outgoldmap: } for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) { if (DEADMONSTER(mtmp)) continue; /* probably overkill here */ -#ifndef GOLDOBJ - if (mtmp->mgold || monsndx(mtmp->data) == PM_GOLD_GOLEM) { -#else if (findgold(mtmp->minvent) || monsndx(mtmp->data) == PM_GOLD_GOLEM) { -#endif struct obj gold; gold = zeroobj; /* ensure oextra is cleared too */ gold.otyp = GOLD_PIECE; @@ -459,11 +433,7 @@ int class; /* an object class, 0 for all */ } if ((is_cursed && mtmp->m_ap_type == M_AP_OBJECT && (!class || class == objects[mtmp->mappearance].oc_class)) || -#ifndef GOLDOBJ - (mtmp->mgold && (!class || class == COIN_CLASS))) { -#else (findgold(mtmp->minvent) && (!class || class == COIN_CLASS))) { -#endif ct++; break; } @@ -545,11 +515,7 @@ int class; /* an object class, 0 for all */ temp.oy = mtmp->my; temp.corpsenm = PM_TENGU; /* if mimicing a corpse */ map_object(&temp, 1); -#ifndef GOLDOBJ - } else if (mtmp->mgold && (!class || class == COIN_CLASS)) { -#else } else if (findgold(mtmp->minvent) && (!class || class == COIN_CLASS)) { -#endif struct obj gold; gold = zeroobj; /* ensure oextra is cleared too */ gold.otyp = GOLD_PIECE; @@ -1058,12 +1024,10 @@ struct rm *lev; { int newmask = lev->doormask & ~WM_MASK; -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) /* rogue didn't have doors, only doorways */ newmask = D_NODOOR; else -#endif /* newly exposed door is closed */ if (!(newmask & D_LOCKED)) newmask |= D_CLOSED; diff --git a/src/dig.c b/src/dig.c index 5e0b40aca..00a60aaba 100644 --- a/src/dig.c +++ b/src/dig.c @@ -1,11 +1,10 @@ -/* NetHack 3.5 dig.c $Date$ $Revision$ */ +/* NetHack 3.5 dig.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dig.c $Date: 2012/02/16 03:01:37 $ $Revision: 1.67 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -/* #define DEBUG */ /* turn on for diagnostics */ - static NEARDATA boolean did_dig_msg; STATIC_DCL boolean NDECL(rm_waslit); @@ -249,13 +248,11 @@ dig(VOID_ARGS) You("fumble and drop %s.", yname(uwep)); dropx(uwep); } else { -#ifdef STEED if (u.usteed) pline("%s and %s %s!", Yobjnam2(uwep, "bounce"), otense(uwep, "hit"), mon_nam(u.usteed)); else -#endif pline("Ouch! %s and %s you!", Yobjnam2(uwep, "bounce"), otense(uwep, "hit")); set_wounded_legs(RIGHT_SIDE, 5 + rnd(5)); @@ -543,11 +540,9 @@ int ttyp; SET_FOUNTAIN_WARNED(x,y); /* force dryup */ dryup(x, y, madeby_u); return; -#ifdef SINKS } else if (IS_SINK(lev->typ)) { breaksink(x, y); return; -#endif } else if (lev->typ == DRAWBRIDGE_DOWN || (is_drawbridge_wall(x, y) >= 0)) { int bx = x, by = y; @@ -1534,11 +1529,9 @@ char *msg; } else if (is_pool(cc->x,cc->y)) { } else if (IS_GRAVE(ltyp)) { #endif -#ifdef SINKS } else if (IS_SINK(ltyp)) { Strcpy(msg, "A tangled mass of plumbing remains below the sink."); return FALSE; -#endif } else if ((cc->x == xupladder && cc->y == yupladder) || /* "ladder up" */ (cc->x == xdnladder && cc->y == ydnladder)) { /* "ladder down" */ Strcpy(msg, "The ladder is unaffected."); @@ -1697,9 +1690,7 @@ bury_an_obj(otmp) struct obj *otmp2; boolean under_ice; -#ifdef DEBUG - pline("bury_an_obj: %s", xname(otmp)); -#endif + debugpline("bury_an_obj: %s", xname(otmp)); if (otmp == uball) { unpunish(); u.utrap = rn1(50,20); @@ -1761,10 +1752,8 @@ int x, y; { struct obj *otmp, *otmp2; -#ifdef DEBUG if(level.objects[x][y] != (struct obj *)0) - pline("bury_objs: at %d, %d", x, y); -#endif + debugpline("bury_objs: at %d, %d", x, y); for (otmp = level.objects[x][y]; otmp; otmp = otmp2) otmp2 = bury_an_obj(otmp); @@ -1781,9 +1770,7 @@ int x, y; struct obj *otmp, *otmp2, *bball; coord cc; -#ifdef DEBUG - pline("unearth_objs: at %d, %d", x, y); -#endif + debugpline("unearth_objs: at %d, %d", x, y); cc.x = x; cc.y = y; bball = buried_ball(&cc); for (otmp = level.buriedobjlist; otmp; otmp = otmp2) { @@ -1892,9 +1879,7 @@ void bury_monst(mtmp) struct monst *mtmp; { -#ifdef DEBUG - pline("bury_monst: %s", mon_nam(mtmp)); -#endif + debugpline("bury_monst: %s", mon_nam(mtmp)); if(canseemon(mtmp)) { if(is_flyer(mtmp->data) || is_floater(mtmp->data)) { pline_The("%s opens up, but %s is not swallowed!", @@ -1913,9 +1898,7 @@ struct monst *mtmp; void bury_you() { -#ifdef DEBUG - pline("bury_you"); -#endif + debugpline("bury_you"); if (!Levitation && !Flying) { if(u.uswallow) You_feel("a sensation like falling into a trap!"); @@ -1932,9 +1915,7 @@ bury_you() void unearth_you() { -#ifdef DEBUG - pline("unearth_you"); -#endif + debugpline("unearth_you"); u.uburied = FALSE; under_ground(0); if(!uamul || uamul->otyp != AMULET_OF_STRANGULATION) @@ -1945,9 +1926,7 @@ unearth_you() void escape_tomb() { -#ifdef DEBUG - pline("escape_tomb"); -#endif + debugpline("escape_tomb"); if ((Teleportation || can_teleport(youmonst.data)) && (Teleport_control || rn2(3) < Luck+2)) { You("attempt a teleport spell."); @@ -1979,9 +1958,7 @@ bury_obj(otmp) struct obj *otmp; { -#ifdef DEBUG - pline("bury_obj"); -#endif + debugpline("bury_obj"); if(cansee(otmp->ox, otmp->oy)) pline_The("objects on the %s tumble into a hole!", surface(otmp->ox, otmp->oy)); @@ -1992,7 +1969,7 @@ struct obj *otmp; #ifdef DEBUG int -wiz_debug_cmd() /* in this case, bury everything at your loc and around */ +wiz_debug_cmd_bury() /* in this case, bury everything at your loc and around */ { int x, y; diff --git a/src/display.c b/src/display.c index b48d06833..23dcef3a0 100644 --- a/src/display.c +++ b/src/display.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 display.c $Date$ $Revision$ */ +/* NetHack 3.5 display.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 display.c $Date: 2011/12/05 03:17:36 $ $Revision: 1.34 $ */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ @@ -136,35 +137,7 @@ STATIC_DCL void FDECL(set_seenv, (struct rm *, int, int, int, int)); STATIC_DCL void FDECL(t_warn, (struct rm *)); STATIC_DCL int FDECL(wall_angle, (struct rm *)); -#ifdef DUNGEON_OVERVIEW -# define remember_topology(x,y) (lastseentyp[x][y] = levl[x][y].typ) -#else -# define remember_topology(x,y) /*empty*/ -#endif - -#ifdef INVISIBLE_OBJECTS -/* - * vobj_at() - * - * Returns a pointer to an object if the hero can see an object at the - * given location. This takes care of invisible objects. NOTE, this - * assumes that the hero is not blind and on top of the object pile. - * It does NOT take into account that the location is out of sight, or, - * say, one can see blessed, etc. - */ -struct obj * -vobj_at(x,y) - xchar x,y; -{ - register struct obj *obj = level.objects[x][y]; - - while (obj) { - if (!obj->oinvis || See_invisible) return obj; - obj = obj->nexthere; - } - return ((struct obj *) 0); -} -#endif /* else vobj_at() is defined in display.h */ +#define remember_topology(x,y) (lastseentyp[x][y] = levl[x][y].typ) /* * magic_map_background() @@ -419,10 +392,8 @@ display_monster(x, y, mon, sightflags, worm_tail) levl[x][y].glyph = glyph; if (!sensed) { show_glyph(x,y, glyph); -#ifdef DUNGEON_OVERVIEW /* override real topology with mimic's fake one */ lastseentyp[x][y] = cmap_to_type(sym); -#endif } break; } @@ -1125,11 +1096,9 @@ see_monsters() warn_obj_cnt = new_warn_obj_cnt; } -#ifdef STEED /* when mounted, hero's location gets caught by monster loop */ if (!u.usteed) -#endif - newsym(u.ux, u.uy); + newsym(u.ux, u.uy); } /* diff --git a/src/dlb.c b/src/dlb.c index 394678ca2..32af6eedc 100644 --- a/src/dlb.c +++ b/src/dlb.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dlb.c $Date$ $Revision$ */ +/* NetHack 3.5 dlb.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dlb.c $Date: 2012/02/16 03:01:37 $ $Revision: 1.10 $ */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/do.c b/src/do.c index fa09f7d53..981981293 100644 --- a/src/do.c +++ b/src/do.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 do.c $Date$ $Revision$ */ +/* NetHack 3.5 do.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 do.c $Date: 2014/11/18 03:10:39 $ $Revision: 1.101 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -7,10 +8,8 @@ #include "hack.h" #include "lev.h" -#ifdef SINKS STATIC_DCL void FDECL(trycall, (struct obj *)); STATIC_DCL void FDECL(dosinkring, (struct obj *)); -#endif /* SINKS */ STATIC_PTR int FDECL(drop, (struct obj *)); STATIC_PTR int NDECL(wipeoff); @@ -29,11 +28,7 @@ static NEARDATA const char drop_types[] = int dodrop() { -#ifndef GOLDOBJ - int result, i = (invent || u.ugold) ? 0 : (SIZE(drop_types) - 1); -#else int result, i = (invent) ? 0 : (SIZE(drop_types) - 1); -#endif if (*u.ushops) sellobj_state(SELL_DELIBERATE); result = drop(getobj(&drop_types[i], "drop")); @@ -79,11 +74,9 @@ boolean pushing; char whobuf[BUFSZ]; Strcpy(whobuf, "you"); -#ifdef STEED if (u.usteed) Strcpy(whobuf, y_monnam(u.usteed)); -#endif - pline("%s %s %s into the %s.", upstart(whobuf), - vtense(whobuf, "push"), the(xname(otmp)), what); + pline("%s %s %s into the %s.", upstart(whobuf), + vtense(whobuf, "push"), the(xname(otmp)), what); if (flags.verbose && !Blind) pline("Now you can cross it!"); /* no splashing in this case */ @@ -245,7 +238,6 @@ doaltarobj(obj) /* obj is an object dropped on an altar */ } } -#ifdef SINKS STATIC_OVL void trycall(obj) @@ -397,7 +389,6 @@ giveback: } else useup(obj); } -#endif /* some common tests when trying to drop or throw items */ boolean @@ -433,14 +424,12 @@ register const char *word; body_part(HAND)); return(FALSE); } -#ifdef STEED if (obj->owornmask & W_SADDLE) { if (*word) You("cannot %s %s you are sitting on.", word, something); return (FALSE); } -#endif return(TRUE); } @@ -478,13 +467,11 @@ register struct obj *obj; mbodypart(u.ustuck, STOMACH)); } } else { -#ifdef SINKS if((obj->oclass == RING_CLASS || obj->otyp == MEAT_RING) && IS_SINK(levl[u.ux][u.uy].typ)) { dosinkring(obj); return(1); } -#endif if (!can_reach_floor(TRUE)) { /* we might be levitating due to #invoke Heart of Ahriman; if so, levitation would end during call to freeinv() @@ -493,13 +480,9 @@ register struct obj *obj; if (levhack) ELevitation = W_ART; /* other than W_ARTI */ if(flags.verbose) You("drop %s.", doname(obj)); -#ifndef GOLDOBJ - if (obj->oclass != COIN_CLASS || obj == invent) freeinv(obj); -#else /* Ensure update when we drop gold objects */ if (obj->oclass == COIN_CLASS) context.botl = 1; freeinv(obj); -#endif hitfloor(obj); if (levhack) float_down(I_SPECIAL|TIMEOUT, W_ARTI|W_ART); return(1); @@ -518,13 +501,9 @@ void dropx(obj) register struct obj *obj; { -#ifndef GOLDOBJ - if (obj->oclass != COIN_CLASS || obj == invent) freeinv(obj); -#else /* Ensure update when we drop gold objects */ if (obj->oclass == COIN_CLASS) context.botl = 1; freeinv(obj); -#endif if (!u.uswallow) { if (ship_object(obj, u.ux, u.uy, FALSE)) return; if (IS_ALTAR(levl[u.ux][u.uy].typ)) @@ -662,17 +641,10 @@ int retry; int n, i, n_dropped = 0; long cnt; struct obj *otmp, *otmp2; -#ifndef GOLDOBJ - struct obj *u_gold = 0; -#endif menu_item *pick_list; boolean all_categories = TRUE; boolean drop_everything = FALSE; -#ifndef GOLDOBJ - /* put gold where inventory traversal will see it */ - if (u.ugold) u_gold = insert_gold_into_invent(TRUE); -#endif if (retry) { all_categories = (retry == -2); } else if (flags.menu_style == MENU_FULL) { @@ -758,11 +730,6 @@ int retry; /* same kludge as getobj(), for canletgo()'s use */ otmp->corpsenm = (int) cnt; /* don't split */ } else { -#ifndef GOLDOBJ - if (otmp->oclass == COIN_CLASS) - (void) splitobj(otmp, otmp->quan - cnt); - else -#endif otmp = splitobj(otmp, cnt); } } @@ -774,10 +741,6 @@ int retry; } drop_done: -#ifndef GOLDOBJ - /* if we put gold into inventory above, take it back out now */ - if (u_gold) remove_gold_from_invent(); -#endif return n_dropped; } @@ -800,11 +763,9 @@ dodown() return 1; } -#ifdef STEED if (stucksteed(TRUE)) { return 0; } -#endif /* Levitation might be blocked, but player can still use '>' to turn off controlled levitaiton */ if (HLevitation || ELevitation) { @@ -923,11 +884,9 @@ doup() You_cant("go up here."); return(0); } -#ifdef STEED if (stucksteed(TRUE)) { return(0); } -#endif if(u.ustuck) { You("are %s, and cannot go up.", !u.uswallow ? "being held" : is_animal(u.ustuck->data) ? @@ -1042,9 +1001,7 @@ boolean at_stairs, falling, portal; newlevel->dlevel = dunlevs_in_dungeon(newlevel); if (newdungeon && In_endgame(newlevel)) { /* 1st Endgame Level !!! */ if (!u.uhave.amulet) return; /* must have the Amulet */ -#ifdef WIZARD if (!wizard) /* wizard ^V can bypass Earth level */ -#endif assign_level(newlevel, &earth_level); /* (redundant) */ } new_ledger = ledger_no(newlevel); @@ -1120,9 +1077,7 @@ boolean at_stairs, falling, portal; keepdogs(FALSE); if (u.uswallow) /* idem */ u.uswldtim = u.uswallow = 0; -#ifdef DUNGEON_OVERVIEW recalc_mapseen(); /* recalculate map overview before we leave the level */ -#endif /* DUNGEON_OVERVIEW */ /* * We no longer see anything on the level. Make sure that this * follows u.uswallow set to null since uswallow overrides all @@ -1149,27 +1104,21 @@ boolean at_stairs, falling, portal; /* discard unreachable levels; keep #0 */ for (l_idx = maxledgerno(); l_idx > 0; --l_idx) delete_levelfile(l_idx); -#ifdef DUNGEON_OVERVIEW /* mark #overview data for all dungeon branches as uninteresting */ for (l_idx = 0; l_idx < n_dgns; ++l_idx) remdun_mapseen(l_idx); -#endif } -#ifdef REINCARNATION if (Is_rogue_level(newlevel) || Is_rogue_level(&u.uz)) assign_graphics(Is_rogue_level(newlevel) ? ROGUESET : PRIMARY); -#endif #ifdef USE_TILES substitute_tiles(newlevel); #endif -#ifdef DUNGEON_OVERVIEW /* record this level transition as a potential seen branch unless using * some non-standard means of transportation (level teleport). */ if ((at_stairs || falling || portal) && (u.uz.dnum != newlevel->dnum)) recbranch_mapseen(&u.uz, newlevel); -#endif /* DUNGEON_OVERVIEW */ assign_level(&u.uz0, &u.uz); assign_level(&u.uz, newlevel); assign_level(&u.utolev, newlevel); @@ -1266,12 +1215,10 @@ boolean at_stairs, falling, portal; freeinv(uball); } } -#ifdef STEED /* falling off steed has its own losehp() call */ if (u.usteed) dismount_steed(DISMOUNT_FELL); else -#endif losehp(Maybe_Half_Phys(rnd(3)), at_ladder ? "falling off a ladder" : "tumbling down a flight of stairs", @@ -1304,11 +1251,7 @@ boolean at_stairs, falling, portal; initrack(); - if ((mtmp = m_at(u.ux, u.uy)) != 0 -#ifdef STEED - && mtmp != u.usteed -#endif - ) { + if ((mtmp = m_at(u.ux, u.uy)) != 0 && mtmp != u.usteed) { /* There's a monster at your target destination; it might be one which accompanied you--see mon_arrive(dogmove.c)--or perhaps it was already here. Randomly move you to an adjacent spot @@ -1324,12 +1267,10 @@ boolean at_stairs, falling, portal; mnexto(mtmp); if ((mtmp = m_at(u.ux, u.uy)) != 0) { -#ifdef WIZARD /* there was an unconditional impossible("mnearto failed") here, but it's not impossible and we're prepared to cope with the situation, so only say something when debugging */ if (wizard) pline("(monster in hero's way)"); -#endif if (!rloc(mtmp, TRUE)) /* no room to move it; send it away, to return later */ migrate_to_level(mtmp, ledger_no(&u.uz), @@ -1430,10 +1371,8 @@ boolean at_stairs, falling, portal; } } } else { -#ifdef REINCARNATION if (new && Is_rogue_level(&u.uz)) You("enter what seems to be an older, more primitive world."); -#endif /* main dungeon message from your quest leader */ if (!In_quest(&u.uz0) && at_dgn_entrance("The Quest") && !(u.uevent.qcompleted || u.uevent.qexpelled || @@ -1745,9 +1684,7 @@ heal_legs() context.botl = 1; } -#ifdef STEED if (!u.usteed) -#endif { const char *legs = body_part(LEG); diff --git a/src/do_name.c b/src/do_name.c index 9d19a1997..4face203e 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 do_name.c $Date$ $Revision$ */ +/* NetHack 3.5 do_name.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 do_name.c $Date: 2012/01/29 03:00:17 $ $Revision: 1.49 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -328,20 +329,16 @@ do_mname() cy = cc.y; if (cx == u.ux && cy == u.uy) { -#ifdef STEED if (u.usteed && canspotmon(u.usteed)) mtmp = u.usteed; else { -#endif pline("This %s creature is called %s and cannot be renamed.", ACURR(A_CHA) > 14 ? (flags.female ? "beautiful" : "handsome") : "ugly", plname); return; -#ifdef STEED } -#endif } else mtmp = m_at(cx, cy); @@ -677,9 +674,7 @@ boolean called; do_it = !canspotmon(mtmp) && article != ARTICLE_YOUR && !program_state.gameover && -#ifdef STEED mtmp != u.usteed && -#endif !(u.uswallow && mtmp == u.ustuck) && !(suppress & SUPPRESS_IT); do_saddle = !(suppress & SUPPRESS_SADDLE); @@ -745,11 +740,9 @@ boolean called; Strcat(strcat(buf, adjective), " "); if (do_invis) Strcat(buf, "invisible "); -#ifdef STEED if (do_saddle && (mtmp->misc_worn_check & W_SADDLE) && !Blind && !Hallucination) Strcat(buf, "saddled "); -#endif if (buf[0] != 0) has_adjectives = TRUE; else @@ -897,10 +890,8 @@ struct monst *mtmp; prefix = mtmp->mtame ? ARTICLE_YOUR : ARTICLE_THE; suppression_flag = (has_mname(mtmp) -#ifdef STEED /* "saddled" is redundant when mounted */ || mtmp == u.usteed -#endif ) ? SUPPRESS_SADDLE : 0; return x_monnam(mtmp, prefix, (char *)0, suppression_flag, FALSE); @@ -1066,7 +1057,6 @@ const char *mname; return FALSE; } -#ifdef REINCARNATION const char * roguename() /* Name of a Rogue player */ { @@ -1084,7 +1074,6 @@ roguename() /* Name of a Rogue player */ return rn2(3) ? (rn2(2) ? "Michael Toy" : "Kenneth Arnold") : "Glenn Wichman"; } -#endif /* REINCARNATION */ static NEARDATA const char * const hcolors[] = { "ultraviolet", "infrared", "bluish-orange", diff --git a/src/do_wear.c b/src/do_wear.c index 42f23491a..414f5a522 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 do_wear.c $Date$ $Revision$ */ +/* NetHack 3.5 do_wear.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 do_wear.c $Date: 2012/02/05 04:26:48 $ $Revision: 1.69 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -8,9 +9,7 @@ static NEARDATA const char see_yourself[] = "see yourself"; static NEARDATA const char unknown_type[] = "Unknown type of %s (%d)"; static NEARDATA const char c_armor[] = "armor", c_suit[] = "suit", -#ifdef TOURIST c_shirt[] = "shirt", -#endif c_cloak[] = "cloak", c_gloves[] = "gloves", c_boots[] = "boots", @@ -23,11 +22,8 @@ static NEARDATA const char c_armor[] = "armor", static NEARDATA const long takeoff_order[] = { WORN_BLINDF, W_WEP, WORN_SHIELD, WORN_GLOVES, LEFT_RING, RIGHT_RING, WORN_CLOAK, - WORN_HELMET, WORN_AMUL, WORN_ARMOR, -#ifdef TOURIST - WORN_SHIRT, -#endif - WORN_BOOTS, W_SWAPWEP, W_QUIVER, 0L }; + WORN_HELMET, WORN_AMUL, WORN_ARMOR, WORN_SHIRT, WORN_BOOTS, W_SWAPWEP, + W_QUIVER, 0L }; STATIC_DCL void FDECL(on_msg, (struct obj *)); STATIC_DCL void FDECL(toggle_stealth, (struct obj *,long,BOOLEAN_P)); @@ -39,9 +35,7 @@ STATIC_PTR int NDECL(Helmet_on); STATIC_PTR int NDECL(Gloves_on); STATIC_DCL void FDECL(wielding_corpse, (struct obj *,BOOLEAN_P)); STATIC_PTR int NDECL(Shield_on); -#ifdef TOURIST STATIC_PTR int NDECL(Shirt_on); -#endif STATIC_DCL void NDECL(Amulet_on); STATIC_DCL void FDECL(learnring, (struct obj *,BOOLEAN_P)); STATIC_DCL void FDECL(Ring_off_or_gone, (struct obj *, BOOLEAN_P)); @@ -600,7 +594,6 @@ Shield_off(VOID_ARGS) return 0; } -#ifdef TOURIST STATIC_PTR int Shirt_on(VOID_ARGS) { @@ -630,7 +623,6 @@ Shirt_off(VOID_ARGS) setworn((struct obj *)0, W_ARMU); return 0; } -#endif /*TOURIST*/ /* This must be done in worn.c, because one of the possible intrinsics conferred * is fire resistance, and we have to immediately set HFire_resistance in worn.c @@ -862,9 +854,6 @@ register struct obj *obj; /* can now see invisible monsters */ set_mimic_blocking(); /* do special mimic handling */ see_monsters(); -#ifdef INVISIBLE_OBJECTS - see_objects(); -#endif if (Invis && !oldprop && !HSee_invisible && !Blind) { newsym(u.ux,u.uy); @@ -974,9 +963,6 @@ boolean gone; if (!See_invisible) { set_mimic_blocking(); /* do special mimic handling */ see_monsters(); -#ifdef INVISIBLE_OBJECTS - see_objects(); -#endif } if (Invisible && !Blind) { @@ -1136,9 +1122,7 @@ struct obj *obj; /* if null, do all worn items; otherwise just obj itself */ if (!obj ? uleft != 0 : (obj == uleft)) (void) Ring_on(uleft); if (!obj ? uamul != 0 : (obj == uamul)) (void) Amulet_on(); -#ifdef TOURIST if (!obj ? uarmu != 0 : (obj == uarmu)) (void) Shirt_on(); -#endif if (!obj ? uarm != 0 : (obj == uarm)) (void) Armor_on(); if (!obj ? uarmc != 0 : (obj == uarmc)) (void) Cloak_on(); if (!obj ? uarmf != 0 : (obj == uarmf)) (void) Boots_on(); @@ -1162,11 +1146,9 @@ register struct obj *otmp; if (otmp == uarm) result = (afternmv == Armor_on || afternmv == Armor_off || what == WORN_ARMOR); -#ifdef TOURIST else if (otmp == uarmu) result = (afternmv == Shirt_on || afternmv == Shirt_off || what == WORN_SHIRT); -#endif else if (otmp == uarmc) result = (afternmv == Cloak_on || afternmv == Cloak_off || what == WORN_CLOAK); @@ -1198,10 +1180,8 @@ struct obj *otmp; /* 'T' (also 'W') sets afternmv, 'A' sets context.takeoff.what */ if (otmp == uarm) result = (afternmv == Armor_off || what == WORN_ARMOR); -#ifdef TOURIST else if (otmp == uarmu) result = (afternmv == Shirt_off || what == WORN_SHIRT); -#endif else if (otmp == uarmc) result = (afternmv == Cloak_off || what == WORN_CLOAK); else if (otmp == uarmf) @@ -1296,11 +1276,9 @@ dotakeoff() } else if (uarm) { armorpieces++; otmp = uarm; -#ifdef TOURIST } else if (uarmu) { armorpieces++; otmp = uarmu; -#endif } if (!armorpieces) { /* assert( GRAY_DRAGON_SCALES > YELLOW_DRAGON_SCALE_MAIL ); */ @@ -1324,21 +1302,16 @@ dotakeoff() /* note: the `uskin' case shouldn't be able to happen here; dragons can't wear any armor so will end up with `armorpieces == 0' above */ if (otmp == uskin || ((otmp == uarm) && uarmc) -#ifdef TOURIST - || ((otmp == uarmu) && (uarmc || uarm)) -#endif - ) { + || ((otmp == uarmu) && (uarmc || uarm))) { char why[BUFSZ], what[BUFSZ]; why[0] = what[0] = '\0'; if (otmp != uskin) { if (uarmc) Strcat(what, cloak_simple_name(uarmc)); -#ifdef TOURIST if ((otmp == uarmu) && uarm) { if (uarmc) Strcat(what, " and "); Strcat(what, suit_simple_name(uarm)); } -#endif Sprintf(why, " without taking off your %s first", what); } You_cant("take that off%s.", why); @@ -1368,12 +1341,10 @@ doremring() MOREACC(ublindf); if(!Accessories) { - pline("Not wearing any accessories.%s", (iflags.cmdassist && - (uarm || uarmc || -#ifdef TOURIST - uarmu || -#endif - uarms || uarmh || uarmg || uarmf)) ? + pline("Not wearing any accessories.%s", + (iflags.cmdassist + && (uarm || uarmc || uarmu || uarms || uarmh || uarmg + || uarmf)) ? " Use 'T' command to take off armor." : ""); return(0); } @@ -1515,9 +1486,7 @@ boolean noisy; const char *which; which = is_cloak(otmp) ? c_cloak : -#ifdef TOURIST is_shirt(otmp) ? c_shirt : -#endif is_suit(otmp) ? c_suit : 0; if (which && cantweararm(youmonst.data) && /* same exception for cloaks as used in m_dowear() */ @@ -1530,12 +1499,7 @@ boolean noisy; return 0; } - if (welded(uwep) && bimanual(uwep) && - (is_suit(otmp) -#ifdef TOURIST - || is_shirt(otmp) -#endif - )) { + if (welded(uwep) && bimanual(uwep) && (is_suit(otmp) || is_shirt(otmp))) { if (noisy) You("cannot do that while holding your %s.", is_sword(uwep) ? c_sword : c_weapon); @@ -1612,7 +1576,6 @@ boolean noisy; err++; } else *mask = W_ARMG; -#ifdef TOURIST } else if (is_shirt(otmp)) { if (uarm || uarmc || uarmu) { if (uarmu) { @@ -1624,7 +1587,6 @@ boolean noisy; err++; } else *mask = W_ARMU; -#endif } else if (is_cloak(otmp)) { if (uarmc) { if (noisy) already_wearing(an(cloak_simple_name(uarmc))); @@ -1710,9 +1672,7 @@ dowear() } else { if(is_cloak(otmp)) (void) Cloak_on(); if (is_shield(otmp)) (void) Shield_on(); -#ifdef TOURIST if (is_shirt(otmp)) (void) Shirt_on(); -#endif on_msg(otmp); } context.takeoff.mask = context.takeoff.what = 0L; @@ -1857,9 +1817,7 @@ find_ac() if(uarmf) uac -= ARM_BONUS(uarmf); if(uarms) uac -= ARM_BONUS(uarms); if(uarmg) uac -= ARM_BONUS(uarmg); -#ifdef TOURIST if(uarmu) uac -= ARM_BONUS(uarmu); -#endif if(uleft && uleft->otyp == RIN_PROTECTION) uac -= uleft->spe; if(uright && uright->otyp == RIN_PROTECTION) uac -= uright->spe; if (HProtection & INTRINSIC) uac -= u.ublessed; @@ -1965,10 +1923,8 @@ struct monst *victim; otmph = (victim == &youmonst) ? uarmc : which_armor(victim, W_ARMC); if (!otmph) otmph = (victim == &youmonst) ? uarm : which_armor(victim, W_ARM); -#ifdef TOURIST if (!otmph) otmph = (victim == &youmonst) ? uarmu : which_armor(victim, W_ARMU); -#endif otmp = (victim == &youmonst) ? uarmh : which_armor(victim, W_ARMH); if(otmp && (!otmph || !rn2(4))) otmph = otmp; @@ -2085,20 +2041,14 @@ register struct obj *otmp; } } /* special suit and shirt checks */ - if (otmp == uarm -#ifdef TOURIST - || otmp == uarmu -#endif - ) { + if (otmp == uarm || otmp == uarmu) { why = 0; /* the item which prevents disrobing */ if (uarmc && uarmc->cursed) { Sprintf(buf, "remove your %s", cloak_simple_name(uarmc)); why = uarmc; -#ifdef TOURIST } else if (otmp == uarmu && uarm && uarm->cursed) { Sprintf(buf, "remove your %s", c_suit); why = uarm; -#endif } else if (welded(uwep) && bimanual(uwep)) { Sprintf(buf, "release your %s", is_sword(uwep) ? c_sword : @@ -2125,9 +2075,7 @@ register struct obj *otmp; else if(otmp == uarmg) context.takeoff.mask |= WORN_GLOVES; else if(otmp == uarmh) context.takeoff.mask |= WORN_HELMET; else if(otmp == uarms) context.takeoff.mask |= WORN_SHIELD; -#ifdef TOURIST else if(otmp == uarmu) context.takeoff.mask |= WORN_SHIRT; -#endif else if(otmp == uleft) context.takeoff.mask |= LEFT_RING; else if(otmp == uright) context.takeoff.mask |= RIGHT_RING; else if(otmp == uamul) context.takeoff.mask |= WORN_AMUL; @@ -2178,11 +2126,9 @@ do_takeoff() } else if (doff->what == WORN_SHIELD) { otmp = uarms; if (!cursed(otmp)) (void) Shield_off(); -#ifdef TOURIST } else if (doff->what == WORN_SHIRT) { otmp = uarmu; if (!cursed(otmp)) (void) Shirt_off(); -#endif } else if (doff->what == WORN_AMUL) { otmp = uamul; if (!cursed(otmp)) Amulet_off(); @@ -2256,13 +2202,11 @@ take_off(VOID_ARGS) otmp = uarmh; } else if (doff->what == WORN_SHIELD) { otmp = uarms; -#ifdef TOURIST } else if (doff->what == WORN_SHIRT) { otmp = uarmu; /* add the time to take off and put back on armor and/or cloak */ if (uarm) doff->delay += 2 * objects[uarm->otyp].oc_delay; if (uarmc) doff->delay += 2 * objects[uarmc->otyp].oc_delay + 1; -#endif } else if (doff->what == WORN_AMUL) { doff->delay = 1; } else if (doff->what == LEFT_RING) { @@ -2398,13 +2342,11 @@ register struct obj *atmp; surface(u.ux,u.uy)); (void) Armor_gone(); useup(otmp); -#ifdef TOURIST } else if (DESTROY_ARM(uarmu)) { if (donning(otmp)) cancel_don(); Your("shirt crumbles into tiny threads and falls apart!"); (void) Shirt_off(); useup(otmp); -#endif } else if (DESTROY_ARM(uarmh)) { if (donning(otmp)) cancel_don(); Your("%s turns to dust and is blown away!", @@ -2483,7 +2425,6 @@ boolean only_if_known_cursed; /* ignore covering unless known to be cursed */ } return TRUE; } -#ifdef TOURIST /* check for shirt covered by suit and/or cloak */ if (obj == uarmu && ((uarm && BLOCKSACCESS(uarm)) || (uarmc && BLOCKSACCESS(uarmc)))) { @@ -2504,7 +2445,6 @@ boolean only_if_known_cursed; /* ignore covering unless known to be cursed */ } return TRUE; } -#endif /* check for ring covered by gloves */ if ((obj == uleft || obj == uright) && uarmg && BLOCKSACCESS(uarmg)) { if (verb) { diff --git a/src/dog.c b/src/dog.c index 035e5cef7..ff7dd525d 100644 --- a/src/dog.c +++ b/src/dog.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dog.c $Date$ $Revision$ */ +/* NetHack 3.5 dog.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dog.c $Date: 2011/04/15 01:55:42 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -147,9 +148,7 @@ struct monst * makedog() { register struct monst *mtmp; -#ifdef STEED register struct obj *otmp; -#endif const char *petname; int pettype; static int petname_used = 0; @@ -178,7 +177,6 @@ makedog() if(!mtmp) return((struct monst *) 0); /* pets were genocided */ context.startingpet_mid = mtmp->m_id; -#ifdef STEED /* Horses already wear a saddle */ if (pettype == PM_PONY && !!(otmp = mksobj(SADDLE, TRUE, FALSE))) { if (mpickobj(mtmp, otmp)) @@ -189,7 +187,6 @@ makedog() otmp->leashmon = mtmp->m_id; update_mon_intrinsics(mtmp, otmp, TRUE, TRUE); } -#endif if (!petname_used++ && *petname) mtmp = christen_monst(mtmp, petname); @@ -322,10 +319,8 @@ boolean with_you; mtmp->mtrack[0].x = mtmp->mtrack[0].y = 0; mtmp->mtrack[1].x = mtmp->mtrack[1].y = 0; -#ifdef STEED if (mtmp == u.usteed) return; /* don't place steed on the map */ -#endif if (with_you) { /* When a monster accompanies you, sometimes it will arrive at your intended destination and you'll end up next to @@ -448,15 +443,6 @@ boolean with_you; } corpse = mkcorpstat(CORPSE, (struct monst *)0, mtmp->data, xlocale, ylocale, CORPSTAT_NONE); -#ifndef GOLDOBJ - if (mtmp->mgold) { - if (xlocale == 0 && ylocale == 0 && corpse) { - (void) get_obj_location(corpse, &xlocale, &ylocale, 0); - (void) mkgold(mtmp->mgold, xlocale, ylocale); - } - mtmp->mgold = 0L; - } -#endif mongone(mtmp); } } @@ -574,24 +560,20 @@ boolean pets_only; /* true for ascension or final escape */ only if in range. -3. */ (u.uhave.amulet && mtmp->iswiz)) && ((!mtmp->msleeping && mtmp->mcanmove) -#ifdef STEED /* eg if level teleport or new trap, steed has no control to avoid following */ || (mtmp == u.usteed) -#endif ) /* monster won't follow if it hasn't noticed you yet */ && !(mtmp->mstrategy & STRAT_WAITFORU)) { stay_behind = FALSE; if (mtmp->mtrapped) (void)mintrap(mtmp); /* try to escape */ -#ifdef STEED if (mtmp == u.usteed) { /* make sure steed is eligible to accompany hero */ mtmp->mtrapped = 0; /* escape trap */ mtmp->meating = 0; /* terminate eating */ mdrop_special_objs(mtmp); /* drop Amulet */ } else -#endif if (mtmp->meating || mtmp->mtrapped) { if (canseemon(mtmp)) pline("%s is still %s.", Monnam(mtmp), @@ -611,14 +593,12 @@ boolean pets_only; /* true for ascension or final escape */ : "Its"); m_unleash(mtmp, FALSE); } -#ifdef STEED if (mtmp == u.usteed) { /* can't happen unless someone makes a change which scrambles the stay_behind logic above */ impossible("steed left behind?"); dismount_steed(DISMOUNT_GENERIC); } -#endif continue; } if (mtmp->isshk) @@ -979,9 +959,7 @@ boolean was_dead; /* a life-saved monster might be leashed; don't leave it that way if it's no longer tame */ if (mtmp->mleashed) m_unleash(mtmp, TRUE); -#ifdef STEED if (mtmp == u.usteed) dismount_steed(DISMOUNT_THROWN); -#endif } else if (edog) { /* it's still a pet; start a clean pet-slate now */ edog->revivals++; diff --git a/src/dogmove.c b/src/dogmove.c index 58c5a52c7..604c52267 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dogmove.c $Date$ $Revision$ */ +/* NetHack 3.5 dogmove.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dogmove.c $Date: 2012/02/10 09:29:28 $ $Revision: 1.35 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -25,13 +26,6 @@ struct monst *mon; struct obj *obj, *wep, dummy, *pickaxe, *unihorn, *key; -#ifndef TOURIST -#define CREDIT_CARD STRANGE_OBJECT /* avoids messy conditionalization */ -#endif - -#ifndef GOLDOBJ - if (mon->mgold) return &zeroobj; /* pet has something to drop */ -#endif dummy = zeroobj; dummy.otyp = GOLD_PIECE; /* not STRANGE_OBJECT or tools of interest */ dummy.oartifact = 1; /* so real artifact won't override "don't keep it" */ @@ -110,28 +104,16 @@ struct monst *mon; if (!obj->owornmask && obj != wep) return obj; } -#ifndef TOURIST -#undef CREDIT_CARD -#endif - return (struct obj *)0; /* don't drop anything */ } static NEARDATA const char nofetch[] = { BALL_CLASS, CHAIN_CLASS, ROCK_CLASS, 0 }; -#ifndef BARGETHROUGH -STATIC_OVL boolean FDECL(cursed_object_at, (int, int)); -#endif /* not BARGETHROUGH */ - STATIC_VAR xchar gtyp, gx, gy; /* type and position of dog's current goal */ STATIC_PTR void FDECL(wantdoor, (int, int, genericptr_t)); -#ifdef BARGETHROUGH boolean -#else -STATIC_OVL boolean -#endif cursed_object_at(x, y) int x, y; { @@ -353,11 +335,7 @@ register struct edog *edog; stop_occupation(); } else if (monstermoves > edog->hungrytime + 750 || mtmp->mhp < 1) { dog_died: - if (mtmp->mleashed -#ifdef STEED - && mtmp != u.usteed -#endif - ) + if (mtmp->mleashed && mtmp != u.usteed) Your("leash goes slack."); else if (cansee(mtmp->mx, mtmp->my)) pline("%s starves.", Monnam(mtmp)); @@ -452,11 +430,9 @@ int after, udist, whappr; xchar otyp; int appr; -#ifdef STEED /* Steeds don't move on their own will */ if (mtmp == u.usteed) return (-2); -#endif omx = mtmp->mx; omy = mtmp->my; @@ -600,9 +576,7 @@ register int after; /* this is extra fast monster movement */ struct obj *obj = (struct obj *) 0; xchar otyp; boolean has_edog, cursemsg[9], do_eat = FALSE; -#ifdef BARGETHROUGH boolean better_with_displacing = FALSE; -#endif xchar nix, niy; /* position mtmp is (considering) moving to */ register int nx, ny; /* temporary coordinates */ xchar cnt, uncursedcnt, chcnt; @@ -625,7 +599,6 @@ register int after; /* this is extra fast monster movement */ if (has_edog && dog_hunger(mtmp, edog)) return(2); /* starved */ udist = distu(omx,omy); -#ifdef STEED /* Let steeds eat and maybe throw rider during Conflict */ if (mtmp == u.usteed) { if (Conflict && !resist(mtmp, RING_CLASS, 0, 0)) { @@ -633,10 +606,9 @@ register int after; /* this is extra fast monster movement */ return (1); } udist = 1; - } else -#endif - /* maybe we tamed him while being swallowed --jgm */ - if (!udist) return(0); + } else if (!udist) + /* maybe we tamed him while being swallowed --jgm */ + return(0); nix = omx; /* set before newdogpos */ niy = omy; @@ -660,9 +632,7 @@ register int after; /* this is extra fast monster movement */ if (passes_walls(mtmp->data)) allowflags |= (ALLOW_ROCK | ALLOW_WALL); if (passes_bars(mtmp->data)) allowflags |= ALLOW_BARS; if (throws_rocks(mtmp->data)) allowflags |= ALLOW_ROCK; -#ifdef BARGETHROUGH if (is_displacer(mtmp->data)) allowflags |= ALLOW_MDISP; -#endif if (Conflict && !resist(mtmp, RING_CLASS, 0, 0)) { allowflags |= ALLOW_U; if (!has_edog) { @@ -688,9 +658,7 @@ register int after; /* this is extra fast monster movement */ } if (is_giant(mtmp->data)) allowflags |= BUSTDOOR; if (tunnels(mtmp->data) -#ifdef REINCARNATION && !Is_rogue_level(&u.uz) /* same restriction as m_move() */ -#endif ) allowflags |= ALLOW_DIG; cnt = mfndpos(mtmp, poss, info, allowflags); @@ -701,19 +669,13 @@ register int after; /* this is extra fast monster movement */ uncursedcnt = 0; for (i = 0; i < cnt; i++) { nx = poss[i].x; ny = poss[i].y; -#ifdef BARGETHROUGH if (MON_AT(nx,ny) && !((info[i] & ALLOW_M) || info[i] & ALLOW_MDISP)) continue; -#else - if (MON_AT(nx,ny) && !(info[i] & ALLOW_M)) continue; -#endif if (cursed_object_at(nx, ny)) continue; uncursedcnt++; } -#ifdef BARGETHROUGH better_with_displacing = should_displace(mtmp,poss,info,cnt,gx,gy); -#endif chcnt = 0; chi = -1; @@ -767,7 +729,6 @@ register int after; /* this is extra fast monster movement */ } return 0; } -#ifdef BARGETHROUGH if ((info[i] & ALLOW_MDISP) && MON_AT(nx, ny) && better_with_displacing && !undesirable_disp(mtmp,nx,ny)) { @@ -777,7 +738,6 @@ register int after; /* this is extra fast monster movement */ if (mstatus & MM_DEF_DIED) return 2; return 0; } -#endif /* BARGETHROUGH */ { /* Dog avoids harmful traps, but perhaps it has to pass one * in order to follow player. (Non-harmful traps do not @@ -1008,9 +968,7 @@ static struct qmchoices { {PM_HOUSECAT, 0, PM_DOG, M_AP_MONSTER}, {PM_LARGE_CAT, 0, PM_LARGE_DOG, M_AP_MONSTER}, {PM_HOUSECAT, 0, PM_GIANT_RAT, M_AP_MONSTER}, -#ifdef SINKS {0, S_DOG, SINK, M_AP_FURNITURE}, /* sorry, no fire hydrants in NetHack */ -#endif {0, 0, TRIPE_RATION, M_AP_OBJECT}, /* leave this at end */ }; diff --git a/src/dokick.c b/src/dokick.c index 9e76828e3..b17379e07 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dokick.c $Date$ $Revision$ */ +/* NetHack 3.5 dokick.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dokick.c $Date: 2012/05/06 02:29:33 $ $Revision: 1.78 $ */ /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ @@ -321,11 +322,7 @@ register struct obj *gold; verbalize("Thank you for your contribution."); else verbalize("Thanks, scum!"); } else if (mtmp->isgd) { -#ifndef GOLDOBJ - umoney = u.ugold; -#else umoney = money_cnt(invent); -#endif /* Some of these are iffy, because a hostile guard won't become peaceful and resume leading hero out of the vault. If he did do that, player @@ -351,11 +348,7 @@ register struct obj *gold; goldreqd = 750L; if (goldreqd) { -#ifndef GOLDOBJ - umoney = u.ugold; -#else umoney = money_cnt(invent); -#endif if (value > goldreqd + (umoney + u.ulevel * rn2(5)) / ACURR(A_CHA)) mtmp->mpeaceful = TRUE; @@ -687,9 +680,7 @@ char *buf; else if (IS_THRONE(maploc->typ)) what = "a throne"; else if (IS_FOUNTAIN(maploc->typ)) what = "a fountain"; else if (IS_GRAVE(maploc->typ)) what = "a headstone"; -#ifdef SINKS else if (IS_SINK(maploc->typ)) what = "a sink"; -#endif else if (IS_ALTAR(maploc->typ)) what = "an altar"; else if (IS_DRAWBRIDGE(maploc->typ)) what = "a drawbridge"; else if (maploc->typ == STAIRS) what = "the stairs"; @@ -715,7 +706,6 @@ dokick() } else if (verysmall(youmonst.data)) { You("are too small to do any kicking."); no_kick = TRUE; -#ifdef STEED } else if (u.usteed) { if (yn_function("Kick your steed?", ynchars, 'y') == 'y') { You("kick %s.", mon_nam(u.usteed)); @@ -724,7 +714,6 @@ dokick() } else { return 0; } -#endif } else if (Wounded_legs) { /* note: jump() has similar code */ long wl = (EWounded_legs & BOTH_SIDES); @@ -1055,7 +1044,6 @@ dokick() } goto ouch; } -#ifdef SINKS if(IS_SINK(maploc->typ)) { int gend = poly_gender(); short washerndx = (gend == 1 || (gend == 2 && rn2(2))) ? @@ -1108,7 +1096,6 @@ dokick() } goto ouch; } -#endif if (maploc->typ == STAIRS || maploc->typ == LADDER || IS_STWALL(maploc->typ)) { if(!IS_STWALL(maploc->typ) && maploc->ladder == LA_DOWN) @@ -1461,10 +1448,7 @@ boolean shop_floor_obj; const char *result; if (objects[otmp->otyp].oc_material == GLASS -#ifdef TOURIST - || otmp->otyp == EXPENSIVE_CAMERA -#endif - ) { + || otmp->otyp == EXPENSIVE_CAMERA) { if (otmp->otyp == MIRROR) change_luck(-2); result = "crash"; diff --git a/src/dothrow.c b/src/dothrow.c index 9ebd06c9a..aedb4fc40 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dothrow.c $Date$ $Revision$ */ +/* NetHack 3.5 dothrow.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dothrow.c $Date: 2013/11/05 00:57:55 $ $Revision: 1.89 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -44,18 +45,6 @@ int shotlimit; boolean twoweap, weakmultishot; /* ask "in what direction?" */ -#ifndef GOLDOBJ - if (!getdir((char *)0)) { - if (obj->oclass == COIN_CLASS) { - u.ugold += obj->quan; - context.botl = 1; - dealloc_obj(obj); - } - return(0); - } - - if(obj->oclass == COIN_CLASS) return(throw_gold(obj)); -#else if (!getdir((char *)0)) { /* obj might need to be merged back into the singular gold object */ freeinv(obj); @@ -72,7 +61,6 @@ int shotlimit; possibly using a sling. */ if(obj->oclass == COIN_CLASS && obj != uquiver) return(throw_gold(obj)); -#endif if(!canletgo(obj,"throw")) return(0); @@ -1001,13 +989,11 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */ u.twoweap = twoweap; } else if (u.dz < 0) { (void) toss_up(obj, rn2(5) && !Underwater); -#ifdef STEED } else if (u.dz > 0 && u.usteed && obj->oclass == POTION_CLASS && rn2(6)) { /* alternative to prayer or wand of opening/spell of knock for dealing with cursed saddle: throw holy water > */ potionhit(u.usteed, obj, TRUE); -#endif } else { hitfloor(obj); } @@ -1776,9 +1762,7 @@ struct obj *obj; obj->oclass != GEM_CLASS) return 1; switch (obj->oclass == POTION_CLASS ? POT_WATER : obj->otyp) { -#ifdef TOURIST case EXPENSIVE_CAMERA: -#endif case POT_WATER: /* really, all potions */ case EGG: case CREAM_PIE: @@ -1807,9 +1791,7 @@ boolean in_view; case LENSES: case MIRROR: case CRYSTAL_BALL: -#ifdef TOURIST case EXPENSIVE_CAMERA: -#endif to_pieces = " into a thousand pieces"; /*FALLTHRU*/ case POT_WATER: /* really, all potions */ @@ -1838,34 +1820,18 @@ throw_gold(obj) struct obj *obj; { int range, odx, ody; -#ifndef GOLDOBJ - long zorks = obj->quan; -#endif register struct monst *mon; if(!u.dx && !u.dy && !u.dz) { -#ifndef GOLDOBJ - u.ugold += obj->quan; - context.botl = 1; - dealloc_obj(obj); -#endif You("cannot throw gold at yourself."); return(0); } -#ifdef GOLDOBJ freeinv(obj); -#endif if(u.uswallow) { pline(is_animal(u.ustuck->data) ? "%s in the %s's entrails." : "%s into %s.", -#ifndef GOLDOBJ - "The gold disappears", mon_nam(u.ustuck)); - u.ustuck->mgold += zorks; - dealloc_obj(obj); -#else "The money disappears", mon_nam(u.ustuck)); add_to_minv(u.ustuck, obj); -#endif return(1); } diff --git a/src/drawing.c b/src/drawing.c index eecd9fe07..a5cc10d46 100644 --- a/src/drawing.c +++ b/src/drawing.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 drawing.c $Date$ $Revision$ */ +/* NetHack 3.5 drawing.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 drawing.c $Date: 2009/05/06 10:46:09 $ $Revision: 1.28 $ */ /* SCCS Id: @(#)drawing.c 3.5 2007/07/30 */ /* Copyright (c) NetHack Development Team 1992. */ /* NetHack may be freely redistributed. See license for details. */ @@ -18,17 +19,13 @@ #define C(n) #endif -#ifdef LOADSYMSETS struct symsetentry symset[NUM_GRAPHICS]; -#endif int currentgraphics = 0; nhsym showsyms[SYM_MAX] = DUMMY; /* symbols to be displayed */ -nhsym l_syms[SYM_MAX] = DUMMY; /* loaded symbols */ -#ifdef REINCARNATION -nhsym r_syms[SYM_MAX] = DUMMY; /* rogue symbols */ -#endif +nhsym l_syms[SYM_MAX] = DUMMY; /* loaded symbols */ +nhsym r_syms[SYM_MAX] = DUMMY; /* rogue symbols */ nhsym warnsyms[WARNCOUNT] = DUMMY; /* the current warning display symbols */ const char invisexplain[] = "remembered, unseen, creature"; @@ -168,11 +165,7 @@ const struct symdef defsyms[MAXPCHARS] = { {'_', "altar", C(CLR_GRAY)}, /* altar */ {'|', "grave", C(CLR_GRAY)}, /* grave */ {'\\', "opulent throne",C(HI_GOLD)}, /* throne */ -#ifdef SINKS {'#', "sink", C(CLR_GRAY)}, /* sink */ -#else - {'#', "", C(CLR_GRAY)}, /* sink */ -#endif /*30*/ {'{', "fountain", C(CLR_BLUE)}, /* fountain */ {'}', "water", C(CLR_BLUE)}, /* pool */ {'.', "ice", C(CLR_CYAN)}, /* ice */ @@ -237,7 +230,6 @@ const struct symdef defsyms[MAXPCHARS] = { {'/', "", C(CLR_ORANGE)}, /* explosion bottom right */ }; -#ifdef REINCARNATION /* default rogue level symbols */ static const uchar def_r_oc_syms[MAXOCLASSES] = { /* 0*/ '\0', @@ -259,7 +251,6 @@ static const uchar def_r_oc_syms[MAXOCLASSES] = { CHAIN_SYM, VENOM_SYM }; -#endif #undef C @@ -309,10 +300,10 @@ def_char_to_monclass(ch) * Sets the current display symbols, the * loadable symbols to the default NetHack * symbols, including the r_syms rogue level - * symbols if REINCARNATION is defined. - * This would typically be done immediately - * after execution begins. Any previously - * loaded external symbol sets are discarded. + * symbols. This would typically be done + * immediately after execution begins. Any + * previously loaded external symbol sets are + * discarded. * * switch_symbols(arg) * Called to swap in new current display symbols @@ -353,9 +344,7 @@ init_symbols() { init_l_symbols(); init_showsyms(); -#ifdef REINCARNATION init_r_symbols(); -#endif } void @@ -408,12 +397,9 @@ init_l_symbols() l_syms[i + SYM_OFF_X] = DEF_INVISIBLE; } -#ifdef LOADSYMSETS clear_symsetentry(PRIMARY, FALSE); -#endif } -#ifdef REINCARNATION void init_r_symbols() { @@ -443,15 +429,12 @@ init_r_symbols() r_syms[i + SYM_OFF_X] = DEF_INVISIBLE; } -# ifdef LOADSYMSETS clear_symsetentry(ROGUESET, FALSE); symset[ROGUESET].nocolor = 1; /* default on Rogue level is no color * but some symbol sets can * override that */ -# endif } -#endif /*REINCARNATION*/ void assign_graphics(whichset) @@ -460,7 +443,6 @@ int whichset; register int i; switch(whichset) { -# ifdef REINCARNATION case ROGUESET: /* Adjust graphics display characters on Rogue levels */ @@ -472,7 +454,6 @@ int whichset; # endif currentgraphics = ROGUESET; break; -# endif case PRIMARY: default: @@ -512,7 +493,6 @@ int nondefault; init_symbols(); } -#ifdef LOADSYMSETS void update_l_symset(symp, val) struct symparse *symp; @@ -521,7 +501,6 @@ int val; l_syms[symp->idx] = val; } -# ifdef REINCARNATION void update_r_symset(symp, val) struct symparse *symp; @@ -529,7 +508,6 @@ int val; { r_syms[symp->idx] = val; } -# endif /* REINCARNATION */ void clear_symsetentry(which_set, name_too) @@ -547,7 +525,6 @@ boolean name_too; /* initialize restriction bits */ symset[which_set].primary = 0; symset[which_set].rogue = 0; - symset[which_set].unicode = 0; if (name_too) { if (symset[which_set].name) @@ -585,7 +562,6 @@ const char *known_handling[] = { const char *known_restrictions[] = { "primary", "rogue", - "unicode", (const char *)0, }; @@ -770,7 +746,6 @@ struct symparse loadsyms[] = { {SYM_OTH, SYM_INVISIBLE + SYM_OFF_X, "S_invisible"}, {0,0,(const char *)0} /* fence post */ }; -#endif /*LOADSYMSETS*/ /*drawing.c*/ diff --git a/src/dungeon.c b/src/dungeon.c index e9b66e194..4c8e6beeb 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dungeon.c $Date$ $Revision$ */ +/* NetHack 3.5 dungeon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dungeon.c $Date: 2012/04/14 08:31:05 $ $Revision: 1.34 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -49,16 +50,13 @@ STATIC_DCL void FDECL(init_level, (int,int,struct proto_dungeon *)); STATIC_DCL int FDECL(possible_places, (int, boolean *, struct proto_dungeon *)); STATIC_DCL xchar FDECL(pick_level, (boolean *, int)); STATIC_DCL boolean FDECL(place_level, (int, struct proto_dungeon *)); -#ifdef WIZARD STATIC_DCL boolean FDECL(unplaced_floater, (struct dungeon *)); STATIC_DCL boolean FDECL(unreachable_level, (d_level *,BOOLEAN_P)); STATIC_DCL void FDECL(tport_menu, (winid,char *,struct lchoice *, d_level *,BOOLEAN_P)); STATIC_DCL const char *FDECL(br_string, (int)); STATIC_DCL void FDECL(print_branch, (winid, int, int, int, BOOLEAN_P, struct lchoice *)); -#endif -#ifdef DUNGEON_OVERVIEW mapseen *mapseenchn = (struct mapseen *)0; STATIC_DCL mapseen *FDECL(load_mapseen, (int)); STATIC_DCL void FDECL(save_mapseen, (int, mapseen *)); @@ -71,7 +69,6 @@ STATIC_DCL const char *FDECL(br_string2, (branch *)); STATIC_DCL const char *FDECL(endgamelevelname, (char *,int)); STATIC_DCL const char *FDECL(shop_string, (int)); STATIC_DCL char *FDECL(tunesuffix, (mapseen *,char *)); -#endif /* DUNGEON_OVERVIEW */ #ifdef DEBUG #define DD dungeons[i] @@ -84,6 +81,8 @@ dumpit() s_level *x; branch *br; + if (!showdebug()) return; + for(i = 0; i < n_dgns; i++) { fprintf(stderr, "\n#%d \"%s\" (%s):\n", i, DD.dname, DD.proto); @@ -134,9 +133,7 @@ save_dungeon(fd, perform_write, free_data) boolean perform_write, free_data; { branch *curr, *next; -#ifdef DUNGEON_OVERVIEW mapseen *curr_ms, *next_ms; -#endif int count; if (perform_write) { @@ -158,14 +155,12 @@ save_dungeon(fd, perform_write, free_data) (unsigned)count * sizeof (struct linfo)); bwrite(fd, (genericptr_t) &inv_pos, sizeof inv_pos); -#ifdef DUNGEON_OVERVIEW for (count = 0, curr_ms = mapseenchn; curr_ms; curr_ms = curr_ms->next) count++; bwrite(fd, (genericptr_t) &count, sizeof(count)); for (curr_ms = mapseenchn; curr_ms; curr_ms = curr_ms->next) save_mapseen(fd, curr_ms); -#endif /* DUNGEON_OVERVIEW */ } if (free_data) { @@ -174,7 +169,6 @@ save_dungeon(fd, perform_write, free_data) free((genericptr_t) curr); } branches = 0; -#ifdef DUNGEON_OVERVIEW for (curr_ms = mapseenchn; curr_ms; curr_ms = next_ms) { next_ms = curr_ms->next; if (curr_ms->custom) @@ -182,7 +176,6 @@ save_dungeon(fd, perform_write, free_data) free((genericptr_t) curr_ms); } mapseenchn = 0; -#endif /* DUNGEON_OVERVIEW */ } } @@ -193,9 +186,7 @@ restore_dungeon(fd) { branch *curr, *last; int count, i; -#ifdef DUNGEON_OVERVIEW mapseen *curr_ms, *last_ms; -#endif mread(fd, (genericptr_t) &n_dgns, sizeof(n_dgns)); mread(fd, (genericptr_t) dungeons, sizeof(dungeon) * (unsigned)n_dgns); @@ -222,7 +213,6 @@ restore_dungeon(fd) mread(fd, (genericptr_t) level_info, (unsigned)count*sizeof(struct linfo)); mread(fd, (genericptr_t) &inv_pos, sizeof inv_pos); -#ifdef DUNGEON_OVERVIEW mread(fd, (genericptr_t) &count, sizeof(count)); last_ms = (mapseen *) 0; for (i = 0; i < count; i++) { @@ -234,7 +224,6 @@ restore_dungeon(fd) mapseenchn = curr_ms; last_ms = curr_ms; } -#endif /* DUNGEON_OVERVIEW */ } static void @@ -532,10 +521,7 @@ init_level(dgn, proto_index, pd) struct tmplevel *tlevel = &pd->tmplevel[proto_index]; pd->final_lev[proto_index] = (s_level *) 0; /* no "real" level */ -#ifdef WIZARD - if (!wizard) -#endif - if (tlevel->chance <= rn2(100)) return; + if (!wizard && tlevel->chance <= rn2(100)) return; pd->final_lev[proto_index] = new_level = (s_level *) alloc(sizeof(s_level)); @@ -679,9 +665,7 @@ struct level_map { { "medusa", &medusa_level }, { "oracle", &oracle_level }, { "orcus", &orcus_level }, -#ifdef REINCARNATION { "rogue", &rogue_level }, -#endif { "sanctum", &sanctum_level }, { "valley", &valley_level }, { "water", &water_level }, @@ -755,10 +739,8 @@ init_dungeons() /* initialize the "dungeon" structs */ for (i = 0; i < n_dgns; i++) { Fread((genericptr_t)&pd.tmpdungeon[i], sizeof(struct tmpdungeon), 1, dgn_file); -#ifdef WIZARD - if(!wizard) -#endif - if(pd.tmpdungeon[i].chance && (pd.tmpdungeon[i].chance <= rn2(100))) { + if(!wizard && pd.tmpdungeon[i].chance + && (pd.tmpdungeon[i].chance <= rn2(100))) { int j; /* skip over any levels or branches */ @@ -1147,10 +1129,8 @@ int x, y; #ifdef CLIPPING cliparound(u.ux, u.uy); #endif -#ifdef STEED /* ridden steed always shares hero's location */ if (u.usteed) u.usteed->mx = u.ux, u.usteed->my = u.uy; -#endif /* when changing levels, don't leave old position set with stale values from previous level */ if (!on_level(&u.uz, &u.uz0)) u.ux0 = u.ux, u.uy0 = u.uy; @@ -1557,9 +1537,7 @@ const char *nam; (u.uz.dnum == medusa_level.dnum && dlev.dnum == valley_level.dnum)) && ( /* either wizard mode or else seen and not forgotten */ -#ifdef WIZARD wizard || -#endif (level_info[idx].flags & (FORGOTTEN|VISITED)) == VISITED)) { lev = depth(&slev->dlevel); } @@ -1573,9 +1551,7 @@ const char *nam; idxtoo = (idx >> 8) & 0x00FF; idx &= 0x00FF; if ( /* either wizard mode, or else _both_ sides of branch seen */ -#ifdef WIZARD wizard || -#endif ((level_info[idx].flags & (FORGOTTEN|VISITED)) == VISITED && (level_info[idxtoo].flags & (FORGOTTEN|VISITED)) == VISITED)) { if (ledger_to_dnum(idxtoo) == u.uz.dnum) idx = idxtoo; @@ -1588,8 +1564,6 @@ const char *nam; return lev; } -#ifdef WIZARD - STATIC_OVL boolean unplaced_floater(dptr) struct dungeon *dptr; @@ -1836,9 +1810,7 @@ xchar *rdgn; destroy_nhwindow(win); return 0; } -#endif /* WIZARD */ -#ifdef DUNGEON_OVERVIEW /* Record that the player knows about a branch from a level. This function * will determine whether or not it was a "real" branch that was taken. * This function should not be called for a transition done via level @@ -2087,9 +2059,7 @@ mapseen *mptr; if (mptr->flags.unreachable || mptr->flags.forgot) return FALSE; /* level is of interest if it has an auto-generated annotation */ if (mptr->flags.oracle || mptr->flags.bigroom || -# ifdef REINCARNATION mptr->flags.roguelevel || -# endif mptr->flags.castle || mptr->flags.valley || mptr->flags.msanctum) return TRUE; /* when in Sokoban, list all sokoban levels visited; when not in it, @@ -2152,9 +2122,7 @@ recalc_mapseen() mptr->flags.bigroom = Is_bigroom(&u.uz); else if (mptr->flags.forgot) mptr->flags.bigroom = 0; -# ifdef REINCARNATION mptr->flags.roguelevel = Is_rogue_level(&u.uz); -# endif mptr->flags.oracle = 0; /* recalculated during room traversal below */ mptr->flags.castletune = 0; /* flags.castle, flags.valley, flags.msanctum retain previous value */ @@ -2580,7 +2548,6 @@ boolean printdun; */ Sprintf(buf, "%sLevel %d:", TAB, i); -#ifdef WIZARD /* wizmode prints out proto dungeon names for clarity */ if (wizard) { s_level *slev; @@ -2588,7 +2555,6 @@ boolean printdun; if ((slev = Is_special(&mptr->lev)) != 0) Sprintf(eos(buf), " [%s]", slev->proto); } -#endif /* [perhaps print custom annotation on its own line when it's long] */ if (mptr->custom) Sprintf(eos(buf), " (%s)", mptr->custom); @@ -2651,10 +2617,8 @@ boolean printdun; mptr->flags.sokosolved ? "Solved" : "Unsolved"); } else if (mptr->flags.bigroom) { Sprintf(buf, "%sA very big room.", PREFIX); -# ifdef REINCARNATION } else if (mptr->flags.roguelevel) { Sprintf(buf, "%sA primitive area.", PREFIX); -# endif } else if (on_level(&mptr->lev, &qstart_level)) { Sprintf(buf, "%sHome%s.", PREFIX, mptr->flags.unreachable ? " (no way back...)" : ""); @@ -2720,6 +2684,5 @@ boolean printdun; } } } -#endif /* DUNGEON_OVERVIEW */ /*dungeon.c*/ diff --git a/src/eat.c b/src/eat.c index 8aa7f5da1..320fa2351 100644 --- a/src/eat.c +++ b/src/eat.c @@ -1,19 +1,10 @@ -/* NetHack 3.5 eat.c $Date$ $Revision$ */ +/* NetHack 3.5 eat.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 eat.c $Date: 2012/02/01 00:49:16 $ $Revision: 1.116 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -/* #define DEBUG */ /* uncomment to enable new eat code debugging */ - -#ifdef DEBUG -# ifdef WIZARD -#define debugpline if (wizard) pline -# else -#define debugpline pline -# endif -#endif - STATIC_PTR int NDECL(eatmdone); STATIC_PTR int NDECL(eatfood); STATIC_PTR void FDECL(costly_tin, (int)); @@ -293,15 +284,11 @@ recalc_wt() { struct obj *piece = context.victual.piece; -#ifdef DEBUG debugpline("Old weight = %d", piece->owt); debugpline("Used time = %d, Req'd time = %d", context.victual.usedtime, context.victual.reqtime); -#endif piece->owt = weight(piece); -#ifdef DEBUG debugpline("New weight = %d", piece->owt); -#endif } void @@ -311,9 +298,7 @@ reset_eat() /* called when eating interrupted by an event */ * the round is spent eating. */ if(context.victual.eating && !context.victual.doreset) { -#ifdef DEBUG debugpline("reset_eat..."); -#endif context.victual.doreset = TRUE; } return; @@ -328,9 +313,7 @@ register struct obj *otmp; (void) splitobj(otmp, otmp->quan - 1L); else otmp = splitobj(otmp, 1L); -#ifdef DEBUG debugpline("split object,"); -#endif } if (!otmp->oeaten) { @@ -391,9 +374,7 @@ struct obj *old_obj, *new_obj; STATIC_OVL void do_reset_eat() { -#ifdef DEBUG debugpline("do_reset_eat..."); -#endif if (context.victual.piece) { context.victual.o_id = 0; context.victual.piece = touchfood(context.victual.piece); @@ -734,57 +715,39 @@ register struct permonst *ptr; switch (type) { case FIRE_RES: res = (ptr->mconveys & MR_FIRE) != 0; -#ifdef DEBUG if (res) debugpline("can get fire resistance"); -#endif break; case SLEEP_RES: res = (ptr->mconveys & MR_SLEEP) != 0; -#ifdef DEBUG if (res) debugpline("can get sleep resistance"); -#endif break; case COLD_RES: res = (ptr->mconveys & MR_COLD) != 0; -#ifdef DEBUG if (res) debugpline("can get cold resistance"); -#endif break; case DISINT_RES: res = (ptr->mconveys & MR_DISINT) != 0; -#ifdef DEBUG if (res) debugpline("can get disintegration resistance"); -#endif break; case SHOCK_RES: /* shock (electricity) resistance */ res = (ptr->mconveys & MR_ELEC) != 0; -#ifdef DEBUG if (res) debugpline("can get shock resistance"); -#endif break; case POISON_RES: res = (ptr->mconveys & MR_POISON) != 0; -#ifdef DEBUG if (res) debugpline("can get poison resistance"); -#endif break; case TELEPORT: res = can_teleport(ptr); -#ifdef DEBUG if (res) debugpline("can get teleport"); -#endif break; case TELEPORT_CONTROL: res = control_teleport(ptr); -#ifdef DEBUG if (res) debugpline("can get teleport control"); -#endif break; case TELEPAT: res = telepathic(ptr); -#ifdef DEBUG if (res) debugpline("can get telepathy"); -#endif break; default: /* res stays 0 */ @@ -803,9 +766,7 @@ register struct permonst *ptr; { register int chance; -#ifdef DEBUG debugpline("Attempting to give intrinsic %d", type); -#endif /* some intrinsics are easier to get than others */ switch (type) { case POISON_RES: @@ -834,9 +795,7 @@ register struct permonst *ptr; switch (type) { case FIRE_RES: -#ifdef DEBUG debugpline("Trying to give fire resistance"); -#endif if(!(HFire_resistance & FROMOUTSIDE)) { You(Hallucination ? "be chillin'." : "feel a momentary chill."); @@ -844,27 +803,21 @@ register struct permonst *ptr; } break; case SLEEP_RES: -#ifdef DEBUG debugpline("Trying to give sleep resistance"); -#endif if(!(HSleep_resistance & FROMOUTSIDE)) { You_feel("wide awake."); HSleep_resistance |= FROMOUTSIDE; } break; case COLD_RES: -#ifdef DEBUG debugpline("Trying to give cold resistance"); -#endif if(!(HCold_resistance & FROMOUTSIDE)) { You_feel("full of hot air."); HCold_resistance |= FROMOUTSIDE; } break; case DISINT_RES: -#ifdef DEBUG debugpline("Trying to give disintegration resistance"); -#endif if(!(HDisint_resistance & FROMOUTSIDE)) { You_feel(Hallucination ? "totally together, man." : @@ -873,9 +826,7 @@ register struct permonst *ptr; } break; case SHOCK_RES: /* shock (electricity) resistance */ -#ifdef DEBUG debugpline("Trying to give shock resistance"); -#endif if(!(HShock_resistance & FROMOUTSIDE)) { if (Hallucination) You_feel("grounded in reality."); @@ -885,9 +836,7 @@ register struct permonst *ptr; } break; case POISON_RES: -#ifdef DEBUG debugpline("Trying to give poison resistance"); -#endif if(!(HPoison_resistance & FROMOUTSIDE)) { You_feel(Poison_resistance ? "especially healthy." : "healthy."); @@ -895,9 +844,7 @@ register struct permonst *ptr; } break; case TELEPORT: -#ifdef DEBUG debugpline("Trying to give teleport"); -#endif if(!(HTeleportation & FROMOUTSIDE)) { You_feel(Hallucination ? "diffuse." : "very jumpy."); @@ -905,9 +852,7 @@ register struct permonst *ptr; } break; case TELEPORT_CONTROL: -#ifdef DEBUG debugpline("Trying to give teleport control"); -#endif if(!(HTeleport_control & FROMOUTSIDE)) { You_feel(Hallucination ? "centered in your personal space." : @@ -916,9 +861,7 @@ register struct permonst *ptr; } break; case TELEPAT: -#ifdef DEBUG debugpline("Trying to give telepathy"); -#endif if(!(HTelepat & FROMOUTSIDE)) { You_feel(Hallucination ? "in touch with the cosmos." : @@ -929,9 +872,7 @@ register struct permonst *ptr; } break; default: -#ifdef DEBUG debugpline("Tried to give an impossible intrinsic"); -#endif break; } } @@ -1016,10 +957,8 @@ register int pm; u.uconduct.polyselfs++; /* you're changing form */ You_cant("resist the temptation to mimic %s.", Hallucination ? "an orange" : "a pile of gold"); -#ifdef STEED /* A pile of gold can't ride. */ if (u.usteed) dismount_steed(DISMOUNT_FELL); -#endif nomul(-tmp); Sprintf(buf, Hallucination ? "You suddenly dread being peeled and mimic %s again!" : @@ -1064,9 +1003,7 @@ register int pm; case PM_DISENCHANTER: /* picks an intrinsic at random and removes it; there's no feedback if hero already lacks the chosen ability */ -#ifdef DEBUG debugpline("using attrcurse to strip an intrinsic"); -#endif attrcurse(); break; case PM_MIND_FLAYER: @@ -1106,9 +1043,7 @@ register int pm; if (conveys_STR) { count = 1; tmp = -1; /* use -1 as fake prop index for STR */ -#ifdef DEBUG debugpline("\"Intrinsic\" strength, %d", tmp); -#endif } for (i = 1; i <= LAST_PROP; i++) { if (!intrinsic_possible(i, ptr)) continue; @@ -1118,9 +1053,7 @@ register int pm; of keeping the old choice (note that 1 in 1 and 0 in 1 are what we want for the first candidate) */ if (!rn2(count)) { -#ifdef DEBUG debugpline("Intrinsic %d replacing %d", i, tmp); -#endif tmp = i; } } @@ -1539,9 +1472,7 @@ struct obj *obj; what = "you lose control of", where = "yourself"; else what = "you slap against the", where = -#ifdef STEED (u.usteed) ? "saddle" : -#endif surface(u.ux,u.uy); pline_The("world spins and %s %s.", what, where); incr_itimeout(&HDeaf, duration); @@ -1666,13 +1597,11 @@ start_eating(otmp) /* called as you start to eat */ { const char *old_nomovemsg, *save_nomovemsg; -#ifdef DEBUG - debugpline("start_eating: %lx (victual = %lx)", otmp, context.victual.piece); + debugpline("start_eating: %p (victual = %p)", otmp, context.victual.piece); debugpline("reqtime = %d", context.victual.reqtime); debugpline("(original reqtime = %d)", objects[otmp->otyp].oc_delay); debugpline("nmod = %d", context.victual.nmod); debugpline("oeaten = %d", otmp->oeaten); -#endif context.victual.fullwarn = context.victual.doreset = FALSE; context.victual.eating = TRUE; @@ -1992,13 +1921,8 @@ eatspecial() /* called after eating non-food */ context.victual.o_id = 0; context.victual.eating = 0; if (otmp->oclass == COIN_CLASS) { -#ifdef GOLDOBJ if (carried(otmp)) useupall(otmp); -#else - if (otmp->where == OBJ_FREE) - dealloc_obj(otmp); -#endif else useupf(otmp, otmp->quan); vault_gd_watching(GD_EATGOLD); @@ -2336,11 +2260,7 @@ doeat() /* generic "eat" command funtion (see cmd.c) */ } else if (!is_edible(otmp)) { You("cannot eat that!"); return 0; - } else if ((otmp->owornmask & (W_ARMOR|W_TOOL|W_AMUL -#ifdef STEED - |W_SADDLE -#endif - )) != 0) { + } else if ((otmp->owornmask & (W_ARMOR|W_TOOL|W_AMUL|W_SADDLE)) != 0) { /* let them eat rings */ You_cant("eat %s you're wearing.", something); return 0; @@ -2521,15 +2441,11 @@ doeat() /* generic "eat" command funtion (see cmd.c) */ if (otmp->otyp == CORPSE) basenutrit = mons[otmp->corpsenm].cnutrit; else basenutrit = objects[otmp->otyp].oc_nutrition; -#ifdef DEBUG debugpline("before rounddiv: context.victual.reqtime == %d", context.victual.reqtime); debugpline("oeaten == %d, basenutrit == %d", otmp->oeaten, basenutrit); -#endif context.victual.reqtime = (basenutrit == 0 ? 0 : rounddiv(context.victual.reqtime * (long)otmp->oeaten, basenutrit)); -#ifdef DEBUG debugpline("after rounddiv: context.victual.reqtime == %d", context.victual.reqtime); -#endif /* calculate the modulo value (nutrit. units per round eating) * note: this isn't exact - you actually lose a little nutrition * due to this method. @@ -2631,9 +2547,7 @@ register int num; { /* See comments in newuhs() for discussion on force_save_hs */ boolean iseating = (occupation == eatfood) || force_save_hs; -#ifdef DEBUG debugpline("lesshungry(%d)", num); -#endif u.uhunger += num; if(u.uhunger >= 2000) { if (!iseating || context.victual.canchoke) { @@ -2843,9 +2757,7 @@ floorfood(verb,corpsecheck) /* get food from floor or pack */ /* if we can't touch floor objects then use invent food only */ if (!can_reach_floor(TRUE) || -#ifdef STEED (feeding && u.usteed) || /* can't eat off floor while riding */ -#endif (is_pool_or_lava(u.ux, u.uy) && (Wwalking || is_clinger(youmonst.data) || (Flying && !Breathless)))) diff --git a/src/end.c b/src/end.c index 23d6ecd50..f7e7f5ec3 100644 --- a/src/end.c +++ b/src/end.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 end.c $Date$ $Revision$ */ +/* NetHack 3.5 end.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 end.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.79 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -322,7 +323,7 @@ done2() } return 0; } -#if defined(WIZARD) && (defined(UNIX) || defined(VMS) || defined(LATTICE)) +#if (defined(UNIX) || defined(VMS) || defined(LATTICE)) if(wizard) { int c; # ifdef VMS @@ -509,7 +510,7 @@ panic VA_DECL(const char *, str) !program_state.something_worth_saving ? "Program initialization has failed." : "Suddenly, the dungeon collapses."); -#if defined(WIZARD) && !defined(MICRO) +#ifndef MICRO # if defined(NOTIFY_NETHACK_BUGS) if (!wizard) raw_printf("Report the following error to \"%s\" or at \"%s\".", @@ -530,11 +531,7 @@ panic VA_DECL(const char *, str) free(tmp); } else raw_printf("Report error to \"%s\"%s.", -# ifdef WIZARD_NAME /*(KR1ED)*/ WIZARD_NAME, -# else - WIZARD, -# endif !program_state.something_worth_saving ? "" : " and it may be possible to rebuild."); } @@ -559,7 +556,7 @@ panic VA_DECL(const char *, str) #ifdef WIN32 interject(INTERJECT_PANIC); #endif -#if defined(WIZARD) && (defined(UNIX) || defined(VMS) || defined(LATTICE) || defined(WIN32)) +#if defined(UNIX) || defined(VMS) || defined(LATTICE) || defined(WIN32) if (wizard) NH_abort(); /* generate core dump */ #endif @@ -845,12 +842,10 @@ int how; paniclog("trickery", killer.name); killer.name[0] = 0; } -#ifdef WIZARD if (wizard) { You("are a very tricky wizard, it seems."); return; } -#endif } /* pbuf: holds Sprintf'd output for raw_print and putstr @@ -884,11 +879,7 @@ int how; return; } } - if (( -#ifdef WIZARD - wizard || -#endif - discover) && (how <= GENOCIDED)) { + if ((wizard || discover) && (how <= GENOCIDED)) { if (paranoid_query(ParanoidDie, "Die?")) goto die; pline("OK, so you don't %s.", (how == CHOKING) ? "choke" : "die"); @@ -1007,13 +998,8 @@ die: { int deepest = deepest_lev_reached(FALSE); -#ifndef GOLDOBJ - umoney = u.ugold; - tmp = u.ugold0; -#else umoney = money_cnt(invent); tmp = u.umoney0; -#endif umoney += hidden_gold(); /* accumulate gold from containers */ tmp = umoney - tmp; /* net gain */ @@ -1046,9 +1032,7 @@ die: } if (bones_ok) { -#ifdef WIZARD if (!wizard || paranoid_query(ParanoidBones, "Save bones?")) -#endif savebones(how, endtime, corpse); /* corpse may be invalid pointer now so ensure that it isn't used again */ @@ -1057,11 +1041,7 @@ die: /* update gold for the rip output, which can't use hidden_gold() (containers will be gone by then if bones just got saved...) */ -#ifndef GOLDOBJ - u.ugold = umoney; -#else done_money = umoney; -#endif /* clean up unneeded windows */ if (have_windows) { diff --git a/src/engrave.c b/src/engrave.c index 51b6f7b89..ebfcd0829 100644 --- a/src/engrave.c +++ b/src/engrave.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 engrave.c $Date$ $Revision$ */ +/* NetHack 3.5 engrave.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 engrave.c $Date: 2012/12/20 01:48:36 $ $Revision: 1.39 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -139,10 +140,8 @@ boolean check_pit; struct trap *t; if (u.uswallow) return FALSE; -#ifdef STEED /* Restricted/unskilled riders can't reach the floor */ if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) return FALSE; -#endif if (check_pit && (t = t_at(u.ux, u.uy)) != 0 && uteetering_at_seen_pit(t) && !Flying) return FALSE; @@ -243,7 +242,6 @@ xchar x, y; return((struct engr *) 0); } -#ifdef ELBERETH /* Decide whether a particular string is engraved at a specified * location; a case-insensitive substring match used. * Ignore headstones, in case the player names herself "Elbereth". @@ -258,7 +256,6 @@ sengr_at(s, x, y) return (ep && ep->engr_type != HEADSTONE && ep->engr_time <= moves && strstri(ep->engr_txt, s) != 0); } -#endif /* ELBERETH */ void u_wipe_engr(cnt) @@ -839,12 +836,10 @@ doengrave() break; case VENOM_CLASS: -#ifdef WIZARD if (wizard) { pline("Writing a poison pen letter??"); break; } -#endif case ILLOBJ_CLASS: impossible("You're engraving with an illegal object!"); break; diff --git a/src/exper.c b/src/exper.c index e0b3b8992..5b1d73927 100644 --- a/src/exper.c +++ b/src/exper.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 exper.c $Date$ $Revision$ */ +/* NetHack 3.5 exper.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 exper.c $Date: 2009/05/06 10:46:24 $ $Revision: 1.19 $ */ /* SCCS Id: @(#)exper.c 3.5 2005/09/19 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -170,13 +171,11 @@ const char *drainer; /* cause of death, if drain should be fatal */ { register int num; -#ifdef WIZARD /* override life-drain resistance when handling an explicit wizard mode request to reduce level; never fatal though */ if (drainer && !strcmp(drainer, "#levelchange")) drainer = 0; else -#endif if (resists_drli(&youmonst)) return; if (u.ulevel > 1) { diff --git a/src/explode.c b/src/explode.c index a2416dd75..65dbe82a5 100644 --- a/src/explode.c +++ b/src/explode.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 explode.c $Date$ $Revision$ */ +/* NetHack 3.5 explode.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 explode.c $Date: 2013/11/05 00:57:55 $ $Revision: 1.34 $ */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ @@ -166,10 +167,8 @@ int expltype; } /* can be both you and mtmp if you're swallowed */ mtmp = m_at(i+x-1, j+y-1); -#ifdef STEED if (!mtmp && i+x-1 == u.ux && j+y-1 == u.uy) mtmp = u.usteed; -#endif if (mtmp) { if (mtmp->mhp < 1) explmask[i][j] = 2; else switch(adtyp) { @@ -274,10 +273,8 @@ int expltype; type, &shopdamage, exploding_wand_typ); mtmp = m_at(i+x-1, j+y-1); -#ifdef STEED if (!mtmp && i+x-1 == u.ux && j+y-1 == u.uy) mtmp = u.usteed; -#endif if (!mtmp) continue; if (do_hallu) { /* replace "gas spore" with a different description diff --git a/src/extralev.c b/src/extralev.c index 5e2e96bf6..821e5794f 100644 --- a/src/extralev.c +++ b/src/extralev.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 extralev.c $Date$ $Revision$ */ +/* NetHack 3.5 extralev.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 extralev.c $Date: 2010/01/10 02:35:19 $ $Revision: 1.5 $ */ /* Copyright 1988, 1989 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ @@ -8,8 +9,6 @@ #include "hack.h" -#ifdef REINCARNATION - struct rogueroom { xchar rlx, rly; xchar dx, dy; @@ -335,6 +334,5 @@ makerogueghost() ghostobj->known = TRUE; } } -#endif /* REINCARNATION */ /*extralev.c*/ diff --git a/src/files.c b/src/files.c index c899f259e..7ba180547 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 files.c $Date$ $Revision$ */ +/* NetHack 3.5 files.c $NHDT-Date: 1425081976 2015/02/28 00:06:16 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.127 $ */ +/* NetHack 3.5 files.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.124 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -123,12 +124,10 @@ boolean nethack_thinks_it_is_open; /* Does NetHack think it's open? */ # endif #endif /*HOLD_LOCKFILE_OPEN*/ -#ifdef WIZARD #define WIZKIT_MAX 128 static char wizkit[WIZKIT_MAX]; STATIC_DCL FILE *NDECL(fopen_wizkit_file); STATIC_DCL void FDECL(wizkit_addinv, (struct obj *)); -#endif #ifdef AMIGA extern char PATH[]; /* see sys/amiga/amidos.c */ @@ -191,10 +190,8 @@ STATIC_DCL FILE *FDECL(fopen_config_file, (const char *, int)); STATIC_DCL int FDECL(get_uchars, (FILE *,char *,char *,uchar *,BOOLEAN_P,int,const char *)); int FDECL(parse_config_line, (FILE *,char *,int)); -#ifdef LOADSYMSETS STATIC_DCL FILE *NDECL(fopen_sym_file); STATIC_DCL void FDECL(set_symhandling, (char *,int)); -#endif #ifdef NOCWD_ASSUMPTIONS STATIC_DCL void FDECL(adjust_prefix, (char *, int)); #endif @@ -789,10 +786,8 @@ d_level *lev; #else ret = rename(tempname, fq_bones); #endif -#ifdef WIZARD if (wizard && ret != 0) pline("couldn't rename %s to %s.", tempname, fq_bones); -#endif } @@ -898,7 +893,7 @@ int fd; #endif -#if defined(WIZARD) && !defined(MICRO) +#ifndef MICRO /* change pre-existing savefile name to indicate an error savefile */ void set_error_savefile() @@ -1297,9 +1292,7 @@ boolean uncomp; (void) signal(SIGQUIT, SIG_IGN); (void) wait((int *)&i); (void) signal(SIGINT, (SIG_RET_TYPE) done1); -# ifdef WIZARD if (wizard) (void) signal(SIGQUIT, SIG_DFL); -# endif #else /* I don't think we can really cope with external compression * without signals, so we'll declare that compress failed and @@ -2025,10 +2018,8 @@ int src; parseoptions(bufp, TRUE, TRUE); if (plname[0]) /* If a name was given */ plnamesuffix(); /* set the character class */ -#ifdef AUTOPICKUP_EXCEPTIONS } else if (match_varname(buf, "AUTOPICKUP_EXCEPTION", 5)) { add_autopickup_exception(bufp); -#endif #ifdef NOCWD_ASSUMPTIONS } else if (match_varname(buf, "HACKDIR", 4)) { adjust_prefix(bufp, HACKPREFIX); @@ -2112,6 +2103,9 @@ int src; } else if (src == SET_IN_SYS && match_varname(buf, "SHELLERS", 8)) { if (sysopt.shellers) free(sysopt.shellers); sysopt.shellers = dupstr(bufp); + } else if (src == SET_IN_SYS && match_varname(buf, "DEBUGFILES", 5)) { + if (sysopt.debugfiles) free(sysopt.debugfiles); + sysopt.debugfiles = dupstr(bufp); } else if (src == SET_IN_SYS && match_varname(buf, "SUPPORT", 7)) { if (sysopt.support) free(sysopt.support); sysopt.support = dupstr(bufp); @@ -2206,10 +2200,6 @@ int src; WARNCOUNT, "WARNINGS"); assign_warnings(translate); } else if (match_varname(buf, "SYMBOLS", 4)) { - /* This part is not ifdef LOADSYMSETS because we want to be able - * to silently ignore its presence in a config file if that is - * not defined. - */ char *op, symbuf[BUFSZ]; boolean morelines; do { @@ -2228,10 +2218,8 @@ int src; /* strip trailing space now that '\' is gone */ while (--op >= bufp && isspace(*op)) *op = '\0'; } -#ifdef LOADSYMSETS /* parse here */ parsesymbols(bufp); -#endif if (morelines) do { *symbuf = '\0'; @@ -2242,13 +2230,9 @@ int src; bufp = symbuf; } while (*bufp == '#'); } while (morelines); -#ifdef LOADSYMSETS switch_symbols(TRUE); -#endif -#ifdef WIZARD } else if (match_varname(buf, "WIZKIT", 6)) { (void) strncpy(wizkit, bufp, WIZKIT_MAX-1); -#endif #ifdef AMIGA } else if (match_varname(buf, "FONT", 4)) { char *t; @@ -2434,7 +2418,6 @@ OR: Forbid multiline stuff for alternate config sources. return rv; } -#ifdef WIZARD STATIC_OVL FILE * fopen_wizkit_file() { @@ -2568,9 +2551,6 @@ read_wizkit() return; } -#endif /*WIZARD*/ - -#ifdef LOADSYMSETS extern struct symsetentry *symset_list; /* options.c */ extern struct symparse loadsyms[]; /* drawing.c */ extern const char *known_handling[]; /* drawing.c */ @@ -2627,7 +2607,7 @@ parse_sym_line(buf, which_set) char *buf; int which_set; { - int val; + int val, i; struct symparse *symp = (struct symparse *)0; char *bufp, *commentp, *altp; @@ -2677,7 +2657,6 @@ int which_set; return 0; if (!symset[which_set].name) { - int i; /* A null symset name indicates that we're just building a pick-list of possible symset values from the file, so only do that */ @@ -2702,7 +2681,6 @@ int which_set; /* initialize restriction bits */ tmpsp->primary = 0; tmpsp->rogue = 0; - tmpsp->unicode = 0; break; case 2: /* handler type identified */ @@ -2725,17 +2703,14 @@ int which_set; case 5: /* restrictions: xxxx*/ tmpsp = symset_list; /* most recent symset */ - i = 0; - while (known_restrictions[i]) { + for (i = 0; known_restrictions[i]; ++i) { if (!strcmpi(known_restrictions[i], bufp)) { switch(i) { case 0: tmpsp->primary = 1; break; case 1: tmpsp->rogue = 1; break; - case 2: tmpsp->unicode = 1; break; } break; /* while loop */ } - i++; } break; } @@ -2751,11 +2726,8 @@ int which_set; /* matches desired one */ chosen_symset_start = TRUE; /* these init_*() functions clear symset fields too */ -# ifdef REINCARNATION if (which_set == ROGUESET) init_r_symbols(); - else -# endif - if (which_set == PRIMARY) init_l_symbols(); + else if (which_set == PRIMARY) init_l_symbols(); } break; case 1: @@ -2794,26 +2766,12 @@ int which_set; break; case 1: symset[which_set].rogue = 1; break; - case 2: symset[which_set].unicode = 1; - break; } break; /* while loop */ } n++; } - /* Don't allow unicode set if code can't handle it */ - if (symset[which_set].unicode && - !iflags.unicodedisp) { - if (chosen_symset_start) - chosen_symset_end = FALSE; - chosen_symset_start = FALSE; -# ifdef REINCARNATION - if (which_set == ROGUESET) init_r_symbols(); - else -# endif - if (which_set == PRIMARY) init_l_symbols(); - } - } + } break; } } else { /* !SYM_CONTROL */ @@ -2821,12 +2779,9 @@ int which_set; if (chosen_symset_start) { if (which_set == PRIMARY) { update_l_symset(symp, val); - } -# ifdef REINCARNATION - else if (which_set == ROGUESET) { + } else if (which_set == ROGUESET) { update_r_symset(symp, val); } -# endif } } } @@ -2850,73 +2805,6 @@ int which_set; } } -/* - * Produces a single integer value. - */ -int -sym_val(cp) -const char *cp; -{ - unsigned int cval = 0; - int meta = 0, dcount = 0; - const char *dp, *hex = "00112233445566778899aAbBcCdDeEfF"; - - while (*cp) - { - if (*cp == '\\' && index("mM", cp[1])) { - meta = 1; - cp += 2; - } - if ((*cp == 'U' || *cp == 'u') && cp[1] == '+' && index(hex, cp[2])) - { - dcount = 0; - cp++; - for (++cp; *cp && (dp = index(hex, *cp)) && (dcount++ < 4); cp++) - cval = (unsigned int)((cval * 16) + - ((unsigned int)(dp - hex) / 2)); - } - else if (*cp == '\\' && index("0123456789xXoO", cp[1])) - { - dcount = 0; - cp++; - if (*cp == 'x' || *cp == 'X') - for (++cp; *cp && (dp = index(hex, *cp)) && (dcount++ < 4); cp++) - cval = (unsigned int)((cval * 16) + - ((unsigned int)(dp - hex) / 2)); - else if (*cp == 'o' || *cp == 'O') - for (++cp; *cp && (index("01234567",*cp)) && (dcount++ < 5); cp++) - cval = (cval * 8) + (unsigned int)(*cp - '0'); - else - for (; *cp && (index("0123456789",*cp)) && (dcount++ < 5); cp++) - cval = (cval * 10) + (unsigned int)(*cp - '0'); - } - else if (*cp == '\\') /* C-style character escapes */ - { - switch (*++cp) - { - case '\\': cval = '\\'; break; - case 'n': cval = '\n'; break; - case 't': cval = '\t'; break; - case 'b': cval = '\b'; break; - case 'r': cval = '\r'; break; - default: cval = (unsigned int)*cp; - } - cp++; - } - else if (*cp == '^') /* expand control-character syntax */ - { - cval = (unsigned int)(*++cp & 0x1f); - cp++; - } - else - cval = (unsigned int)*cp++; - if (meta) - cval |= 0x80; - } - return cval; -} -#endif /*LOADSYMSETS*/ - /* ---------- END CONFIG FILE HANDLING ----------- */ /* ---------- BEGIN SCOREBOARD CREATION ----------- */ diff --git a/src/fountain.c b/src/fountain.c index bb0745002..f167c09d4 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 fountain.c $Date$ $Revision$ */ +/* NetHack 3.5 fountain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 fountain.c $Date: 2011/08/20 00:22:20 $ $Revision: 1.32 $ */ /* Copyright Scott R. Turner, srt@ucla, 10/27/86 */ /* NetHack may be freely redistributed. See license for details. */ @@ -181,12 +182,10 @@ boolean isyou; if(!mtmp) pline_The("flow reduces to a trickle."); return; } -#ifdef WIZARD if (isyou && wizard) { if (yn("Dry up fountain?") == 'n') return; } -#endif /* replace the fountain with ordinary floor */ levl[x][y].typ = ROOM; levl[x][y].looted = 0; @@ -453,14 +452,6 @@ register struct obj *obj; break; case 28: /* Strange feeling */ pline("An urge to take a bath overwhelms you."); -#ifndef GOLDOBJ - if (u.ugold > 10) { - u.ugold -= somegold() / 10; - You("lost some of your gold in the fountain!"); - CLEAR_FOUNTAIN_LOOTED(u.ux,u.uy); - exercise(A_WIS, FALSE); - } -#else { long money = money_cnt(invent); struct obj *otmp; @@ -480,7 +471,6 @@ register struct obj *obj; exercise(A_WIS, FALSE); } } -#endif break; case 29: /* You see coins */ @@ -503,7 +493,6 @@ register struct obj *obj; dryup(u.ux, u.uy, TRUE); } -#ifdef SINKS void breaksink(x,y) int x, y; @@ -609,6 +598,5 @@ drinksink() rn2(3) ? (rn2(2) ? "cold" : "warm") : "hot"); } } -#endif /* SINKS */ /*fountain.c*/ diff --git a/src/hack.c b/src/hack.c index 792671075..1edfb9f4e 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 hack.c $Date$ $Revision$ */ +/* NetHack 3.5 hack.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 hack.c $Date: 2013/10/26 21:33:47 $ $Revision: 1.120 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -9,9 +10,7 @@ STATIC_DCL void NDECL(maybe_wail); STATIC_DCL int NDECL(moverock); STATIC_DCL int FDECL(still_chewing,(XCHAR_P,XCHAR_P)); -#ifdef SINKS STATIC_DCL void NDECL(dosinkfall); -#endif STATIC_DCL boolean FDECL(findtravelpath, (BOOLEAN_P)); STATIC_DCL boolean FDECL(trapmove, (int,int,struct trap *)); STATIC_DCL void NDECL(switch_terrain); @@ -117,11 +116,7 @@ moverock() /* Give them a chance to climb over it? */ return -1; } - if (verysmall(youmonst.data) -#ifdef STEED - && !u.usteed -#endif - ) { + if (verysmall(youmonst.data) && !u.usteed) { if (Blind) feel_location(sx, sy); pline("You're too small to push that %s.", xname(otmp)); goto cannot_push; @@ -158,10 +153,7 @@ moverock() } if (flags.verbose) pline("Perhaps that's why %s cannot move it.", -#ifdef STEED - u.usteed ? y_monnam(u.usteed) : -#endif - "you"); + u.usteed ? y_monnam(u.usteed) : "you"); goto cannot_push; } @@ -230,13 +222,11 @@ moverock() /* trap didn't work; skip "disappears" message */ goto dopush; } -#ifdef STEED if (u.usteed) - pline("%s pushes %s and suddenly it disappears!", - upstart(y_monnam(u.usteed)), the(xname(otmp))); + pline("%s pushes %s and suddenly it disappears!", + upstart(y_monnam(u.usteed)), the(xname(otmp))); else -#endif - You("push %s and suddenly it disappears!", + You("push %s and suddenly it disappears!", the(xname(otmp))); if (ttmp->ttyp == TELEP_TRAP) { (void)rloco(otmp); @@ -278,19 +268,15 @@ moverock() static NEARDATA long lastmovetime; #endif dopush: -#ifdef STEED if (!u.usteed) { -#endif if (moves > lastmovetime+2 || moves < lastmovetime) pline("With %s effort you move %s.", throws_rocks(youmonst.data) ? "little" : "great", the(xname(otmp))); exercise(A_STR, TRUE); -#ifdef STEED } else pline("%s moves %s.", upstart(y_monnam(u.usteed)), the(xname(otmp))); -#endif lastmovetime = moves; } @@ -306,24 +292,19 @@ moverock() } } else { nopushmsg: -#ifdef STEED if (u.usteed) pline("%s tries to move %s, but cannot.", upstart(y_monnam(u.usteed)), the(xname(otmp))); else -#endif You("try to move %s, but in vain.", the(xname(otmp))); if (Blind) feel_location(sx, sy); cannot_push: if (throws_rocks(youmonst.data)) { -#ifdef STEED if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) { You("aren't skilled enough to %s %s from %s.", (flags.pickup && !Sokoban) ? "pick up" : "push aside", the(xname(otmp)), y_monnam(u.usteed)); - } else -#endif - { + } else { pline("However, you can easily %s.", (flags.pickup && !Sokoban) ? "pick it up" : "push it aside"); @@ -333,11 +314,7 @@ moverock() break; } - if ( -#ifdef STEED - !u.usteed && -#endif - (((!invent || inv_weight() <= -850) && + if (!u.usteed && (((!invent || inv_weight() <= -850) && (!u.dx || !u.dy || (IS_ROCK(levl[u.ux][sy].typ) && IS_ROCK(levl[sx][u.uy].typ)))) || verysmall(youmonst.data))) { @@ -489,7 +466,6 @@ register xchar ox, oy; newsym(ox, oy); } -#ifdef SINKS static NEARDATA const char fell_on_sink[] = "fell onto a sink"; STATIC_OVL void @@ -570,7 +546,6 @@ dosinkfall() through float_down(), but make sure BFlying is up to date */ float_vs_flight(); } -#endif boolean may_dig(x,y) @@ -692,13 +667,10 @@ int mode; You("try to ooze under the door, but can't squeeze your possessions through."); else if (x == ux || y == uy) { if (Blind || Stunned || ACURR(A_DEX) < 10 || Fumbling) { -#ifdef STEED if (u.usteed) { You_cant("lead %s through that closed door.", y_monnam(u.usteed)); - } else -#endif - { + } else { pline("Ouch! You bump into a door."); exercise(A_DEX, FALSE); } @@ -795,7 +767,7 @@ int mode; static boolean trav_debug = FALSE; int -wiz_debug_cmd() /* in this case, toggle display of travel debug info */ +wiz_debug_cmd_traveldisplay() /* in this case, toggle display of travel debug info */ { trav_debug = !trav_debug; return 0; @@ -1000,9 +972,7 @@ struct trap *desttrap; /* nonnull if another trap at */ { boolean anchored; const char *predicament, *culprit; -#ifdef STEED char *steedname = !u.usteed ? (char *)0 : y_monnam(u.usteed); -#endif if (!u.utrap) return TRUE; /* sanity check */ @@ -1010,11 +980,9 @@ struct trap *desttrap; /* nonnull if another trap at */ case TT_BEARTRAP: if (flags.verbose) { predicament = "caught in a bear trap"; -#ifdef STEED if (u.usteed) Norep("%s is %s.", upstart(steedname), predicament); else -#endif Norep("You are %s.", predicament); } /* [why does diagonal movement give quickest escape?] */ @@ -1036,41 +1004,33 @@ struct trap *desttrap; /* nonnull if another trap at */ if (--u.utrap) { if (flags.verbose) { predicament = "stuck to the web"; -#ifdef STEED if (u.usteed) - Norep("%s is %s.", upstart(steedname), predicament); + Norep("%s is %s.", upstart(steedname), predicament); else -#endif - Norep("You are %s.", predicament); + Norep("You are %s.", predicament); } } else { -#ifdef STEED if (u.usteed) pline("%s breaks out of the web.", upstart(steedname)); else -#endif You("disentangle yourself."); } break; case TT_LAVA: if (flags.verbose) { predicament = "stuck in the lava"; -#ifdef STEED if (u.usteed) Norep("%s is %s.", upstart(steedname), predicament); else -#endif Norep("You are %s.", predicament); } if (!is_lava(x, y)) { u.utrap--; if ((u.utrap & 0xff) == 0) { u.utrap = 0; -#ifdef STEED if (u.usteed) You("lead %s to the edge of the lava.", steedname); else -#endif You("pull yourself to the edge of the lava."); } } @@ -1105,7 +1065,6 @@ struct trap *desttrap; /* nonnull if another trap at */ predicament = "stuck in the"; culprit = surface(u.ux, u.uy); } -#ifdef STEED if (u.usteed) { if (anchored) Norep("You and %s are %s %s.", steedname, @@ -1114,16 +1073,13 @@ struct trap *desttrap; /* nonnull if another trap at */ Norep("%s is %s %s.", upstart(steedname), predicament, culprit); } else -#endif - Norep("You are %s %s.", predicament, culprit); + Norep("You are %s %s.", predicament, culprit); } } else { -#ifdef STEED if (u.usteed) pline("%s finally %s free.", upstart(steedname), !anchored ? "lurches" : "wrenches the ball"); else -#endif You("finally %s free.", !anchored ? "wriggle" : "wrench the ball"); if (anchored) @@ -1418,12 +1374,10 @@ domove() newsym(x, y); } /* not attacking an animal, so we try to move */ -#ifdef STEED if ((u.dx || u.dy) && u.usteed && stucksteed(FALSE)) { nomul(0); return; } -#endif if(!youmonst.data->mmove) { You("are rooted %s.", Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz) ? @@ -1455,14 +1409,12 @@ domove() mtmp = m_at(x, y); u.ux += u.dx; u.uy += u.dy; -#ifdef STEED /* Move your steed, too */ if (u.usteed) { u.usteed->mx = u.ux; u.usteed->my = u.uy; exercise_steed(); } -#endif /* * If safepet at destination then move the pet to the hero's @@ -1661,11 +1613,8 @@ invocation_message() struct obj *otmp = carrying(CANDELABRUM_OF_INVOCATION); nomul(0); /* stop running or travelling */ -#ifdef STEED if (u.usteed) Sprintf(buf, "beneath %s", y_monnam(u.usteed)); - else -#endif - if (Levitation || Flying) Strcpy(buf, "beneath you"); + else if (Levitation || Flying) Strcpy(buf, "beneath you"); else Sprintf(buf, "under your %s", makeplural(body_part(FOOT))); You_feel("a strange vibration %s.", buf); @@ -1751,7 +1700,6 @@ boolean newspot; /* true if called by spoteffects */ /* check for entering water or lava */ if (!u.ustuck && !Levitation && !Flying && is_pool_or_lava(u.ux, u.uy)) { -#ifdef STEED if (u.usteed && (is_flyer(u.usteed->data) || is_floater(u.usteed->data) || is_clinger(u.usteed->data))) { /* floating or clinging steed keeps hero safe (is_flyer() test @@ -1769,7 +1717,6 @@ boolean newspot; /* true if called by spoteffects */ return TRUE; } /* not mounted */ -#endif /* STEED */ /* drown(),lava_effects() return true if hero changes location while surviving the problem */ @@ -1816,10 +1763,8 @@ boolean pick; if (pooleffects(TRUE)) goto spotdone; check_special_room(FALSE); -#ifdef SINKS if(IS_SINK(levl[u.ux][u.uy].typ) && Levitation) dosinkfall(); -#endif if (!in_steed_dismounting) { /* if dismounting, we'll check again later */ boolean pit; @@ -2170,9 +2115,7 @@ register boolean newlev; rt = 0; break; } -#ifdef DUNGEON_OVERVIEW if (msg_given) room_discovered(roomno); -#endif if (rt != 0) { rooms[roomno].rtype = OROOM; @@ -2265,10 +2208,8 @@ dopickup() if (!can_reach_floor(TRUE)) { if (traphere && uteetering_at_seen_pit(traphere)) You("cannot reach the bottom of the pit."); -#ifdef STEED else if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) rider_cant_reach(); -#endif else if (Blind && !can_reach_floor(TRUE)) You("cannot reach anything here."); else @@ -2413,11 +2354,9 @@ int x, y; struct rm *lev_p = &levl[x][y]; if (!IS_DOOR(lev_p->typ)) return FALSE; -#ifdef REINCARNATION /* all rogue level doors are doorless but disallow diagonal access, so we treat them as if their non-existant doors were actually present */ if (Is_rogue_level(&u.uz)) return FALSE; -#endif return !(lev_p->doormask & ~(D_NODOOR|D_BROKEN)); } @@ -2577,9 +2516,7 @@ weight_cap() } if (Levitation || Is_airlevel(&u.uz) /* pugh@cornell */ -#ifdef STEED || (u.usteed && strongmonst(u.usteed->data)) -#endif ) carrcap = MAX_CARR_CAP; else { @@ -2603,22 +2540,10 @@ inv_weight() register struct obj *otmp = invent; register int wt = 0; -#ifndef GOLDOBJ - /* when putting stuff into containers, gold is inserted at the head - of invent for easier manipulation by askchain & co, but it's also - retained in u.ugold in order to keep the status line accurate; we - mustn't add its weight in twice under that circumstance */ - wt = (otmp && otmp->oclass == COIN_CLASS) ? 0 : - (int)((u.ugold + 50L) / 100L); -#endif while (otmp) { -#ifndef GOLDOBJ - if (otmp->otyp != BOULDER || !throws_rocks(youmonst.data)) -#else if (otmp->oclass == COIN_CLASS) wt += (int)(((long)otmp->quan + 50L) / 100L); else if (otmp->otyp != BOULDER || !throws_rocks(youmonst.data)) -#endif wt += otmp->owt; otmp = otmp->nobj; } @@ -2672,7 +2597,7 @@ const char *str; int inv_cnt(incl_gold) -boolean incl_gold; /* only meaningful for GOLDOBJ config */ +boolean incl_gold; { register struct obj *otmp = invent; register int ct = 0; @@ -2684,7 +2609,6 @@ boolean incl_gold; /* only meaningful for GOLDOBJ config */ return(ct); } -#ifdef GOLDOBJ /* Counts the money in an object chain. */ /* Intended use is for your or some monsters inventory, */ /* now that u.gold/m.gold is gone.*/ @@ -2700,6 +2624,5 @@ struct obj *otmp; } return 0L; } -#endif /* GOLDOBJ */ /*hack.c*/ diff --git a/src/hacklib.c b/src/hacklib.c index d2985af6f..4565f6d65 100644 --- a/src/hacklib.c +++ b/src/hacklib.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 hacklib.c $Date$ $Revision$ */ +/* NetHack 3.5 hacklib.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 hacklib.c $Date: 2009/05/06 10:46:32 $ $Revision: 1.23 $ */ /* SCCS Id: @(#)hacklib.c 3.5 2007/04/30 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Robert Patrick Rankin, 1991 */ @@ -767,192 +768,4 @@ midnight() return(getlt()->tm_hour == 0); } -#ifdef UNICODE_WIDEWINPORT -nhwchar * -nhwstrncpy(dest, strSource, cnt) -nhwchar *dest; -const char *strSource; -size_t cnt; -{ - nhwchar *d = dest; - const char *s = strSource; - size_t dcnt = 0; - - while(*s && dcnt < cnt) { - *d++ = (nhwchar)*s++; - dcnt++; - } - if (dcnt < cnt) *d = 0; - return dest; -} - -nhwchar * -nhwncpy(dest, src, cnt) -nhwchar *dest; -const nhwchar *src; -size_t cnt; -{ - nhwchar *d = dest; - const nhwchar *s = src; - size_t dcnt = 0; - - while(*s && dcnt < cnt) { - *d++ = *s++; - dcnt++; - } - if (dcnt < cnt) *d = 0; - return dest; -} - -nhwchar * -nhwcpy(dest, src) -nhwchar *dest; -const nhwchar *src; -{ - nhwchar *d = dest; - const nhwchar *s = src; - - while(*s) { - *d++ = *s++; - } - *d = 0; - return dest; -} - -nhwchar * -nhwstrcpy(dest, strSource) -nhwchar *dest; -const char *strSource; -{ - nhwchar *d = dest; - const char *s = strSource; - - while(*s) { - *d++ = *s++; - } - *d = 0; - return dest; -} - -char * -strnhwcpy(strDest, src) -char *strDest; -const nhwchar *src; -{ - char *d = strDest; - const nhwchar *s = src; - - while(*s) { - *d++ = (char)*s++; - } - *d = 0; - return strDest; -} - -nhwchar * -nhwstrcat(dest, strSource) -nhwchar *dest; -const char *strSource; -{ - nhwchar *d = dest; - const char *s = strSource; - - while(*d) d++; - while(*s) { - *d++ = *s++; - } - *d = 0; - return dest; -} - -nhwchar * -nhwcat(dest, src) -nhwchar *dest; -const nhwchar *src; -{ - nhwchar *d = dest; - const nhwchar *s = src; - - while(*d) d++; - while(*s) { - *d++ = *s++; - } - *d = 0; - return dest; -} - -nhwchar * -nhwindex(ss, c) -const nhwchar *ss; -int c; -{ - const nhwchar *s = ss; - - while (*s) { - if (*s == c) return (nhwchar *)s; - s++; - } - if (*s == c) return (nhwchar *)s; - return (nhwchar *)0; -} - -size_t nhwlen(src) -const nhwchar *src; -{ - register size_t dl = 0; - - while(*src++) dl++; - return dl; -} - -int -nhwcmp(s1, s2) /* case sensitive comparison */ -register const nhwchar *s1, *s2; -{ - register nhwchar t1, t2; - - for (;;) { - if (!*s2) return (*s1 != 0); /* s1 >= s2 */ - else if (!*s1) return -1; /* s1 < s2 */ - t1 = *s1++; - t2 = *s2++; - if (t1 != t2) return (t1 > t2) ? 1 : -1; - } - return 0; /* s1 == s2 */ -} - -int -nhwncmp(s1, s2, n) /* case sensitive counted nhwchar (wide string) comparison */ - register const nhwchar *s1, *s2; - register int n; /*(should probably be size_t, which is usually unsigned)*/ -{ - register nhwchar t1, t2; - - while (n--) { - if (!*s2) return (*s1 != 0); /* s1 >= s2 */ - else if (!*s1) return -1; /* s1 < s2 */ - t1 = *s1++; - t2 = *s2++; - if (t1 != t2) return (t1 > t2) ? 1 : -1; - } - return 0; /* s1 == s2 */ -} - -int -nhwstrcmp(s1, s2) -register const nhwchar *s1; -const char *s2; -{ - register nhwchar t1, t2; - - for (;;) { - if (!*s2) return (*s1 != 0); /* s1 >= s2 */ - else if (!*s1) return -1; /* s1 < s2 */ - t1 = *s1++; - t2 = (nhwchar)*s2++; - if (t1 != t2) return (t1 > t2) ? 1 : -1; - } - return 0; /* s1 == s2 */ -} -#endif /*hacklib.c*/ diff --git a/src/invent.c b/src/invent.c index b51151a38..62295915c 100644 --- a/src/invent.c +++ b/src/invent.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 invent.c $Date$ $Revision$ */ +/* NetHack 3.5 invent.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 invent.c $Date: 2013/11/05 00:57:55 $ $Revision: 1.125 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -32,7 +33,6 @@ STATIC_DCL char FDECL(obj_to_let,(struct obj *)); static int lastinvnr = 51; /* 0 ... 51 (never saved&restored) */ -#ifdef WIZARD /* wizards can wish for venom, which will become an invisible inventory * item without this. putting it in inv_order would mean venom would * suddenly become a choice for all the inventory-class commands, which @@ -41,7 +41,6 @@ static int lastinvnr = 51; /* 0 ... 51 (never saved&restored) */ * around on a bones level for normal players to find. */ static char venom_inv[] = { VENOM_CLASS, 0 }; /* (constant) */ -#endif void assigninvlet(otmp) @@ -169,9 +168,7 @@ struct obj **potmp, **pobj; / (otmp->quan + obj->quan); otmp->quan += obj->quan; -#ifdef GOLDOBJ /* temporary special case for gold objects!!!! */ -#endif if (otmp->oclass == COIN_CLASS) otmp->owt = weight(otmp); else otmp->owt += obj->owt; if(!has_oname(otmp) && has_oname(obj)) @@ -239,11 +236,7 @@ addinv_core1(obj) struct obj *obj; { if (obj->oclass == COIN_CLASS) { -#ifndef GOLDOBJ - u.ugold += obj->quan; -#else context.botl = 1; -#endif } else if (obj->otyp == AMULET_OF_YENDOR) { if (u.uhave.amulet) impossible("already have amulet?"); u.uhave.amulet = 1; @@ -306,11 +299,6 @@ struct obj *obj; obj->was_thrown = 0; /* not meaningful for invent */ addinv_core1(obj); -#ifndef GOLDOBJ - /* if handed gold, we're done */ - if (obj->oclass == COIN_CLASS) - return obj; -#endif /* merge with quiver in preference to any other inventory slot in case quiver and wielded weapon are both eligible; adding @@ -489,10 +477,6 @@ freeinv_core(obj) struct obj *obj; { if (obj->oclass == COIN_CLASS) { -#ifndef GOLDOBJ - u.ugold -= obj->quan; - obj->in_use = FALSE; -#endif context.botl = 1; return; } else if (obj->otyp == AMULET_OF_YENDOR) { @@ -680,60 +664,6 @@ register int x, y; return((struct obj *)0); } -#ifndef GOLDOBJ -/* Make a gold object from the hero's gold. */ -struct obj * -mkgoldobj(q) -register long q; -{ - register struct obj *otmp; - - otmp = mksobj(GOLD_PIECE, FALSE, FALSE); - u.ugold -= q; - otmp->quan = q; - otmp->owt = weight(otmp); - context.botl = 1; - return(otmp); -} - -/* used for container apply/#loot and multi-item Drop */ -struct obj * -insert_gold_into_invent(keep_on_status_line) -boolean keep_on_status_line; -{ - struct obj *u_gold = 0; - - if (u.ugold) { - u_gold = mkgoldobj(u.ugold); - if (keep_on_status_line) { - u_gold->in_use = 1; /* in case of panic/hangup save */ - u.ugold = u_gold->quan; /* put back on status line */ - } /* else mkgoldobj() left status $:0 */ - assigninvlet(u_gold); /* should yield '$' */ - u_gold->where = OBJ_INVENT; - u_gold->nobj = invent; - invent = u_gold; - } - return u_gold; -} - -/* undo insert_gold_into_invent; gold might have been used up though */ -void -remove_gold_from_invent() -{ - struct obj *u_gold = invent; /* we expect gold to be first */ - - if (u_gold && u_gold->otyp != GOLD_PIECE) - u_gold = carrying(GOLD_PIECE); - - if (u_gold) { - extract_nobj(u_gold, &invent); - if (!u_gold->in_use) u.ugold += u_gold->quan; - dealloc_obj(u_gold); - } -} -#endif /* !GOLDOBJ */ - STATIC_OVL void compactify(buf) register char *buf; @@ -803,10 +733,8 @@ const char *action; * struct obj *xxx: object to do something with. * (struct obj *) 0 error return: no object. * &zeroobj explicitly no object (as in w-). -#ifdef GOLDOBJ !!!! test if gold can be used in unusual ways (eaten etc.) !!!! may be able to remove "usegold" -#endif */ struct obj * getobj(let,word) @@ -820,10 +748,6 @@ register const char *let,*word; register char *bp = buf; xchar allowcnt = 0; /* 0, 1 or 2 */ struct obj *firstobj = invent; -#ifndef GOLDOBJ - struct obj *u_gold = 0; - boolean allowgold = FALSE; /* can't use gold because they don't have any */ -#endif boolean usegold = FALSE; /* can't use gold because its illegal */ boolean allowall = FALSE; boolean allownone = FALSE; @@ -834,22 +758,13 @@ register const char *let,*word; long dummymask; if(*let == ALLOW_COUNT) let++, allowcnt = 1; -#ifndef GOLDOBJ - if(*let == COIN_CLASS) let++, - usegold = TRUE, allowgold = (u.ugold ? TRUE : FALSE); -#else if(*let == COIN_CLASS) let++, usegold = TRUE; -#endif /* Equivalent of an "ugly check" for gold */ if (usegold && !strcmp(word, "eat") && (!metallivorous(youmonst.data) || youmonst.data == &mons[PM_RUST_MONSTER])) -#ifndef GOLDOBJ - usegold = allowgold = FALSE; -#else usegold = FALSE; -#endif if(*let == ALL_CLASSES) let++, allowall = TRUE; if(*let == ALLOW_NONE) let++, allownone = TRUE; @@ -867,17 +782,6 @@ register const char *let,*word; useboulder = TRUE; if(allownone) *bp++ = '-'; -#ifndef GOLDOBJ - if(allowgold) { - *bp++ = def_oc_syms[COIN_CLASS].sym; - if (firstobj && firstobj->otyp == GOLD_PIECE) { - /* gold has been inserted into inventory; skip it during - inventory letter collection */ - u_gold = firstobj; - firstobj = u_gold->nobj; - } - } -#endif if(bp > buf && bp[-1] == '-') *bp++ = ' '; ap = altlets; @@ -892,9 +796,7 @@ register const char *let,*word; } if (!*let || index(let, otmp->oclass) -#ifdef GOLDOBJ || (usegold && otmp->invlet == GOLD_SYM) -#endif || (useboulder && otmp->otyp == BOULDER) ) { register int otyp = otmp->otyp; @@ -999,12 +901,8 @@ register const char *let,*word; } else { /* "ugly check" for reading fortune cookies, part 2 */ - if ((!strcmp(word, "read") && - (otmp->otyp == FORTUNE_COOKIE -#ifdef TOURIST - || otmp->otyp == T_SHIRT -#endif - ))) + if ((!strcmp(word, "read") + && (otmp->otyp == FORTUNE_COOKIE || otmp->otyp == T_SHIRT))) allowall = TRUE; } } @@ -1015,11 +913,7 @@ register const char *let,*word; compactify(bp); *ap = '\0'; -#ifndef GOLDOBJ - if(!foo && !allowall && !allowgold && !allownone) { -#else if(!foo && !allowall && !allownone) { -#endif You("don't have anything %sto %s.", foox ? "else " : "", word); return((struct obj *)0); @@ -1034,11 +928,9 @@ register const char *let,*word; Sprintf(qbuf, "What do you want to %s? [%s or ?*]", word, buf); } -#ifdef REDO if (in_doagain) ilet = readchar(); else -#endif ilet = yn_function(qbuf, (char *)0, '\0'); if (digit(ilet) && !allowcnt) { pline("No count allowed with this command."); @@ -1046,9 +938,7 @@ register const char *let,*word; } if (ilet == '0') prezero = TRUE; while (digit(ilet)) { -#ifdef REDO if (ilet != '?' && ilet != '*') savech(ilet); -#endif /* accumulate unless cnt has overflowed */ if (allowcnt < 3) { prevcnt = cnt; @@ -1075,11 +965,6 @@ register const char *let,*word; if (!usegold) { You("cannot %s gold.", word); return(struct obj *)0; -#ifndef GOLDOBJ - } else if (!allowgold) { - You("are not carrying any gold."); - return(struct obj *)0; -#endif } /* Historic note: early Nethack had a bug which was * first reported for Larn, where trying to drop 2^32-n @@ -1094,15 +979,6 @@ register const char *let,*word; return (struct obj *)0; } -#ifndef GOLDOBJ - if(!(allowcnt == 2 && cnt < u.ugold)) - cnt = u.ugold; - if (!u_gold) - u_gold = mkgoldobj(cnt); - else if (cnt < u_gold->quan) - u_gold = splitobj(u_gold, cnt); - return u_gold; -#endif } if(ilet == '?' || ilet == '*') { char *allowed_choices = (ilet == '?') ? lets : (char *)0; @@ -1129,9 +1005,7 @@ register const char *let,*word; /* permit counts for throwing gold, but don't accept * counts for other things since the throw code will * split off a single item anyway */ -#ifdef GOLDOBJ if (ilet != def_oc_syms[COIN_CLASS].sym) -#endif allowcnt = 1; if(cnt == 0 && prezero) return((struct obj *)0); if(cnt > 1) { @@ -1139,34 +1013,24 @@ register const char *let,*word; continue; } } -#ifdef GOLDOBJ context.botl = 1; /* May have changed the amount of money */ -#endif -#ifdef REDO savech(ilet); -#endif for (otmp = invent; otmp; otmp = otmp->nobj) if (otmp->invlet == ilet) break; if(!otmp) { You("don't have that object."); -#ifdef REDO if (in_doagain) return((struct obj *) 0); -#endif continue; } else if (cnt < 0 || otmp->quan < cnt) { You("don't have that many! You have only %ld.", otmp->quan); -#ifdef REDO if (in_doagain) return((struct obj *) 0); -#endif continue; } break; } if(!allowall && let && !index(let,otmp->oclass) -#ifdef GOLDOBJ && !(usegold && otmp->oclass == COIN_CLASS) -#endif ) { silly_thing(word, otmp); return((struct obj *)0); @@ -1240,10 +1104,7 @@ boolean wearing_armor() { return((boolean)(uarm || uarmc || uarmf || uarmg || uarmh || uarms -#ifdef TOURIST - || uarmu -#endif - )); + || uarmu)); } boolean @@ -1251,10 +1112,7 @@ is_worn(otmp) register struct obj *otmp; { return((boolean)(!!(otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL | -#ifdef STEED - W_SADDLE | -#endif - W_WEP | W_SWAPWEP | W_QUIVER)))); + W_SADDLE | W_WEP | W_SWAPWEP | W_QUIVER)))); } /* extra xprname() input that askchain() can't pass through safe_qbuf() */ @@ -1300,25 +1158,14 @@ unsigned *resultflags; boolean FDECL((*filter),(OBJ_P)) = (boolean FDECL((*),(OBJ_P))) 0; boolean takeoff, ident, allflag, m_seen; int itemcount; -#ifndef GOLDOBJ - int oletct, iletct, allowgold, unpaid, oc_of_sym; -#else int oletct, iletct, unpaid, oc_of_sym; -#endif char sym, *ip, olets[MAXOCLASSES+5], ilets[MAXOCLASSES+5]; char extra_removeables[3+1]; /* uwep,uswapwep,uquiver */ char buf[BUFSZ], qbuf[QBUFSZ]; if (resultflags) *resultflags = 0; -#ifndef GOLDOBJ - allowgold = (u.ugold && !strcmp(word, "drop")) ? 1 : 0; -#endif takeoff = ident = allflag = m_seen = FALSE; -#ifndef GOLDOBJ - if(!invent && !allowgold){ -#else if(!invent){ -#endif You("have nothing to %s.", word); return(0); } @@ -1333,9 +1180,6 @@ unsigned *resultflags; iletct = collect_obj_classes(ilets, invent, FALSE, -#ifndef GOLDOBJ - (allowgold != 0), -#endif filter, &itemcount); unpaid = count_unpaid(invent); @@ -1408,15 +1252,7 @@ unsigned *resultflags; } if (oc_of_sym == COIN_CLASS && !combo) { -#ifndef GOLDOBJ - if (allowgold == 1) - (*fn)(mkgoldobj(u.ugold)); - else if (!u.ugold) - You("have no gold."); - allowgold = 2; -#else context.botl = 1; -#endif } else if (sym == 'a') { allflag = TRUE; } else if (sym == 'A') { @@ -1453,16 +1289,10 @@ unsigned *resultflags; return (allflag || (!oletct && ckfn != ckunpaid)) ? -2 : -3; else if (flags.menu_style != MENU_TRADITIONAL && combo && !allflag) return 0; -#ifndef GOLDOBJ - else if (allowgold == 2 && !oletct) - return 1; /* you dropped gold (or at least tried to) */ - else { -#else else /*!!!! if (allowgold == 2 && !oletct) !!!! return 1; you dropped gold (or at least tried to) !!!! test gold dropping else*/ { -#endif int cnt = askchain(&invent, olets, allflag, fn, ckfn, mx, word); /* * askchain() has already finished the job in this case @@ -1739,10 +1569,6 @@ STATIC_OVL char obj_to_let(obj) /* should of course only be called for things in invent */ register struct obj *obj; { -#ifndef GOLDOBJ - if (obj->oclass == COIN_CLASS) - return GOLD_SYM; -#endif if (!flags.invlet_constant) { obj->invlet = NOINVSYM; reassign(); @@ -1798,11 +1624,6 @@ long quan; /* if non-0, print this quantity, not obj->quan */ Sprintf(li, "%c - %-45s %6ld %s", (dot && use_invlet ? obj->invlet : let), (txt ? txt : doname(obj)), cost, currency(cost)); -#ifndef GOLDOBJ - } else if (obj && obj->oclass == COIN_CLASS) { - Sprintf(li, "%ld gold piece%s%s", obj->quan, plur(obj->quan), - (dot ? "." : "")); -#endif } else { /* ordinary inventory display or pickup message */ Sprintf(li, "%c - %s%s", @@ -1896,11 +1717,7 @@ long* out_cnt; to here is short circuited away. */ if (!invent && !(flags.perm_invent && !lets && !want_reply)) { -#ifndef GOLDOBJ - pline("Not carrying anything%s.", u.ugold ? " except gold" : ""); -#else pline("Not carrying anything."); -#endif return 0; } @@ -1925,7 +1742,6 @@ long* out_cnt; } start_menu(win); -#ifdef WIZARD if (wizard && iflags.override_ID) { char prompt[BUFSZ]; any.a_char = -1; @@ -1936,7 +1752,6 @@ long* out_cnt; add_menu(win, NO_GLYPH, &any,' ', iflags.override_ID, ATR_NONE, prompt, MENU_UNSELECTED); } -#endif nextclass: classcount = 0; any = zeroany; /* set all bits to zero */ @@ -1959,12 +1774,10 @@ nextclass: } if (flags.sortpack) { if (*++invlet) goto nextclass; -#ifdef WIZARD if (--invlet != venom_inv) { invlet = venom_inv; goto nextclass; } -#endif } end_menu(win, (char *) 0); @@ -2234,11 +2047,7 @@ dotypeinv() boolean traditional = TRUE; const char *prompt = "What type of object do you want an inventory of?"; -#ifndef GOLDOBJ - if (!invent && !u.ugold && !billx) { -#else if (!invent && !billx) { -#endif You("aren't carrying anything."); return 0; } @@ -2260,9 +2069,6 @@ dotypeinv() types[0] = 0; class_count = collect_obj_classes(types, invent, FALSE, -#ifndef GOLDOBJ - (u.ugold != 0), -#endif (boolean FDECL((*),(OBJ_P))) 0, &itemcount); if (unpaid_count) { Strcat(types, "u"); @@ -2286,9 +2092,7 @@ dotypeinv() if(class_count > 1) { c = yn_function(prompt, types, '\0'); -#ifdef REDO savech(c); -#endif if(c == '\0') { clear_nhwindow(WIN_MESSAGE); return 0; @@ -2366,10 +2170,8 @@ char *buf; cmap = S_ice; /* "ice" */ else if (is_pool(x,y)) dfeature = "pool of water"; -#ifdef SINKS else if (IS_SINK(ltyp)) cmap = S_sink; /* "sink" */ -#endif else if (IS_ALTAR(ltyp)) { Sprintf(altbuf, "%saltar to %s (%s)", ((lev->altarmask & AM_SHRINE) && @@ -2513,9 +2315,6 @@ boolean picked_some; /* only one object */ if (dfeature) pline1(fbuf); read_engr_at(u.ux, u.uy); /* Eric Backus */ -#ifdef INVISIBLE_OBJECTS - if (otmp->oinvis && !See_invisible) verb = "feel"; -#endif You("%s here %s.", verb, doname(otmp)); iflags.last_msg = PLNMSG_ONE_ITEM_HERE; if (otmp->otyp == CORPSE) feel_cockatrice(otmp, FALSE); @@ -2609,10 +2408,8 @@ mergable(otmp, obj) /* returns TRUE if obj & otmp can be merged */ { int objnamelth = 0, otmpnamelth = 0; if (obj->otyp != otmp->otyp) return FALSE; -#ifdef GOLDOBJ /* coins of the same kind will always merge */ if (obj->oclass == COIN_CLASS) return TRUE; -#endif if (obj->unpaid != otmp->unpaid || obj->spe != otmp->spe || obj->dknown != otmp->dknown || (obj->bknown != otmp->bknown && !Role_if(PM_PRIEST)) || @@ -2621,9 +2418,6 @@ mergable(otmp, obj) /* returns TRUE if obj & otmp can be merged */ obj->obroken != otmp->obroken || obj->otrapped != otmp->otrapped || obj->lamplit != otmp->lamplit || -#ifdef INVISIBLE_OBJECTS - obj->oinvis != otmp->oinvis || -#endif obj->greased != otmp->greased || obj->oeroded != otmp->oeroded || obj->oeroded2 != otmp->oeroded2 || @@ -2693,18 +2487,11 @@ doprgold() { /* the messages used to refer to "carrying gold", but that didn't take containers into account */ -#ifndef GOLDOBJ - if(!u.ugold) - Your("wallet is empty."); - else - Your("wallet contains %ld gold piece%s.", u.ugold, plur(u.ugold)); -#else long umoney = money_cnt(invent); if(!umoney) Your("wallet is empty."); else Your("wallet contains %ld %s.", umoney, currency(umoney)); -#endif shopper_financial_report(); return 0; } @@ -2749,16 +2536,10 @@ doprarm() if (!wearing_armor()) { noarmor(TRUE); } else { -#ifdef TOURIST char lets[8]; -#else - char lets[7]; -#endif register int ct = 0; -#ifdef TOURIST if(uarmu) lets[ct++] = obj_to_let(uarmu); -#endif if(uarm) lets[ct++] = obj_to_let(uarm); if(uarmc) lets[ct++] = obj_to_let(uarmc); if(uarmh) lets[ct++] = obj_to_let(uarmh); @@ -2802,11 +2583,7 @@ STATIC_OVL boolean tool_in_use(obj) struct obj *obj; { - if ((obj->owornmask & (W_TOOL -#ifdef STEED - | W_SADDLE -#endif - )) != 0L) return TRUE; + if ((obj->owornmask & (W_TOOL | W_SADDLE)) != 0L) return TRUE; if (obj->oclass != TOOL_CLASS) return FALSE; return (boolean)(obj == uwep || obj->lamplit || (obj->otyp == LEASH && obj->leashmon)); @@ -2942,17 +2719,13 @@ reassign() register struct obj *obj; for(obj = invent, i = 0; obj; obj = obj->nobj, i++) { -#ifdef GOLDOBJ if (obj->oclass == COIN_CLASS && obj->invlet == GOLD_SYM) --i; /* keep $ instead of using up i'th letter */ else -#endif if (i < 52) obj->invlet = (i < 26) ? ('a'+i) : ('A'+i-26); -#ifdef GOLDOBJ else if (obj->oclass == COIN_CLASS) obj->invlet = GOLD_SYM; -#endif else obj->invlet = NOINVSYM; } @@ -2996,7 +2769,6 @@ doorganize() /* inventory organizer by Del Lamb */ const char *adj_type; if (!invent) { - /* (we don't need any !GOLDOBJ check for "except gold" here) */ You("aren't carrying anything to adjust."); return 0; } @@ -3205,20 +2977,12 @@ int dflags; char *title; { struct obj *ret; -#ifndef GOLDOBJ - struct obj m_gold; -#endif char tmp[QBUFSZ]; int n; menu_item *selected = 0; int do_all = (dflags & MINV_ALL) != 0, incl_hero = (do_all && u.uswallow && mon == u.ustuck), -#ifndef GOLDOBJ - do_gold = (do_all && mon->mgold), - have_inv = (mon->minvent || do_gold), -#else have_inv = (mon->minvent != 0), -#endif have_any = (have_inv || incl_hero); Sprintf(tmp,"%s %s:", s_suffix(noit_Monnam(mon)), @@ -3230,34 +2994,12 @@ char *title; */ youmonst.data = mon->data; -#ifndef GOLDOBJ - if (do_gold) { - /* - * Make temporary gold object and insert at the head of - * the mon's inventory. We can get away with using a - * stack variable object because monsters don't carry - * gold in their inventory, so it won't merge. - */ - m_gold = zeroobj; - m_gold.otyp = GOLD_PIECE; m_gold.oclass = COIN_CLASS; - m_gold.quan = mon->mgold; m_gold.dknown = 1; - m_gold.where = OBJ_FREE; - /* we had better not merge and free this object... */ - if (add_to_minv(mon, &m_gold)) - panic("display_minventory: static object freed."); - } - -#endif n = query_objlist(title ? title : tmp, mon->minvent, INVORDER_SORT | (incl_hero ? INCLUDE_HERO : 0), &selected, (dflags & MINV_NOLET) ? PICK_NONE : PICK_ONE, do_all ? allow_all : worn_wield_only); -#ifndef GOLDOBJ - if (do_gold) obj_extract_self(&m_gold); -#endif - set_uasmon(); } else { invdisp_nothing(title ? title : tmp, "(none)"); @@ -3267,14 +3009,6 @@ char *title; if (n > 0) { ret = selected[0].item.a_obj; free((genericptr_t)selected); -#ifndef GOLDOBJ - /* - * Unfortunately, we can't return a pointer to our temporary - * gold object. We'll have to work out a scheme where this - * can happen. Maybe even put gold in the inventory list... - */ - if (ret == &m_gold) ret = (struct obj *) 0; -#endif } else ret = (struct obj *) 0; return ret; diff --git a/src/light.c b/src/light.c index 4f39849ca..f7d43eeee 100644 --- a/src/light.c +++ b/src/light.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 light.c $Date$ $Revision$ */ +/* NetHack 3.5 light.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 light.c $Date: 2009/05/06 10:46:38 $ $Revision: 1.15 $ */ /* SCCS Id: @(#)light.c 3.5 2009/01/20 */ /* Copyright (c) Dean Luick, 1994 */ /* NetHack may be freely redistributed. See license for details. */ @@ -392,18 +393,14 @@ write_ls(fd, ls) otmp = ls->id.a_obj; ls->id = zeroany; ls->id.a_uint = otmp->o_id; -#ifdef DEBUG - if (find_oid((unsigned)ls->id) != otmp) - panic("write_ls: can't find obj #%u!", ls->id.a_uint); -#endif + if (find_oid((unsigned)ls->id.a_uint) != otmp) + debugpline("write_ls: can't find obj #%u!", ls->id.a_uint); } else { /* ls->type == LS_MONSTER */ mtmp = (struct monst *)ls->id.a_monst; ls->id = zeroany; ls->id.a_uint = mtmp->m_id; -#ifdef DEBUG - if (find_mid((unsigned)ls->id, FM_EVERYWHERE) != mtmp) - panic("write_ls: can't find mon #%u!", ls->x_id); -#endif + if (find_mid((unsigned)ls->id.a_uint, FM_EVERYWHERE) != mtmp) + debugpline("write_ls: can't find mon #%u!", ls->id.a_uint); } ls->flags |= LSF_NEEDS_FIXUP; bwrite(fd, (genericptr_t)ls, sizeof(light_source)); @@ -632,8 +629,6 @@ struct obj *obj; return "strangely"; } -#ifdef WIZARD - int wiz_light_sources() { @@ -673,6 +668,4 @@ wiz_light_sources() return 0; } -#endif /* WIZARD */ - /*light.c*/ diff --git a/src/lock.c b/src/lock.c index 87b54cca3..67a11a545 100644 --- a/src/lock.c +++ b/src/lock.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 lock.c $Date$ $Revision$ */ +/* NetHack 3.5 lock.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lock.c $Date: 2014/09/20 00:32:01 $ $Revision: 1.39 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -60,10 +61,8 @@ lock_action() /* otherwise we're trying to unlock it */ else if (xlock.picktyp == LOCK_PICK) return actions[3]; /* "picking the lock" */ -#ifdef TOURIST else if (xlock.picktyp == CREDIT_CARD) return actions[3]; /* same as lock_pick */ -#endif else if (xlock.door) return actions[0]; /* "unlocking the door" */ else @@ -252,9 +251,7 @@ pick_lock(pick) if (nohands(youmonst.data)) { const char *what = (picktyp == LOCK_PICK) ? "pick" : "key"; -#ifdef TOURIST if (picktyp == CREDIT_CARD) what = "card"; -#endif pline(no_longer, "hold the", what); reset_pick(); return PICKLOCK_LEARNED_SOMETHING; @@ -275,18 +272,13 @@ pick_lock(pick) return PICKLOCK_DID_NOTHING; } else if (u.uswallow) { You_cant("%sunlock %s.", -#ifdef TOURIST (picktyp == CREDIT_CARD) ? "" : -#endif "lock or ", mon_nam(u.ustuck)); return PICKLOCK_DID_NOTHING; } - if((picktyp != LOCK_PICK && -#ifdef TOURIST - picktyp != CREDIT_CARD && -#endif - picktyp != SKELETON_KEY)) { + if((picktyp != LOCK_PICK && picktyp != CREDIT_CARD + && picktyp != SKELETON_KEY)) { impossible("picking lock with object %d?", picktyp); return PICKLOCK_DID_NOTHING; } @@ -343,20 +335,16 @@ pick_lock(pick) You_cant("fix its broken lock with %s.", doname(pick)); return PICKLOCK_LEARNED_SOMETHING; } -#ifdef TOURIST else if (picktyp == CREDIT_CARD && !otmp->olocked) { /* credit cards are only good for unlocking */ You_cant("do that with %s.", an(simple_typename(picktyp))); return PICKLOCK_LEARNED_SOMETHING; } -#endif switch(picktyp) { -#ifdef TOURIST case CREDIT_CARD: ch = ACURR(A_DEX) + 20*Role_if(PM_ROGUE); break; -#endif case LOCK_PICK: ch = 4*ACURR(A_DEX) + 25*Role_if(PM_ROGUE); break; @@ -390,12 +378,10 @@ pick_lock(pick) if (mtmp && canseemon(mtmp) && mtmp->m_ap_type != M_AP_FURNITURE && mtmp->m_ap_type != M_AP_OBJECT) { -#ifdef TOURIST if (picktyp == CREDIT_CARD && (mtmp->isshk || mtmp->data == &mons[PM_ORACLE])) verbalize("No checks, no credit, no problem."); else -#endif pline("I don't think %s would appreciate that.", mon_nam(mtmp)); return PICKLOCK_LEARNED_SOMETHING; } else if (mtmp && mtmp->m_ap_type == M_AP_FURNITURE && @@ -429,13 +415,11 @@ pick_lock(pick) pline("This door is broken."); return PICKLOCK_LEARNED_SOMETHING; default: -#ifdef TOURIST /* credit cards are only good for unlocking */ if(picktyp == CREDIT_CARD && !(door->doormask & D_LOCKED)) { You_cant("lock a door with a credit card."); return PICKLOCK_LEARNED_SOMETHING; } -#endif Sprintf(qbuf,"%s it?", (door->doormask & D_LOCKED) ? "Unlock" : "Lock"); @@ -444,11 +428,9 @@ pick_lock(pick) if(c == 'n') return(0); switch(picktyp) { -#ifdef TOURIST case CREDIT_CARD: ch = 2*ACURR(A_DEX) + 20*Role_if(PM_ROGUE); break; -#endif case LOCK_PICK: ch = 3*ACURR(A_DEX) + 30*Role_if(PM_ROGUE); break; @@ -579,16 +561,12 @@ doopen() /* try to open a door */ portcullis = (is_drawbridge_wall(cc.x, cc.y) >= 0); if (Blind) { int oldglyph = door->glyph; -#ifdef DUNGEON_OVERVIEW schar oldlastseentyp = lastseentyp[cc.x][cc.y]; -#endif feel_location(cc.x, cc.y); if (door->glyph != oldglyph -#ifdef DUNGEON_OVERVIEW - || lastseentyp[cc.x][cc.y] != oldlastseentyp -#endif - ) res = 1; /* learned something */ + || lastseentyp[cc.x][cc.y] != oldlastseentyp) + res = 1; /* learned something */ } if (portcullis || !IS_DOOR(door->typ)) { @@ -711,16 +689,11 @@ doclose() /* try to close a door */ portcullis = (is_drawbridge_wall(x, y) >= 0); if (Blind) { int oldglyph = door->glyph; -#ifdef DUNGEON_OVERVIEW schar oldlastseentyp = lastseentyp[x][y]; -#endif feel_location(x, y); - if (door->glyph != oldglyph -#ifdef DUNGEON_OVERVIEW - || lastseentyp[x][y] != oldlastseentyp -#endif - ) res = 1; /* learned something */ + if (door->glyph != oldglyph || lastseentyp[x][y] != oldlastseentyp) + res = 1; /* learned something */ } if (portcullis || !IS_DOOR(door->typ)) { @@ -748,19 +721,11 @@ doclose() /* try to close a door */ } if(door->doormask == D_ISOPEN) { - if(verysmall(youmonst.data) -#ifdef STEED - && !u.usteed -#endif - ) { + if(verysmall(youmonst.data) && !u.usteed) { pline("You're too small to push the door closed."); return res; } - if ( -#ifdef STEED - u.usteed || -#endif - rn2(25) < (ACURRSTR+ACURR(A_DEX)+ACURR(A_CON))/3) { + if ( u.usteed || rn2(25) < (ACURRSTR+ACURR(A_DEX)+ACURR(A_CON))/3) { pline_The("door closes."); door->doormask = D_CLOSED; if (Blind) @@ -857,7 +822,6 @@ int x, y; switch(otmp->otyp) { case WAN_LOCKING: case SPE_WIZARD_LOCK: -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { boolean vis = cansee(x,y); /* Can't have real locking in Rogue, so just hide doorway */ @@ -875,7 +839,6 @@ int x, y; newsym(x,y); return TRUE; } -#endif if (obstructed(x,y,mysterywand)) return FALSE; /* Don't allow doors to close over traps. This is for pits */ /* & trap doors, but is it ever OK for anything else? */ diff --git a/src/mail.c b/src/mail.c index 7221d3864..cc01b97d3 100644 --- a/src/mail.c +++ b/src/mail.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mail.c $Date$ $Revision$ */ +/* NetHack 3.5 mail.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mail.c $Date: 2009/05/06 10:46:41 $ $Revision: 1.12 $ */ /* SCCS Id: @(#)mail.c 3.5 2008/01/30 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/makemon.c b/src/makemon.c index 98cfedb3d..afaa0140a 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -1,12 +1,11 @@ -/* NetHack 3.5 makemon.c $Date$ $Revision$ */ +/* NetHack 3.5 makemon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 makemon.c $Date: 2012/01/29 00:34:33 $ $Revision: 1.69 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#ifdef REINCARNATION #include -#endif STATIC_VAR NEARDATA struct monst zeromonst; @@ -94,9 +93,7 @@ register int x, y, n; int cnttmp,cntdiv; cnttmp = cnt; -# ifdef DEBUG - pline("init group call x=%d,y=%d,n=%d,cnt=%d.", x, y, n, cnt); -# endif + debugpline("init group call x=%d,y=%d,n=%d,cnt=%d.", x, y, n, cnt); cntdiv = ((u.ulevel < 3) ? 4 : (u.ulevel < 5) ? 2 : 1); #endif /* Tuning: cut down on swarming at low character levels [mrs] */ @@ -159,9 +156,7 @@ register struct monst *mtmp; register int mm = monsndx(ptr); struct obj *otmp; -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) return; -#endif /* * first a few special cases: * @@ -312,14 +307,12 @@ register struct monst *mtmp; } } break; -# ifdef KOPS case S_KOP: /* create Keystone Kops with cream pies to * throw. As suggested by KAA. [MRS] */ if (!rn2(4)) m_initthrow(mtmp, CREAM_PIE, 2); if (!rn2(3)) (void)mongets(mtmp,(rn2(2)) ? CLUB : RUBBER_HOSE); break; -# endif case S_ORC: if(rn2(2)) (void)mongets(mtmp, ORCISH_HELM); switch (mm != PM_ORC_CAPTAIN ? mm : @@ -459,7 +452,6 @@ register struct monst *mtmp; (void) mongets(mtmp, rnd_offensive_item(mtmp)); } -#ifdef GOLDOBJ /* * Makes up money for monster's inventory. * This will change with silver & copper coins @@ -473,7 +465,6 @@ long amount; gold->quan = amount; add_to_minv(mtmp, gold); } -#endif STATIC_OVL void m_initinv(mtmp) @@ -482,9 +473,7 @@ register struct monst *mtmp; register int cnt; register struct obj *otmp; register struct permonst *ptr = mtmp->data; -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) return; -#endif /* * Soldiers get armour & rations - armour approximates their ac. * Nymphs may get mirror or potion of object detection. @@ -562,11 +551,7 @@ register struct monst *mtmp; rn2(3) ? CLOAK_OF_PROTECTION : CLOAK_OF_MAGIC_RESISTANCE); (void) mongets(mtmp, SMALL_SHIELD); -#ifndef GOLDOBJ - mtmp->mgold = (long)rn1(10,20); -#else mkmonmoney(mtmp,(long)rn1(10,20)); -#endif } else if (quest_mon_represents_role(ptr,PM_MONK)) { (void) mongets(mtmp, rn2(11) ? ROBE : CLOAK_OF_MAGIC_RESISTANCE); @@ -620,11 +605,7 @@ register struct monst *mtmp; } break; case S_LEPRECHAUN: -#ifndef GOLDOBJ - mtmp->mgold = (long) d(level_difficulty(), 30); -#else mkmonmoney(mtmp, (long) d(level_difficulty(), 30)); -#endif break; case S_DEMON: /* moved here from m_initweap() because these don't @@ -647,14 +628,8 @@ register struct monst *mtmp; (void) mongets(mtmp, rnd_defensive_item(mtmp)); if ((int) mtmp->m_lev > rn2(100)) (void) mongets(mtmp, rnd_misc_item(mtmp)); -#ifndef GOLDOBJ - if (likes_gold(ptr) && !mtmp->mgold && !rn2(5)) - mtmp->mgold = - (long) d(level_difficulty(), mtmp->minvent ? 5 : 10); -#else if (likes_gold(ptr) && !findgold(mtmp->minvent) && !rn2(5)) mkmonmoney(mtmp, (long) d(level_difficulty(), mtmp->minvent ? 5 : 10)); -#endif } /* Note: for long worms, always call cutworm (cutworm calls clone_mon) */ @@ -698,9 +673,6 @@ xchar x, y; /* clone's preferred location or 0 (near mon) */ m2->mcloned = 1; m2->minvent = (struct obj *) 0; /* objects don't clone */ m2->mleashed = FALSE; -#ifndef GOLDOBJ - m2->mgold = 0L; -#endif /* Max HP the same, but current HP halved for both. The caller * might want to override this by halving the max HP also. * When current HP is odd, the original keeps the extra point. @@ -786,10 +758,8 @@ boolean ghostly; mvitals[mndx].born++; if ((int) mvitals[mndx].born >= lim && !(mons[mndx].geno & G_NOGEN) && !(mvitals[mndx].mvflags & G_EXTINCT)) { -#if defined(DEBUG) && defined(WIZARD) - if (wizard) pline("Automatically extinguished %s.", + if (wizard) debugpline("Automatically extinguished %s.", makeplural(mons[mndx].mname)); -#endif mvitals[mndx].mvflags |= G_EXTINCT; reset_rndmonst(mndx); } @@ -932,11 +902,9 @@ register int mmflags; /* if you are to make a specific monster and it has already been genocided, return */ if (mvitals[mndx].mvflags & G_GENOD) return((struct monst *) 0); -#if defined(WIZARD) && defined(DEBUG) if (wizard && (mvitals[mndx].mvflags & G_EXTINCT)) - pline("Explicitly creating extinct monster %s.", + debugpline("Explicitly creating extinct monster %s.", mons[mndx].mname); -#endif } else { /* make a random (common) monster that can survive here. * (the special levels ask for random monsters at specific @@ -948,9 +916,7 @@ register int mmflags; do { if(!(ptr = rndmonst())) { -#ifdef DEBUG - pline("Warning: no monster."); -#endif + debugpline("Warning: no monster."); return((struct monst *) 0); /* no more monsters! */ } fakemon.data = ptr; /* set up for goodpos */ @@ -1193,12 +1159,9 @@ boolean neverask; int x, y; struct monst *mon; boolean known = FALSE; -#ifdef WIZARD boolean ask = (wizard && !neverask); -#endif while (cnt--) { -#ifdef WIZARD if (ask) { if (create_particular()) { known = TRUE; @@ -1206,7 +1169,6 @@ boolean neverask; } else ask = FALSE; /* ESC will shut off prompting */ } -#endif x = u.ux, y = u.uy; /* if in water, try to encourage an aquatic monster by finding and then specifying another wet location */ @@ -1280,9 +1242,7 @@ rndmonst() if (rndmonst_state.choice_count < 0) { /* need to recalculate */ int zlevel, minmlev, maxmlev; boolean elemlevel; -#ifdef REINCARNATION boolean upper; -#endif rndmonst_state.choice_count = 0; /* look for first common monster */ @@ -1292,9 +1252,7 @@ rndmonst() } if (mndx == SPECIAL_PM) { /* evidently they've all been exterminated */ -#ifdef DEBUG - pline("rndmonst: no common mons!"); -#endif + debugpline("rndmonst: no common mons!"); return (struct permonst *)0; } /* else `mndx' now ready for use below */ zlevel = level_difficulty(); @@ -1302,9 +1260,7 @@ rndmonst() minmlev = zlevel / 6; /* determine the level of the strongest monster to make. */ maxmlev = (zlevel + u.ulevel) / 2; -#ifdef REINCARNATION upper = Is_rogue_level(&u.uz); -#endif elemlevel = In_endgame(&u.uz) && !Is_astralevel(&u.uz); /* @@ -1316,9 +1272,7 @@ rndmonst() rndmonst_state.mchoices[mndx] = 0; if (tooweak(mndx, minmlev) || toostrong(mndx, maxmlev)) continue; -#ifdef REINCARNATION if (upper && !isupper(def_monsyms[(int)(ptr->mlet)].sym)) continue; -#endif if (elemlevel && wrong_elem_type(ptr)) continue; if (uncommon(mndx)) continue; if (Inhell && (ptr->geno & G_NOHELL)) continue; @@ -1336,9 +1290,7 @@ rndmonst() if (rndmonst_state.choice_count <= 0) { /* maybe no common mons left, or all are too weak or too strong */ -#ifdef DEBUG - Norep("rndmonst: choice_count=%d", rndmonst_state.choice_count); -#endif + debugpline("rndmonst: choice_count=%d", rndmonst_state.choice_count); return (struct permonst *)0; } @@ -1826,15 +1778,9 @@ register struct monst *mtmp; levl[mx-1][my].typ == TDWALL || levl[mx-1][my].typ == CROSSWALL|| levl[mx-1][my].typ == TUWALL )) -#ifdef REINCARNATION appear = Is_rogue_level(&u.uz) ? S_hwall : S_hcdoor; else appear = Is_rogue_level(&u.uz) ? S_vwall : S_vcdoor; -#else - appear = S_hcdoor; - else - appear = S_vcdoor; -#endif if(!mtmp->minvis || See_invisible) block_point(mx,my); /* vision */ } else if (level.flags.is_maze_lev && !In_sokoban(&u.uz) && rn2(2)) { diff --git a/src/mapglyph.c b/src/mapglyph.c index fe8ade7f4..e44265d3a 100644 --- a/src/mapglyph.c +++ b/src/mapglyph.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mapglyph.c $Date$ $Revision$ */ +/* NetHack 3.5 mapglyph.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mapglyph.c $Date: 2009/05/06 10:46:45 $ $Revision: 1.24 $ */ /* SCCS Id: @(#)mapglyph.c 3.5 2006/10/01 */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -33,9 +34,6 @@ int explcolors[] = { #define pet_color(n) color = iflags.use_color ? mons[n].mcolor : NO_COLOR #define warn_color(n) color = iflags.use_color ? def_warnsyms[n].color : NO_COLOR #define explode_color(n) color = iflags.use_color ? explcolors[n] : NO_COLOR -# if defined(REINCARNATION) && defined(LOADSYMSETS) -# define ROGUE_COLOR -# endif #else /* no text color */ @@ -65,17 +63,13 @@ int *ochar; unsigned *ospecial; { register int offset, idx; -#if defined(TEXTCOLOR) || defined(ROGUE_COLOR) int color = NO_COLOR; -#endif nhsym ch; unsigned special = 0; /* condense multiple tests in macro version down to single */ boolean has_rogue_ibm_graphics = HAS_ROGUE_IBM_GRAPHICS; -#ifdef ROGUE_COLOR boolean has_rogue_color = (has_rogue_ibm_graphics && (symset[currentgraphics].nocolor == 0)); -#endif /* * Map the glyph back to a character and color. @@ -85,45 +79,36 @@ unsigned *ospecial; */ if ((offset = (glyph - GLYPH_STATUE_OFF)) >= 0) { /* a statue */ idx = mons[offset].mlet + SYM_OFF_M; -# ifdef ROGUE_COLOR if (has_rogue_color) color = CLR_RED; else -# endif obj_color(STATUE); special |= MG_STATUE; } else if ((offset = (glyph - GLYPH_WARNING_OFF)) >= 0) { /* a warning flash */ idx = offset + SYM_OFF_W; -# ifdef ROGUE_COLOR if (has_rogue_color) color = NO_COLOR; else -# endif warn_color(offset); } else if ((offset = (glyph - GLYPH_SWALLOW_OFF)) >= 0) { /* swallow */ /* see swallow_to_glyph() in display.c */ idx = (S_sw_tl + (offset & 0x7)) + SYM_OFF_P; -#ifdef ROGUE_COLOR if (has_rogue_color && iflags.use_color) color = NO_COLOR; else -#endif mon_color(offset >> 3); } else if ((offset = (glyph - GLYPH_ZAP_OFF)) >= 0) { /* zap beam */ /* see zapdir_to_glyph() in display.c */ idx = (S_vbeam + (offset & 0x3)) + SYM_OFF_P; -#ifdef ROGUE_COLOR if (has_rogue_color && iflags.use_color) color = NO_COLOR; else -#endif zap_color((offset >> 2)); } else if ((offset = (glyph - GLYPH_EXPLODE_OFF)) >= 0) { /* explosion */ idx = ((offset % MAXEXPCHARS) + S_explode1) + SYM_OFF_P; explode_color(offset / MAXEXPCHARS); } else if ((offset = (glyph - GLYPH_CMAP_OFF)) >= 0) { /* cmap */ idx = offset + SYM_OFF_P; -#ifdef ROGUE_COLOR if (has_rogue_color && iflags.use_color) { if (offset >= S_vwall && offset <= S_hcdoor) color = CLR_BROWN; @@ -136,7 +121,6 @@ unsigned *ospecial; else color = NO_COLOR; } else -#endif #ifdef TEXTCOLOR /* provide a visible difference if normal and lit corridor * use the same symbol */ @@ -150,7 +134,6 @@ unsigned *ospecial; idx = objects[offset].oc_class + SYM_OFF_O; if (offset == BOULDER && iflags.bouldersym) idx = SYM_BOULDER + SYM_OFF_X; -#ifdef ROGUE_COLOR if (has_rogue_color && iflags.use_color) { switch(objects[offset].oc_class) { case COIN_CLASS: color = CLR_YELLOW; break; @@ -158,70 +141,56 @@ unsigned *ospecial; default: color = CLR_BRIGHT_BLUE; break; } } else -#endif obj_color(offset); } else if ((offset = (glyph - GLYPH_RIDDEN_OFF)) >= 0) { /* mon ridden */ idx = mons[offset].mlet + SYM_OFF_M; -#ifdef ROGUE_COLOR if (has_rogue_color) /* This currently implies that the hero is here -- monsters */ /* don't ride (yet...). Should we set it to yellow like in */ /* the monster case below? There is no equivalent in rogue. */ color = NO_COLOR; /* no need to check iflags.use_color */ else -#endif mon_color(offset); special |= MG_RIDDEN; } else if ((offset = (glyph - GLYPH_BODY_OFF)) >= 0) { /* a corpse */ idx = objects[CORPSE].oc_class + SYM_OFF_O; -#ifdef ROGUE_COLOR if (has_rogue_color && iflags.use_color) color = CLR_RED; else -#endif mon_color(offset); special |= MG_CORPSE; } else if ((offset = (glyph - GLYPH_DETECT_OFF)) >= 0) { /* mon detect */ idx = mons[offset].mlet + SYM_OFF_M; -#ifdef ROGUE_COLOR if (has_rogue_color) color = NO_COLOR; /* no need to check iflags.use_color */ else -#endif mon_color(offset); /* Disabled for now; anyone want to get reverse video to work? */ /* is_reverse = TRUE; */ special |= MG_DETECT; } else if ((offset = (glyph - GLYPH_INVIS_OFF)) >= 0) { /* invisible */ idx = SYM_INVISIBLE + SYM_OFF_X; -#ifdef ROGUE_COLOR if (has_rogue_color) color = NO_COLOR; /* no need to check iflags.use_color */ else -#endif invis_color(offset); special |= MG_INVIS; } else if ((offset = (glyph - GLYPH_PET_OFF)) >= 0) { /* a pet */ idx = mons[offset].mlet + SYM_OFF_M; -#ifdef ROGUE_COLOR if (has_rogue_color) color = NO_COLOR; /* no need to check iflags.use_color */ else -#endif pet_color(offset); special |= MG_PET; } else { /* a monster */ idx = mons[glyph].mlet + SYM_OFF_M; -#ifdef ROGUE_COLOR if (has_rogue_color && iflags.use_color) { if (x == u.ux && y == u.uy) /* actually player should be yellow-on-gray if in a corridor */ color = CLR_YELLOW; else color = NO_COLOR; - } else -#endif - { + } else { mon_color(glyph); /* special case the hero for `showrace' option */ #ifdef TEXTCOLOR @@ -235,15 +204,7 @@ unsigned *ospecial; ch = showsyms[idx]; #ifdef TEXTCOLOR /* Turn off color if no color defined, or rogue level w/o PC graphics. */ -# ifdef REINCARNATION -# ifdef ROGUE_COLOR if (!has_color(color) || (Is_rogue_level(&u.uz) && !has_rogue_color)) -# else - if (!has_color(color) || Is_rogue_level(&u.uz)) -# endif -# else - if (!has_color(color)) -# endif color = NO_COLOR; #endif @@ -264,7 +225,6 @@ int glyph; return encbuf; } -#ifndef UNICODE_WIDEWINPORT /* * This differs from putstr() because the str parameter can * contain a sequence of characters representing: @@ -306,12 +266,25 @@ genl_putmixed(window, attr, str) gv = (int)((gv * 16) + ((int)(dp - hex) / 2)); so = mapglyph(gv, &ch, &oc, &os, 0, 0); *put++ = showsyms[so]; - continue; } else { /* possible forgery - leave it the way it is */ cp = save_cp; } break; +# if 0 + case 'S': /* symbol offset */ + dcount = 0; + for (++cp; *cp && (dp = index(hex, *cp)) && (dcount++ < 4); cp++) + rndchk = (int)((rndchk * 16) + ((int)(dp - hex) / 2)); + + if (rndchk == context.rndencode) { + dcount = 0; + for (; *cp && (dp = index(hex, *cp)) && (dcount++ < 2); cp++) + so = (int)((so * 16) + ((int)(dp - hex) / 2)); + } + *put++ = showsyms[so]; + break; +# endif case '\\': break; } @@ -322,5 +295,4 @@ genl_putmixed(window, attr, str) /* now send it to the normal putstr */ putstr(window, attr, buf); } -#endif /*!UNICODE_WIDEWINPORT*/ /*mapglyph.c*/ diff --git a/src/mcastu.c b/src/mcastu.c index a8bc604b2..a677db12e 100644 --- a/src/mcastu.c +++ b/src/mcastu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mcastu.c $Date$ $Revision$ */ +/* NetHack 3.5 mcastu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mcastu.c $Date: 2011/12/30 23:14:58 $ $Revision: 1.37 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mhitm.c b/src/mhitm.c index ade47bf26..47a14915f 100644 --- a/src/mhitm.c +++ b/src/mhitm.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhitm.c $Date$ $Revision$ */ +/* NetHack 3.5 mhitm.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhitm.c $Date: 2011/04/07 20:59:40 $ $Revision: 1.57 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -167,7 +168,6 @@ fightm(mtmp) /* have monsters fight each other */ return 0; } -#ifdef BARGETHROUGH /* * mdisplacem() -- attacker moves defender out of the way; * returns same results as mattackm(). @@ -243,7 +243,6 @@ boolean quietly; return MM_HIT; } -#endif /* BARGETHROUGH */ /* * mattackm() -- a monster attacks another monster. @@ -404,12 +403,10 @@ mattackm(magr, mdef) break; case AT_ENGL: -#ifdef STEED if (u.usteed && (mdef == u.usteed)) { strike = 0; break; } -#endif /* Engulfing attacks are directed at the hero if * possible. -dlc */ @@ -955,11 +952,7 @@ mdamagem(magr, mdef, mattk) if (vis) Strcpy(mdef_Monnam, Monnam(mdef)); mdef->mstrategy &= ~STRAT_WAITFORU; (void) rloc(mdef, FALSE); - if (vis && !canspotmon(mdef) -#ifdef STEED - && mdef != u.usteed -#endif - ) + if (vis && !canspotmon(mdef) && mdef != u.usteed) pline("%s suddenly disappears!", mdef_Monnam); } break; @@ -1055,14 +1048,6 @@ mdamagem(magr, mdef, mattk) break; case AD_SGLD: tmp = 0; -#ifndef GOLDOBJ - if (magr->mcan || !mdef->mgold) break; - /* technically incorrect; no check for stealing gold from - * between mdef's feet... - */ - magr->mgold += mdef->mgold; - mdef->mgold = 0; -#else if (magr->mcan) break; /* technically incorrect; no check for stealing gold from * between mdef's feet... @@ -1073,7 +1058,6 @@ mdamagem(magr, mdef, mattk) obj_extract_self(gold); add_to_minv(magr, gold); } -#endif mdef->mstrategy &= ~STRAT_WAITFORU; if (vis) { Strcpy(buf, Monnam(magr)); @@ -1097,9 +1081,7 @@ mdamagem(magr, mdef, mattk) /* Automatic kill if drained past level 0 */ } break; -#ifdef SEDUCE case AD_SSEX: -#endif case AD_SITM: /* for now these are the same */ case AD_SEDU: if (magr->mcan) break; @@ -1116,12 +1098,10 @@ mdamagem(magr, mdef, mattk) Strcpy(mdefnambuf, x_monnam(mdef, ARTICLE_THE, (char *)0, 0, FALSE)); otmp = obj; -#ifdef STEED if (u.usteed == mdef && otmp == which_armor(mdef, W_SADDLE)) /* "You can no longer ride ." */ dismount_steed(DISMOUNT_POLY); -#endif obj_extract_self(otmp); if (otmp->owornmask) { mdef->misc_worn_check &= ~otmp->owornmask; diff --git a/src/mhitu.c b/src/mhitu.c index 1d650f23d..6f298ff63 100644 --- a/src/mhitu.c +++ b/src/mhitu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhitu.c $Date$ $Revision$ */ +/* NetHack 3.5 mhitu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhitu.c $Date: 2012/02/05 04:26:48 $ $Revision: 1.104 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -11,9 +12,7 @@ STATIC_DCL void FDECL(urustm, (struct monst *, struct obj *)); STATIC_DCL boolean FDECL(u_slip_free, (struct monst *,struct attack *)); STATIC_DCL int FDECL(passiveum, (struct permonst *,struct monst *,struct attack *)); -#ifdef SEDUCE STATIC_DCL void FDECL(mayberem, (struct obj *, const char *)); -#endif STATIC_DCL boolean FDECL(diseasemu, (struct permonst *)); STATIC_DCL int FDECL(hitmu, (struct monst *,struct attack *)); @@ -322,7 +321,6 @@ mattacku(mtmp) if(u.uinvulnerable) return (0); /* stomachs can't hurt you! */ } -#ifdef STEED else if (u.usteed) { if (mtmp == u.usteed) /* Your steed won't attack you */ @@ -342,7 +340,6 @@ mattacku(mtmp) return (!!(mattackm(u.usteed, mtmp) & MM_DEF_DIED)); } } -#endif if (u.uundetected && !range2 && foundyou && !u.uswallow) { if (!canspotmon(mtmp)) map_invisible(mtmp->mx, mtmp->my); @@ -655,9 +652,7 @@ mattacku(mtmp) break; case AT_WEAP: if(range2) { -#ifdef REINCARNATION if (!Is_rogue_level(&u.uz)) -#endif thrwmu(mtmp); } else { int hittmp = 0; @@ -760,10 +755,8 @@ int attk; */ if (uarm) (void)rust_dmg(uarm, xname(uarm), hurt, TRUE, &youmonst); -#ifdef TOURIST else if (uarmu) (void)rust_dmg(uarmu, xname(uarmu), hurt, TRUE, &youmonst); -#endif break; case 2: if (!uarms || !rust_dmg(uarms, xname(uarms), hurt, FALSE, &youmonst)) @@ -804,9 +797,7 @@ struct attack *mattk; { struct obj *obj = (uarmc ? uarmc : uarm); -#ifdef TOURIST if (!obj) obj = uarmu; -#endif if (mattk->adtyp == AD_DRIN) obj = uarmh; /* if your cloak/armor is greased, monster slips off; this @@ -1144,11 +1135,7 @@ dopois: * still _can_ attack you when you're flying or mounted. * [FIXME: why can't a flying attacker overcome this?] */ - if ( -#ifdef STEED - u.usteed || -#endif - Levitation || Flying) { + if (u.usteed || Levitation || Flying) { pline("%s tries to reach your %s %s!", Monnam(mtmp), sidestr, body_part(LEG)); dmg = 0; @@ -1267,7 +1254,6 @@ dopois: if(!mtmp->mcan) stealgold(mtmp); break; -#ifdef SEDUCE case AD_SSEX: if(SYSOPT_SEDUCE){ if(could_seduce(mtmp, &youmonst, mattk) == 1 @@ -1277,7 +1263,6 @@ dopois: break; } /* else FALLTHRU */ -#endif case AD_SITM: /* for now these are the same */ case AD_SEDU: if (is_animal(mtmp->data)) { @@ -1285,10 +1270,7 @@ dopois: if (mtmp->mcan) break; /* Continue below */ } else if (dmgtype(youmonst.data, AD_SEDU) -#ifdef SEDUCE - || (SYSOPT_SEDUCE && dmgtype(youmonst.data, AD_SSEX)) -#endif - ) { + || (SYSOPT_SEDUCE && dmgtype(youmonst.data, AD_SSEX))) { pline("%s %s.", Monnam(mtmp), mtmp->minvent ? "brags about the goods some dungeon explorer provided" : "makes some remarks about how difficult theft is lately"); @@ -1380,11 +1362,8 @@ dopois: hitmsg(mtmp, mattk); break; } - if(!uwep -#ifdef TOURIST - && !uarmu -#endif - && !uarm && !uarmh && !uarms && !uarmg && !uarmc && !uarmf) { + if(!uwep && !uarmu && !uarm && !uarmh && !uarms && !uarmg && !uarmc + && !uarmf) { boolean goaway = FALSE; pline("%s hits! (I hope you don't mind.)", Monnam(mtmp)); if (Upolyd) { @@ -1663,7 +1642,6 @@ gulpmu(mtmp, mattk) /* monster swallows you, or damage if u.uswallow */ place_monster(mtmp, u.ux, u.uy); u.ustuck = mtmp; newsym(mtmp->mx,mtmp->my); -#ifdef STEED if (is_animal(mtmp->data) && u.usteed) { char buf[BUFSZ]; /* Too many quirks presently if hero and steed @@ -1675,8 +1653,7 @@ gulpmu(mtmp, mattk) /* monster swallows you, or damage if u.uswallow */ Monnam(mtmp), buf); dismount_steed(DISMOUNT_ENGULFED); } else -#endif - pline("%s engulfs you!", Monnam(mtmp)); + pline("%s engulfs you!", Monnam(mtmp)); stop_occupation(); reset_occupations(); /* behave as if you had moved */ @@ -2214,19 +2191,13 @@ struct attack *mattk; gendef = gender(mdef); } - if(agrinvis && !defperc -#ifdef SEDUCE - && (!SYSOPT_SEDUCE || ( mattk && mattk->adtyp != AD_SSEX)) -#endif - ) + if(agrinvis && !defperc && + (!SYSOPT_SEDUCE || ( mattk && mattk->adtyp != AD_SSEX))) return 0; if(pagr->mlet != S_NYMPH && ((pagr != &mons[PM_INCUBUS] && pagr != &mons[PM_SUCCUBUS]) -#ifdef SEDUCE - || (SYSOPT_SEDUCE && mattk && mattk->adtyp != AD_SSEX) -#endif - )) + || (SYSOPT_SEDUCE && mattk && mattk->adtyp != AD_SSEX))) return 0; if(genagr == 1 - gendef) @@ -2235,7 +2206,6 @@ struct attack *mattk; return (pagr->mlet == S_NYMPH) ? 2 : 0; } -#ifdef SEDUCE /* Returns 1 if monster teleported */ int doseduce(mon) @@ -2338,10 +2308,7 @@ register struct monst *mon; } if (!uarmc && !uarmf && !uarmg && !uarms && !uarmh -#ifdef TOURIST - && !uarmu -#endif - ) + && !uarmu) pline("%s murmurs sweet nothings into your ear.", Blind ? (fem ? "She" : "He") : Monnam(mon)); else @@ -2355,10 +2322,8 @@ register struct monst *mon; mayberem(uarmg, "gloves"); mayberem(uarms, "shield"); mayberem(uarmh, helm_simple_name(uarmh)); -#ifdef TOURIST if(!uarmc && !uarm) mayberem(uarmu, "shirt"); -#endif if (uarm || uarmc) { verbalize("You're such a %s; I wish...", @@ -2451,27 +2416,6 @@ register struct monst *mon; pline("%s tries to take your money, but fails...", noit_Monnam(mon)); else { -#ifndef GOLDOBJ - long cost; - - if (u.ugold > (long)LARGEST_INT - 10L) - cost = (long) rnd(LARGEST_INT) + 500L; - else - cost = (long) rnd((int)u.ugold + 10) + 500L; - if (mon->mpeaceful) { - cost /= 5L; - if (!cost) cost = 1L; - } - if (cost > u.ugold) cost = u.ugold; - if (!cost) verbalize("It's on the house!"); - else { - pline("%s takes %ld %s for services rendered!", - noit_Monnam(mon), cost, currency(cost)); - u.ugold -= cost; - mon->mgold += cost; - context.botl = 1; - } -#else long cost; long umoney = money_cnt(invent); @@ -2491,7 +2435,6 @@ register struct monst *mon; money2mon(mon, cost); context.botl = 1; } -#endif } if (!rn2(25)) mon->mcan = 1; /* monster is worn out */ if (!tele_restrict(mon)) (void) rloc(mon, FALSE); @@ -2522,15 +2465,12 @@ const char *str; (obj == uarmc || obj == uarms) ? "it's in the way" : (obj == uarmf) ? "let me rub your feet" : (obj == uarmg) ? "they're too clumsy" : -#ifdef TOURIST (obj == uarmu) ? "let me massage you" : -#endif /* obj == uarmh */ hairbuf); } remove_worn_item(obj, TRUE); } -#endif /* SEDUCE */ STATIC_OVL int passiveum(olduasmon,mtmp,mattk) diff --git a/src/minion.c b/src/minion.c index 935719588..814bb21b5 100644 --- a/src/minion.c +++ b/src/minion.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 minion.c $Date$ $Revision$ */ +/* NetHack 3.5 minion.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 minion.c $Date: 2009/05/06 10:46:52 $ $Revision: 1.26 $ */ /* SCCS Id: @(#)minion.c 3.5 2008/11/14 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -235,11 +236,7 @@ register struct monst *mtmp; if (!tele_restrict(mtmp)) (void) rloc(mtmp, FALSE); return(1); } -#ifndef GOLDOBJ - cash = u.ugold; -#else cash = money_cnt(invent); -#endif demand = (cash * (rnd(80) + 20 * Athome)) / (100 * (1 + (sgn(u.ualign.type) == sgn(mtmp->data->maligntyp)))); @@ -280,9 +277,7 @@ struct monst *mtmp; { char buf[BUFSZ]; long offer; -#ifdef GOLDOBJ long umoney = money_cnt(invent); -#endif getlin("How much will you offer?", buf); if (sscanf(buf, "%ld", &offer) != 1) offer = 0L; @@ -296,16 +291,6 @@ struct monst *mtmp; } else if (offer == 0L) { You("refuse."); return 0L; -#ifndef GOLDOBJ - } else if (offer >= u.ugold) { - You("give %s all your gold.", mon_nam(mtmp)); - offer = u.ugold; - } else { - You("give %s %ld %s.", mon_nam(mtmp), offer, currency(offer)); - } - u.ugold -= offer; - mtmp->mgold += offer; -#else } else if (offer >= umoney) { You("give %s all your gold.", mon_nam(mtmp)); offer = umoney; @@ -313,7 +298,6 @@ struct monst *mtmp; You("give %s %ld %s.", mon_nam(mtmp), offer, currency(offer)); } (void) money2mon(mtmp, offer); -#endif context.botl = 1; return(offer); } diff --git a/src/mklev.c b/src/mklev.c index e75216ef6..2d4899984 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -1,17 +1,9 @@ -/* NetHack 3.5 mklev.c $Date$ $Revision$ */ +/* NetHack 3.5 mklev.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mklev.c $Date: 2012/02/15 01:55:33 $ $Revision: 1.20 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -/* #define DEBUG */ /* uncomment to enable code debugging */ - -#ifdef DEBUG -# ifdef WIZARD -#define debugpline if (wizard) pline -# else -#define debugpline pline -# endif -#endif /* for UNIX, Rand #def'd to (long)lrand48() or (long)random() */ /* croom->lx etc are schar (width <= int), so % arith ensures that */ @@ -19,9 +11,7 @@ STATIC_DCL void FDECL(mkfount,(int,struct mkroom *)); -#ifdef SINKS STATIC_DCL void FDECL(mksink,(struct mkroom *)); -#endif STATIC_DCL void FDECL(mkaltar,(struct mkroom *)); STATIC_DCL void FDECL(mkgrave,(struct mkroom *)); STATIC_DCL void NDECL(makevtele); @@ -401,11 +391,9 @@ register int type; levl[x][y].doormask = (shdoor ? D_ISOPEN : D_NODOOR); #endif -#ifdef REINCARNATION /* also done in roguecorr(); doing it here first prevents making mimics in place of trapped doors on rogue level */ if (Is_rogue_level(&u.uz)) levl[x][y].doormask = D_NODOOR; -#endif if(levl[x][y].doormask & D_TRAPPED) { struct monst *mtmp; @@ -628,11 +616,7 @@ makelevel() register s_level *slev = Is_special(&u.uz); /* check for special levels */ -#ifdef REINCARNATION if (slev && !Is_rogue_level(&u.uz)) -#else - if (slev) -#endif { makemaz(slev->proto); return; @@ -664,12 +648,10 @@ makelevel() /* otherwise, fall through - it's a "regular" level. */ -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { makeroguerooms(); makerogueghost(); } else -#endif makerooms(); sort_rooms(); @@ -695,18 +677,14 @@ makelevel() branchp = Is_branchlev(&u.uz); /* possible dungeon branch */ room_threshold = branchp ? 4 : 3; /* minimum number of rooms needed to allow a random special room */ -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) goto skip0; -#endif makecorridors(); make_niches(); /* make a secret treasure vault, not connected to the rest */ if(do_vault()) { xchar w,h; -#ifdef DEBUG debugpline("trying to make a vault..."); -#endif w = 1; h = 1; if (check_room(&vault_x, &w, &vault_y, &h, TRUE)) { @@ -731,9 +709,7 @@ makelevel() { register int u_depth = depth(&u.uz); -#ifdef WIZARD if(wizard && nh_getenv("SHOPTYPE")) mkroom(SHOPBASE); else -#endif if (u_depth > 1 && u_depth < depth(&medusa_level) && nroom >= room_threshold && @@ -754,9 +730,7 @@ makelevel() !(mvitals[PM_COCKATRICE].mvflags & G_GONE)) mkroom(COCKNEST); } -#ifdef REINCARNATION skip0: -#endif /* Place multi-dungeon branch. */ place_branch(branchp, 0, 0); @@ -785,13 +759,9 @@ skip0: mktrap(0,0,croom,(coord*)0); if (!goldseen && !rn2(3)) (void) mkgold(0L, somex(croom), somey(croom)); -#ifdef REINCARNATION if(Is_rogue_level(&u.uz)) goto skip_nonrogue; -#endif if(!rn2(10)) mkfount(0,croom); -#ifdef SINKS if(!rn2(60)) mksink(croom); -#endif if(!rn2(60)) mkaltar(croom); x = 80 - (depth(&u.uz) * 2); if (x < 2) x = 2; @@ -825,9 +795,7 @@ skip0: } } -#ifdef REINCARNATION skip_nonrogue: -#endif if(!rn2(3)) { (void) mkobj_at(0, somex(croom), somey(croom), TRUE); tryct = 0; @@ -866,9 +834,7 @@ mineralize() /* determine if it is even allowed; almost all special levels are excluded */ if (In_hell(&u.uz) || In_V_tower(&u.uz) || -#ifdef REINCARNATION Is_rogue_level(&u.uz) || -#endif level.flags.arboreal || ((sp = Is_special(&u.uz)) != 0 && !Is_oracle_level(&u.uz) && (!In_mines(&u.uz) || sp->flags.town) @@ -933,9 +899,7 @@ mklev() struct mkroom *croom; int ridx; -#ifdef DUNGEON_OVERVIEW init_mapseen(&u.uz); -#endif if(getbones()) return; in_mklev = TRUE; @@ -986,10 +950,8 @@ register struct mkroom *croom; if ((int) levl[lowx][lowy].roomno == roomno || croom->irregular) return; #ifdef SPECIALIZATION -# ifdef REINCARNATION if (Is_rogue_level(&u.uz)) do_ordinary = TRUE; /* vision routine helper */ -# endif if ((rtype != OROOM) || do_ordinary) #endif { @@ -1210,7 +1172,6 @@ coord *tm; if (num > 0 && num < TRAPNUM) { kind = num; -#ifdef REINCARNATION } else if (Is_rogue_level(&u.uz)) { switch (rn2(7)) { default: kind = BEAR_TRAP; break; /* 0 */ @@ -1221,7 +1182,6 @@ coord *tm; case 5: kind = SLP_GAS_TRAP; break; case 6: kind = RUST_TRAP; break; } -#endif } else if (Inhell && !rn2(5)) { /* bias the frequency of fire traps in Gehennom */ kind = FIRE_TRAP; @@ -1346,7 +1306,6 @@ register struct mkroom *croom; level.flags.nfountains++; } -#ifdef SINKS STATIC_OVL void mksink(croom) register struct mkroom *croom; @@ -1365,8 +1324,6 @@ register struct mkroom *croom; level.flags.nsinks++; } -#endif /* SINKS */ - STATIC_OVL void mkaltar(croom) @@ -1591,11 +1548,7 @@ xchar x, y; } /* Already set or 2/3 chance of deferring until a later level. */ - if (source->dnum < n_dgns || (rn2(3) -#ifdef WIZARD - && !wizard -#endif - )) return; + if (source->dnum < n_dgns || (rn2(3) && !wizard)) return; if (! (u.uz.dnum == oracle_level.dnum /* in main dungeon */ && !at_dgn_entrance("The Quest") /* but not Quest's entry */ @@ -1607,9 +1560,7 @@ xchar x, y; *source = u.uz; insert_branch(br, TRUE); -#ifdef DEBUG - pline("Made knox portal."); -#endif + debugpline("Made knox portal."); place_branch(br, x, y); } diff --git a/src/mkmap.c b/src/mkmap.c index 408cea4a7..c014f7194 100644 --- a/src/mkmap.c +++ b/src/mkmap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mkmap.c $Date$ $Revision$ */ +/* NetHack 3.5 mkmap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mkmap.c $Date: 2009/05/06 10:46:55 $ $Revision: 1.12 $ */ /* SCCS Id: @(#)mkmap.c 3.5 2008/02/29 */ /* Copyright (c) J. C. Collet, M. Stephenson and D. Cohrs, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/mkmaze.c b/src/mkmaze.c index 2ff7c7413..0cfdbe35a 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mkmaze.c $Date$ $Revision$ */ +/* NetHack 3.5 mkmaze.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mkmaze.c $Date: 2009/05/06 10:46:56 $ $Revision: 1.18 $ */ /* SCCS Id: @(#)mkmaze.c 3.5 2007/06/18 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -508,7 +509,6 @@ register const char *s; } else Strcpy(protofile, ""); -#ifdef WIZARD /* SPLEVTYPE format is "level-choice,level-choice"... */ if (wizard && *protofile && sp && sp->rndlevs) { char *ep = getenv("SPLEVTYPE"); /* not nh_getenv */ @@ -530,7 +530,6 @@ register const char *s; } } } -#endif if(*protofile) { Strcat(protofile, LEV_EXT); @@ -588,12 +587,10 @@ register const char *s; int x_range = x_maze_max - x_maze_min - 2*INVPOS_X_MARGIN - 1, y_range = y_maze_max - y_maze_min - 2*INVPOS_Y_MARGIN - 1; -#ifdef DEBUG if (x_range <= INVPOS_X_MARGIN || y_range <= INVPOS_Y_MARGIN || (x_range * y_range) <= (INVPOS_DISTANCE * INVPOS_DISTANCE)) - panic("inv_pos: maze is too small! (%d x %d)", + debugpline("inv_pos: maze is too small! (%d x %d)", x_maze_max, y_maze_max); -#endif inv_pos.x = inv_pos.y = 0; /*{occupied() => invocation_pos()}*/ do { x = rn1(x_range, x_maze_min + INVPOS_X_MARGIN + 1); @@ -880,10 +877,8 @@ register xchar x, y, todnum, todlevel; impossible("portal on top of portal??"); return; } -#ifdef DEBUG - pline("mkportal: at (%d,%d), to %s, level %d", + debugpline("mkportal: at (%d,%d), to %s, level %d", x, y, dungeons[todnum].dname, todlevel); -#endif ttmp->dst.dnum = todnum; ttmp->dst.dlevel = todlevel; return; diff --git a/src/mkobj.c b/src/mkobj.c index 01a67f8f7..5c7cffb7c 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mkobj.c $Date$ $Revision$ */ +/* NetHack 3.5 mkobj.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mkobj.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.70 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -9,16 +10,12 @@ STATIC_DCL void FDECL(maybe_adjust_light, (struct obj *,int)); STATIC_DCL void FDECL(obj_timer_checks,(struct obj *, XCHAR_P, XCHAR_P, int)); STATIC_DCL void FDECL(container_weight, (struct obj *)); STATIC_DCL struct obj *FDECL(save_mtraits, (struct obj *, struct monst *)); -#ifdef WIZARD STATIC_DCL void FDECL(objlist_sanity, (struct obj *,int,const char *)); STATIC_DCL void FDECL(mon_obj_sanity, (struct monst *,const char *)); STATIC_DCL const char *FDECL(where_name, (struct obj *)); STATIC_DCL void FDECL(insane_object, (struct obj *,const char *,const char *,struct monst *)); STATIC_DCL void FDECL(check_contained, (struct obj *,const char *)); -#endif - -/*#define DEBUG_EFFECTS*/ /* show some messages for debugging */ struct icp { int iprob; /* probability of an item type */ @@ -51,7 +48,6 @@ const struct icp boxiprobs[] = { { 1, AMULET_CLASS} }; -#ifdef REINCARNATION const struct icp rogueprobs[] = { {12, WEAPON_CLASS}, {12, ARMOR_CLASS}, @@ -61,7 +57,6 @@ const struct icp rogueprobs[] = { { 5, WAND_CLASS}, { 5, RING_CLASS} }; -#endif const struct icp hellprobs[] = { {20, WEAPON_CLASS}, @@ -221,10 +216,8 @@ boolean artif; if(oclass == RANDOM_CLASS) { const struct icp *iprobs = -#ifdef REINCARNATION (Is_rogue_level(&u.uz)) ? (const struct icp *)rogueprobs : -#endif Inhell ? (const struct icp *)hellprobs : (const struct icp *)mkobjprobs; @@ -613,9 +606,6 @@ boolean artif; otmp->known = 1; otmp->lknown = 0; otmp->cknown = 0; -#ifdef INVISIBLE_OBJECTS - otmp->oinvis = !rn2(1250); -#endif otmp->corpsenm = NON_PM; if (init) switch (let) { @@ -725,9 +715,7 @@ boolean artif; break; case LEASH: otmp->leashmon = 0; break; -#ifdef TOURIST case EXPENSIVE_CAMERA: -#endif case TINNING_KIT: case MAGIC_MARKER: otmp->spe = rn1(70,30); break; @@ -1044,9 +1032,7 @@ register struct obj *otmp; { int old_light = 0; -#ifdef GOLDOBJ if (otmp->oclass == COIN_CLASS) return; -#endif if (otmp->lamplit) old_light = arti_light_radius(otmp); otmp->cursed = 0; otmp->blessed = 1; @@ -1081,9 +1067,7 @@ register struct obj *otmp; { int old_light = 0; -#ifdef GOLDOBJ if (otmp->oclass == COIN_CLASS) return; -#endif if (otmp->lamplit) old_light = arti_light_radius(otmp); otmp->blessed = 0; otmp->cursed = 1; @@ -1358,10 +1342,6 @@ struct monst *mtmp; mtmp2->data = (struct permonst *)0; mtmp2->minvent = (struct obj *)0; if (mtmp->mextra) copy_mextra(mtmp2, mtmp); -#ifndef GOLDOBJ - /* not a pointer but is discarded along with minvent */ - mtmp2->mgold = 0L; -#endif } return obj; } @@ -1541,12 +1521,10 @@ struct obj *otmp; /* Adjust the age; must be same as obj_timer_checks() for off ice*/ age = monstermoves - otmp->age; retval += age * (ROT_ICE_ADJUSTMENT-1) / ROT_ICE_ADJUSTMENT; -#ifdef DEBUG_EFFECTS - pline_The("%s age has ice modifications:otmp->age = %ld, returning %ld.", + debugpline("The %s age has ice modifications:otmp->age = %ld, returning %ld.", s_suffix(doname(otmp)),otmp->age, retval); - pline("Effective age of corpse: %ld.", + debugpline("Effective age of corpse: %ld.", monstermoves - retval); -#endif } return retval; } @@ -1575,9 +1553,7 @@ int force; /* 0 = no force so do checks, <0 = force off, >0 force on */ /* mark the corpse as being on ice */ otmp->on_ice = 1; -#ifdef DEBUG_EFFECTS - pline("%s is now on ice at %d,%d.", The(xname(otmp)),x,y); -#endif + debugpline("%s is now on ice at %d,%d.", The(xname(otmp)),x,y); /* Adjust the time remaining */ tleft *= ROT_ICE_ADJUSTMENT; restart_timer = TRUE; @@ -1603,9 +1579,7 @@ int force; /* 0 = no force so do checks, <0 = force off, >0 force on */ long age; otmp->on_ice = 0; -#ifdef DEBUG_EFFECTS - pline("%s is no longer on ice at %d,%d.", The(xname(otmp)),x,y); -#endif + debugpline("%s is no longer on ice at %d,%d.", The(xname(otmp)),x,y); /* Adjust the remaining time */ tleft /= ROT_ICE_ADJUSTMENT; restart_timer = TRUE; @@ -1955,7 +1929,6 @@ boolean tipping; /* caller emptying entire contents; affects shop handling */ return objcount; } -#ifdef WIZARD /* support for wizard-mode's `sanity_check' option */ static const char NEARDATA /* pline formats for insane_object() */ @@ -2149,6 +2122,5 @@ check_contained(container, mesg) } } } -#endif /* WIZARD */ /*mkobj.c*/ diff --git a/src/mkroom.c b/src/mkroom.c index 59b2ddf54..7f94076e7 100644 --- a/src/mkroom.c +++ b/src/mkroom.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mkroom.c $Date$ $Revision$ */ +/* NetHack 3.5 mkroom.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mkroom.c $Date: 2012/01/10 17:47:19 $ $Revision: 1.15 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -66,7 +67,6 @@ mkshop() { register struct mkroom *sroom; int i = -1; -#ifdef WIZARD char *ep = (char *)0; /* (init == lint suppression) */ /* first determine shoptype */ @@ -128,7 +128,6 @@ mkshop() } #ifndef MAC gottype: -#endif #endif for(sroom = &rooms[0]; ; sroom++){ if(sroom->hx < 0) return; @@ -139,11 +138,8 @@ gottype: if(sroom->rtype != OROOM) continue; if(has_dnstairs(sroom) || has_upstairs(sroom)) continue; - if( -#ifdef WIZARD - (wizard && ep && sroom->doorct != 0) || -#endif - sroom->doorct == 1) break; + if( (wizard && ep && sroom->doorct != 0) || sroom->doorct == 1) + break; } if (!sroom->rlit) { int x, y; @@ -199,11 +195,7 @@ register boolean strict; continue; } else if(has_upstairs(sroom) || has_dnstairs(sroom)) continue; - if(sroom->doorct == 1 || !rn2(5) -#ifdef WIZARD - || wizard -#endif - ) + if(sroom->doorct == 1 || !rn2(5) || wizard) return sroom; } return (struct mkroom *)0; diff --git a/src/mon.c b/src/mon.c index ae6394d13..f617dad4c 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mon.c $Date$ $Revision$ */ +/* NetHack 3.5 mon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mon.c $Date: 2012/05/16 02:15:10 $ $Revision: 1.126 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -13,28 +14,19 @@ STATIC_DCL boolean FDECL(restrap,(struct monst *)); STATIC_DCL long FDECL(mm_aggression, (struct monst *,struct monst *)); -#ifdef BARGETHROUGH STATIC_DCL long FDECL(mm_displacement, (struct monst *,struct monst *)); -#endif STATIC_DCL int NDECL(pick_animal); STATIC_DCL void FDECL(kill_eggs, (struct obj *)); STATIC_DCL void FDECL(dealloc_mextra, (struct mextra *)); STATIC_DCL int FDECL(pickvampshape, (struct monst *)); STATIC_DCL boolean FDECL(isspecmon, (struct monst *)); STATIC_DCL boolean FDECL(validspecmon, (struct monst *,int)); -#ifdef WIZARD STATIC_DCL boolean FDECL(validvamp, (struct monst *,int *,int)); -#endif STATIC_DCL struct permonst *FDECL(accept_newcham_form, (int)); -#ifdef REINCARNATION #define LEVEL_SPECIFIC_NOCORPSE(mdat) \ (Is_rogue_level(&u.uz) || \ (level.flags.graveyard && is_undead(mdat) && rn2(3))) -#else -#define LEVEL_SPECIFIC_NOCORPSE(mdat) \ - (level.flags.graveyard && is_undead(mdat) && rn2(3)) -#endif #if 0 /* part of the original warning code which was replaced in 3.3.1 */ @@ -100,9 +92,7 @@ int mndx, mode; case PM_HUNTER: mndx = mode ? PM_RANGER : PM_HUMAN; break; case PM_THUG: mndx = mode ? PM_ROGUE : PM_HUMAN; break; case PM_ROSHI: mndx = mode ? PM_SAMURAI : PM_HUMAN; break; -#ifdef TOURIST case PM_GUIDE: mndx = mode ? PM_TOURIST : PM_HUMAN; break; -#endif case PM_APPRENTICE: mndx = mode ? PM_WIZARD : PM_HUMAN; break; case PM_WARRIOR: mndx = mode ? PM_VALKYRIE : PM_HUMAN; break; default: @@ -313,11 +303,6 @@ unsigned corpseflags; */ if (Blind && !sensemon(mtmp)) obj->dknown = 0; -#ifdef INVISIBLE_OBJECTS - /* Invisible monster ==> invisible corpse */ - obj->oinvis = mtmp->minvis; -#endif - stackobj(obj); newsym(x, y); return obj; @@ -336,12 +321,10 @@ register struct monst *mtmp; !is_flyer(mtmp->data) && !is_floater(mtmp->data); infountain = IS_FOUNTAIN(levl[mtmp->mx][mtmp->my].typ); -#ifdef STEED /* Flying and levitation keeps our steed out of the liquid */ /* (but not water-walking or swimming) */ if (mtmp == u.usteed && (Flying || Levitation)) return (0); -#endif /* Gremlin multiplying won't go on forever since the hit points * keep going down, and when it gets to 1 hit point the clone @@ -448,15 +431,12 @@ struct monst *mon; else if (mon->mspeed == MFAST) mmove = (4 * mmove + 2) / 3; -#ifdef STEED if (mon == u.usteed) { if (u.ugallop && context.mv) { /* average movement is 1.50 times normal */ mmove = ((rn2(2) ? 4 : 5) * mmove) / 3; } - } else -#endif - if (mmove) { + } else if (mmove) { /* vary movement points allocated to slightly reduce predictability; random increment (avg +2) exceeds random decrement (avg +1) by a small amount; normal speed monsters will occasionally get an @@ -839,13 +819,8 @@ mpickgold(mtmp) if ((gold = g_at(mtmp->mx, mtmp->my)) != 0) { mat_idx = objects[gold->otyp].oc_material; -#ifndef GOLDOBJ - mtmp->mgold += gold->quan; - delobj(gold); -#else obj_extract_self(gold); add_to_minv(mtmp, gold); -#endif if (cansee(mtmp->mx, mtmp->my) ) { if (flags.verbose && !mtmp->isgd) pline("%s picks up some %s.", Monnam(mtmp), @@ -878,9 +853,6 @@ mpickstuff(mtmp, str) if (!touch_artifact(otmp,mtmp)) continue; if (!can_carry(mtmp,otmp)) continue; if (is_pool(mtmp->mx,mtmp->my)) continue; -#ifdef INVISIBLE_OBJECTS - if (otmp->oinvis && !perceives(mtmp->data)) continue; -#endif if (cansee(mtmp->mx,mtmp->my) && flags.verbose) pline("%s picks up %s.", Monnam(mtmp), (distu(mtmp->mx, mtmp->my) <= 5) ? @@ -957,10 +929,8 @@ struct obj *otmp; (otyp != BELL_OF_OPENING || !is_covetous(mdat))) return FALSE; -#ifdef STEED /* Steeds don't pick up stuff (to avoid shop abuse) */ if (mtmp == u.usteed) return (FALSE); -#endif if (mtmp->isshk) return(TRUE); /* no limit */ if (mtmp->mpeaceful && !mtmp->mtame) return(FALSE); /* otherwise players might find themselves obligated to violate @@ -1056,9 +1026,7 @@ nexttry: /* eels prefer the water, but if there is no water nearby, if (nx != x && ny != y && (nodiag || (IS_DOOR(nowtyp) && (levl[x][y].doormask & ~D_BROKEN)) || (IS_DOOR(ntyp) && (levl[nx][ny].doormask & ~D_BROKEN)) || -#ifdef REINCARNATION ((IS_DOOR(nowtyp) || IS_DOOR(ntyp)) && Is_rogue_level(&u.uz)) || -#endif /* mustn't pass between adjacent long worm segments, but can attack that way */ (m_at(x, ny) && m_at(nx, y) && worm_cross(x, y, nx, ny) && @@ -1105,13 +1073,6 @@ nexttry: /* eels prefer the water, but if there is no water nearby, struct monst *mtmp2 = m_at(nx, ny); long mmflag = flag | mm_aggression(mon, mtmp2); -#ifndef BARGETHROUGH - if (!(mmflag & ALLOW_M)) continue; - info[cnt] |= ALLOW_M; - if (mtmp2->mtame) { - if (!(mmflag & ALLOW_TM)) continue; - info[cnt] |= ALLOW_TM; -#else /* BARGETHROUGH */ if (mmflag & ALLOW_M) { info[cnt] |= ALLOW_M; if (mtmp2->mtame) { @@ -1122,7 +1083,6 @@ nexttry: /* eels prefer the water, but if there is no water nearby, mmflag = flag | mm_displacement(mon, mtmp2); if (!(mmflag & ALLOW_MDISP)) continue; info[cnt] |= ALLOW_MDISP; -#endif /* BARGETHROUGH */ } } /* Note: ALLOW_SANCT only prevents movement, not */ @@ -1228,7 +1188,6 @@ struct monst *magr, /* monster that is currently deciding where to move */ return 0L; } -#ifdef BARGETHROUGH /* Monster displacing another monster out of the way */ STATIC_OVL long mm_displacement(magr, mdef) @@ -1254,7 +1213,6 @@ struct monst *magr, /* monster that is currently deciding where to move */ return ALLOW_MDISP; return 0L; } -#endif /* BARGETHROUGH */ boolean monnear(mon, x, y) @@ -1300,10 +1258,8 @@ register struct monst *mtmp, *mtmp2; /* transfer the monster's inventory */ for (otmp = mtmp2->minvent; otmp; otmp = otmp->nobj) { -#ifdef DEBUG if (otmp->where != OBJ_MINVENT || otmp->ocarry != mtmp) - panic("replmon: minvent inconsistency"); -#endif + debugpline("replmon: minvent inconsistency"); otmp->ocarry = mtmp2; } mtmp->minvent = 0; @@ -1312,10 +1268,8 @@ register struct monst *mtmp, *mtmp2; relmon(mtmp, (struct monst **)0); /* finish adding its replacement */ -#ifdef STEED - if (mtmp == u.usteed) ; else /* don't place steed onto the map */ -#endif - place_monster(mtmp2, mtmp2->mx, mtmp2->my); + if (mtmp != u.usteed) /* don't place steed onto the map */ + place_monster(mtmp2, mtmp2->mx, mtmp2->my); if (mtmp2->wormno) /* update level.monsters[wseg->wx][wseg->wy] */ place_wsegs(mtmp2); /* locations to mtmp2 not mtmp. */ if (emits_light(mtmp2->data)) { @@ -1329,9 +1283,7 @@ register struct monst *mtmp, *mtmp2; mtmp2->nmon = fmon; fmon = mtmp2; if (u.ustuck == mtmp) u.ustuck = mtmp2; -#ifdef STEED if (u.usteed == mtmp) u.usteed = mtmp2; -#endif if (mtmp2->isshk) replshk(mtmp,mtmp2); /* discard the old monster */ @@ -1596,11 +1548,9 @@ register struct monst *mtmp; need to do this after life-saving and before m_detach() */ if (mtmp->isgd && !grddead(mtmp)) return; -#ifdef STEED /* Player is thrown from his steed when it dies */ if (mtmp == u.usteed) dismount_steed(DISMOUNT_GENERIC); -#endif mptr = mtmp->data; /* save this for m_detach() */ /* restore chameleon, lycanthropes to true form at death */ @@ -1638,7 +1588,6 @@ register struct monst *mtmp; if (tmp == PM_MAIL_DAEMON) mvitals[tmp].mvflags |= G_GENOD; #endif -#ifdef KOPS if (mtmp->data->mlet == S_KOP) { /* Dead Kops may come back. */ switch(rnd(5)) { @@ -1652,7 +1601,6 @@ register struct monst *mtmp; break; } } -#endif if(mtmp->iswiz) wizdead(); if(mtmp->data->msound == MS_NEMESIS) nemdead(); if(glyph_is_invisible(levl[mtmp->mx][mtmp->my].glyph)) @@ -1747,20 +1695,15 @@ mongone(mdef) register struct monst *mdef; { mdef->mhp = 0; /* can skip some inventory bookkeeping */ -#ifdef STEED /* Player is thrown from his steed when it disappears */ if (mdef == u.usteed) dismount_steed(DISMOUNT_GENERIC); -#endif /* drop special items like the Amulet so that a dismissed Kop or nurse can't remove them from the game */ mdrop_special_objs(mdef); /* release rest of monster's inventory--it is removed from game */ discard_minvent(mdef); -#ifndef GOLDOBJ - mdef->mgold = 0L; -#endif m_detach(mdef, mdef->data); } @@ -1816,16 +1759,6 @@ register struct monst *mdef; oldminvent = obj->nobj; (void) add_to_container(otmp, obj); } -#ifndef GOLDOBJ - if (mdef->mgold) { - struct obj *au; - au = mksobj(GOLD_PIECE, FALSE, FALSE); - au->quan = mdef->mgold; - au->owt = weight(au); - (void) add_to_container(otmp, au); - mdef->mgold = 0; - } -#endif /* Archeologists should not break unique statues */ if (mdef->data->geno & G_UNIQ) otmp->spe = 1; @@ -2006,10 +1939,8 @@ int dest; if (!rn2(6) && !(mvitals[mndx].mvflags & G_NOCORPSE) && /* no extra item from swallower or steed */ (x != u.ux || y != u.uy) && -#ifdef KOPS /* no extra item from kops--too easy to abuse */ mdat->mlet != S_KOP && -#endif /* reduced chance of item from cloned monster */ (!mtmp->mcloned || !rn2(mvitals[mndx].died / 5 + 1))) { otmp = mkobj(RANDOM_CLASS, TRUE); @@ -2120,14 +2051,12 @@ mnexto(mtmp) /* Make monster mtmp next to you (if possible) */ coord mm; boolean couldspot = canspotmon(mtmp); -#ifdef STEED if (mtmp == u.usteed) { /* Keep your steed in sync with you instead */ mtmp->mx = u.ux; mtmp->my = u.uy; return; } -#endif if(!enexto(&mm, u.ux, u.uy, mtmp->data)) return; rloc_to(mtmp, mm.x, mm.y); @@ -2628,7 +2557,6 @@ int mndx; return TRUE; /* potential new form is ok */ } -#ifdef WIZARD /* prevent wizard mode user from specifying invalid vampshifter shape */ STATIC_OVL boolean validvamp(mon, mndx_p, monclass) @@ -2667,7 +2595,6 @@ int *mndx_p, monclass; } return (*mndx_p != NON_PM); } -#endif /*WIZARD*/ int select_newcham_form(mon) @@ -2718,7 +2645,6 @@ struct monst *mon; } break; } -#ifdef WIZARD /* for debugging: allow control of polymorphed monster */ if (wizard && iflags.mon_polycontrol) { char pprompt[BUFSZ], buf[BUFSZ]; @@ -2760,7 +2686,6 @@ struct monst *mon; if (is_vampshifter(mon) && !validvamp(mon, &mndx, monclass)) mndx = pickvampshape(mon); /* don't resort to arbitrary */ } -#endif /*WIZARD*/ /* if no form was specified above, pick one at random now */ if (mndx == NON_PM) { diff --git a/src/mondata.c b/src/mondata.c index 029c00d9c..98c3244f5 100644 --- a/src/mondata.c +++ b/src/mondata.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mondata.c $Date$ $Revision$ */ +/* NetHack 3.5 mondata.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mondata.c $Date: 2011/10/02 02:18:54 $ $Revision: 1.44 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -790,9 +791,7 @@ boolean levl_follower(mtmp) struct monst *mtmp; { -#ifdef STEED if (mtmp == u.usteed) return TRUE; -#endif /* Wizard with Amulet won't bother trying to follow across levels */ if (mtmp->iswiz && mon_has_amulet(mtmp)) return FALSE; @@ -859,11 +858,9 @@ static const short grownups[][2] = { {PM_ACOLYTE, PM_PRIEST}, {PM_APPRENTICE, PM_WIZARD}, {PM_MANES,PM_LEMURE}, -#ifdef KOPS {PM_KEYSTONE_KOP, PM_KOP_SERGEANT}, {PM_KOP_SERGEANT, PM_KOP_LIEUTENANT}, {PM_KOP_LIEUTENANT, PM_KOP_KAPTAIN}, -#endif {NON_PM,NON_PM} }; diff --git a/src/monmove.c b/src/monmove.c index 531d8a789..81eb563d3 100644 --- a/src/monmove.c +++ b/src/monmove.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 monmove.c $Date$ $Revision$ */ +/* NetHack 3.5 monmove.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 monmove.c $Date: 2011/08/30 22:13:27 $ $Revision: 1.46 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -45,9 +46,7 @@ monhaskey(mon, for_unlocking) struct monst *mon; boolean for_unlocking; /* true => credit card ok, false => not ok */ { -#ifdef TOURIST if (for_unlocking && m_carrying(mon, CREDIT_CARD)) return TRUE; -#endif return m_carrying(mon, SKELETON_KEY) || m_carrying(mon, LOCK_PICK); } @@ -121,9 +120,7 @@ struct monst *mtmp; return(FALSE); return (boolean)(sobj_at(SCR_SCARE_MONSTER, x, y) || -#ifdef ELBERETH sengr_at("Elbereth", x, y) || -#endif (IS_ALTAR(levl[x][y].typ) && (mtmp->data->mlet == S_VAMPIRE || is_vampshifter(mtmp)))); @@ -480,13 +477,8 @@ toofar: if(!nearby || mtmp->mflee || scared || mtmp->mconf || mtmp->mstun || (mtmp->minvis && !rn2(3)) || -#ifndef GOLDOBJ - (mdat->mlet == S_LEPRECHAUN && - !u.ugold && (mtmp->mgold || rn2(2))) || -#else (mdat->mlet == S_LEPRECHAUN && !findgold(invent) && (findgold(mtmp->minvent) || rn2(2))) || -#endif (is_wanderer(mdat) && !rn2(4)) || (Conflict && !mtmp->iswiz) || (!mtmp->mcansee && !rn2(4)) || mtmp->mpeaceful) { /* Possibly cast an undirected spell if not attacking you */ @@ -587,7 +579,6 @@ register struct monst *mtmp; return(FALSE); } -#ifdef BARGETHROUGH /* * should_displace() * @@ -631,7 +622,6 @@ xchar gx, gy; return TRUE; return FALSE; } -#endif /* BARGETHROUGH */ /* Return values: * 0: did not move, but can still attack and do other stuff. @@ -652,9 +642,7 @@ register int after; boolean can_open=0, can_unlock=0, doorbuster=0; boolean uses_items=0, setlikes=0; boolean avoid=FALSE; -#ifdef BARGETHROUGH boolean better_with_displacing = FALSE; -#endif struct permonst *ptr; struct monst *mtoo; schar mmoved = 0; /* not strictly nec.: chi >= 0 will do */ @@ -683,9 +671,7 @@ register int after; /* Not necessary if m_move called from this file, but necessary in * other calls of m_move (ex. leprechauns dodging) */ -#ifdef REINCARNATION if (!Is_rogue_level(&u.uz)) -#endif can_tunnel = tunnels(ptr); can_open = !(nohands(ptr) || verysmall(ptr)); can_unlock = ((can_open && monhaskey(mtmp, TRUE)) || @@ -770,9 +756,7 @@ not_special: if (mtmp->mconf || (u.uswallow && mtmp == u.ustuck)) appr = 0; else { -#ifdef GOLDOBJ struct obj *lepgold, *ygold; -#endif boolean should_see = (couldsee(omx, omy) && (levl[gx][gy].lit || !levl[omx][omy].lit) && @@ -788,12 +772,8 @@ not_special: appr = 0; if(monsndx(ptr) == PM_LEPRECHAUN && (appr == 1) && -#ifndef GOLDOBJ - (mtmp->mgold > u.ugold)) -#else ( (lepgold = findgold(mtmp->minvent)) && (lepgold->quan > ((ygold = findgold(invent)) ? ygold->quan : 0L)) )) -#endif appr = -1; if (!should_see && can_track(ptr)) { @@ -807,11 +787,7 @@ not_special: } } - if ((!mtmp->mpeaceful || !rn2(10)) -#ifdef REINCARNATION - && (!Is_rogue_level(&u.uz)) -#endif - ) { + if ((!mtmp->mpeaceful || !rn2(10)) && (!Is_rogue_level(&u.uz))) { boolean in_line = lined_up(mtmp) && (distmin(mtmp->mx, mtmp->my, mtmp->mux, mtmp->muy) <= (throws_rocks(youmonst.data) ? 20 : ACURRSTR/2+1) @@ -976,19 +952,15 @@ not_special: for(i = 0; i < cnt; i++) if(!(info[i] & NOTONL)) avoid=TRUE; } -#ifdef BARGETHROUGH better_with_displacing = should_displace(mtmp,poss,info,cnt,gx,gy); -#endif for(i=0; i < cnt; i++) { if (avoid && (info[i] & NOTONL)) continue; nx = poss[i].x; ny = poss[i].y; -#ifdef BARGETHROUGH if (MON_AT(nx,ny) && (info[i] & ALLOW_MDISP) && !(info[i] & ALLOW_M) && !better_with_displacing) continue; -#endif if (appr != 0) { mtrk = &mtmp->mtrack[0]; for(j=0; j < jcnt; mtrk++, j++) @@ -1084,7 +1056,6 @@ not_special: return 3; } -#ifdef BARGETHROUGH if((info[chi] & ALLOW_MDISP)) { struct monst *mtmp2; int mstatus; @@ -1095,7 +1066,6 @@ not_special: if (mstatus & MM_HIT) return 1; return 3; } -#endif /* BARGETHROUGH */ if (!m_in_out_region(mtmp,nix,niy)) return 3; @@ -1329,9 +1299,7 @@ register struct monst *mtmp; { boolean notseen, gotu; register int disp, mx = mtmp->mux, my = mtmp->muy; -#ifdef GOLDOBJ long umoney = money_cnt(invent); -#endif /* * do cheapest and/or most likely tests first @@ -1349,13 +1317,7 @@ register struct monst *mtmp; if (notseen || Underwater) { /* Xorns can smell quantities of valuable metal like that in solid gold coins, treat as seen */ - if ((mtmp->data == &mons[PM_XORN]) && -#ifndef GOLDOBJ - u.ugold -#else - umoney -#endif - && !Underwater) + if ((mtmp->data == &mons[PM_XORN]) && umoney && !Underwater) disp = 0; else disp = 1; @@ -1397,7 +1359,6 @@ found_you: mtmp->muy = my; } -#ifdef BARGETHROUGH /* * mon-to-mon displacement is a deliberate "get out of my way" act, * not an accidental bump, so we don't consider mstun or mconf in @@ -1429,7 +1390,6 @@ xchar x,y; return FALSE; } -#endif /* BARGETHROUGH */ /* * Inventory prevents passage under door. @@ -1442,40 +1402,28 @@ struct monst *mtmp; struct obj *chain, *obj; if (mtmp == &youmonst) { -#ifndef GOLDOBJ - if (u.ugold > 100L) return TRUE; -#endif chain = invent; } else { -#ifndef GOLDOBJ - if (mtmp->mgold > 100L) return TRUE; -#endif chain = mtmp->minvent; } for (obj = chain; obj; obj = obj->nobj) { int typ = obj->otyp; -#ifdef GOLDOBJ if (typ == COIN_CLASS && obj->quan > 100L) return TRUE; -#endif if (obj->oclass != GEM_CLASS && !(typ >= ARROW && typ <= BOOMERANG) && !(typ >= DAGGER && typ <= CRYSKNIFE) && typ != SLING && !is_cloak(obj) && typ != FEDORA && !is_gloves(obj) && typ != LEATHER_JACKET && -#ifdef TOURIST typ != CREDIT_CARD && !is_shirt(obj) && -#endif !(typ == CORPSE && verysmall(&mons[obj->corpsenm])) && typ != FORTUNE_COOKIE && typ != CANDY_BAR && typ != PANCAKE && typ != LEMBAS_WAFER && typ != LUMP_OF_ROYAL_JELLY && obj->oclass != AMULET_CLASS && obj->oclass != RING_CLASS && -#ifdef WIZARD obj->oclass != VENOM_CLASS && -#endif typ != SACK && typ != BAG_OF_HOLDING && typ != BAG_OF_TRICKS && !Is_candle(obj) && typ != OILSKIN_SACK && typ != LEASH && diff --git a/src/monst.c b/src/monst.c index fb2d3e8db..d6b843b6c 100644 --- a/src/monst.c +++ b/src/monst.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 monst.c $Date$ $Revision$ */ +/* NetHack 3.5 monst.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 monst.c $Date: 2011/09/02 21:44:09 $ $Revision: 1.38 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1594,7 +1595,6 @@ struct permonst _mons2[] = { M1_ANIMAL|M1_FLY|M1_CARNIVORE, M2_HOSTILE|M2_STRONG|M2_NASTY|M2_COLLECT, M3_INFRAVISIBLE, HI_LORD), #endif -#ifdef KOPS /* * Kops */ @@ -1626,7 +1626,6 @@ struct permonst _mons2[] = { SIZ(WT_HUMAN, 200, MS_ARREST, MZ_HUMAN), 0, 0, M1_HUMANOID, M2_HUMAN|M2_WANDER|M2_HOSTILE|M2_STRONG|M2_MALE|M2_COLLECT, M3_INFRAVISIBLE, HI_LORD), -#endif /* * Liches */ @@ -2555,14 +2554,9 @@ struct permonst _mons2[] = { #define SEDUCTION_ATTACKS_NO \ A(ATTK(AT_CLAW, AD_PHYS, 1, 3), ATTK(AT_CLAW, AD_PHYS, 1, 3), \ ATTK(AT_BITE, AD_DRLI, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK) -#ifdef SEDUCE -# define SEDUCTION_ATTACKS SEDUCTION_ATTACKS_YES -#else -# define SEDUCTION_ATTACKS SEDUCTION_ATTACKS_NO -#endif MON("succubus", S_DEMON, LVL(6, 12, 0, 70, -9), (G_NOCORPSE|1), - SEDUCTION_ATTACKS, + SEDUCTION_ATTACKS_YES, SIZ(WT_HUMAN, 400, MS_SEDUCE, MZ_HUMAN), MR_FIRE|MR_POISON, 0, M1_HUMANOID|M1_FLY|M1_POIS, M2_DEMON|M2_STALK|M2_HOSTILE|M2_NASTY|M2_FEMALE, @@ -2578,12 +2572,11 @@ struct permonst _mons2[] = { CLR_BROWN), MON("incubus", S_DEMON, LVL(6, 12, 0, 70, -9), (G_NOCORPSE|1), - SEDUCTION_ATTACKS, + SEDUCTION_ATTACKS_YES, SIZ(WT_HUMAN, 400, MS_SEDUCE, MZ_HUMAN), MR_FIRE|MR_POISON, 0, M1_HUMANOID|M1_FLY|M1_POIS, M2_DEMON|M2_STALK|M2_HOSTILE|M2_NASTY|M2_MALE, M3_INFRAVISIBLE|M3_INFRAVISION, CLR_GRAY), -#undef SEDUCTION_ATTACKS /* Used by AD&D for a type of demon, originally one of the Furies */ /* and spelled this way */ MON("erinys", S_DEMON, @@ -3022,7 +3015,6 @@ struct permonst _mons2[] = { SIZ(WT_HUMAN, 400, MS_HUMANOID, MZ_HUMAN), 0, 0, M1_HUMANOID|M1_OMNIVORE, M2_NOPOLY|M2_HUMAN|M2_STRONG|M2_COLLECT, M3_INFRAVISIBLE, HI_DOMESTIC), -#ifdef TOURIST MON("tourist", S_HUMAN, LVL(10, 12, 10, 1, 0), G_NOGEN, A(ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_WEAP, AD_PHYS, 1, 6), @@ -3030,7 +3022,6 @@ struct permonst _mons2[] = { SIZ(WT_HUMAN, 400, MS_HUMANOID, MZ_HUMAN), 0, 0, M1_HUMANOID|M1_OMNIVORE, M2_NOPOLY|M2_HUMAN|M2_STRONG|M2_COLLECT, M3_INFRAVISIBLE, HI_DOMESTIC), -#endif MON("valkyrie", S_HUMAN, LVL(10, 12, 10, 1, -1), G_NOGEN, A(ATTK(AT_WEAP, AD_PHYS, 1, 8), ATTK(AT_WEAP, AD_PHYS, 1, 8), @@ -3166,7 +3157,6 @@ struct permonst _mons2[] = { M2_NOPOLY|M2_HUMAN|M2_PNAME|M2_PEACEFUL|M2_STRONG|M2_MALE| M2_COLLECT|M2_MAGIC, M3_CLOSE|M3_INFRAVISIBLE, HI_LORD), -#ifdef TOURIST MON("Twoflower", S_HUMAN, LVL(20, 12, 10, 20, 0), (G_NOGEN|G_UNIQ), A(ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_WEAP, AD_PHYS, 1, 6), @@ -3176,7 +3166,6 @@ struct permonst _mons2[] = { M2_NOPOLY|M2_HUMAN|M2_PNAME|M2_PEACEFUL|M2_STRONG|M2_MALE| M2_COLLECT|M2_MAGIC, M3_CLOSE|M3_INFRAVISIBLE, HI_DOMESTIC), -#endif MON("Norn", S_HUMAN, LVL(20, 12, 0, 80, 0), (G_NOGEN|G_UNIQ), A(ATTK(AT_WEAP, AD_PHYS, 1, 8), ATTK(AT_WEAP, AD_PHYS, 1, 6), @@ -3314,11 +3303,9 @@ struct permonst _mons2[] = { M2_NOPOLY|M2_HUMAN|M2_PNAME|M2_HOSTILE|M2_STRONG|M2_STALK| M2_NASTY|M2_MALE|M2_COLLECT|M2_MAGIC, M3_WANTSARTI|M3_WAITFORU|M3_INFRAVISIBLE, HI_LORD), -#ifdef TOURIST /* * Note: the Master of Thieves was defined above. */ -#endif MON("Lord Surtur", S_GIANT, LVL(15, 12, 2, 50, 12), (G_NOGEN|G_UNIQ), A(ATTK(AT_WEAP, AD_PHYS, 2,10), ATTK(AT_WEAP, AD_PHYS, 2,10), @@ -3439,7 +3426,6 @@ struct permonst _mons2[] = { M1_HUMANOID|M1_OMNIVORE, M2_NOPOLY|M2_HUMAN|M2_PEACEFUL|M2_STRONG|M2_COLLECT, M3_INFRAVISIBLE, HI_DOMESTIC), -#ifdef TOURIST MON("guide", S_HUMAN, LVL(5, 12, 10, 20, 0), G_NOGEN, A(ATTK(AT_WEAP, AD_PHYS, 1, 6), ATTK(AT_MAGC, AD_SPEL, 0, 0), @@ -3448,7 +3434,6 @@ struct permonst _mons2[] = { M1_HUMANOID|M1_OMNIVORE, M2_NOPOLY|M2_HUMAN|M2_PEACEFUL | M2_STRONG|M2_COLLECT|M2_MAGIC, M3_INFRAVISIBLE, HI_DOMESTIC), -#endif MON("warrior", S_HUMAN, LVL(5, 12, 10, 10, -1), G_NOGEN, A(ATTK(AT_WEAP, AD_PHYS, 1, 8), ATTK(AT_WEAP, AD_PHYS, 1, 8), diff --git a/src/mplayer.c b/src/mplayer.c index 26cd4f62f..e1cc0f812 100644 --- a/src/mplayer.c +++ b/src/mplayer.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mplayer.c $Date$ $Revision$ */ +/* NetHack 3.5 mplayer.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mplayer.c $Date: 2009/05/06 10:47:09 $ $Revision: 1.11 $ */ /* SCCS Id: @(#)mplayer.c 3.5 2006/12/15 */ /* Copyright (c) Izchak Miller, 1992. */ /* NetHack may be freely redistributed. See license for details. */ @@ -202,11 +203,9 @@ register boolean special; case PM_SAMURAI: if (rn2(2)) weapon = KATANA; break; -#ifdef TOURIST case PM_TOURIST: /* Defaults are just fine */ break; -#endif case PM_VALKYRIE: if (rn2(2)) weapon = WAR_HAMMER; if (rn2(2)) armor = rnd_class(PLATE_MAIL, CHAIN_MAIL); @@ -261,11 +260,7 @@ register boolean special; (void)mongets(mtmp, rnd_class(DILITHIUM_CRYSTAL, JADE)); /* To get the gold "right" would mean a player can double his */ /* gold supply by killing one mplayer. Not good. */ -#ifndef GOLDOBJ - mtmp->mgold = rn2(1000); -#else mkmonmoney(mtmp, rn2(1000)); -#endif quan = rn2(10); while(quan--) (void) mpickobj(mtmp, mkobj(RANDOM_CLASS, FALSE)); diff --git a/src/mthrowu.c b/src/mthrowu.c index ea955d6a6..e61814321 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mthrowu.c $Date$ $Revision$ */ +/* NetHack 3.5 mthrowu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mthrowu.c $Date: 2011/12/30 23:47:06 $ $Revision: 1.43 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -430,11 +431,8 @@ struct obj *obj; /* missile (or stack providing it) */ /* missile might hit iron bars */ || (levl[bhitpos.x+dx][bhitpos.y+dy].typ == IRONBARS && hits_bars(&singleobj, bhitpos.x, bhitpos.y, !rn2(5), 0)) -#ifdef SINKS /* Thrown objects "sink" */ - || IS_SINK(levl[bhitpos.x][bhitpos.y].typ) -#endif - ) { + || IS_SINK(levl[bhitpos.x][bhitpos.y].typ)) { if (singleobj) /* hits_bars might have destroyed it */ (void) drop_throw(singleobj, 0, bhitpos.x, bhitpos.y); break; @@ -816,9 +814,7 @@ int whodidit; /* 1==hero, 0=other, -1==just check whether it'll pass thru */ case TOOL_CLASS: hits = (obj_type != SKELETON_KEY && obj_type != LOCK_PICK && -#ifdef TOURIST obj_type != CREDIT_CARD && -#endif obj_type != TALLOW_CANDLE && obj_type != WAX_CANDLE && obj_type != LENSES && diff --git a/src/muse.c b/src/muse.c index a289cf6e8..855a91887 100644 --- a/src/muse.c +++ b/src/muse.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 muse.c $Date$ $Revision$ */ +/* NetHack 3.5 muse.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 muse.c $Date: 2012/04/12 23:26:47 $ $Revision: 1.49 $ */ /* Copyright (C) 1990 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ @@ -919,11 +920,8 @@ struct monst *mtmp; int trycnt = 0; if(is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data) - || pm->mlet == S_GHOST -# ifdef KOPS - || pm->mlet == S_KOP -# endif - ) return 0; + || pm->mlet == S_GHOST || pm->mlet == S_KOP) + return 0; try_again: switch (rn2(8 + (difficulty > 3) + (difficulty > 6) + (difficulty > 8))) { @@ -990,11 +988,8 @@ struct monst *mtmp; return FALSE; if (u.uswallow) return FALSE; if (in_your_sanctuary(mtmp, 0, 0)) return FALSE; - if (dmgtype(mtmp->data, AD_HEAL) && !uwep -#ifdef TOURIST - && !uarmu -#endif - && !uarm && !uarmh && !uarms && !uarmg && !uarmc && !uarmf) + if (dmgtype(mtmp->data, AD_HEAL) && !uwep && !uarmu && !uarm && !uarmh + && !uarms && !uarmg && !uarmc && !uarmf) return FALSE; if (!ranged_stuff) return FALSE; @@ -1085,9 +1080,7 @@ struct monst *mtmp; unsolid(mtmp->data) || !rn2(10)) && dist2(mtmp->mx,mtmp->my,mtmp->mux,mtmp->muy) <= 2 && mtmp->mcansee && haseyes(mtmp->data) -#ifdef REINCARNATION && !Is_rogue_level(&u.uz) -#endif && (!In_endgame(&u.uz) || Is_earthlevel(&u.uz))) { m.offensive = obj; m.has_offense = MUSE_SCR_EARTH; @@ -1534,11 +1527,8 @@ struct monst *mtmp; int difficulty = monstr[(monsndx(pm))]; if(is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data) - || pm->mlet == S_GHOST -# ifdef KOPS - || pm->mlet == S_KOP -# endif - ) return 0; + || pm->mlet == S_GHOST || pm->mlet == S_KOP) + return 0; if (difficulty > 7 && !rn2(35)) return WAN_DEATH; switch (rn2(9 - (difficulty < 4) + 4 * (difficulty > 6))) { case 0: { @@ -1942,11 +1932,8 @@ struct monst *mtmp; int difficulty = monstr[(monsndx(pm))]; if(is_animal(pm) || attacktype(pm, AT_EXPL) || mindless(mtmp->data) - || pm->mlet == S_GHOST -# ifdef KOPS - || pm->mlet == S_KOP -# endif - ) return 0; + || pm->mlet == S_GHOST || pm->mlet == S_KOP) + return 0; /* Unlike other rnd_item functions, we only allow _weak_ monsters * to have this item; after all, the item will be used to strengthen * the monster and strong monsters won't use it at all... diff --git a/src/music.c b/src/music.c index c3f4bf056..94f6282d1 100644 --- a/src/music.c +++ b/src/music.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 music.c $Date$ $Revision$ */ +/* NetHack 3.5 music.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 music.c $Date: 2011/12/30 23:47:06 $ $Revision: 1.27 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -274,12 +275,10 @@ int force; if (cansee(x,y)) pline_The("fountain falls into a chasm."); goto do_pit; -#ifdef SINKS case SINK : if (cansee(x,y)) pline_The("kitchen sink falls into a chasm."); goto do_pit; -#endif case ALTAR : if (Is_astralevel(&u.uz) || Is_sanctum(&u.uz)) break; diff --git a/src/o_init.c b/src/o_init.c index 3b65bf9c7..4ae8892e9 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 o_init.c $Date$ $Revision$ */ +/* NetHack 3.5 o_init.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 o_init.c $Date: 2011/10/02 21:27:24 $ $Revision: 1.11 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -567,9 +568,7 @@ doclassdisco() } /* get the class (via its symbol character) */ c = yn_function(prompt, discosyms, '\0'); -#ifdef REDO savech(c); -#endif if (!c) clear_nhwindow(WIN_MESSAGE); } else { diff --git a/src/objects.c b/src/objects.c index c59c2ec59..4c015595d 100644 --- a/src/objects.c +++ b/src/objects.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 objects.c $Date$ $Revision$ */ +/* NetHack 3.5 objects.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 objects.c $Date: 2011/07/28 04:00:20 $ $Revision: 1.23 $ */ /* Copyright (c) Mike Threepoint, 1989. */ /* NetHack may be freely redistributed. See license for details. */ @@ -241,10 +242,8 @@ WEAPON("war hammer", (char *)0, /* +1 small */ WEAPON("club", (char *)0, 1, 0, 0, 12, 30, 3, 6, 3, 0, B, P_CLUB, WOOD, HI_WOOD), -#ifdef KOPS WEAPON("rubber hose", (char *)0, 1, 0, 0, 0, 20, 3, 4, 3, 0, B, P_WHIP, PLASTIC, CLR_BROWN), -#endif WEAPON("quarterstaff", "staff", 0, 0, 1, 11, 40, 5, 6, 6, 0, B, P_QUARTERSTAFF, WOOD, HI_WOOD), /* two-piece */ @@ -368,13 +367,8 @@ ARMOR("plate mail", (char *)0, 1, 0, 1, 0, 44, 5, 450, 600, 3, 2, ARM_SUIT, IRON, HI_METAL), ARMOR("crystal plate mail", (char *)0, 1, 0, 1, 0, 10, 5, 450, 820, 3, 2, ARM_SUIT, GLASS, CLR_WHITE), -#ifdef TOURIST ARMOR("bronze plate mail", (char *)0, 1, 0, 1, 0, 25, 5, 450, 400, 4, 1, ARM_SUIT, COPPER, HI_COPPER), -#else -ARMOR("bronze plate mail", (char *)0, - 1, 0, 1, 0, 35, 5, 450, 400, 4, 1, ARM_SUIT, COPPER, HI_COPPER), -#endif ARMOR("splint mail", (char *)0, 1, 0, 1, 0, 62, 5, 400, 80, 4, 1, ARM_SUIT, IRON, HI_METAL), ARMOR("banded mail", (char *)0, @@ -400,13 +394,11 @@ ARMOR("leather armor", (char *)0, ARMOR("leather jacket", (char *)0, 1, 0, 0, 0, 12, 0, 30, 10, 9, 0, ARM_SUIT, LEATHER, CLR_BLACK), -#ifdef TOURIST /* shirts */ ARMOR("Hawaiian shirt", (char *)0, 1, 0, 0, 0, 8, 0, 5, 3, 10, 0, ARM_SHIRT, CLOTH, CLR_MAGENTA), ARMOR("T-shirt", (char *)0, 1, 0, 0, 0, 2, 0, 5, 2, 10, 0, ARM_SHIRT, CLOTH, CLR_WHITE), -#endif /* cloaks */ /* 'cope' is not a spelling mistake... leave it be */ @@ -592,12 +584,8 @@ CONTAINER("bag of tricks", "bag", 0, 1, 1, 20, 15, 100, CLOTH, HI_CLOTH), /* lock opening tools */ TOOL("skeleton key", "key", 0, 0, 0, 0, 80, 3, 10, IRON, HI_METAL), -#ifdef TOURIST TOOL("lock pick", (char *)0, 1, 0, 0, 0, 60, 4, 20, IRON, HI_METAL), TOOL("credit card", (char *)0, 1, 0, 0, 0, 15, 1, 10, PLASTIC, CLR_WHITE), -#else -TOOL("lock pick", (char *)0, 1, 0, 0, 0, 75, 4, 20, IRON, HI_METAL), -#endif /* light sources */ TOOL("tallow candle", "candle", 0, 1, 0, 0, 20, 2, 10, WAX, CLR_WHITE), TOOL("wax candle", "candle", 0, 1, 0, 0, 5, 2, 20, WAX, CLR_WHITE), @@ -605,24 +593,16 @@ TOOL("brass lantern", (char *)0,1, 0, 0, 0, 30, 30, 12, COPPER, CLR_YELLOW), TOOL("oil lamp", "lamp", 0, 0, 0, 0, 45, 20, 10, COPPER, CLR_YELLOW), TOOL("magic lamp", "lamp", 0, 0, 1, 0, 15, 20, 50, COPPER, CLR_YELLOW), /* other tools */ -#ifdef TOURIST TOOL("expensive camera", (char *)0, 1, 0, 0, 1, 15, 12, 200, PLASTIC, CLR_BLACK), TOOL("mirror", "looking glass", 0, 0, 0, 0, 45, 13, 10, GLASS, HI_SILVER), -#else -TOOL("mirror", "looking glass", 0, 0, 0, 0, 60, 13, 10, GLASS, HI_SILVER), -#endif TOOL("crystal ball", "glass orb", 0, 0, 1, 1, 15,150, 60, GLASS, HI_GLASS), TOOL("lenses", (char *)0, 1, 0, 0, 0, 5, 3, 80, GLASS, HI_GLASS), TOOL("blindfold", (char *)0, 1, 0, 0, 0, 50, 2, 20, CLOTH, CLR_BLACK), TOOL("towel", (char *)0, 1, 0, 0, 0, 50, 2, 50, CLOTH, CLR_MAGENTA), -#ifdef STEED TOOL("saddle", (char *)0, 1, 0, 0, 0, 5,200, 150, LEATHER, HI_LEATHER), TOOL("leash", (char *)0, 1, 0, 0, 0, 65, 12, 20, LEATHER, HI_LEATHER), -#else -TOOL("leash", (char *)0, 1, 0, 0, 0, 70, 12, 20, LEATHER, HI_LEATHER), -#endif TOOL("stethoscope", (char *)0, 1, 0, 0, 0, 25, 4, 75, IRON, HI_METAL), TOOL("tinning kit", (char *)0, 1, 0, 0, 1, 15,100, 30, IRON, HI_METAL), TOOL("tin opener", (char *)0, 1, 0, 0, 0, 35, 4, 30, IRON, HI_METAL), diff --git a/src/objnam.c b/src/objnam.c index ed3bab967..84c3599f4 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 objnam.c $Date$ $Revision$ */ +/* NetHack 3.5 objnam.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 objnam.c $Date: 2011/10/27 02:24:54 $ $Revision: 1.101 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -682,10 +683,6 @@ register struct obj *obj; } else Strcpy(prefix, "a "); -#ifdef INVISIBLE_OBJECTS - if (obj->oinvis) Strcat(prefix,"invisible "); -#endif - /* "empty" goes at the beginning, but item count goes at the end */ if (cknown && (Is_container(obj) || obj->otyp == STATUE) && !Has_contents(obj)) @@ -771,11 +768,7 @@ plus: /* weptools already get this done when we go to the +n code */ if (!is_weptool(obj)) add_erosion_words(obj, prefix); - if(obj->owornmask & (W_TOOL /* blindfold */ -#ifdef STEED - | W_SADDLE -#endif - )) { + if(obj->owornmask & (W_TOOL /* blindfold */ | W_SADDLE)) { Strcat(bp, " (being worn)"); break; } @@ -933,10 +926,8 @@ boolean not_fully_identified(otmp) register struct obj *otmp; { -#ifdef GOLDOBJ /* gold doesn't have any interesting attributes [yet?] */ if (otmp->oclass == COIN_CLASS) return FALSE; /* always fully ID'd */ -#endif /* check fundamental ID hallmarks first */ if (!otmp->known || !otmp->dknown || #ifdef MAIL @@ -1693,9 +1684,7 @@ static const char *const as_is[] = { "boots", "shoes", "gloves", "lenses", "scales", "gauntlets", -#ifdef WIZARD "iron bars", -#endif /* both singular and plural are spelled the same */ "deer", "fish", "tuna", "yaki", "-hai", "krill", "manes", "ninja", "sheep", "ronin", "roshi", "shito", "tengu", @@ -2185,17 +2174,13 @@ STATIC_OVL NEARDATA const struct o_range o_ranges[] = { { "boots", ARMOR_CLASS, LOW_BOOTS, LEVITATION_BOOTS }, { "shoes", ARMOR_CLASS, LOW_BOOTS, IRON_SHOES }, { "cloak", ARMOR_CLASS, MUMMY_WRAPPING, CLOAK_OF_DISPLACEMENT }, -#ifdef TOURIST { "shirt", ARMOR_CLASS, HAWAIIAN_SHIRT, T_SHIRT }, -#endif { "dragon scales", ARMOR_CLASS, GRAY_DRAGON_SCALES, YELLOW_DRAGON_SCALES }, { "dragon scale mail", ARMOR_CLASS, GRAY_DRAGON_SCALE_MAIL, YELLOW_DRAGON_SCALE_MAIL }, { "sword", WEAPON_CLASS, SHORT_SWORD, KATANA }, -#ifdef WIZARD { "venom", VENOM_CLASS, BLINDING_VENOM, ACID_VENOM }, -#endif { "gray stone", GEM_CLASS, LUCKSTONE, FLINT }, { "grey stone", GEM_CLASS, LUCKSTONE, FLINT }, }; @@ -2221,10 +2206,8 @@ struct alt_spellings { { "amulet of poison resistance", AMULET_VERSUS_POISON }, { "potion of sleep", POT_SLEEPING }, { "stone", ROCK }, -#ifdef TOURIST { "camera", EXPENSIVE_CAMERA }, { "tee shirt", T_SHIRT }, -#endif { "can", TIN }, { "can opener", TIN_OPENER }, { "kelp", KELP_FROND }, @@ -2254,9 +2237,6 @@ struct obj *no_wish; int cnt, spe, spesgn, typ, very, rechrg; int blessed, uncursed, iscursed, ispoisoned, isgreased; int eroded, eroded2, erodeproof; -#ifdef INVISIBLE_OBJECTS - int isinvisible; -#endif int halfeaten, mntmp, contents; int islit, unlabeled, ishistoric, isdiluted, trapped; int tmp, tinv, tvariety; @@ -2284,9 +2264,6 @@ struct obj *no_wish; cnt = spe = spesgn = typ = very = rechrg = blessed = uncursed = iscursed = -#ifdef INVISIBLE_OBJECTS - isinvisible = -#endif ispoisoned = isgreased = eroded = eroded2 = erodeproof = halfeaten = islit = unlabeled = ishistoric = isdiluted = trapped = 0; @@ -2337,10 +2314,6 @@ struct obj *no_wish; iscursed = 1; } else if (!strncmpi(bp, "uncursed ", l=9)) { uncursed = 1; -#ifdef INVISIBLE_OBJECTS - } else if (!strncmpi(bp, "invisible ", l=10)) { - isinvisible = 1; -#endif } else if (!strncmpi(bp, "rustproof ", l=10) || !strncmpi(bp, "erodeproof ", l=11) || !strncmpi(bp, "corrodeproof ", l=13) || @@ -2603,15 +2576,9 @@ struct obj *no_wish; !strcmpi(bp, "coin") || *bp == GOLD_SYM) { if (cnt > 5000 && !wizard) cnt = 5000; else if (cnt < 1) cnt = 1; -#ifndef GOLDOBJ - pline("%d gold piece%s.", cnt, plur(cnt)); - u.ugold += (long) cnt; - otmp = &zeroobj; /* readobjnam()'s return value for gold */ -#else otmp = mksobj(GOLD_PIECE, FALSE, FALSE); otmp->quan = (long) cnt; otmp->owt = weight(otmp); -#endif context.botl = 1; return otmp; } @@ -2659,7 +2626,6 @@ struct obj *no_wish; } } -#ifdef WIZARD /* Wishing in wizard mode can create traps and furniture. * Part I: distinguish between trap and object for the two * types of traps which have corresponding objects: bear trap @@ -2699,7 +2665,6 @@ struct obj *no_wish; the object name and getting a disarmed trap object] */ } } -#endif retry: /* "grey stone" check must be before general "stone" */ @@ -2869,7 +2834,6 @@ srch: goto typfnd; } } -#ifdef WIZARD /* Let wizards wish for traps and furniture. * Must come after objects check so wizards can still wish for * trap objects like beartraps. @@ -2916,7 +2880,6 @@ wiztrap: newsym(x, y); return(&zeroobj); } -# ifdef SINKS if (!BSTRCMPI(bp, p-4, "sink")) { lev->typ = SINK; level.flags.nsinks++; @@ -2924,7 +2887,6 @@ wiztrap: newsym(x, y); return &zeroobj; } -# endif /* ("water" matches "potion of water" rather than terrain) */ if (!BSTRCMPI(bp, p-4, "pool") || !BSTRCMPI(bp, p-4, "moat")) { lev->typ = !BSTRCMPI(bp, p-4, "pool") ? POOL : MOAT; @@ -2988,7 +2950,6 @@ wiztrap: return &zeroobj; } } -#endif /* WIZARD */ if(!oclass) return((struct obj *)0); any: @@ -3044,16 +3005,12 @@ typfnd: || typ == ROCK || is_missile(otmp))))) otmp->quan = (long) cnt; -#ifdef WIZARD if (oclass == VENOM_CLASS) otmp->spe = 1; -#endif if (spesgn == 0) { spe = otmp->spe; -#ifdef WIZARD } else if (wizard) { ; /* no alteration to spe */ -#endif } else if (oclass == ARMOR_CLASS || oclass == WEAPON_CLASS || is_weptool(otmp) || (oclass==RING_CLASS && objects[typ].oc_charged)) { @@ -3166,10 +3123,6 @@ typfnd: curse(otmp); } -#ifdef INVISIBLE_OBJECTS - if (isinvisible) otmp->oinvis = 1; -#endif - /* set eroded */ if (is_damageable(otmp) || otmp->otyp == CRYSKNIFE) { if (eroded && (is_flammable(otmp) || is_rustprone(otmp))) diff --git a/src/options.c b/src/options.c index e7f39283f..1c63c5ed5 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 options.c $Date$ $Revision$ */ +/* NetHack 3.5 options.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.158 $ */ +/* NetHack 3.5 options.c $Date: 2012/04/09 02:56:30 $ $Revision: 1.153 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -137,12 +138,8 @@ static struct Bool_Opt #else {"mail", (boolean *)0, TRUE, SET_IN_FILE}, #endif -#ifdef WIZARD /* for menu debugging only*/ {"menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME}, -#else - {"menu_tab_sep", (boolean *)0, FALSE, SET_IN_FILE}, -#endif {"mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME}, /*WC*/ #ifdef NEWS {"news", &iflags.news, TRUE, DISP_IN_GAME}, @@ -176,17 +173,9 @@ static struct Bool_Opt DISP_IN_GAME}, #endif {"safe_pet", &flags.safe_dog, TRUE, SET_IN_GAME}, -#ifdef WIZARD {"sanity_check", &iflags.sanity_check, FALSE, SET_IN_GAME}, -#else - {"sanity_check", (boolean *)0, FALSE, SET_IN_FILE}, -#endif {"selectsaved", &iflags.wc2_selectsaved, TRUE, DISP_IN_GAME}, /*WC*/ -#ifdef EXP_ON_BOTL {"showexp", &flags.showexp, FALSE, SET_IN_GAME}, -#else - {"showexp", (boolean *)0, FALSE, SET_IN_FILE}, -#endif {"showrace", &flags.showrace, FALSE, SET_IN_GAME}, #ifdef SCORE_ON_BOTL {"showscore", &flags.showscore, FALSE, SET_IN_GAME}, @@ -209,9 +198,6 @@ static struct Bool_Opt {"tombstone",&flags.tombstone, TRUE, SET_IN_GAME}, {"toptenwin",&iflags.toptenwin, FALSE, SET_IN_GAME}, {"travel", &flags.travelcmd, TRUE, SET_IN_GAME}, -#ifdef UNICODE_SUPPORT - {"unicode", &iflags.unicodedisp, FALSE, SET_IN_GAME}, -#endif #ifdef WIN32CON {"use_inverse", &iflags.wc_inverse, TRUE, SET_IN_GAME}, /*WC*/ #else @@ -338,12 +324,7 @@ static struct Comp_Opt MAXOCLASSES, SET_IN_GAME }, { "pile_limit", "threshold for \"there are many objects here\"", 24, SET_IN_GAME }, - { "playmode", -#ifdef WIZARD - "normal play, non-scoring explore mode, or debug mode", -#else - "normal play or non-scoring explore mode", -#endif + { "playmode", "normal play, non-scoring explore mode, or debug mode", 8, DISP_IN_GAME }, { "player_selection", "choose character via dialog or prompts", 12, DISP_IN_GAME }, @@ -362,21 +343,9 @@ static struct Comp_Opt { "soundcard", "type of sound card to use", 20, SET_IN_FILE }, #endif { "symset", "load a set of display symbols from the symbols file", 70, -#ifdef LOADSYMSETS SET_IN_GAME }, -#else - DISP_IN_GAME}, -#endif { "roguesymset", "load a set of rogue display symbols from the symbols file", 70, -#ifdef REINCARNATION -# ifdef LOADSYMSETS SET_IN_GAME }, -# else - DISP_IN_GAME}, -# endif -#else - SET_IN_FILE}, -#endif { "suppress_alert", "suppress alerts about version-specific features", 8, SET_IN_GAME }, { "tile_width", "width of tiles", 20, DISP_IN_GAME}, /*WC*/ @@ -517,10 +486,8 @@ STATIC_OVL boolean FDECL(is_wc_option, (const char *)); STATIC_OVL boolean FDECL(wc_supported, (const char *)); STATIC_OVL boolean FDECL(is_wc2_option, (const char *)); STATIC_OVL boolean FDECL(wc2_supported, (const char *)); -#ifdef AUTOPICKUP_EXCEPTIONS STATIC_DCL void FDECL(remove_autopickup_exception, (struct autopickup_exception *)); STATIC_OVL int FDECL(count_ape_maps, (int *, int *)); -#endif /* check whether a user-supplied option string is a proper leading substring of a particular option name; option string might have @@ -635,9 +602,6 @@ initoptions_init() iflags.msg_history = 20; #ifdef TTY_GRAPHICS iflags.prevmsg_window = 's'; -# if defined(UNIX) && defined(UNICODE_WIDEWINPORT) - iflags.unicodecapable = TRUE; -# endif #endif iflags.menu_headings = ATR_INVERSE; @@ -672,11 +636,9 @@ initoptions_init() */ /* this detects the IBM-compatible console on most 386 boxes */ if ((opts = nh_getenv("TERM")) && !strncmp(opts, "AT", 2)) { -#ifdef LOADSYMSETS if (!symset[PRIMARY].name) load_symset("IBMGraphics", PRIMARY); if (!symset[ROGUESET].name) load_symset("RogueIBM", ROGUESET); switch_symbols(TRUE); -#endif # ifdef TEXTCOLOR iflags.use_color = TRUE; # endif @@ -688,10 +650,8 @@ initoptions_init() if ((opts = nh_getenv("TERM")) && !strncmpi(opts, "vt", 2) && AS && AE && index(AS, '\016') && index(AE, '\017')) { -# ifdef LOADSYMSETS if (!symset[PRIMARY].name) load_symset("DECGraphics", PRIMARY); switch_symbols(TRUE); -# endif /*LOADSYMSETS*/ } # endif #endif /* UNIX || VMS */ @@ -925,12 +885,7 @@ char *op; char *sp, buf[BUFSZ]; num = 0; -#ifndef GOLDOBJ - if (!index(op, GOLD_SYM)) - buf[num++] = COIN_CLASS; -#else /* !!!! probably unnecessary with gold as normal inventory */ -#endif for (sp = op; *sp; sp++) { oc_sym = def_char_to_objclass(*sp); @@ -1115,17 +1070,9 @@ STATIC_VAR const struct paranoia_opts { { PARANOID_QUIT, "quit", 1, "explore", 1, "yes vs y to quit or to enter explore mode" }, { PARANOID_DIE, "die", 1, "death", 2, -#ifdef WIZARD "yes vs y to die (explore mode or debug mode)" }, -#else - "yes vs y to die (explore mode only)" }, -#endif { PARANOID_BONES, "bones", 1, 0, 0, -#ifdef WIZARD "yes vs y to save bones data when dying in debug mode" }, -#else - "(only applicable for debug mode)" }, -#endif { PARANOID_HIT, "attack", 1, "hit", 1, "yes vs y to attack a peaceful monster" }, { PARANOID_PRAY, "pray", 1, 0, 0, @@ -1416,7 +1363,6 @@ boolean tinitial, tfrom_file; fullname = "roguesymset"; if (match_optname(opts, fullname, 7, TRUE)) { -#if defined(REINCARNATION) && defined(LOADSYMSETS) if (duplicate) complain_about_duplicate(opts,1); if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_opt(opts, FALSE)) != 0) { @@ -1433,13 +1379,11 @@ boolean tinitial, tfrom_file; need_redraw = TRUE; } } -#endif return; } fullname = "symset"; if (match_optname(opts, fullname, 6, TRUE)) { -#ifdef LOADSYMSETS if (duplicate) complain_about_duplicate(opts,1); if (negated) bad_negation(fullname, FALSE); else if ((op = string_for_opt(opts, FALSE)) != 0) { @@ -1455,7 +1399,6 @@ boolean tinitial, tfrom_file; need_redraw = TRUE; } } -#endif return; } @@ -2050,12 +1993,7 @@ goodfruit: wizard = FALSE, discover = TRUE; } else if (!strncmpi(op, "debug", 5) || !strncmpi(op, "wizard", 6)) { -#ifdef WIZARD wizard = TRUE, discover = FALSE; -#else - raw_printf("\"%s\":%s -- debug mode not available.", - fullname, op); -#endif } else { raw_printf("Invalid value for \"%s\":%s.", fullname, op); } @@ -2543,7 +2481,6 @@ goodfruit: fullname = "DECgraphics"; if (match_optname(opts, fullname, 10, TRUE)) { boolean badflag = FALSE; -# ifdef LOADSYMSETS if (duplicate) complain_about_duplicate(opts,1); if (!negated) { /* There is no rogue level DECgraphics-specific set */ @@ -2563,17 +2500,15 @@ goodfruit: wait_synch(); } } -# endif /*LOADSYMSETS*/ return; } fullname = "IBMgraphics"; if (match_optname(opts, fullname, 10, TRUE)) { const char *sym_name = fullname; boolean badflag = FALSE; -# ifdef LOADSYMSETS if (duplicate) complain_about_duplicate(opts,1); if (!negated) { - for (i = PRIMARY; i <= ROGUESET; ++i) { + for (i = 0; i < NUM_GRAPHICS; ++i) { if (symset[i].name) badflag = TRUE; else { @@ -2593,13 +2528,10 @@ goodfruit: wait_synch(); } else { switch_symbols(TRUE); -# ifdef REINCARNATION if (!initial && Is_rogue_level(&u.uz)) assign_graphics(ROGUESET); -# endif } } -# endif /*LOADSYMSETS*/ return; } #endif @@ -2607,7 +2539,6 @@ goodfruit: fullname = "MACgraphics"; if (match_optname(opts, fullname, 11, TRUE)) { boolean badflag = FALSE; -# ifdef LOADSYMSETS if (duplicate) complain_about_duplicate(opts,1); if (!negated) { if (symset[PRIMARY]).name badflag = TRUE; @@ -2629,7 +2560,6 @@ goodfruit: assign_graphics(ROGUESET); } } -# endif /*LOADSYMSETS*/ return; } #endif @@ -2678,9 +2608,7 @@ goodfruit: if (initial) return; if ((boolopt[i].addr) == &flags.time -#ifdef EXP_ON_BOTL || (boolopt[i].addr) == &flags.showexp -#endif #ifdef SCORE_ON_BOTL || (boolopt[i].addr) == &flags.showscore #endif @@ -2875,10 +2803,8 @@ doset() ((boolopt[i].optflags == DISP_IN_GAME && pass == 0) || (boolopt[i].optflags == SET_IN_GAME && pass == 1))) { if (bool_p == &flags.female) continue; /* obsolete */ -#ifdef WIZARD if (bool_p == &iflags.sanity_check && !wizard) continue; if (bool_p == &iflags.menu_tab_sep && !wizard) continue; -#endif if (is_wc_option(boolopt[i].name) && !wc_supported(boolopt[i].name)) continue; if (is_wc2_option(boolopt[i].name) && @@ -2963,12 +2889,10 @@ doset() add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED); # endif #endif -#ifdef AUTOPICKUP_EXCEPTIONS any.a_int = -1; Sprintf(buf, "autopickup exceptions (%d currently set)", count_ape_maps((int *)0, (int *)0)); add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, MENU_UNSELECTED); -#endif /* AUTOPICKUP_EXCEPTIONS */ #ifdef PREFIXES_IN_USE any = zeroany; add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, "", MENU_UNSELECTED); @@ -2988,12 +2912,10 @@ doset() */ for (pick_idx = 0; pick_idx < pick_cnt; ++pick_idx) { opt_indx = pick_list[pick_idx].item.a_int - 1; -#ifdef AUTOPICKUP_EXCEPTIONS if (opt_indx == -2) { /* -3 due to -1 offset for select_menu() */ (void)special_handling("autopickup_exception", setinitial, fromfile); } else -#endif #ifdef STATUS_VIA_WINDOWPORT # ifdef STATUS_HILITES if (opt_indx == -3) { /* -3 due to -1 offset for select_menu() */ @@ -3043,10 +2965,8 @@ doset() return 0; } -#ifdef LOADSYMSETS struct symsetentry *symset_list = 0; /* files.c will populate this with list of available sets */ -#endif STATIC_OVL boolean special_handling(optname, setinitial, setfromfile) @@ -3060,9 +2980,7 @@ boolean setinitial,setfromfile; /* Special handling of menustyle, pickup_burden, pickup_types, * disclose, runmode, msg_window, menu_headings, and number_pad options. -#ifdef AUTOPICKUP_EXCEPTIONS * Also takes care of interactive autopickup_exception_handling changes. -#endif */ if (!strcmp("menustyle", optname)) { const char *style_name; @@ -3336,7 +3254,6 @@ boolean setinitial,setfromfile; } destroy_nhwindow(tmpwin); } else if (!strcmp("autopickup_exception", optname)) { -#ifdef AUTOPICKUP_EXCEPTIONS int pick_cnt, pick_idx, opt_idx, pass; int totalapes = 0, numapes[2] = {0,0}; menu_item *pick_list = (menu_item *)0; @@ -3432,33 +3349,23 @@ boolean setinitial,setfromfile; destroy_nhwindow(tmpwin); if (pick_cnt >= 0) goto ape_again; } -#endif /* AUTOPICKUP_EXCEPTIONS */ } else if (!strcmp("symset", optname) || !strcmp("roguesymset", optname)) { menu_item *symset_pick = (menu_item *)0; boolean primaryflag = (*optname == 's'), - rogueflag = (*optname == 'r'), + rogueflag = (*optname == 'r'), ready_to_switch = FALSE, nothing_to_do = FALSE; -#ifdef LOADSYMSETS int res; char *symset_name, fmtstr[20]; struct symsetentry *sl; int setcount = 0; -#endif int chosen = -2, which_set; -#ifdef REINCARNATION if (rogueflag) which_set = ROGUESET; else -#endif which_set = PRIMARY; -#ifndef REINCARNATION - if (rogueflag) return TRUE; -#endif - -#ifdef LOADSYMSETS /* clear symset[].name as a flag to read_sym_file() to build list */ symset_name = symset[which_set].name; symset[which_set].name = (char *)0; @@ -3471,8 +3378,7 @@ boolean setinitial,setfromfile; sl = symset_list; while (sl) { /* check restrictions */ - if ((!rogueflag && sl->rogue) || - (!iflags.unicodedisp && sl->unicode) || + if ((!rogueflag && sl->rogue) || (!primaryflag && sl->primary)) { sl = sl->next; continue; @@ -3485,8 +3391,8 @@ boolean setinitial,setfromfile; } if (!setcount) { pline("There are no appropriate %ssymbol sets available.", - (rogueflag) ? "rogue level " : - (primaryflag) ? "primary " : + (rogueflag) ? "rogue level " : + (primaryflag) ? "primary " : ""); return TRUE; } @@ -3502,7 +3408,6 @@ boolean setinitial,setfromfile; while (sl) { /* check restrictions */ if ((!rogueflag && sl->rogue) || - (!iflags.unicodedisp && sl->unicode) || (!primaryflag && sl->primary)) { sl = sl->next; continue; @@ -3586,12 +3491,10 @@ boolean setinitial,setfromfile; symset[which_set].name = symset_name; /* Set default symbols and clear the handling value */ -# ifdef REINCARNATION if(rogueflag) init_r_symbols(); else -# endif - init_l_symbols(); + init_l_symbols(); if (symset[which_set].name) { if (read_sym_file(which_set)) @@ -3604,15 +3507,11 @@ boolean setinitial,setfromfile; if (ready_to_switch) switch_symbols(TRUE); -# ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { if (rogueflag) assign_graphics(ROGUESET); - } else -# endif - if (!rogueflag) assign_graphics(PRIMARY); + } else if (!rogueflag) assign_graphics(PRIMARY); need_redraw = TRUE; -#endif /*LOADSYMSETS*/ return TRUE; } else { @@ -3661,14 +3560,9 @@ char *buf; #endif #ifdef BACKWARD_COMPAT else if (!strcmp(optname, "boulder")) - Sprintf(buf, -# ifdef UNICODE_DRAWING - "\\x%04X", -# else - "%c", -# endif - iflags.bouldersym ? iflags.bouldersym : - showsyms[(int)objects[BOULDER].oc_class + SYM_OFF_O]); + Sprintf(buf, "%c", iflags.bouldersym ? + iflags.bouldersym : + showsyms[(int)objects[BOULDER].oc_class + SYM_OFF_O]); #endif else if (!strcmp(optname, "catname")) Sprintf(buf, "%s", catname[0] ? catname : none); @@ -3831,17 +3725,13 @@ char *buf; } else if (!strcmp(optname, "race")) Sprintf(buf, "%s", rolestring(flags.initrace, races, noun)); -#ifdef REINCARNATION else if (!strcmp(optname, "roguesymset")) { Sprintf(buf, "%s", -# ifdef LOADSYMSETS symset[ROGUESET].name ? symset[ROGUESET].name : -# endif "default"); if (currentgraphics == ROGUESET && symset[ROGUESET].name) Strcat(buf, ", active"); -#endif } else if (!strcmp(optname, "role")) Sprintf(buf, "%s", rolestring(flags.initrole, roles, name.m)); @@ -3876,10 +3766,8 @@ char *buf; } else if (!strcmp(optname, "symset")) { Sprintf(buf, "%s", -#ifdef LOADSYMSETS symset[PRIMARY].name ? symset[PRIMARY].name : -#endif "default"); if (currentgraphics == PRIMARY && symset[PRIMARY].name) Strcat(buf, ", active"); @@ -3950,12 +3838,10 @@ dotogglepickup() if (flags.pickup) { oc_to_str(flags.pickup_types, ocl); Sprintf(buf, "ON, for %s objects%s", ocl[0] ? ocl : "all", -#ifdef AUTOPICKUP_EXCEPTIONS (iflags.autopickup_exceptions[AP_LEAVE] || iflags.autopickup_exceptions[AP_GRAB]) ? ((count_ape_maps((int *)0, (int *)0) == 1) ? ", with one exception" : ", with some exceptions") : -#endif ""); } else { Strcpy(buf, "OFF"); @@ -3964,7 +3850,6 @@ dotogglepickup() return 0; } -#ifdef AUTOPICKUP_EXCEPTIONS int add_autopickup_exception(mapping) const char *mapping; @@ -4057,9 +3942,7 @@ free_autopickup_exceptions() } } } -#endif /* AUTOPICKUP_EXCEPTIONS */ -#ifdef LOADSYMSETS /* bundle some common usage into one easy-to-use routine */ int load_symset(s, which_set) @@ -4137,7 +4020,15 @@ char *buf; } return (struct symparse *)0; } -#endif /*LOADSYMSETS*/ + +int sym_val(strval) +char *strval; +{ + char buf[QBUFSZ]; + buf[0] = '\0'; + escapes(strval, buf); + return (int)*buf; +} /* data for option_help() */ static const char *opt_intro[] = { @@ -4182,10 +4073,8 @@ option_help() /* Boolean options */ for (i = 0; boolopt[i].name; i++) { if (boolopt[i].addr) { -#ifdef WIZARD if (boolopt[i].addr == &iflags.sanity_check && !wizard) continue; if (boolopt[i].addr == &iflags.menu_tab_sep && !wizard) continue; -#endif next_opt(datawin, boolopt[i].name); } } @@ -4776,11 +4665,9 @@ void set_playmode() { if (wizard) { -#ifdef WIZARD if (authorize_wizard_mode()) Strcpy(plname, "wizard"); else -#endif wizard = FALSE; /* not allowed or not available */ /* force explore mode if we didn't make it into wizard mode */ discover = !wizard; diff --git a/src/pager.c b/src/pager.c index 62e744fd6..4e8008c1b 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pager.c $Date$ $Revision$ */ +/* NetHack 3.5 pager.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pager.c $Date: 2012/01/15 09:27:06 $ $Revision: 1.41 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -64,10 +65,8 @@ char *outbuf; /* being blinded may hide invisibility from self */ (Invis && (senseself() || !Blind)) ? "invisible " : "", race, mons[u.umonnum].mname, plname); -#ifdef STEED if (u.usteed) Sprintf(eos(outbuf), ", mounted on %s", y_monnam(u.usteed)); -#endif return outbuf; } @@ -572,7 +571,7 @@ do_look(mode, click_cc) for (i = 0; i < MAXMCLASSES; i++) { if (sym == ((from_screen || clicklook) ? showsyms[i + SYM_OFF_M] : def_monsyms[i].sym) && - def_monsyms[i].explain) { + def_monsyms[i].explain) { need_to_look = TRUE; if (!found) { Sprintf(out_str, "%s %s", @@ -937,9 +936,7 @@ static const char *help_menu_items[] = { #else #define WIZHLP_SLOT 11 #endif -#ifdef WIZARD "List of wizard-mode commands.", -#endif "", (char *)0 }; @@ -958,10 +955,8 @@ help_menu(sel) any = zeroany; /* zero all bits */ start_menu(tmpwin); -#ifdef WIZARD if (!wizard) help_menu_items[WIZHLP_SLOT] = "", help_menu_items[WIZHLP_SLOT+1] = (char *)0; -#endif for (i = 0; help_menu_items[i]; i++) #ifdef PORT_HELP /* port-specific line has a %s in it for the PORT_ID */ @@ -1011,10 +1006,8 @@ dohelp() case PORT_HELP_ID: port_help(); break; #endif default: -#ifdef WIZARD /* handle slot 11 or 12 */ display_file(DEBUGHELP, TRUE); -#endif break; } } diff --git a/src/pickup.c b/src/pickup.c index e73a5576c..fea45dce3 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pickup.c $Date$ $Revision$ */ +/* NetHack 3.5 pickup.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.126 $ */ +/* NetHack 3.5 pickup.c $Date: 2012/02/16 03:01:38 $ $Revision: 1.123 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -11,13 +12,8 @@ #define CONTAINED_SYM '>' /* from invent.c */ STATIC_DCL void FDECL(simple_look, (struct obj *,BOOLEAN_P)); -#ifndef GOLDOBJ -STATIC_DCL boolean FDECL(query_classes, (char *,boolean *,boolean *, - const char *,struct obj *,BOOLEAN_P,BOOLEAN_P,int *)); -#else STATIC_DCL boolean FDECL(query_classes, (char *,boolean *,boolean *, const char *,struct obj *,BOOLEAN_P,int *)); -#endif STATIC_DCL boolean FDECL(fatal_corpse_mistake, (struct obj *,BOOLEAN_P)); STATIC_DCL void FDECL(check_here, (BOOLEAN_P)); STATIC_DCL boolean FDECL(n_or_more, (struct obj *)); @@ -100,15 +96,6 @@ boolean here; /* flag for type of obj list linkage */ } } -#ifndef GOLDOBJ -int -collect_obj_classes(ilets, otmp, here, incl_gold, filter, itemcount) -char ilets[]; -register struct obj *otmp; -boolean here, incl_gold; -boolean FDECL((*filter),(OBJ_P)); -int *itemcount; -#else int collect_obj_classes(ilets, otmp, here, filter, itemcount) char ilets[]; @@ -116,16 +103,11 @@ register struct obj *otmp; boolean here; boolean FDECL((*filter),(OBJ_P)); int *itemcount; -#endif { register int iletct = 0; register char c; *itemcount = 0; -#ifndef GOLDOBJ - if (incl_gold) - ilets[iletct++] = def_oc_syms[COIN_CLASS].sym; -#endif ilets[iletct] = '\0'; /* terminate ilets so that index() will work */ while (otmp) { c = def_oc_syms[(int)otmp->oclass].sym; @@ -150,17 +132,6 @@ int *itemcount; * "?/a" or "a?/" or "/a?",&c picks all '?' even though no '/' * (ie, treated as if it had just been "?a"). */ -#ifndef GOLDOBJ -STATIC_OVL boolean -query_classes(oclasses, one_at_a_time, everything, action, objs, - here, incl_gold, menu_on_demand) -char oclasses[]; -boolean *one_at_a_time, *everything; -const char *action; -struct obj *objs; -boolean here, incl_gold; -int *menu_on_demand; -#else STATIC_OVL boolean query_classes(oclasses, one_at_a_time, everything, action, objs, here, menu_on_demand) @@ -170,7 +141,6 @@ const char *action; struct obj *objs; boolean here; int *menu_on_demand; -#endif { char ilets[20], inbuf[BUFSZ]; int iletct, oclassct; @@ -182,9 +152,6 @@ int *menu_on_demand; oclasses[oclassct = 0] = '\0'; *one_at_a_time = *everything = m_seen = FALSE; iletct = collect_obj_classes(ilets, objs, here, -#ifndef GOLDOBJ - incl_gold, -#endif (boolean FDECL((*),(OBJ_P))) 0, &itemcount); if (iletct == 0) { return FALSE; @@ -577,9 +544,6 @@ menu_pickup: if (!query_classes(oclasses, &selective, &all_of_a_type, "pick up", objchain, traverse_how == BY_NEXTHERE, -#ifndef GOLDOBJ - FALSE, -#endif &via_menu)) { if (!via_menu) return (0); n = query_objlist("Pick up what?", @@ -648,7 +612,6 @@ end_query: return (n_tried > 0); } -#ifdef AUTOPICKUP_EXCEPTIONS boolean is_autopickup_exception(obj, grab) struct obj *obj; @@ -667,7 +630,6 @@ boolean grab; /* forced pickup, rather than forced leave behind? */ } return FALSE; } -#endif /* AUTOPICKUP_EXCEPTIONS */ /* * Pick from the given list using flags.pickup_types. Return the number @@ -691,12 +653,10 @@ menu_item **pick_list; /* list of objects and counts to pick up */ /* first count the number of eligible items */ for (n = 0, curr = olist; curr; curr = FOLLOW(curr, follow)) { pickit = (!*otypes || index(otypes, curr->oclass)); -#ifdef AUTOPICKUP_EXCEPTIONS /* check for "always pick up */ if (!pickit) pickit = is_autopickup_exception(curr, TRUE); /* then for "never pick up */ if (pickit) pickit = !is_autopickup_exception(curr, FALSE); -#endif /* pickup_thrown overrides pickup_types and exceptions */ if (!pickit) pickit = (flags.pickup_thrown && curr->was_thrown); /* finally, do we count this object? */ @@ -707,10 +667,8 @@ menu_item **pick_list; /* list of objects and counts to pick up */ *pick_list = pi = (menu_item *) alloc(sizeof(menu_item) * n); for (n = 0, curr = olist; curr; curr = FOLLOW(curr, follow)) { pickit = (!*otypes || index(otypes, curr->oclass)); -#ifdef AUTOPICKUP_EXCEPTIONS if (!pickit) pickit = is_autopickup_exception(curr, TRUE); if (pickit) pickit = !is_autopickup_exception(curr, FALSE); -#endif if (!pickit) pickit = (flags.pickup_thrown && curr->was_thrown); if (pickit) { pi[n].item.a_obj = curr; @@ -939,9 +897,7 @@ int how; /* type of query */ (*pick_list)->item.a_int = curr->oclass; return 1; } else { -#ifdef DEBUG - impossible("query_category: no single object match"); -#endif + debugpline("query_category: no single object match"); } return 0; } @@ -1095,11 +1051,7 @@ int *wt_before, *wt_after; savequan = obj->quan; saveowt = obj->owt; -#ifndef GOLDOBJ - umoney = u.ugold; -#else umoney = money_cnt(invent); -#endif iw = max_capacity(); if (count != savequan) { @@ -1314,62 +1266,12 @@ boolean telekinesis; /* not picking it up directly by hand */ /* In case of auto-pickup, where we haven't had a chance to look at it yet; affects docall(SCR_SCARE_MONSTER). */ if (!Blind) -#ifdef INVISIBLE_OBJECTS - if (!obj->oinvis || See_invisible) -#endif obj->dknown = 1; if (obj == uchain) { /* do not pick up attached chain */ return 0; } else if (obj->oartifact && !touch_artifact(obj,&youmonst)) { return 0; -#ifndef GOLDOBJ - } else if (obj->oclass == COIN_CLASS) { - /* Special consideration for gold pieces... */ - long iw = (long)max_capacity() - GOLD_WT(u.ugold); - long gold_capacity = GOLD_CAPACITY(iw, u.ugold); - const char *where = (obj->ox == u.ux && obj->oy == u.uy) ? - "here" : "there"; - - if (gold_capacity <= 0L) { - pline( - "There %s %ld gold piece%s %s, but you cannot carry any more.", - otense(obj, "are"), - obj->quan, plur(obj->quan), where); - return 0; - } else if (gold_capacity < count) { - You("can only %s %s of the %ld gold pieces lying %s.", - telekinesis ? "acquire" : "carry", - gold_capacity == 1L ? "one" : "some", obj->quan, where); - pline("%s %ld gold piece%s.", - nearloadmsg, gold_capacity, plur(gold_capacity)); - u.ugold += gold_capacity; - obj->quan -= gold_capacity; - costly_gold(obj->ox, obj->oy, gold_capacity); - } else { - u.ugold += count; - if (count == obj->quan) - /* costly_gold() can trigger --More-- prompt, so - take gold off map before messages in order to - prevent hangup save there from duplicating it */ - obj_extract_self(obj); /* remove from floor */ - else - obj->quan -= count; - if ((nearload = near_capacity()) != 0) - pline("%s %ld gold piece%s.", - nearload < MOD_ENCUMBER ? - moderateloadmsg : nearloadmsg, - count, plur(count)); - else - prinv((char *) 0, obj, count); - costly_gold(obj->ox, obj->oy, count); - if (obj->where == OBJ_FREE) - delobj(obj); - } - context.botl = 1; - if (context.run) nomul(0); - return 1; -#endif } else if (obj->otyp == CORPSE) { if (fatal_corpse_mistake(obj, telekinesis) || rider_corpse_revival(obj, telekinesis)) @@ -1394,10 +1296,8 @@ boolean telekinesis; /* not picking it up directly by hand */ if ((res = lift_object(obj, (struct obj *)0, &count, telekinesis)) <= 0) return res; -#ifdef GOLDOBJ /* Whats left of the special case for gold :-) */ if (obj->oclass == COIN_CLASS) context.botl = 1; -#endif if (obj->quan != count && obj->otyp != LOADSTONE) obj = splitobj(obj, count); @@ -1416,8 +1316,6 @@ boolean telekinesis; /* not picking it up directly by hand */ * and putting it in the hero's inventory. Take care of billing. Return a * pointer to the object where otmp ends up. This may be different * from otmp because of merging. - * - * Gold never reaches this routine unless GOLDOBJ is defined. */ struct obj * pick_obj(otmp) @@ -1515,11 +1413,9 @@ boolean looting; /* loot vs tip */ const char *verb = looting ? "loot" : "tip"; if (!can_reach_floor(TRUE)) { -#ifdef STEED if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) rider_cant_reach(); /* not skilled enough to reach */ else -#endif cant_reach_floor(x, y, FALSE, TRUE); return FALSE; } else if ((is_pool(x, y) && (looting || !Underwater)) || @@ -1704,12 +1600,6 @@ reverse_loot() return FALSE; } -#ifndef GOLDOBJ - if (u.ugold) { - contribution = ((long)rnd(5) * u.ugold + 4L) / 5L; - goldob = mkgoldobj(contribution); - } -#else /* find a money object to mess with */ for (goldob = invent; goldob; goldob = goldob->nobj) if (goldob->oclass == COIN_CLASS) { @@ -1718,7 +1608,6 @@ reverse_loot() goldob = splitobj(goldob, contribution); break; } -#endif if (!goldob) return FALSE; if (!IS_THRONE(levl[x][y].typ)) { @@ -1739,9 +1628,7 @@ reverse_loot() if (coffers) { verbalize("Thank you for your contribution to reduce the debt."); -#ifdef GOLDOBJ freeinv(goldob); -#endif (void)add_to_container(coffers, goldob); coffers->owt = weight(coffers); coffers->cknown = 0; @@ -1750,13 +1637,8 @@ reverse_loot() (void)boxlock(coffers, &boxdummy); } } else if ((mon = makemon(courtmon(), x, y, NO_MM_FLAGS)) != 0) { -#ifndef GOLDOBJ - mon->mgold += goldob->quan; - delobj(goldob); -#else freeinv(goldob); add_to_minv(mon, goldob); -#endif pline("The exchequer accepts your contribution."); } else { You("drop %s.", doname(goldob)); @@ -1776,7 +1658,6 @@ boolean *prev_loot; { int c = -1; int timepassed = 0; -#ifdef STEED struct obj *otmp; char qbuf[QBUFSZ]; @@ -1815,7 +1696,6 @@ boolean *prev_loot; return (0); } } -#endif /* STEED */ /* 3.4.0 introduced the ability to pick things up from within swallower's stomach */ if (u.uswallow) { int count = passed_info ? *passed_info : 0; @@ -2051,9 +1931,6 @@ register struct obj *obj; otmp, count); if (is_gold) { -#ifndef GOLDOBJ - dealloc_obj(obj); -#endif bot(); /* update character's gold piece count immediately */ } return 1; @@ -2170,9 +2047,6 @@ struct obj **objp; int held; { struct obj *curr, *otmp, *obj = *objp; -#ifndef GOLDOBJ - struct obj *u_gold = (struct obj *)0; -#endif boolean quantum_cat, cursed_mbag, loot_out, loot_in, loot_in_first, stash_one, inokay, outokay, outmaybe; @@ -2236,9 +2110,6 @@ int held; } inokay = (invent != 0 && !(invent == current_container && !current_container->nobj)); -#ifndef GOLDOBJ - if (u.ugold) inokay = TRUE; -#endif outokay = Has_contents(current_container); if (!outokay) /* preformat the empty-container message */ Sprintf(emptymsg, "%s is %sempty.", @@ -2333,11 +2204,6 @@ int held; } } -#ifndef GOLDOBJ - /* if putting in, place gold where inventory traversal will see it */ - if ((loot_in || stash_one) && u.ugold) - u_gold = insert_gold_into_invent(TRUE); -#endif if ((loot_in || stash_one) && (!invent || (invent == current_container && !invent->nobj))) { You("don't have anything%s to %s.", @@ -2373,11 +2239,6 @@ int held; /* putting something in might have triggered magic bag explosion */ if (!current_container) loot_out = FALSE; -#ifndef GOLDOBJ - /* if we put gold into inventory above, take it back out now */ - if (u_gold) remove_gold_from_invent(); -#endif - /* out after in */ if (loot_out && loot_in_first) { if (!Has_contents(current_container)) { @@ -2435,9 +2296,6 @@ boolean put_in; if (query_classes(selection, &one_by_one, &allflag, action, *objlist, FALSE, -#ifndef GOLDOBJ - put_in ? (boolean)(u.ugold != 0L) : FALSE, -#endif &menu_on_request)) { if (askchain(objlist, (one_by_one ? (char *)0 : selection), allflag, actionfunc, checkfunc, 0, action)) diff --git a/src/pline.c b/src/pline.c index d4cdb9c43..3ee998684 100644 --- a/src/pline.c +++ b/src/pline.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pline.c $Date$ $Revision$ */ +/* NetHack 3.5 pline.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pline.c $Date: 2013/02/09 01:33:37 $ $Revision: 1.30 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -49,9 +50,7 @@ pline VA_DECL(const char *, line) #ifdef HANGUPHANDLING if (program_state.done_hup) return; #endif -#ifdef WIZARD if (program_state.wizkit_wishing) return; -#endif if (index(line, '%')) { Vsprintf(pbuf,line,VA_ARGS); @@ -77,11 +76,7 @@ pline VA_DECL(const char *, line) return; } #ifndef MAC -# ifdef UNICODE_WIDEWINPORT - if (no_repeat && !nhwstrcmp(toplines, line)) -# else - if (no_repeat && !strcmp(toplines, line)) -# endif + if (no_repeat && !strcmp(line, toplines)) return; #endif /* MAC */ if (vision_full_recalc) vision_recalc(0); @@ -340,7 +335,6 @@ register struct monst *mtmp; info[0] = 0; if (mtmp->mtame) { Strcat(info, ", tame"); -#ifdef WIZARD if (wizard) { Sprintf(eos(info), " (%d", mtmp->mtame); if (!mtmp->isminion) @@ -348,7 +342,6 @@ register struct monst *mtmp; EDOG(mtmp)->hungrytime, EDOG(mtmp)->apport); Strcat(info, ")"); } -#endif } else if (mtmp->mpeaceful) Strcat(info, ", peaceful"); if (mtmp->cham >= LOW_PM && mtmp->data != &mons[mtmp->cham]) @@ -400,9 +393,7 @@ register struct monst *mtmp; ", digesting you" : is_animal(u.ustuck->data) ? ", swallowing you" : ", engulfing you"); -#ifdef STEED if (mtmp == u.usteed) Strcat(info, ", carrying you"); -#endif /* avoid "Status of the invisible newt ..., invisible" */ /* and unlike a normal mon_nam, use "saddled" even if it has a name */ @@ -450,10 +441,7 @@ ustatusline() } /* note: "goop" == "glop"; variation is intentional */ } if (Stunned) Strcat(info, ", stunned"); -#ifdef STEED - if (!u.usteed) -#endif - if (Wounded_legs) { + if (!u.usteed && Wounded_legs) { const char *what = body_part(LEG); if ((Wounded_legs & BOTH_SIDES) == BOTH_SIDES) what = makeplural(what); diff --git a/src/polyself.c b/src/polyself.c index 7bafe84dd..3effba8b2 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 polyself.c $Date$ $Revision$ */ +/* NetHack 3.5 polyself.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 polyself.c $Date: 2013/03/16 01:44:28 $ $Revision: 1.88 $ */ /* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */ /* NetHack may be freely redistributed. See license for details. */ @@ -690,7 +691,6 @@ int mntmp; if (!sticky && !u.uswallow && u.ustuck && sticks(youmonst.data)) u.ustuck = 0; else if (sticky && !sticks(youmonst.data)) uunstick(); -#ifdef STEED if (u.usteed) { if (touch_petrifies(u.usteed->data) && !Stone_resistance && rnl(3)) { @@ -703,7 +703,6 @@ int mntmp; } if (!can_ride(u.usteed)) dismount_steed(DISMOUNT_POLY); } -#endif if (flags.verbose) { static const char use_thec[] = "Use the command #%s to %s."; @@ -822,12 +821,10 @@ break_armor() useup(otmp); } } -#ifdef TOURIST if (uarmu) { Your("shirt rips to shreds!"); useup(uarmu); } -#endif } else if (sliparm(youmonst.data)) { if (((otmp = uarm) != 0) && (racial_exception(&youmonst, otmp) < 1)) { if (donning(otmp)) cancel_don(); @@ -842,7 +839,6 @@ break_armor() (void) Cloak_off(); dropx(otmp); } -#ifdef TOURIST if ((otmp = uarmu) != 0) { if (is_whirly(youmonst.data)) You("seep right through your shirt!"); @@ -850,7 +846,6 @@ break_armor() setworn((struct obj *)0, otmp->owornmask & W_ARMU); dropx(otmp); } -#endif } if (has_horns(youmonst.data)) { if ((otmp = uarmh) != 0) { diff --git a/src/potion.c b/src/potion.c index ede26f139..7542ea451 100644 --- a/src/potion.c +++ b/src/potion.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 potion.c $Date$ $Revision$ */ +/* NetHack 3.5 potion.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 potion.c $Date: 2013/11/05 00:57:55 $ $Revision: 1.91 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -89,11 +90,9 @@ boolean talk; } if (xtime && !old) { if (talk) { -#ifdef STEED if (u.usteed) You("wobble in the saddle."); else -#endif You("%s...", stagger(youmonst.data, "stagger")); } } @@ -400,7 +399,6 @@ dodrink() return 1; } } -#ifdef SINKS /* Or a kitchen sink? */ if (IS_SINK(levl[u.ux][u.uy].typ) && /* not as low as floor level but similar restrictions apply */ @@ -410,7 +408,6 @@ dodrink() return 1; } } -#endif /* Or are you surrounded by water? */ if (Underwater && !u.uswallow) { @@ -675,10 +672,8 @@ peffects(otmp) else { if (Levitation || Is_airlevel(&u.uz)||Is_waterlevel(&u.uz)) You("are motionlessly suspended."); -#ifdef STEED else if (u.usteed) You("are frozen in place!"); -#endif else Your("%s are frozen to the %s!", makeplural(body_part(FOOT)), surface(u.ux, u.uy)); @@ -813,11 +808,8 @@ peffects(otmp) } break; case POT_SPEED: - if(Wounded_legs && !otmp->cursed -#ifdef STEED - && !u.usteed /* heal_legs() would heal steeds legs */ -#endif - ) { + if(Wounded_legs && !otmp->cursed && !u.usteed) { + /* heal_legs() would heal steeds legs */ heal_legs(); unkn++; break; @@ -1142,10 +1134,8 @@ boolean your_fault; register const char *botlnam = bottlename(); boolean isyou = (mon == &youmonst); int distance; -#ifdef STEED struct obj *saddle = (struct obj *)0; boolean hit_saddle = FALSE; -#endif if(isyou) { distance = 0; @@ -1153,7 +1143,6 @@ boolean your_fault; botlnam, body_part(HEAD)); losehp(Maybe_Half_Phys(rnd(2)), "thrown potion", KILLED_BY_AN); } else { -#ifdef STEED /* sometimes it hits the saddle */ if(((mon->misc_worn_check & W_SADDLE) && (saddle = which_armor(mon, W_SADDLE))) && @@ -1162,21 +1151,17 @@ boolean your_fault; ((rnl(10) > 7 && obj->cursed) || (rnl(10) < 4 && obj->blessed) || !rn2(3))))) hit_saddle = TRUE; -#endif distance = distu(mon->mx,mon->my); if (!cansee(mon->mx,mon->my)) pline("Crash!"); else { char *mnam = mon_nam(mon); char buf[BUFSZ]; -#ifdef STEED if(hit_saddle && saddle) { Sprintf(buf, "%s saddle", s_suffix(x_monnam(mon, ARTICLE_THE, (char *)0, (SUPPRESS_IT|SUPPRESS_SADDLE), FALSE))); - } else -#endif - if(has_head(mon->data)) { + } else if(has_head(mon->data)) { Sprintf(buf, "%s %s", s_suffix(mnam), (notonhead ? "body" : "head")); @@ -1186,20 +1171,12 @@ boolean your_fault; pline_The("%s crashes on %s and breaks into shards.", botlnam, buf); } - if(rn2(5) && mon->mhp > 1 -#ifdef STEED - && !hit_saddle -#endif - ) + if(rn2(5) && mon->mhp > 1 && !hit_saddle) mon->mhp--; } /* oil doesn't instantly evaporate; Neither does a saddle hit */ - if (obj->otyp != POT_OIL && -#ifdef STEED - !hit_saddle && -#endif - cansee(mon->mx,mon->my)) + if (obj->otyp != POT_OIL && !hit_saddle && cansee(mon->mx,mon->my)) pline("%s.", Tobjnam(obj, "evaporate")); if (isyou) { @@ -1223,7 +1200,6 @@ boolean your_fault; } break; } -#ifdef STEED } else if (hit_saddle && saddle) { char *mnam, buf[BUFSZ], saddle_glows[BUFSZ]; boolean affected = FALSE; @@ -1244,7 +1220,6 @@ boolean your_fault; } if (useeit && !affected) pline("%s %s wet.", buf, aobjnam(saddle, "get")); -#endif } else { boolean angermon = TRUE; @@ -1776,11 +1751,9 @@ dodip() if (yn(upstart(qtoo)) == 'y') { if (Levitation) { floating_above(pooltype); -#ifdef STEED } else if (u.usteed && !is_swimmer(u.usteed->data) && P_SKILL(P_RIDING) < P_BASIC) { rider_cant_reach(); /* not skilled enough to reach */ -#endif } else { if (obj->otyp == POT_ACID) obj->in_use = 1; (void) get_wet(obj); @@ -1936,28 +1909,6 @@ dodip() return 1; } -#ifdef INVISIBLE_OBJECTS - if (potion->otyp == POT_INVISIBILITY && !obj->oinvis) { - obj->oinvis = TRUE; - if (!Blind) { - if (!See_invisible) pline("Where did %s go?", - the(xname(obj))); - else You("notice a little haziness around %s.", - the(xname(obj))); - } - goto poof; - } else if (potion->otyp == POT_SEE_INVISIBLE && obj->oinvis) { - obj->oinvis = FALSE; - if (!Blind) { - if (!See_invisible) pline("So that's where %s went!", - the(xname(obj))); - else pline_The("haziness around %s disappears.", - the(xname(obj))); - } - goto poof; - } -#endif - if(is_poisonable(obj)) { if(potion->otyp == POT_SICKNESS && !obj->opoisoned) { char buf[BUFSZ]; diff --git a/src/pray.c b/src/pray.c index da8825dd3..a91782c72 100644 --- a/src/pray.c +++ b/src/pray.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pray.c $Date$ $Revision$ */ +/* NetHack 3.5 pray.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pray.c $Date: 2012/05/07 01:44:38 $ $Revision: 1.62 $ */ /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ @@ -10,9 +11,7 @@ STATIC_DCL int NDECL(in_trouble); STATIC_DCL void FDECL(fix_worst_trouble,(int)); STATIC_DCL void FDECL(angrygods,(ALIGNTYP_P)); STATIC_DCL void FDECL(at_your_feet, (const char *)); -#ifdef ELBERETH STATIC_DCL void NDECL(gcrownu); -#endif /*ELBERETH*/ STATIC_DCL void FDECL(pleased,(ALIGNTYP_P)); STATIC_DCL void FDECL(godvoice,(ALIGNTYP_P,const char*)); STATIC_DCL void FDECL(god_zaps_you,(ALIGNTYP_P)); @@ -208,12 +207,10 @@ in_trouble() Cursed_obj(uarmf, FUMBLE_BOOTS)) return TROUBLE_FUMBLING; if (worst_cursed_item()) return TROUBLE_CURSED_ITEMS; -#ifdef STEED if (u.usteed) { /* can't voluntarily dismount from a cursed saddle */ otmp = which_armor(u.usteed, W_SADDLE); if (Cursed_obj(otmp, SADDLE)) return TROUBLE_SADDLE; } -#endif if (Blinded > 1 && haseyes(youmonst.data) && (!u.uswallow || @@ -221,11 +218,7 @@ in_trouble() return(TROUBLE_BLIND); for(i=0; i= HUNGRY) return TROUBLE_HUNGRY; if (HStun & TIMEOUT) return TROUBLE_STUNNED; if (HConfusion & TIMEOUT) return TROUBLE_CONFUSED; @@ -263,10 +256,8 @@ worst_cursed_item() otmp = uarmh; } else if (uarmf && uarmf->cursed) { /* boots */ otmp = uarmf; -#ifdef TOURIST } else if (uarmu && uarmu->cursed) { /* shirt */ otmp = uarmu; -#endif } else if (uamul && uamul->cursed) { /* amulet */ otmp = uamul; } else if (uleft && uleft->cursed) { /* left ring */ @@ -484,7 +475,6 @@ decurse: pline ("Looks like you are back in Kansas."); (void) make_hallucinated(0L,FALSE,0L); break; -#ifdef STEED case TROUBLE_SADDLE: otmp = which_armor(u.usteed, W_SADDLE); if (!Blind) { @@ -494,7 +484,6 @@ decurse: } uncurse(otmp); break; -#endif } } @@ -560,9 +549,7 @@ aligntyp resp_god; if (uarm && !(EReflecting & W_ARM) && !(EDisint_resistance & W_ARM) && !uarmc) (void) destroy_arm(uarm); -#ifdef TOURIST if (uarmu && !uarm && !uarmc) (void) destroy_arm(uarmu); -#endif if (!Disint_resistance) fry_by_god(resp_god, TRUE); else { @@ -677,7 +664,6 @@ at_your_feet(str) } } -#ifdef ELBERETH STATIC_OVL void gcrownu() { @@ -829,7 +815,6 @@ gcrownu() add_weapon_skill(1); return; } -#endif /*ELBERETH*/ STATIC_OVL void pleased(g_align) @@ -1051,12 +1036,10 @@ pleased(g_align) } case 7: case 8: -#ifdef ELBERETH if (u.ualign.record >= PIOUS && !u.uevent.uhand_of_elbereth) { gcrownu(); break; } /* else FALLTHRU */ -#endif /*ELBERETH*/ case 6: { struct obj *otmp; int sp_no, trycnt = u.ulevel + 1; @@ -1089,9 +1072,7 @@ pleased(g_align) u.ublesscnt = rnz(350); kick_on_butt = u.uevent.udemigod ? 1 : 0; -#ifdef ELBERETH if (u.uevent.uhand_of_elbereth) kick_on_butt++; -#endif if (kick_on_butt) u.ublesscnt += kick_on_butt * rnz(1000); return; @@ -1664,7 +1645,6 @@ dopray() /* set up p_type and p_alignment */ if (!can_pray(TRUE)) return 0; -#ifdef WIZARD if (wizard && p_type >= 0) { if (yn("Force the gods to be pleased?") == 'y') { u.ublesscnt = 0; @@ -1674,7 +1654,6 @@ dopray() if(p_type < 2) p_type = 3; } } -#endif nomul(-3); nomovemsg = "You finish your prayer."; afternmv = prayer_done; diff --git a/src/priest.c b/src/priest.c index e5a112d2c..1ef7ea286 100644 --- a/src/priest.c +++ b/src/priest.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 priest.c $Date$ $Revision$ */ +/* NetHack 3.5 priest.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 priest.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.27 $ */ /* Copyright (c) Izchak Miller, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ @@ -444,11 +445,9 @@ int roomno; if (*this_time <= *other_time) *other_time = *this_time - 1L; } } -#ifdef DUNGEON_OVERVIEW /* recognize the Valley of the Dead and Moloch's Sanctum once hero has encountered the temple priest on those levels */ mapseen_temple(priest); -#endif } else { /* untended */ @@ -540,20 +539,6 @@ register struct monst *priest; priest->mpeaceful = 0; return; } -#ifndef GOLDOBJ - if(!u.ugold) { - if(coaligned && !strayed) { - if (priest->mgold > 0L) { - /* Note: two bits is actually 25 cents. Hmm. */ - pline("%s gives you %s for an ale.", Monnam(priest), - (priest->mgold == 1L) ? "one bit" : "two bits"); - if (priest->mgold > 1L) - u.ugold = 2L; - else - u.ugold = 1L; - priest->mgold -= u.ugold; - context.botl = 1; -#else if(!money_cnt(invent)) { if(coaligned && !strayed) { long pmoney = money_cnt(priest->minvent); @@ -562,7 +547,6 @@ register struct monst *priest; pline("%s gives you %s for an ale.", Monnam(priest), (pmoney == 1L) ? "one bit" : "two bits"); money2u(priest, pmoney > 1L ? 2 : 1); -#endif } else pline("%s preaches the virtues of poverty.", Monnam(priest)); exercise(A_WIS, TRUE); @@ -578,11 +562,7 @@ register struct monst *priest; verbalize("Thou shalt regret thine action!"); if(coaligned) adjalign(-1); } else if(offer < (u.ulevel * 200)) { -#ifndef GOLDOBJ - if(u.ugold > (offer * 2L)) verbalize("Cheapskate."); -#else if(money_cnt(invent) > (offer * 2L)) verbalize("Cheapskate."); -#endif else { verbalize("I thank thee for thy contribution."); /* give player some token */ @@ -590,11 +570,7 @@ register struct monst *priest; } } else if(offer < (u.ulevel * 400)) { verbalize("Thou art indeed a pious individual."); -#ifndef GOLDOBJ - if(u.ugold < (offer * 2L)) { -#else if(money_cnt(invent) < (offer * 2L)) { -#endif if (coaligned && u.ualign.record <= ALGN_SINNED) adjalign(1); verbalize("I bestow upon thee a blessing."); @@ -615,11 +591,7 @@ register struct monst *priest; } else u.ublessed++; } else { verbalize("Thy selfless generosity is deeply appreciated."); -#ifndef GOLDOBJ - if(u.ugold < (offer * 2L) && coaligned) { -#else if(money_cnt(invent) < (offer * 2L) && coaligned) { -#endif if(strayed && (moves - u.ucleansed) > 5000L) { u.ualign.record = 0; /* cleanse thee */ u.ucleansed = moves; diff --git a/src/quest.c b/src/quest.c index 3dfaaf532..e6f8cbc83 100644 --- a/src/quest.c +++ b/src/quest.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 quest.c $Date$ $Revision$ */ +/* NetHack 3.5 quest.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 quest.c $Date: 2009/05/06 10:47:33 $ $Revision: 1.10 $ */ /* SCCS Id: @(#)quest.c 3.5 2006/08/05 */ /* Copyright 1991, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ @@ -128,7 +129,6 @@ boolean talk; int purity; aligntyp original_alignment = u.ualignbase[A_ORIGINAL]; -#ifdef WIZARD if (wizard && talk) { if (u.ualign.type != original_alignment) { You("are currently %s instead of %s.", @@ -142,7 +142,6 @@ boolean talk; u.ualign.record = MIN_QUEST_ALIGN; } } -#endif purity = (u.ualign.record >= MIN_QUEST_ALIGN && u.ualign.type == original_alignment && u.ualignbase[A_CURRENT] == original_alignment) ? 1 : @@ -173,9 +172,7 @@ boolean seal; if (seal) { /* remove the portal to the quest - sealing it off */ int reexpelled = u.uevent.qexpelled; u.uevent.qexpelled = 1; -#ifdef DUNGEON_OVERVIEW remdun_mapseen(quest_dnum); -#endif /* Delete the near portal now; the far (main dungeon side) portal will be deleted as part of arrival on that level. If monster movement is in progress, any who haven't moved diff --git a/src/questpgr.c b/src/questpgr.c index af7489b90..7f51965f7 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 questpgr.c $Date$ $Revision$ */ +/* NetHack 3.5 questpgr.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 questpgr.c $Date: 2012/02/02 09:18:14 $ $Revision: 1.14 $ */ /* Copyright 1991, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ @@ -11,7 +12,9 @@ #define QTEXT_FILE "quest.dat" -/* #define DEBUG */ /* uncomment for debugging */ +#ifdef TTY_GRAPHICS +#include "wintty.h" +#endif /* from sp_lev.c, for deliver_splev_message() */ extern char *lev_message; @@ -43,17 +46,23 @@ static void dump_qtlist() /* dump the character msg list to check appearance */ { struct qtmsg *msg; - long size; + + if (!showdebug()) return; for (msg = qt_list.chrole; msg->msgnum > 0; msg++) { pline("msgnum %d: delivery %c", msg->msgnum, msg->delivery); +#ifdef TTY_GRAPHICS more(); +#endif (void) dlb_fseek(msg_file, msg->offset, SEEK_SET); deliver_by_window(msg, NHW_TEXT); } } -#endif /* DEBUG */ +#else +static void +dump_qtlist() { } +#endif /* !DEBUG */ static void Fread(ptr, size, nitems, stream) @@ -132,9 +141,7 @@ load_qtlist() if (!qt_list.common || !qt_list.chrole) impossible("load_qtlist: cannot load quest text."); -#ifdef DEBUG dump_qtlist(); -#endif return; /* no ***DON'T*** close the msg_file */ } @@ -460,10 +467,8 @@ boolean skip_pager(common) boolean common; { -#ifdef WIZARD /* WIZKIT: suppress plot feedback if starting with quest artifact */ if (program_state.wizkit_wishing) return TRUE; -#endif if (!(common ? qt_list.common : qt_list.chrole)) { panic("%s: no %s quest text data available", common ? "com_pager" : "qt_pager", diff --git a/src/read.c b/src/read.c index 755d09969..9be9f9390 100644 --- a/src/read.c +++ b/src/read.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 read.c $Date$ $Revision$ */ +/* NetHack 3.5 read.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 read.c $Date: 2012/04/06 08:35:00 $ $Revision: 1.78 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -71,7 +72,6 @@ doread() if (!Blind) u.uconduct.literate++; useup(scroll); return(1); -#ifdef TOURIST } else if (scroll->otyp == T_SHIRT) { static const char *shirt_msgs[] = { /* Scott Bigham */ "I explored the Dungeons of Doom and all I got was this lousy T-shirt!", @@ -116,7 +116,6 @@ doread() scroll->o_id ^ (unsigned)ubirthday); pline("\"%s\"", buf); return 1; -#endif /* TOURIST */ } else if (scroll->oclass != SCROLL_CLASS && scroll->oclass != SPBOOK_CLASS) { pline(silly_thing_to, "read"); @@ -363,9 +362,7 @@ int curse_bless; break; case MAGIC_MARKER: case TINNING_KIT: -#ifdef TOURIST case EXPENSIVE_CAMERA: -#endif if (is_cursed) stripspe(obj); else if (rechrg && obj->otyp == MAGIC_MARKER) { /* previously recharged */ obj->recharged = 1; /* override increment done above */ @@ -573,9 +570,7 @@ forget_map(howmuch) levl[zx][zy].seenv = 0; levl[zx][zy].waslit = 0; levl[zx][zy].glyph = cmap_to_glyph(S_stone); -#ifdef DUNGEON_OVERVIEW lastseentyp[zx][zy] = STONE; -#endif } } @@ -636,9 +631,7 @@ forget_levels(percent) count = ((count * percent) + 50) / 100; for (i = 0; i < count; i++) { level_info[indices[i]].flags |= FORGOTTEN; -#ifdef DUNGEON_OVERVIEW forget_mapseen(indices[i]); -#endif } } @@ -999,10 +992,8 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */ } else { for (obj = invent; obj; obj = obj->nobj) { long wornmask; -#ifdef GOLDOBJ /* gold isn't subject to cursing and blessing */ if (obj->oclass == COIN_CLASS) continue; -#endif wornmask = (obj->owornmask & ~(W_BALL|W_ART|W_ARTI)); if (wornmask && !sblessed) { /* handle a couple of special cases; we don't @@ -1125,10 +1116,7 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */ for (i = -bd; i <= bd; i++) for(j = -bd; j <= bd; j++) { if (!isok(u.ux + i, u.uy + j)) continue; if ((mtmp = m_at(u.ux + i, u.uy + j)) != 0 -#ifdef STEED - || (!i && !j && (mtmp = u.usteed) != 0) -#endif - ) { + || (!i && !j && (mtmp = u.usteed) != 0)) { ++candidates; res = maybe_tame(mtmp, sobj); results += res; @@ -1328,11 +1316,8 @@ struct obj *sobj; /* scroll, or fake spellbook object for scroll-like spell */ break; case SCR_EARTH: /* TODO: handle steeds */ - if ( -#ifdef REINCARNATION - !Is_rogue_level(&u.uz) && -#endif - (!In_endgame(&u.uz) || Is_earthlevel(&u.uz))) { + if (!Is_rogue_level(&u.uz) + && (!In_endgame(&u.uz) || Is_earthlevel(&u.uz))) { register int x, y; /* Identify the scroll */ @@ -1612,7 +1597,6 @@ do_it: if (Punished && !on && !Blind) move_bc(1, 0, uball->ox, uball->oy, uchain->ox, uchain->oy); -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) { /* Can't use do_clear_area because MAX_RADIUS is too small */ /* rogue lighting must light the entire room */ @@ -1627,7 +1611,6 @@ do_it: } /* hallways remain dark on the rogue level */ } else -#endif do_clear_area(u.ux,u.uy, (obj && obj->oclass==SCROLL_CLASS && obj->blessed) ? 9 : 5, set_lit, (genericptr_t)(on ? &is_lit : (char *)0)); @@ -1702,7 +1685,6 @@ do_class_genocide() else if (immunecnt || class == S_invisible) You("aren't permitted to genocide such monsters."); else -#ifdef WIZARD /* to aid in topology testing; remove pesky monsters */ if (wizard && buf[0] == '*') { register struct monst *mtmp, *mtmp2; @@ -1716,7 +1698,6 @@ do_class_genocide() pline("Eliminated %d monster%s.", gonecnt, plur(gonecnt)); return; } else -#endif pline("That %s does not represent any monster.", strlen(buf) == 1 ? "symbol" : "response"); continue; @@ -2038,7 +2019,6 @@ struct obj *from_obj; return FALSE; } -#ifdef WIZARD /* * Make a new monster with the type controlled by the user. * @@ -2078,12 +2058,10 @@ create_particular() makehostile = TRUE; } /* decide whether a valid monster was chosen */ -#ifdef WIZARD if (wizard && (!strcmp(bufp, "*") || !strcmp(bufp, "random"))) { randmonst = TRUE; break; } -#endif which = name_to_mon(bufp); if (which >= LOW_PM) break; /* got one */ monclass = name_to_monclass(bufp, &which); @@ -2104,12 +2082,10 @@ create_particular() if (!randmonst) { firstchoice = which; if (cant_revive(&which, FALSE, (struct obj *)0)) { -#ifdef WIZARD /* intentionally redundant... */ /* 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; -#endif } whichpm = &mons[which]; } @@ -2142,6 +2118,5 @@ create_particular() } return madeany; } -#endif /* WIZARD */ /*read.c*/ diff --git a/src/rect.c b/src/rect.c index 5eb5896e8..a3d6228c7 100644 --- a/src/rect.c +++ b/src/rect.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 rect.c $Date$ $Revision$ */ +/* NetHack 3.5 rect.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 rect.c $Date: 2009/05/06 10:47:37 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)rect.c 3.5 1990/02/22 */ /* Copyright (c) 1990 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -136,9 +137,7 @@ add_rect(r) NhRect *r; { if (rect_cnt >= MAXRECT) { -#ifdef WIZARD if (wizard) pline("MAXRECT may be too small."); -#endif return; } /* Check that this NhRect is not included in another one */ diff --git a/src/region.c b/src/region.c index 914b79e62..562747948 100644 --- a/src/region.c +++ b/src/region.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 region.c $Date$ $Revision$ */ +/* NetHack 3.5 region.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 region.c $Date: 2012/05/07 01:44:38 $ $Revision: 1.26 $ */ /* Copyright (c) 1996 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/restore.c b/src/restore.c index cd2bc4006..af974d147 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 restore.c $Date$ $Revision$ */ +/* NetHack 3.5 restore.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 restore.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.71 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -145,17 +146,6 @@ boolean quietly; for (otmp = invent; otmp; otmp = otmp2) { otmp2 = otmp->nobj; -#ifndef GOLDOBJ - if (otmp->oclass == COIN_CLASS) { - /* in_use gold is created by some menu operations */ - if (!otmp->in_use) { - impossible("inven_inuse: !in_use gold in inventory"); - } - extract_nobj(otmp, &invent); - otmp->in_use = FALSE; - dealloc_obj(otmp); - } else -#endif /* GOLDOBJ */ if (otmp->in_use) { if (!quietly) pline("Finishing off %s...", xname(otmp)); useup(otmp); @@ -440,9 +430,6 @@ boolean ghostly; /* restore monster back pointer */ for (obj = mtmp->minvent; obj; obj = obj->nobj) obj->ocarry = mtmp; -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ - put_gold_back(mtmp); -#endif } if (mtmp->mw) { struct obj *obj; @@ -515,7 +502,7 @@ STATIC_OVL boolean restgamestate(fd, stuckid, steedid) register int fd; -unsigned int *stuckid, *steedid; /* STEED */ +unsigned int *stuckid, *steedid; { struct flag newgameflags; #ifdef SYSFLAGS @@ -530,9 +517,7 @@ unsigned int *stuckid, *steedid; /* STEED */ /* for wizard mode, issue a reminder; for others, treat it as an attempt to cheat and refuse to restore this file */ pline("Saved game was not yours."); -#ifdef WIZARD if (!wizard) -#endif return FALSE; } mread(fd, (genericptr_t) &context, sizeof(struct context_info)); @@ -599,9 +584,6 @@ unsigned int *stuckid, *steedid; /* STEED */ restore_timers(fd, RANGE_GLOBAL, FALSE, 0L); restore_light_sources(fd); invent = restobjchn(fd, FALSE, FALSE); -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ - put_gold_back(&youmonst); -#endif /* tmp_bc only gets set here if the ball & chain were orphaned because you were swallowed; otherwise they will be on the floor or in your inventory */ @@ -651,10 +633,8 @@ unsigned int *stuckid, *steedid; /* STEED */ restore_oracles(fd); if (u.ustuck) mread(fd, (genericptr_t) stuckid, sizeof (*stuckid)); -#ifdef STEED if (u.usteed) mread(fd, (genericptr_t) steedid, sizeof (*steedid)); -#endif mread(fd, (genericptr_t) pl_character, sizeof pl_character); mread(fd, (genericptr_t) pl_fruit, sizeof pl_fruit); @@ -675,7 +655,7 @@ unsigned int *stuckid, *steedid; /* STEED */ */ STATIC_OVL void restlevelstate(stuckid, steedid) -unsigned int stuckid, steedid; /* STEED */ +unsigned int stuckid, steedid; { register struct monst *mtmp; @@ -685,7 +665,6 @@ unsigned int stuckid, steedid; /* STEED */ if (!mtmp) panic("Cannot find the monster ustuck."); u.ustuck = mtmp; } -#ifdef STEED if (steedid) { for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) if (mtmp->m_id == steedid) break; @@ -693,7 +672,6 @@ unsigned int stuckid, steedid; /* STEED */ u.usteed = mtmp; remove_monster(mtmp->mx, mtmp->my); } -#endif } /*ARGSUSED*/ /* fd used in MFLOPPY only */ @@ -792,9 +770,7 @@ register int fd; * place_monster() on other levels */ u.ustuck = (struct monst *)0; -#ifdef STEED u.usteed = (struct monst *)0; -#endif #ifdef MICRO # ifdef AMII_GRAPHICS @@ -862,9 +838,7 @@ register int fd; if (!wizard && !discover) (void) delete_savefile(); -#ifdef REINCARNATION if (Is_rogue_level(&u.uz)) assign_graphics(ROGUESET); -#endif #ifdef USE_TILES substitute_tiles(&u.uz); #endif @@ -1015,16 +989,12 @@ boolean ghostly; hpid, pid); else Sprintf(trickbuf, "This is level %d, not %d!", dlvl, lev); -#ifdef WIZARD if (wizard) pline1(trickbuf); -#endif trickery(trickbuf); } restcemetery(fd, &level.bonesinfo); rest_levl(fd, (boolean)((sfrestinfo.sfi1 & SFI1_RLECOMP) == SFI1_RLECOMP)); -#ifdef DUNGEON_OVERVIEW mread(fd, (genericptr_t)lastseentyp, sizeof(lastseentyp)); -#endif mread(fd, (genericptr_t)&omoves, sizeof(omoves)); elapsed = monstermoves - omoves; mread(fd, (genericptr_t)&upstair, sizeof(stairway)); @@ -1183,9 +1153,7 @@ register int fd; ++msgcount; } if (msgcount) putmsghistory((char *)0, TRUE); -#ifdef DEBUG_MSGCOUNT - pline("Read %d messages from savefile.", msgcount); -#endif + debugpline("Read %d messages from savefile.", msgcount); } /* Clear all structures for object and monster ID mapping. */ @@ -1584,29 +1552,4 @@ register unsigned int len; } } -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ -/* used to make save & bones files be compatible with GOLDOBJ config; - takes all of the gold objects out of the invent or mtmp->minvent - chain and puts it into either u.ugold or mtmp->mgold */ -void -put_gold_back(mon) -struct monst *mon; -{ - struct obj *goldobj; - boolean is_hero = (mon == &youmonst); - - /* there could be two gold objects in invent if a hangup save was - performed while gold was in invent for Drop or container access */ - while ((goldobj = (is_hero ? carrying(GOLD_PIECE) : - m_carrying(mon, GOLD_PIECE))) != 0) { - extract_nobj(goldobj, is_hero ? &invent : &mon->minvent); - if (!goldobj->in_use) { - if (is_hero) u.ugold += goldobj->quan; - else mon->mgold += goldobj->quan; - } - dealloc_obj(goldobj); - } -} -#endif /*GOLDOBJ*/ - /*restore.c*/ diff --git a/src/rip.c b/src/rip.c index 85d0c4016..8b3d849a3 100644 --- a/src/rip.c +++ b/src/rip.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 rip.c $Date$ $Revision$ */ +/* NetHack 3.5 rip.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 rip.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.11 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -106,11 +107,7 @@ time_t when; center(NAME_LINE, buf); /* Put $ on stone */ -#ifndef GOLDOBJ - Sprintf(buf, "%ld Au", u.ugold); -#else Sprintf(buf, "%ld Au", done_money); -#endif buf[STONE_LINE_LEN] = 0; /* It could be a *lot* of gold :-) */ center(GOLD_LINE, buf); diff --git a/src/rnd.c b/src/rnd.c index 5f50ecbd0..662d1a275 100644 --- a/src/rnd.c +++ b/src/rnd.c @@ -1,13 +1,10 @@ -/* NetHack 3.5 rnd.c $Date$ $Revision$ */ +/* NetHack 3.5 rnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 rnd.c $Date: 2009/05/06 10:47:41 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)rnd.c 3.5 2004/08/27 */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -#if defined(BETA) && !defined(DEBUG) && !defined(NODEBUG) -#define DEBUG -#endif - /* "Rand()"s definition is determined by [OS]conf.h */ #if defined(LINT) && defined(UNIX) /* rand() is long... */ extern int NDECL(rand); @@ -25,9 +22,9 @@ int rn2(x) /* 0 <= rn2(x) < x */ register int x; { -#ifdef DEBUG +#ifdef BETA if (x <= 0) { - impossible("rn2(%d) attempted", x); + debugpline("rn2(%d) attempted", x); return(0); } x = RND(x); @@ -43,9 +40,9 @@ register int x; /* good luck approaches 0, bad luck approaches (x-1) */ { register int i, adjustment; -#ifdef DEBUG +#ifdef BETA if (x <= 0) { - impossible("rnl(%d) attempted", x); + debugpline("rnl(%d) attempted", x); return(0); } #endif @@ -82,9 +79,9 @@ int rnd(x) /* 1 <= rnd(x) <= x */ register int x; { -#ifdef DEBUG +#ifdef BETA if (x <= 0) { - impossible("rnd(%d) attempted", x); + debugpline("rnd(%d) attempted", x); return(1); } x = RND(x)+1; @@ -100,9 +97,9 @@ register int n, x; { register int tmp = n; -#ifdef DEBUG +#ifdef BETA if (x < 0 || n < 0 || (x == 0 && n != 0)) { - impossible("d(%d,%d) attempted", n, x); + debugpline("d(%d,%d) attempted", n, x); return(1); } #endif diff --git a/src/role.c b/src/role.c index 570acf772..59624c528 100644 --- a/src/role.c +++ b/src/role.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 role.c $Date$ $Revision$ */ +/* NetHack 3.5 role.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 role.c $Date: 2012/02/16 03:01:38 $ $Revision: 1.18 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985-1999. */ /* NetHack may be freely redistributed. See license for details. */ @@ -298,7 +299,6 @@ const struct Role roles[] = { { 1, 0, 0, 1, 0, 1 },11, /* Energy */ 10, 10, 0, 0, 8, A_INT, SPE_CLAIRVOYANCE, -4 }, -#ifdef TOURIST { {"Tourist", 0}, { {"Rambler", 0}, {"Sightseer", 0}, @@ -324,7 +324,6 @@ const struct Role roles[] = { { 1, 0, 0, 1, 0, 1 },14, /* Energy */ 0, 5, 1, 2, 10, A_INT, SPE_CHARM_MONSTER, -4 }, -#endif { {"Valkyrie", 0}, { {"Stripling", 0}, {"Skirmisher", 0}, @@ -1704,10 +1703,8 @@ struct monst *mtmp; case PM_SAMURAI: return (mtmp && mtmp->data == &mons[PM_SHOPKEEPER] ? "Irasshaimase" : "Konnichi wa"); /* Japanese */ -#ifdef TOURIST case PM_TOURIST: return ("Aloha"); /* Hawaiian */ -#endif case PM_VALKYRIE: return ( #ifdef MAIL @@ -1727,10 +1724,8 @@ Goodbye() return ("Fare thee well"); /* Olde English */ case PM_SAMURAI: return ("Sayonara"); /* Japanese */ -#ifdef TOURIST case PM_TOURIST: return ("Aloha"); /* Hawaiian */ -#endif case PM_VALKYRIE: return ("Farvel"); /* Norse */ default: diff --git a/src/rumors.c b/src/rumors.c index 5993a8ead..081b81d8d 100644 --- a/src/rumors.c +++ b/src/rumors.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 rumors.c $Date$ $Revision$ */ +/* NetHack 3.5 rumors.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 rumors.c $Date: 2012/05/11 22:36:33 $ $Revision: 1.17 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -171,7 +172,6 @@ boolean exclude_cookie; return rumor_buf; } -#ifdef WIZARD /* * test that the true/false rumor boundaries are valid. */ @@ -265,7 +265,6 @@ rumor_check() true_rumor_size = -1; /* don't try to open it again */ } } -#endif void outrumor(truth, mechanism) @@ -428,11 +427,7 @@ register struct monst *oracl; char qbuf[QBUFSZ]; multi = 0; -#ifndef GOLDOBJ - umoney = u.ugold; -#else umoney = money_cnt(invent); -#endif if (!oracl) { There("is no one here to consult."); @@ -469,12 +464,7 @@ register struct monst *oracl; u_pay = (umoney < (long)major_cost) ? (int)umoney : major_cost; break; } -#ifndef GOLDOBJ - u.ugold -= (long)u_pay; - oracl->mgold += (long)u_pay; -#else money2mon(oracl, (long)u_pay); -#endif context.botl = 1; add_xpts = 0; /* first oracle of each type gives experience points */ if (u_pay == minor_cost) { diff --git a/src/save.c b/src/save.c index ce1073973..d7828655a 100644 --- a/src/save.c +++ b/src/save.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 save.c $Date$ $Revision$ */ +/* NetHack 3.5 save.c $NHDT-Date: 1425081977 2015/02/28 00:06:17 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.59 $ */ +/* NetHack 3.5 save.c $Date: 2012/02/16 02:40:24 $ $Revision: 1.53 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -230,9 +231,7 @@ dosave0() store_savefileinfo(fd); store_plname_in_file(fd); ustuck_id = (u.ustuck ? u.ustuck->m_id : 0); -#ifdef STEED usteed_id = (u.usteed ? u.usteed->m_id : 0); -#endif savelev(fd, ledger_no(&u.uz), WRITE_SAVE | FREE_SAVE); savegamestate(fd, WRITE_SAVE | FREE_SAVE); @@ -247,9 +246,7 @@ dosave0() * may mislead place_monster() on other levels */ u.ustuck = (struct monst *)0; -#ifdef STEED u.usteed = (struct monst *)0; -#endif for(ltmp = (xchar)1; ltmp <= maxledgerno(); ltmp++) { if (ltmp == ledger_no(&uz_save)) continue; @@ -309,9 +306,6 @@ register int fd, mode; bwrite(fd, (genericptr_t) &flags, sizeof(struct flag)); #ifdef SYSFLAGS bwrite(fd, (genericptr_t) &sysflags, sizeof(struct sysflag)); -#endif -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ - if (u.ugold) (void)insert_gold_into_invent(FALSE); #endif bwrite(fd, (genericptr_t) &u, sizeof(struct you)); bwrite(fd, yyyymmddhhmmss(ubirthday), 14); @@ -322,9 +316,6 @@ register int fd, mode; save_light_sources(fd, mode, RANGE_GLOBAL); saveobjchn(fd, invent, mode); -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ - if (!release_data(mode)) remove_gold_from_invent(); -#endif if (BALL_IN_MON) { /* prevent loss of ball & chain when swallowed */ uball->nobj = uchain; @@ -355,10 +346,8 @@ register int fd, mode; save_oracles(fd, mode); if(ustuck_id) bwrite(fd, (genericptr_t) &ustuck_id, sizeof ustuck_id); -#ifdef STEED if(usteed_id) bwrite(fd, (genericptr_t) &usteed_id, sizeof usteed_id); -#endif bwrite(fd, (genericptr_t) pl_character, sizeof pl_character); bwrite(fd, (genericptr_t) pl_fruit, sizeof pl_fruit); savefruitchn(fd, mode); @@ -432,9 +421,7 @@ savestateinlock() store_plname_in_file(fd); ustuck_id = (u.ustuck ? u.ustuck->m_id : 0); -#ifdef STEED usteed_id = (u.usteed ? u.usteed->m_id : 0); -#endif savegamestate(fd, WRITE_SAVE); } bclose(fd); @@ -518,9 +505,7 @@ int mode; #endif savecemetery(fd, mode, &level.bonesinfo); savelevl(fd, (boolean)((sfsaveinfo.sfi1 & SFI1_RLECOMP) == SFI1_RLECOMP)); -#ifdef DUNGEON_OVERVIEW bwrite(fd,(genericptr_t) lastseentyp,sizeof(lastseentyp)); -#endif bwrite(fd,(genericptr_t) &monstermoves,sizeof(monstermoves)); bwrite(fd,(genericptr_t) &upstair,sizeof(stairway)); bwrite(fd,(genericptr_t) &dnstair,sizeof(stairway)); @@ -1132,22 +1117,10 @@ register struct monst *mtmp; if (perform_bwrite(mode)) { mtmp->mnum = monsndx(mtmp->data); if (mtmp->ispriest) forget_temple_entry(mtmp); /* EPRI() */ -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ - if (mtmp->mgold) { - struct obj *goldobj = mksobj(GOLD_PIECE, FALSE, FALSE); - - goldobj->quan = mtmp->mgold; - mtmp->mgold = 0L; - add_to_minv(mtmp, goldobj); - } -#endif savemon(fd, mtmp); } if (mtmp->minvent) saveobjchn(fd,mtmp->minvent,mode); -#ifndef GOLDOBJ /* GOLDOBJ-compatibility */ - if (!release_data(mode)) put_gold_back(mtmp); -#endif if (release_data(mode)) dealloc_monst(mtmp); mtmp = mtmp2; @@ -1237,9 +1210,7 @@ int fd, mode; } bwrite(fd, (genericptr_t) &minusone, sizeof(int)); } -#ifdef DEBUG_MSGCOUNT - pline("Stored %d messages into savefile.", msgcount); -#endif + debugpline("Stored %d messages into savefile.", msgcount); /* note: we don't attempt to handle release_data() here */ } @@ -1374,9 +1345,7 @@ freedynamicdata() if (iflags.wc_font_menu) free(iflags.wc_font_menu); if (iflags.wc_font_status) free(iflags.wc_font_status); if (iflags.wc_tile_file) free(iflags.wc_tile_file); -#ifdef AUTOPICKUP_EXCEPTIONS free_autopickup_exceptions(); -#endif #endif /* FREE_ALL_MEMORY */ #ifdef STATUS_VIA_WINDOWPORT status_finish(); @@ -1400,12 +1369,10 @@ int lev; if (!swapout_oldest()) return FALSE; } -# ifdef WIZARD if (wizard) { pline("Swapping in `%s'.", from); wait_synch(); } -# endif copyfile(from, to); (void) unlink(from); level_info[lev].where = ACTIVE; @@ -1432,12 +1399,10 @@ swapout_oldest() { Sprintf(to, "%s%s", permbones, alllevels); set_levelfile_name(from, oldest); set_levelfile_name(to, oldest); -# ifdef WIZARD if (wizard) { pline("Swapping out `%s'.", from); wait_synch(); } -# endif copyfile(from, to); (void) unlink(from); level_info[oldest].where = SWAPPED; diff --git a/src/shk.c b/src/shk.c index ef8fed952..12f22eb40 100644 --- a/src/shk.c +++ b/src/shk.c @@ -1,22 +1,19 @@ -/* NetHack 3.5 shk.c $Date$ $Revision$ */ +/* NetHack 3.5 shk.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 shk.c $Date: 2012/07/03 22:54:49 $ $Revision: 1.91 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" -/*#define DEBUG*/ - #define PAY_SOME 2 #define PAY_BUY 1 #define PAY_CANT 0 /* too poor */ #define PAY_SKIP (-1) #define PAY_BROKE (-2) -#ifdef KOPS STATIC_DCL void FDECL(makekops, (coord *)); STATIC_DCL void FDECL(call_kops, (struct monst *,BOOLEAN_P)); STATIC_DCL void FDECL(kops_gone, (BOOLEAN_P)); -#endif /* KOPS */ #define NOTANGRY(mon) ((mon)->mpeaceful) #define ANGRY(mon) (!NOTANGRY(mon)) @@ -79,7 +76,6 @@ STATIC_DCL const char *FDECL(cad, (BOOLEAN_P)); */ -#ifdef GOLDOBJ /* Transfer money from inventory to monster when paying shopkeepers, priests, oracle, succubus, & other demons. @@ -154,8 +150,6 @@ long amount; } } -#endif /* GOLDOBJ */ - STATIC_OVL struct monst * next_shkp(shkp, withbill) register struct monst *shkp; @@ -312,7 +306,6 @@ register struct monst *shkp; return(total); } -#ifdef KOPS STATIC_OVL void call_kops(shkp, nearshop) register struct monst *shkp; @@ -363,7 +356,6 @@ register boolean nearshop; makekops(&mm); } } -#endif /* KOPS */ /* x,y is strictly inside shop */ char @@ -419,11 +411,7 @@ boolean newlev; } if (rob_shop(shkp)) { -#ifdef KOPS call_kops(shkp, (!newlev && levl[u.ux0][u.uy0].edge)); -#else - (void) angry_guards(FALSE); -#endif } } @@ -444,12 +432,8 @@ xchar x, y; return; if (rob_shop(shkp)) { -#ifdef KOPS /*[might want to set 2nd arg based on distance from shop doorway]*/ call_kops(shkp, FALSE); -#else - (void) angry_guards(FALSE); -#endif } } @@ -618,13 +602,11 @@ char *enterstring; "Leave the %s%s outside.", tool, plur(cnt)); should_block = TRUE; -#ifdef STEED } else if (u.usteed) { - verbalize(NOTANGRY(shkp) ? - "Will you please leave %s outside?" : - "Leave %s outside.", y_monnam(u.usteed)); - should_block = TRUE; -#endif + verbalize(NOTANGRY(shkp) ? + "Will you please leave %s outside?" : + "Leave %s outside.", y_monnam(u.usteed)); + should_block = TRUE; } else { should_block = (Fast && (sobj_at(PICK_AXE, u.ux, u.uy) || sobj_at(DWARVISH_MATTOCK, u.ux, u.uy))); @@ -916,13 +898,8 @@ register struct monst *shkp; long robbed = ESHK(shkp)->robbed; long balance = ((tmp <= 0L) ? tmp : check_credit(tmp, shkp)); -#ifndef GOLDOBJ - u.ugold -= balance; - shkp->mgold += balance; -#else if (balance > 0) money2mon(shkp, balance); else if (balance < 0) money2u(shkp, -balance); -#endif context.botl = 1; if(robbed) { robbed -= tmp; @@ -942,11 +919,7 @@ register boolean killkops; (void) mnearto(shkp, x, y, TRUE); level.flags.has_shop = 1; if (killkops) { -#ifdef KOPS kops_gone(TRUE); -#else - You_feel("vaguely apprehensive."); -#endif pacify_guards(); } after_shk_move(shkp); @@ -1066,9 +1039,7 @@ make_happy_shoppers(silentkops) boolean silentkops; { if (!angry_shk_exists()) { -#ifdef KOPS kops_gone(silentkops); -#endif pacify_guards(); } } @@ -1234,9 +1205,7 @@ dopay() } if(!shkp) { -#ifdef DEBUG - pline("dopay: null shkp."); -#endif + debugpline("dopay: null shkp."); return(0); } proceed: @@ -1254,11 +1223,7 @@ proceed: } if(shkp != resident && NOTANGRY(shkp)) { -#ifdef GOLDOBJ umoney = money_cnt(invent); -#else - umoney = u.ugold; -#endif if(!ltmp) You("do not owe %s anything.", mon_nam(shkp)); else if(!umoney) { @@ -1287,11 +1252,7 @@ proceed: /* ltmp is still eshkp->robbed here */ if (!eshkp->billct && !eshkp->debit) { -#ifdef GOLDOBJ umoney = money_cnt(invent); -#else - umoney = u.ugold; -#endif if(!ltmp && NOTANGRY(shkp)) { You("do not owe %s anything.", shkname(shkp)); if (!umoney) @@ -1344,9 +1305,7 @@ proceed: long dtmp = eshkp->debit; long loan = eshkp->loan; char sbuf[BUFSZ]; -#ifdef GOLDOBJ umoney = money_cnt(invent); -#endif Sprintf(sbuf, "You owe %s %ld %s ", shkname(shkp), dtmp, currency(dtmp)); if(loan) { @@ -1356,11 +1315,7 @@ proceed: "for gold picked up and the use of merchandise."); } else Strcat(sbuf, "for the use of merchandise."); pline1(sbuf); -#ifndef GOLDOBJ - if (u.ugold + eshkp->credit < dtmp) { -#else if (umoney + eshkp->credit < dtmp) { -#endif pline("But you don't%s have enough gold%s.", stashed_gold ? " seem to" : "", eshkp->credit ? " or credit" : ""); @@ -1372,12 +1327,7 @@ proceed: eshkp->loan = 0L; Your("debt is covered by your credit."); } else if (!eshkp->credit) { -#ifndef GOLDOBJ - u.ugold -= dtmp; - shkp->mgold += dtmp; -#else money2mon(shkp, dtmp); -#endif eshkp->debit = 0L; eshkp->loan = 0L; You("pay that debt."); @@ -1385,12 +1335,7 @@ proceed: } else { dtmp -= eshkp->credit; eshkp->credit = 0L; -#ifndef GOLDOBJ - u.ugold -= dtmp; - shkp->mgold += dtmp; -#else money2mon(shkp, dtmp); -#endif eshkp->debit = 0L; eshkp->loan = 0L; pline("That debt is partially offset by your credit."); @@ -1403,22 +1348,14 @@ proceed: /* now check items on bill */ if (eshkp->billct) { register boolean itemize; -#ifndef GOLDOBJ - if (!u.ugold && !eshkp->credit) { -#else umoney = money_cnt(invent); if (!umoney && !eshkp->credit) { -#endif You("%shave no money or credit%s.", stashed_gold ? "seem to " : "", paid ? " left" : ""); return(0); } -#ifndef GOLDOBJ - if ((u.ugold + eshkp->credit) < cheapest_item(shkp)) { -#else if ((umoney + eshkp->credit) < cheapest_item(shkp)) { -#endif You("don't have enough money to buy%s the item%s you picked.", eshkp->billct > 1 ? " any of" : "", plur(eshkp->billct)); if(stashed_gold) @@ -1502,11 +1439,7 @@ boolean itemize; { register struct obj *obj = *obj_p; long ltmp, quan, save_quan; -#ifdef GOLDOBJ long umoney = money_cnt(invent); -#else - long umoney = u.ugold; -#endif int buy; boolean stashed_gold = (hidden_gold() > 0L), consumed = (which == 0); @@ -1691,9 +1624,7 @@ int numsk; int croaked; { long loss = 0L; -#ifdef GOLDOBJ long umoney; -#endif struct eshk *eshkp = ESHK(shkp); boolean take = FALSE, taken = FALSE; unsigned save_minvis = shkp->minvis; @@ -1740,12 +1671,8 @@ int croaked; } if (eshkp->following || ANGRY(shkp) || take) { -#ifndef GOLDOBJ - if (!invent && !u.ugold) goto skip; -#else if (!invent) goto skip; umoney = money_cnt(invent); -#endif takes[0] = '\0'; if (!shkp->mcanmove || shkp->msleeping) Strcat(takes, "wakes up and "); @@ -1753,18 +1680,10 @@ int croaked; Strcat(takes, "comes and "); Strcat(takes, "takes"); -#ifndef GOLDOBJ - if (loss > u.ugold || !loss || roomno == eshkp->shoproom) { - eshkp->robbed -= u.ugold; - if (eshkp->robbed < 0L) eshkp->robbed = 0L; - shkp->mgold += u.ugold; - u.ugold = 0L; -#else if (loss > umoney || !loss || roomno == eshkp->shoproom) { eshkp->robbed -= umoney; if (eshkp->robbed < 0L) eshkp->robbed = 0L; if (umoney > 0) money2mon(shkp, umoney); -#endif context.botl = 1; pline("%s %s all your possessions.", shkname(shkp), takes); @@ -1772,12 +1691,7 @@ int croaked; /* where to put player's invent (after disclosure) */ set_repo_loc(shkp); } else { -#ifndef GOLDOBJ - shkp->mgold += loss; - u.ugold -= loss; -#else money2mon(shkp, loss); -#endif context.botl = 1; pline("%s %s the %ld %s %sowed %s.", Monnam(shkp), takes, @@ -1846,14 +1760,9 @@ finish_paybill() unleash_all(); /* if hero has any gold left, take it into shopkeeper's possession */ if (shkp) { -#ifdef GOLDOBJ long umoney = money_cnt(invent); if (umoney) money2mon(shkp, umoney); -#else - shkp->mgold += u.ugold; - u.ugold = 0L; -#endif } /* transfer rest of the character's inventory to the shop floor */ drop_upon_death((struct monst *)0, (struct obj *)0, ox, oy); @@ -1970,11 +1879,9 @@ register struct monst *shkp; /* if angry, impose a surcharge */ } if (uarmh && uarmh->otyp == DUNCE_CAP) multiplier *= 4L, divisor *= 3L; -#ifdef TOURIST else if ((Role_if(PM_TOURIST) && u.ulevel < (MAXULEV/2)) || (uarmu && !uarm && !uarmc)) /* touristy shirt visible */ multiplier *= 4L, divisor *= 3L; -#endif if (ACURR(A_CHA) > 18) divisor *= 2L; else if (ACURR(A_CHA) == 18) multiplier *= 2L, divisor *= 3L; @@ -2135,11 +2042,9 @@ register struct monst *shkp; if (uarmh && uarmh->otyp == DUNCE_CAP) divisor *= 3L; -#ifdef TOURIST else if ((Role_if(PM_TOURIST) && u.ulevel < (MAXULEV/2)) || (uarmu && !uarm && !uarmc)) /* touristy shirt visible */ divisor *= 3L; -#endif else divisor *= 2L; @@ -2860,11 +2765,7 @@ xchar x, y; return; } -#ifndef GOLDOBJ - shkmoney = shkp->mgold; -#else shkmoney = money_cnt(shkp->minvent); -#endif if (!shkmoney) { char c, qbuf[BUFSZ]; long tmpcr = ((offer * 9L) / 10L) + (offer <= 1L); @@ -3511,11 +3412,7 @@ register struct monst *shkp; avoid = FALSE; } else { #define GDIST(x,y) (dist2(x,y,gx,gy)) - if (Invis -#ifdef STEED - || u.usteed -#endif - ) { + if (Invis || u.usteed) { avoid = FALSE; } else { uondoor = (u.ux == eshkp->shd.x && u.uy == eshkp->shd.y); @@ -3660,7 +3557,6 @@ register int fall; } } -#ifdef KOPS STATIC_OVL void makekops(mm) coord *mm; @@ -3685,7 +3581,6 @@ coord *mm; (void) makemon(&mons[mndx], mm->x, mm->y, NO_MM_FLAGS); } } -#endif /* KOPS */ void pay_for_damage(dmgstr, cant_mollify) @@ -3808,11 +3703,7 @@ boolean cant_mollify; } if((um_dist(x, y, 1) && !uinshp) || cant_mollify || -#ifndef GOLDOBJ - (u.ugold + ESHK(shkp)->credit) < cost_of_damage -#else (money_cnt(invent) + ESHK(shkp)->credit) < cost_of_damage -#endif || !rn2(50)) { getcad: if (muteshk(shkp)) { @@ -3836,12 +3727,7 @@ boolean cant_mollify; currency(cost_of_damage), !animal ? "\"" : ""); if(yn(qbuf) != 'n') { cost_of_damage = check_credit(cost_of_damage, shkp); -#ifndef GOLDOBJ - u.ugold -= cost_of_damage; - shkp->mgold += cost_of_damage; -#else money2mon(shkp, cost_of_damage); -#endif context.botl = 1; pline("Mollified, %s accepts your restitution.", shkname(shkp)); @@ -3996,9 +3882,7 @@ shk_chat(shkp) struct monst *shkp; { struct eshk *eshk; -#ifdef GOLDOBJ long shkmoney; -#endif if (!shkp->isshk) { /* The monster type is shopkeeper, but this monster is not actually a shk, which could happen if someone @@ -4039,17 +3923,9 @@ struct monst *shkp; shkname(shkp), eshk->credit, currency(eshk->credit)); else if (eshk->robbed) pline("%s complains about a recent robbery.", shkname(shkp)); -#ifndef GOLDOBJ - else if (shkp->mgold < 50) -#else else if ((shkmoney = money_cnt(shkp->minvent)) < 50) -#endif pline("%s complains that business is bad.", shkname(shkp)); -#ifndef GOLDOBJ - else if (shkp->mgold > 4000) -#else else if (shkmoney > 4000) -#endif pline("%s says that business is good.", shkname(shkp)); else if (is_izchak(shkp, FALSE)) pline(Izchak_speaks[rn2(SIZE(Izchak_speaks))],shkname(shkp)); @@ -4057,7 +3933,6 @@ struct monst *shkp; pline("%s talks about the problem of shoplifters.",shkname(shkp)); } -#ifdef KOPS STATIC_OVL void kops_gone(silent) register boolean silent; @@ -4076,7 +3951,6 @@ register boolean silent; pline_The("Kop%s (disappointed) vanish%s into thin air.", plur(cnt), cnt == 1 ? "es" : ""); } -#endif /* KOPS */ STATIC_OVL long cost_per_charge(shkp, otmp, altusage) @@ -4119,11 +3993,9 @@ boolean altusage; /* some items have an "alternate" use with different cost */ if (otmp->spe > 1) tmp /= 4L; } else if (otmp->oclass == SPBOOK_CLASS) { tmp -= tmp / 5L; - } else if (otmp->otyp == CAN_OF_GREASE || - otmp->otyp == TINNING_KIT -#ifdef TOURIST + } else if (otmp->otyp == CAN_OF_GREASE + || otmp->otyp == TINNING_KIT || otmp->otyp == EXPENSIVE_CAMERA -#endif ) { tmp /= 10L; } else if (otmp->otyp == POT_OIL) { @@ -4284,9 +4156,7 @@ register xchar x, y; && shkp->mcanmove && !shkp->msleeping && (x == sx-1 || x == sx+1 || y == sy-1 || y == sy+1) && (Invis || carrying(PICK_AXE) || carrying(DWARVISH_MATTOCK) -#ifdef STEED || u.usteed -#endif )) { pline("%s%s blocks your way!", shkname(shkp), Invis ? " senses your motion and" : ""); diff --git a/src/shknam.c b/src/shknam.c index 83eb902d3..645fc6b58 100644 --- a/src/shknam.c +++ b/src/shknam.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 shknam.c $Date$ $Revision$ */ +/* NetHack 3.5 shknam.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 shknam.c $Date: 2011/04/15 01:55:42 $ $Revision: 1.24 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -509,7 +510,6 @@ struct mkroom *sroom; else if(sy == sroom->hy+1) sy--; else { shk_failed: #ifdef DEBUG -# ifdef WIZARD /* Said to happen sometimes, but I have never seen it. */ /* Supposedly fixed by fdoor change in mklev.c */ if(wizard) { @@ -526,7 +526,6 @@ struct mkroom *sroom; } display_nhwindow(WIN_MESSAGE, FALSE); } -# endif #endif return(-1); } @@ -553,11 +552,7 @@ struct mkroom *sroom; eshkp->billct = eshkp->visitct = 0; eshkp->bill_p = (struct bill_x *)0; eshkp->customer[0] = '\0'; -#ifndef GOLDOBJ - shk->mgold = 1000L + 30L*(long)rnd(100); /* initial capital */ -#else mkmonmoney(shk, 1000L + 30L*(long)rnd(100)); /* initial capital */ -#endif if (shp->shknms == shkrings) (void) mongets(shk, TOUCHSTONE); nameshk(shk, shp->shknms); diff --git a/src/sit.c b/src/sit.c index 5f9ac52aa..aa3a16605 100644 --- a/src/sit.c +++ b/src/sit.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 sit.c $Date$ $Revision$ */ +/* NetHack 3.5 sit.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sit.c $Date: 2012/02/06 04:17:25 $ $Revision: 1.31 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -8,15 +9,6 @@ void take_gold() { -#ifndef GOLDOBJ - if (u.ugold <= 0) { - You_feel("a strange sensation."); - } else { - You("notice you have no gold!"); - u.ugold = 0; - context.botl = 1; - } -#else struct obj *otmp, *nobj; int lost_money = 0; for (otmp = invent; otmp; otmp = nobj) { @@ -32,7 +24,6 @@ take_gold() You("notice you have no money!"); context.botl = 1; } -#endif } int @@ -42,12 +33,10 @@ dosit() register struct trap *trap = t_at(u.ux,u.uy); register int typ = levl[u.ux][u.uy].typ; -#ifdef STEED if (u.usteed) { You("are already sitting on %s.", mon_nam(u.usteed)); return (0); } -#endif if (u.uundetected && is_hider(youmonst.data) && u.umonnum != PM_TRAPPER) u.uundetected = 0; /* no longer on the ceiling */ @@ -127,11 +116,9 @@ dosit() (void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst); if (!rn2(10) && uarmf && uarmf->otyp != WATER_WALKING_BOOTS) (void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst); -#ifdef SINKS } else if(IS_SINK(typ)) { You(sit_message, defsyms[S_sink].explanation); Your("%s gets wet.", humanoid(youmonst.data) ? "rump" : "underside"); -#endif } else if(IS_ALTAR(typ)) { You(sit_message, defsyms[S_altar].explanation); altar_wrath(u.ux, u.uy); @@ -327,10 +314,8 @@ rndcurse() /* curse a few inventory items at random! */ } for (otmp = invent; otmp; otmp = otmp->nobj) { -#ifdef GOLDOBJ /* gold isn't subject to being cursed or blessed */ if (otmp->oclass == COIN_CLASS) continue; -#endif nobj++; } if (nobj) { @@ -338,10 +323,8 @@ rndcurse() /* curse a few inventory items at random! */ cnt > 0; cnt--) { onum = rnd(nobj); for (otmp = invent; otmp; otmp = otmp->nobj) { -#ifdef GOLDOBJ /* as above */ if (otmp->oclass == COIN_CLASS) continue; -#endif if (--onum == 0) break; /* found the target */ } /* the !otmp case should never happen; picking an already @@ -362,7 +345,6 @@ rndcurse() /* curse a few inventory items at random! */ update_inventory(); } -#ifdef STEED /* treat steed's saddle as extended part of hero's inventory */ if (u.usteed && !rn2(4) && (otmp = which_armor(u.usteed, W_SADDLE)) != 0 && @@ -378,7 +360,6 @@ rndcurse() /* curse a few inventory items at random! */ otmp->bknown = TRUE; } } -#endif /*STEED*/ } void diff --git a/src/sounds.c b/src/sounds.c index eaac43337..d57904778 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 sounds.c $Date$ $Revision$ */ +/* NetHack 3.5 sounds.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sounds.c $Date: 2012/03/10 02:49:08 $ $Revision: 1.39 $ */ /* Copyright (c) 1989 Janet Walz, Mike Threepoint */ /* NetHack may be freely redistributed. See license for details. */ @@ -50,7 +51,6 @@ dosounds() }; You_hear1(fountain_msg[rn2(3)+hallu]); } -#ifdef SINK if (level.flags.nsinks && !rn2(300)) { static const char * const sink_msg[3] = { "a slow drip.", @@ -59,7 +59,6 @@ dosounds() }; You_hear1(sink_msg[rn2(2)+hallu]); } -#endif if (level.flags.has_court && !rn2(200)) { static const char * const throne_msg[4] = { "the tones of courtly conversation.", @@ -797,11 +796,9 @@ register struct monst *mtmp; case PM_ARCHEOLOGIST: pline_msg = "describes a recent article in \"Spelunker Today\" magazine."; break; -#ifdef TOURIST case PM_TOURIST: verbl_msg = "Aloha."; break; -#endif default: pline_msg = "discusses dungeon exploration."; break; @@ -810,7 +807,6 @@ register struct monst *mtmp; case MS_SEDUCE: { int swval; -#ifdef SEDUCE if (SYSOPT_SEDUCE) { if (ptr->mlet != S_NYMPH && could_seduce(mtmp, &youmonst, (struct attack *)0) == 1) { @@ -819,7 +815,6 @@ register struct monst *mtmp; } swval = ((poly_gender() != (int) mtmp->female) ? rn2(3) : 0); } else -#endif swval = ((poly_gender() == 0) ? rn2(3) : 0); switch(swval){ case 2: @@ -833,7 +828,6 @@ register struct monst *mtmp; } } break; -#ifdef KOPS case MS_ARREST: if (mtmp->mpeaceful) verbalize("Just the facts, %s.", @@ -847,7 +841,6 @@ register struct monst *mtmp; verbl_msg = arrest_msg[rn2(3)]; } break; -#endif case MS_BRIBE: if (mtmp->mpeaceful && !mtmp->mtame) { (void) demon_talk(mtmp); @@ -874,18 +867,12 @@ register struct monst *mtmp; verbl_msg = Role_if(PM_HEALER) ? "Doc, I can't help you unless you cooperate." : "Please undress so I can examine you."; -#ifdef TOURIST else if (uarmu) verbl_msg = "Take off your shirt, please."; -#endif else verbl_msg = "Relax, this won't hurt a bit."; break; case MS_GUARD: -#ifndef GOLDOBJ - if (u.ugold) -#else if (money_cnt(invent)) -#endif verbl_msg = "Please drop that gold and follow me."; else verbl_msg = "Please follow me."; @@ -973,15 +960,13 @@ dochat() return(0); } -#ifdef STEED if (u.usteed && u.dz > 0) { - if (!u.usteed->mcanmove || u.usteed->msleeping) { - pline("%s seems not to notice you.", Monnam(u.usteed)); - return(1); - } else - return (domonnoise(u.usteed)); + if (!u.usteed->mcanmove || u.usteed->msleeping) { + pline("%s seems not to notice you.", Monnam(u.usteed)); + return(1); + } else + return (domonnoise(u.usteed)); } -#endif if (u.dz) { pline("They won't hear you %s there.", u.dz < 0 ? "up" : "down"); diff --git a/src/sp_lev.c b/src/sp_lev.c index 0d89bfc31..6be2c9713 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 sp_lev.c $Date$ $Revision$ */ +/* NetHack 3.5 sp_lev.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sp_lev.c $Date: 2011/01/05 01:28:36 $ $Revision: 1.23 $ */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -11,15 +12,6 @@ #include "hack.h" #include "dlb.h" -/* #define DEBUG */ /* uncomment to enable code debugging */ - -#ifdef DEBUG -# ifdef WIZARD -#define debugpline if (wizard) pline -# else -#define debugpline pline -# endif -#endif #include "sp_lev.h" @@ -332,10 +324,8 @@ chk: lev = &levl[x][y]; for (; y <= ymax; y++) { if (lev++->typ) { -#ifdef DEBUG if(!vault) debugpline("strange area [%d,%d] in check_room.",x,y); -#endif if (!rn2(3)) return FALSE; if (x < *lowx) *lowx = x + xlim + 1; @@ -408,9 +398,7 @@ xchar rtype, rlit; r1 = rnd_rect(); /* Get a random rectangle */ if (!r1) { /* No more free rectangles ! */ -#ifdef DEBUG debugpline("No more rects..."); -#endif return FALSE; } hx = r1->hx; @@ -1323,10 +1311,8 @@ schar ftyp, btyp; if (xx <= 0 || yy <= 0 || tx <= 0 || ty <= 0 || xx > COLNO-1 || tx > COLNO-1 || yy > ROWNO-1 || ty > ROWNO-1) { -#ifdef DEBUG debugpline("dig_corridor: bad coords : (%d,%d) (%d,%d).", xx,yy,tx,ty); -#endif return FALSE; } if (tx > xx) dx = 1; diff --git a/src/spell.c b/src/spell.c index 23f136077..e1f6fc55b 100644 --- a/src/spell.c +++ b/src/spell.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 spell.c $Date$ $Revision$ */ +/* NetHack 3.5 spell.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 spell.c $Date: 2011/12/29 22:01:25 $ $Revision: 1.44 $ */ /* Copyright (c) M. Stephenson 1988 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/steal.c b/src/steal.c index 21712a3f2..c73878310 100644 --- a/src/steal.c +++ b/src/steal.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 steal.c $Date$ $Revision$ */ +/* NetHack 3.5 steal.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 steal.c $Date: 2012/02/05 04:26:48 $ $Revision: 1.41 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -12,10 +13,7 @@ STATIC_OVL const char * equipname(otmp) register struct obj *otmp; { - return ( -#ifdef TOURIST - (otmp == uarmu) ? "shirt" : -#endif + return ((otmp == uarmu) ? "shirt" : (otmp == uarmf) ? "boots" : (otmp == uarms) ? "shield" : (otmp == uarmg) ? "gloves" : @@ -24,67 +22,6 @@ register struct obj *otmp; "armor"); } -#ifndef GOLDOBJ -long /* actually returns something that fits in an int */ -somegold() -{ -#ifdef LINT /* long conv. ok */ - return(0L); -#else - return (long)( (u.ugold < 100) ? u.ugold : - (u.ugold > 10000) ? rnd(10000) : rnd((int) u.ugold) ); -#endif -} - -void -stealgold(mtmp) -register struct monst *mtmp; -{ - register struct obj *gold = g_at(u.ux, u.uy); - register long tmp; - struct monst *who; - const char *whose, *what; - - if (gold && (!u.ugold || gold->quan > u.ugold || !rn2(5))) { - mtmp->mgold += gold->quan; - delobj(gold); - newsym(u.ux, u.uy); -#ifdef STEED - if (u.usteed) - who = u.usteed, - whose = s_suffix(y_monnam(who)), - what = makeplural(mbodypart(who, FOOT)); - else -#endif - who = &youmonst, - whose = "your", - what = makeplural(body_part(FOOT)); - /* [ avoid "between your rear regions" :-] */ - if (slithy(who->data)) what = "coils"; - /* reduce "rear hooves/claws" to "hooves/claws" */ - if (!strncmp(what, "rear ", 5)) what += 5; - pline("%s quickly snatches some gold from %s %s %s!", - Monnam(mtmp), - (Levitation || Flying) ? "beneath" : "between", - whose, what); - if(!u.ugold || !rn2(5)) { - if (!tele_restrict(mtmp)) (void) rloc(mtmp, FALSE); - /* do not set mtmp->mavenge here; gold on the floor is fair game */ - monflee(mtmp, 0, FALSE, FALSE); - } - } else if(u.ugold) { - u.ugold -= (tmp = somegold()); - Your("purse feels lighter."); - mtmp->mgold += tmp; - if (!tele_restrict(mtmp)) (void) rloc(mtmp, FALSE); - mtmp->mavenge = 1; - monflee(mtmp, 0, FALSE, FALSE); - context.botl = 1; - } -} - -#else /* !GOLDOBJ */ - long /* actually returns something that fits in an int */ somegold(umoney) long umoney; @@ -136,16 +73,15 @@ register struct monst *mtmp; obj_extract_self(fgold); add_to_minv(mtmp, fgold); newsym(u.ux, u.uy); -#ifdef STEED - if (u.usteed) - who = u.usteed, - whose = s_suffix(y_monnam(who)), - what = makeplural(mbodypart(who, FOOT)); - else -#endif - who = &youmonst, - whose = "your", - what = makeplural(body_part(FOOT)); + if (u.usteed) { + who = u.usteed; + whose = s_suffix(y_monnam(who)); + what = makeplural(mbodypart(who, FOOT)); + } else { + who = &youmonst; + whose = "your"; + what = makeplural(body_part(FOOT)); + } /* [ avoid "between your rear regions" :-] */ if (slithy(who->data)) what = "coils"; /* reduce "rear hooves/claws" to "hooves/claws" */ @@ -171,7 +107,6 @@ register struct monst *mtmp; context.botl = 1; } } -#endif /* GOLDOBJ */ /* steal armor after you finish taking it off */ unsigned int stealoid; /* object to be stolen */ @@ -232,9 +167,7 @@ boolean unchain_ball; /* whether to unpunish or just unwield */ else if (obj == uarmg) (void) Gloves_off(); else if (obj == uarmh) (void) Helmet_off(); else if (obj == uarms) (void) Shield_off(); -#ifdef TOURIST else if (obj == uarmu) (void) Shirt_off(); -#endif /* catchall -- should never happen */ else setworn((struct obj *)0, obj->owornmask & W_ARMOR); } else if (obj->owornmask & W_AMUL) { @@ -263,7 +196,7 @@ boolean unchain_ball; /* whether to unpunish or just unwield */ /* Returns 1 when something was stolen (or at least, when N should flee now) * Returns -1 if the monster died in the attempt * Avoid stealing the object stealoid - * GOLDOBJ: nymphs and monkeys won't steal coins + * Nymphs and monkeys won't steal coins */ int steal(mtmp, objnambuf) @@ -309,30 +242,14 @@ nothing_to_steal: retry: tmp = 0; for(otmp = invent; otmp; otmp = otmp->nobj) - if ((!uarm || otmp != uarmc) && otmp != uskin -#ifdef GOLDOBJ - && otmp->oclass != COIN_CLASS -#endif -#ifdef INVISIBLE_OBJECTS - && (!otmp->oinvis || perceives(mtmp->data)) -#endif - ) - tmp += ((otmp->owornmask & - (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1); + if ((!uarm || otmp != uarmc) && otmp != uskin && otmp->oclass != COIN_CLASS) + tmp += ((otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1); if (!tmp) goto nothing_to_steal; tmp = rn2(tmp); for(otmp = invent; otmp; otmp = otmp->nobj) - if ((!uarm || otmp != uarmc) && otmp != uskin -#ifdef GOLDOBJ - && otmp->oclass != COIN_CLASS -#endif -#ifdef INVISIBLE_OBJECTS - && (!otmp->oinvis || perceives(mtmp->data)) -#endif - ) - if((tmp -= ((otmp->owornmask & - (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1)) < 0) - break; + if ((!uarm || otmp != uarmc) && otmp != uskin && otmp->oclass != COIN_CLASS) + if((tmp -= ((otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)) ? 5 : 1)) < 0) + break; if(!otmp) { impossible("Steal fails!"); return(0); @@ -343,11 +260,9 @@ nothing_to_steal: if (otmp == uarmg && uwep) otmp = uwep; /* can't steal armor while wearing cloak - so steal the cloak. */ else if(otmp == uarm && uarmc) otmp = uarmc; -#ifdef TOURIST /* can't steal shirt while wearing cloak or suit */ else if(otmp == uarmu && uarmc) otmp = uarmc; else if(otmp == uarmu && uarm) otmp = uarm; -#endif gotobj: if(otmp->o_id == stealoid) return(0); @@ -497,19 +412,12 @@ register struct monst *mtmp; register struct obj *otmp; { int freed_otmp; + boolean snuff_otmp = FALSE; /* if monster is acquiring a thrown or kicked object, the throwing or kicking code shouldn't continue to track and place it */ if (otmp == thrownobj) thrownobj = 0; else if (otmp == kickedobj) kickedobj = 0; -#ifndef GOLDOBJ - if (otmp->oclass == COIN_CLASS) { - mtmp->mgold += otmp->quan; - obfree(otmp, (struct obj *)0); - freed_otmp = 1; - } else { -#endif - boolean snuff_otmp = FALSE; /* don't want hidden light source inside the monster; assumes that engulfers won't have external inventories; whirly monsters cause the light to be extinguished rather than letting it shine thru */ @@ -531,9 +439,6 @@ register struct obj *otmp; freed_otmp = add_to_minv(mtmp, otmp); /* and we had to defer this until object is in mtmp's inventory */ if (snuff_otmp) snuff_light_source(mtmp->mx, mtmp->my); -#ifndef GOLDOBJ - } -#endif return freed_otmp; } @@ -638,7 +543,6 @@ boolean verbosely; if (mon->mhp > 0) { mon->misc_worn_check &= ~obj->owornmask; update_mon = TRUE; -#ifdef STEED /* don't charge for an owned saddle on dead steed (provided that the hero is within the same shop at the time) */ } else if (mon->mtame && (obj->owornmask & W_SADDLE) && @@ -646,7 +550,6 @@ boolean verbosely; /* being at a costly_spot guarantees lev->roomno is not 0 */ index(in_rooms(u.ux, u.uy, SHOPBASE), levl[omx][omy].roomno)) { obj->no_charge = 1; -#endif } /* this should be done even if the monster has died */ if (obj->owornmask & W_WEP) setmnotwielded(mon, obj); @@ -696,35 +599,14 @@ boolean is_pet; /* If true, pet should keep wielded/worn items */ /* vault guard's gold goes away rather than be dropped... */ if (mtmp->isgd && -#ifdef GOLDOBJ (otmp = findgold(mtmp->minvent)) != 0 -#else - mtmp->mgold != 0L -#endif ) { if (canspotmon(mtmp)) pline("%s gold %s.", s_suffix(Monnam(mtmp)), canseemon(mtmp) ? "vanishes" : "seems to vanish"); -#ifdef GOLDOBJ obfree(otmp, (struct obj *)0); -#else - mtmp->mgold = 0L; -#endif } /* isgd && has gold */ -#ifndef GOLDOBJ - /* handle gold first since droppables() would get stuck on it */ - if (mtmp->mgold) { - long g = mtmp->mgold; - - (void) mkgold(g, omx, omy); - if (is_pet && cansee(omx, omy) && flags.verbose) - pline("%s drops %ld gold piece%s.", Monnam(mtmp), - g, plur(g)); - mtmp->mgold = 0L; - } -#endif - while ((otmp = (is_pet ? droppables(mtmp) : mtmp->minvent)) != 0) { obj_extract_self(otmp); mdrop_obj(mtmp, otmp, is_pet && flags.verbose); diff --git a/src/steed.c b/src/steed.c index afa110b1f..a18b418b9 100644 --- a/src/steed.c +++ b/src/steed.c @@ -1,12 +1,10 @@ -/* NetHack 3.5 steed.c $Date$ $Revision$ */ +/* NetHack 3.5 steed.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 steed.c $Date: 2012/01/04 18:52:36 $ $Revision: 1.36 $ */ /* Copyright (c) Kevin Hugo, 1998-1999. */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" - -#ifdef STEED - /* Monsters that might be ridden */ static NEARDATA const char steeds[] = { S_QUADRUPED, S_UNICORN, S_ANGEL, S_CENTAUR, S_DRAGON, S_JABBERWOCK, '\0' @@ -179,10 +177,8 @@ doride() if (u.usteed) { dismount_steed(DISMOUNT_BYCHOICE); } else if (getdir((char *)0) && isok(u.ux+u.dx, u.uy+u.dy)) { -#ifdef WIZARD if (wizard && yn("Force the mount to succeed?") == 'y') forcemount = TRUE; -#endif return (mount_steed(m_at(u.ux+u.dx, u.uy+u.dy), forcemount)); } else { return 0; @@ -227,11 +223,9 @@ mount_steed(mtmp, force) */ if (Wounded_legs) { Your("%s are in no shape for riding.", makeplural(body_part(LEG))); -#ifdef WIZARD if (force && wizard && yn("Heal your legs?") == 'y') HWounded_legs = EWounded_legs = 0; else -#endif return (FALSE); } @@ -697,6 +691,4 @@ int x, y; level.monsters[x][y] = mon; } -#endif /* STEED */ - /*steed.c*/ diff --git a/src/sys.c b/src/sys.c index 19aecaade..5f17a0a91 100644 --- a/src/sys.c +++ b/src/sys.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 sys.c $Date$ $Revision$ */ +/* NetHack 3.5 sys.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sys.c $Date: 2012/03/10 02:22:07 $ $Revision: 1.12 $ */ /* Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -7,10 +8,6 @@ /* for KR1ED config, WIZARD is 0 or 1 and WIZARD_NAME is a string; for usual config, WIZARD is the string; forcing WIZARD_NAME to match it eliminates conditional testing for which one to use in string ops */ -#ifndef KR1ED -# undef WIZARD_NAME -# define WIZARD_NAME WIZARD -#endif struct sysopt sysopt; @@ -23,6 +20,7 @@ sys_early_init(){ #else sysopt.wizards = WIZARD_NAME; #endif + sysopt.debugfiles = NULL; sysopt.shellers = NULL; sysopt.maxplayers = 0; /* XXX eventually replace MAX_NR_OF_PLAYERS */ @@ -56,10 +54,8 @@ sys_early_init(){ # endif #endif -#ifdef SEDUCE sysopt.seduce = 1; /* if it's compiled in, default to on */ sysopt_seduce_set(sysopt.seduce); -#endif } diff --git a/src/teleport.c b/src/teleport.c index 000784094..cd179c1f1 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 teleport.c $Date$ $Revision$ */ +/* NetHack 3.5 teleport.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 teleport.c $Date: 2012/01/04 18:52:36 $ $Revision: 1.45 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -38,10 +39,7 @@ unsigned gpflags; * oh well. */ if (mtmp != &youmonst && x == u.ux && y == u.uy -#ifdef STEED - && (!u.usteed || mtmp != u.usteed) -#endif - ) + && (!u.usteed || mtmp != u.usteed)) return FALSE; if (mtmp) { @@ -123,9 +121,7 @@ unsigned entflags; struct monst fakemon; /* dummy monster */ if (!mdat) { -#ifdef DEBUG - pline("enexto() called with mdat==0"); -#endif + debugpline("enexto() called with mdat==0"); /* default to player's original monster type */ mdat = &mons[u.umonster]; } @@ -378,10 +374,8 @@ boolean force_it; { register struct obj *otmp; -#ifdef STEED if (mtmp == u.usteed) return (FALSE); -#endif if (mtmp->mleashed) { otmp = get_mleash(mtmp); @@ -422,14 +416,10 @@ struct obj *scroll; /* Disable teleportation in stronghold && Vlad's Tower */ if (level.flags.noteleport) { -#ifdef WIZARD if (!wizard) { -#endif pline("A mysterious force prevents you from teleporting!"); return TRUE; -#ifdef WIZARD } -#endif } /* don't show trap if "Sorry..." */ @@ -437,15 +427,11 @@ struct obj *scroll; if ((u.uhave.amulet || On_W_tower_level(&u.uz)) && !rn2(3)) { You_feel("disoriented for a moment."); -#ifdef WIZARD if (wizard && yn("Override?") != 'y') -#endif return FALSE; } if ((Teleport_control && !Stunned) -#ifdef WIZARD || wizard -#endif ) { if (unconscious()) { pline("Being unconscious, you cannot control your teleport."); @@ -453,10 +439,8 @@ struct obj *scroll; char whobuf[BUFSZ]; Strcpy(whobuf, "you"); -#ifdef STEED if (u.usteed) Sprintf(eos(whobuf), " and %s", mon_nam(u.usteed)); -#endif pline("To what position do %s want to be teleported?", whobuf); cc.x = u.ux; @@ -525,40 +509,29 @@ dotele() castit = TRUE; break; } -#ifdef WIZARD if (!wizard) { -#endif if (!castit) { if (!Teleportation) You("don't know that spell."); else You("are not able to teleport at will."); return(0); } -#ifdef WIZARD } -#endif } if (u.uhunger <= 100 || ACURR(A_STR) < 6) { -#ifdef WIZARD if (!wizard) { -#endif You("lack the strength %s.", castit ? "for a teleport spell" : "to teleport"); return 1; -#ifdef WIZARD } -#endif } energy = objects[SPE_TELEPORT_AWAY].oc_level * 7 / 2 - 2; if (u.uen <= energy) { -#ifdef WIZARD if (wizard) energy = u.uen; - else -#endif - { + else { You("lack the energy %s.", castit ? "for a teleport spell" : "to teleport"); return 1; @@ -573,10 +546,7 @@ dotele() exercise(A_WIS, TRUE); if (spelleffects(sp_no, TRUE)) return(1); - else -#ifdef WIZARD - if (!wizard) -#endif + else if (!wizard) return(0); } else { u.uen -= energy; @@ -607,29 +577,19 @@ level_tele() boolean force_dest = FALSE; if ((u.uhave.amulet || In_endgame(&u.uz) || In_sokoban(&u.uz)) -#ifdef WIZARD - && !wizard -#endif - ) { + && !wizard) { You_feel("very disoriented for a moment."); return; } - if ((Teleport_control && !Stunned) -#ifdef WIZARD - || wizard -#endif - ) { + if ((Teleport_control && !Stunned) || wizard) { char qbuf[BUFSZ]; int trycnt = 0; Strcpy(qbuf, "To what level do you want to teleport?"); do { if (++trycnt == 2) { -#ifdef WIZARD if (wizard) Strcat(qbuf, " [type a number or ? for a menu]"); - else -#endif - Strcat(qbuf, " [type a number]"); + else Strcat(qbuf, " [type a number]"); } getlin(qbuf, buf); if (!strcmp(buf,"\033")) { /* cancelled */ @@ -644,7 +604,6 @@ level_tele() pline("Oops..."); goto random_levtport; } -#ifdef WIZARD if (wizard && !strcmp(buf,"?")) { schar destlev = 0; xchar destdnum = 0; @@ -667,9 +626,7 @@ level_tele() } } force_dest = TRUE; - } else -#endif /*WIZARD*/ - if ((newlev = lev_by_name(buf)) == 0) newlev = atoi(buf); + } else if ((newlev = lev_by_name(buf)) == 0) newlev = atoi(buf); } while (!newlev && !digit(buf[0]) && (buf[0] != '-' || !digit(buf[1])) && trycnt < 10); @@ -727,7 +684,6 @@ level_tele() You1(shudder_for_moment); return; } -#ifdef WIZARD if (In_endgame(&u.uz)) { /* must already be wizard */ int llimit = dunlevs_in_dungeon(&u.uz); @@ -740,7 +696,6 @@ level_tele() schedule_goto(&newlevel, FALSE, FALSE, 0, (char *)0, (char *)0); return; } -#endif killer.name[0] = 0; /* still alive, so far... */ @@ -806,18 +761,13 @@ level_tele() } else if (u.uz.dnum == medusa_level.dnum && newlev >= dungeons[u.uz.dnum].depth_start + dunlevs_in_dungeon(&u.uz)) { -#ifdef WIZARD if (!(wizard && force_dest)) -#endif find_hell(&newlevel); } else { /* if invocation did not yet occur, teleporting into * the last level of Gehennom is forbidden. */ -#ifdef WIZARD - if (!wizard) -#endif - if (Inhell && !u.uevent.invoked && + if (!wizard && Inhell && !u.uevent.invoked && newlev >= (dungeons[u.uz.dnum].depth_start + dunlevs_in_dungeon(&u.uz) - 1)) { newlev = dungeons[u.uz.dnum].depth_start + @@ -831,9 +781,7 @@ level_tele() * we must translate newlev to a number relative to the * current dungeon. */ -#ifdef WIZARD if (!(wizard && force_dest)) -#endif get_level(&newlevel, newlev); } schedule_goto(&newlevel, FALSE, FALSE, 0, (char *)0, (char *)0); @@ -1031,12 +979,10 @@ boolean suppress_impossible; { register int x, y, trycount; -#ifdef STEED if (mtmp == u.usteed) { tele(); return TRUE; } -#endif if (mtmp->iswiz && mtmp->mx) { /* Wizard, not just arriving */ if (!In_W_tower(u.ux, u.uy, &u.uz)) diff --git a/src/timeout.c b/src/timeout.c index d5d177673..481b16ae7 100644 --- a/src/timeout.c +++ b/src/timeout.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 timeout.c $Date$ $Revision$ */ +/* NetHack 3.5 timeout.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 timeout.c $Date: 2012/04/16 00:57:37 $ $Revision: 1.48 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -235,12 +236,10 @@ nh_timeout() } } -#ifdef STEED if (u.ugallop) { if (--u.ugallop == 0L && u.usteed) pline("%s stops galloping.", Monnam(u.usteed)); } -#endif for(upp = u.uprops; upp < u.uprops+SIZE(u.uprops); upp++) if((upp->intrinsic & TIMEOUT) && !(--upp->intrinsic & TIMEOUT)) { @@ -670,9 +669,7 @@ slip_or_trip() const char *what; char buf[BUFSZ]; boolean on_foot = TRUE; -#ifdef STEED if (u.usteed) on_foot = FALSE; -#endif if (otmp && on_foot && !u.uinwater && is_pool(u.ux, u.uy)) otmp = 0; @@ -706,11 +703,9 @@ slip_or_trip() } } else if (rn2(3) && is_ice(u.ux, u.uy)) { pline("%s %s%s on the ice.", -#ifdef STEED u.usteed ? upstart(x_monnam(u.usteed, (has_mname(u.usteed)) ? ARTICLE_NONE : ARTICLE_THE, (char *)0, SUPPRESS_SADDLE, FALSE)) : -#endif "You", rn2(2) ? "slip" : "slide", on_foot ? "" : "s"); } else { if (on_foot) { @@ -731,7 +726,6 @@ slip_or_trip() break; } } -#ifdef STEED else { switch (rn2(4)) { case 1: @@ -749,7 +743,6 @@ slip_or_trip() } dismount_steed(DISMOUNT_FELL); } -#endif } } @@ -1343,10 +1336,8 @@ do_storms() * Check whether object has a timer of type timer_type. */ -#ifdef WIZARD STATIC_DCL const char *FDECL(kind_name, (SHORT_P)); STATIC_DCL void FDECL(print_queue, (winid, timer_element *)); -#endif STATIC_DCL void FDECL(insert_timer, (timer_element *)); STATIC_DCL timer_element *FDECL(remove_timer, (timer_element **, SHORT_P, ANY_P *)); @@ -1384,9 +1375,6 @@ static const ttable timeout_funcs[NUM_TIME_FUNCS] = { }; #undef TTAB - -#if defined(WIZARD) - STATIC_OVL const char * kind_name(kind) short kind; @@ -1467,9 +1455,6 @@ timer_sanity_check() } } -#endif /* WIZARD */ - - /* * Pick off timeout elements from the global queue and call their functions. * Do this until their time is less than or equal to the move count. diff --git a/src/topten.c b/src/topten.c index a2d205803..58079a6de 100644 --- a/src/topten.c +++ b/src/topten.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 topten.c $Date$ $Revision$ */ +/* NetHack 3.5 topten.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 topten.c $Date: 2012/01/24 04:26:15 $ $Revision: 1.23 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/track.c b/src/track.c index d7a7db4df..db1f38edb 100644 --- a/src/track.c +++ b/src/track.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 track.c $Date$ $Revision$ */ +/* NetHack 3.5 track.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 track.c $Date: 2009/05/06 10:48:00 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)track.c 3.5 87/08/08 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/trap.c b/src/trap.c index 232e4832e..636598789 100644 --- a/src/trap.c +++ b/src/trap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 trap.c $Date$ $Revision$ */ +/* NetHack 3.5 trap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 trap.c $Date: 2013/03/14 01:58:21 $ $Revision: 1.179 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -29,11 +30,9 @@ STATIC_DCL char *FDECL(trapnote, (struct trap *,BOOLEAN_P)); STATIC_DCL void FDECL(join_adjacent_pits, (struct trap *)); #endif STATIC_DCL void FDECL(clear_conjoined_pits, (struct trap *)); -#ifdef STEED STATIC_DCL int FDECL(steedintrap, (struct trap *, struct obj *)); STATIC_DCL boolean FDECL(keep_saddle_with_steedcorpse, (unsigned, struct obj *, struct obj *)); -#endif STATIC_DCL void NDECL(maybe_finish_sokoban); /* mintrap() should take a flags argument, but for time being we use this */ @@ -79,11 +78,9 @@ struct monst *victim; (void) burn_dmg(item, xname(item)); return TRUE; } -#ifdef TOURIST item = (victim == &youmonst) ? uarmu : which_armor(victim, W_ARMU); if (item) (void) burn_dmg(item, "shirt"); -#endif return TRUE; case 2: item = (victim == &youmonst) ? uarms : which_armor(victim, W_ARMS); @@ -650,7 +647,6 @@ boolean shatter; return mtmp; } -#ifdef STEED STATIC_OVL boolean keep_saddle_with_steedcorpse(steed_mid, objchn, saddle) unsigned steed_mid; @@ -678,7 +674,6 @@ struct obj *objchn, *saddle; } return FALSE; } -#endif /*STEED*/ void dotrap(trap, trflags) @@ -694,9 +689,7 @@ unsigned trflags; plunged = (trflags & TOOKPLUNGE) != 0, adj_pit = conjoined_pits(trap, t_at(u.ux0,u.uy0), TRUE); int oldumort; -#ifdef STEED int steed_article = ARTICLE_THE; -#endif nomul(0); @@ -735,7 +728,6 @@ unsigned trflags; } } -#ifdef STEED if (u.usteed) { u.usteed->mtrapseen |= (1 << (ttype - 1)); /* suppress article in various steed messages when using its @@ -743,7 +735,6 @@ unsigned trflags; if (has_mname(u.usteed) && !Hallucination) steed_article = ARTICLE_NONE; } -#endif switch(ttype) { case ARROW_TRAP: @@ -760,11 +751,8 @@ unsigned trflags; otmp->quan = 1L; otmp->owt = weight(otmp); otmp->opoisoned = 0; -#ifdef STEED if (u.usteed && !rn2(2) && steedintrap(trap, otmp)) /* nothing */; - else -#endif - if (thitu(8, dmgval(otmp, &youmonst), otmp, "arrow")) { + else if (thitu(8, dmgval(otmp, &youmonst), otmp, "arrow")) { obfree(otmp, (struct obj *)0); } else { place_object(otmp, u.ux, u.uy); @@ -788,11 +776,8 @@ unsigned trflags; otmp->owt = weight(otmp); if (!rn2(6)) otmp->opoisoned = 1; oldumort = u.umortality; -#ifdef STEED if (u.usteed && !rn2(2) && steedintrap(trap, otmp)) /* nothing */; - else -#endif - if (thitu(7, dmgval(otmp, &youmonst), otmp, "little dart")) { + else if (thitu(7, dmgval(otmp, &youmonst), otmp, "little dart")) { if (otmp->opoisoned) poisoned("dart", A_CON, "little dart", /* if damage triggered life-saving, @@ -875,27 +860,20 @@ unsigned trflags; A_Your[trap->madeby_u]); break; } - if( -#ifdef STEED - !u.usteed && -#endif - youmonst.data->msize <= MZ_SMALL) { + if( !u.usteed && youmonst.data->msize <= MZ_SMALL) { pline("%s bear trap closes harmlessly over you.", A_Your[trap->madeby_u]); break; } u.utrap = rn1(4, 4); u.utraptype = TT_BEARTRAP; -#ifdef STEED if (u.usteed) { pline("%s bear trap closes on %s %s!", A_Your[trap->madeby_u], s_suffix(mon_nam(u.usteed)), mbodypart(u.usteed, FOOT)); if (thitm(0, u.usteed, (struct obj *)0, dmg, FALSE)) u.utrap = 0; /* steed died, hero not trapped */ - } else -#endif - { + } else { pline("%s bear trap closes on your %s!", A_Your[trap->madeby_u], body_part(FOOT)); if(u.umonnum == PM_OWLBEAR || u.umonnum == PM_BUGBEAR) @@ -914,9 +892,7 @@ unsigned trflags; pline("A cloud of gas puts you to sleep!"); fall_asleep(-rnd(25), TRUE); } -#ifdef STEED (void) steedintrap(trap, (struct obj *)0); -#endif break; case RUST_TRAP: @@ -975,10 +951,8 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); 1, TRUE, &youmonst); else if (uarm) (void) rust_dmg(uarm, "armor", 1, TRUE, &youmonst); -#ifdef TOURIST else if (uarmu) (void) rust_dmg(uarmu, "shirt", 1, TRUE, &youmonst); -#endif } update_inventory(); break; @@ -1007,7 +981,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); } if (!Sokoban) { char verbbuf[BUFSZ]; -#ifdef STEED if (u.usteed) { if ((trflags & RECURSIVETRAP) != 0) Sprintf(verbbuf, "and %s fall", @@ -1017,9 +990,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); Sprintf(verbbuf, "lead %s", x_monnam(u.usteed, steed_article, "poor", SUPPRESS_SADDLE, FALSE)); - } else -#endif - if (adj_pit) { + } else if (adj_pit) { You("move into an adjacent pit."); } else { Strcpy(verbbuf, !plunged ? "fall" : @@ -1037,7 +1008,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); pline("How pitiful. Isn't that the pits?"); if (ttype == SPIKED_PIT) { const char *predicament = "on a set of sharp iron spikes"; -#ifdef STEED if (u.usteed) { pline("%s %s %s!", upstart(x_monnam(u.usteed, steed_article, @@ -1045,14 +1015,11 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); adj_pit ? "steps" : "lands", predicament); } else -#endif - You("%s %s!", adj_pit ? "step" : "land", predicament); + You("%s %s!", adj_pit ? "step" : "land", predicament); } u.utrap = rn1(6,2); u.utraptype = TT_PIT; -#ifdef STEED if (!steedintrap(trap, (struct obj *)0)) { -#endif if (ttype == SPIKED_PIT) { oldumort = u.umortality; losehp(Maybe_Half_Phys(rnd(adj_pit ? 6 : 10)), @@ -1085,9 +1052,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); vision_full_recalc = 1; /* vision limits change */ exercise(A_STR, FALSE); exercise(A_DEX, FALSE); -#ifdef STEED } -#endif break; case HOLE: case TRAPDOOR: @@ -1138,12 +1103,10 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); if (forcetrap) { Strcpy(verbbuf, "are caught by"); -#ifdef STEED } else if (u.usteed) { Sprintf(verbbuf, "lead %s into", x_monnam(u.usteed, steed_article, "poor", SUPPRESS_SADDLE, FALSE)); -#endif } else { Sprintf(verbbuf, "%s into", Levitation ? (const char *)"float" : @@ -1157,7 +1120,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); { register int str = ACURR(A_STR); -#ifdef STEED /* If mounted, the steed gets trapped. Use mintrap * to do all the work. If mtrapped is set as a result, * unset it and set utrap instead. In the case of a @@ -1182,7 +1144,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); webmsgok = FALSE; /* mintrap printed the messages */ } -#endif if (str <= 3) u.utrap = rn1(6,6); else if (str < 6) u.utrap = rn1(6,4); else if (str < 9) u.utrap = rn1(4,4); @@ -1215,9 +1176,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); u.uen = (u.uenmax += 2); break; } else domagictrap(); -#ifdef STEED (void) steedintrap(trap, (struct obj *)0); -#endif break; case ANTI_MAGIC: @@ -1257,13 +1216,11 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); case POLY_TRAP: { char verbbuf[BUFSZ]; seetrap(trap); -#ifdef STEED if (u.usteed) Sprintf(verbbuf, "lead %s", x_monnam(u.usteed, steed_article, (char *)0, SUPPRESS_SADDLE, FALSE)); else -#endif Sprintf(verbbuf,"%s", Levitation ? (const char *)"float" : locomotion(youmonst.data, "step")); @@ -1273,9 +1230,7 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); You_feel("momentarily different."); /* Trap did nothing; don't remove it --KAA */ } else { -#ifdef STEED (void) steedintrap(trap, (struct obj *)0); -#endif deltrap(trap); /* delete trap before polymorph */ newsym(u.ux,u.uy); /* get rid of trap symbol */ You_feel("a change coming over you."); @@ -1284,10 +1239,8 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); break; } case LANDMINE: { -#ifdef STEED unsigned steed_mid = 0; struct obj *saddle = 0; -#endif if ((Levitation || Flying) && !forcetrap) { if (!already_seen && rn2(3)) break; feeltrap(trap); @@ -1302,7 +1255,6 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); already_seen ? a_your[trap->madeby_u] : "", already_seen ? " land mine" : "it"); } else { -#ifdef STEED /* prevent landmine from killing steed, throwing you to * the ground, and you being affected again by the same * mine because it hasn't been deleted yet @@ -1310,26 +1262,21 @@ glovecheck: (void) rust_dmg(uarmg, "gauntlets", 1, TRUE, &youmonst); static boolean recursive_mine = FALSE; if (recursive_mine) break; -#endif feeltrap(trap); pline("KAABLAMM!!! You triggered %s land mine!", a_your[trap->madeby_u]); -#ifdef STEED if (u.usteed) steed_mid = u.usteed->m_id; recursive_mine = TRUE; (void) steedintrap(trap, (struct obj *)0); recursive_mine = FALSE; saddle = sobj_at(SADDLE,u.ux, u.uy); -#endif set_wounded_legs(LEFT_SIDE, rn1(35, 41)); set_wounded_legs(RIGHT_SIDE, rn1(35, 41)); exercise(A_DEX, FALSE); } blow_up_landmine(trap); -#ifdef STEED if (steed_mid && saddle && !u.usteed) (void)keep_saddle_with_steedcorpse(steed_mid, fobj, saddle); -#endif newsym(u.ux,u.uy); /* update trap symbol */ losehp(Maybe_Half_Phys(rnd(16)), "land mine", KILLED_BY_AN); /* fall recursively into the pit... */ @@ -1382,7 +1329,6 @@ boolean noprefix; return tnbuf; } -#ifdef STEED STATIC_OVL int steedintrap(trap, otmp) struct trap *trap; @@ -1459,7 +1405,6 @@ struct obj *otmp; } return steedhit ? 1 : 0; } -#endif /*STEED*/ /* some actions common to both player and monsters for triggered landmine */ void @@ -1963,10 +1908,8 @@ register struct monst *mtmp; Sokoban && !trap->madeby_u); const char *fallverb; -#ifdef STEED /* true when called from dotrap, inescapable is not an option */ if (mtmp == u.usteed) inescapable = TRUE; -#endif if (!inescapable && ((mtmp->mtrapseen & (1 << (tt-1))) != 0 || (tt == HOLE && !mindless(mptr)))) { @@ -1982,10 +1925,8 @@ register struct monst *mtmp; in_sight = canseemon(mtmp); see_it = cansee(mtmp->mx, mtmp->my); -#ifdef STEED /* assume hero can tell what's going on for the steed */ if (mtmp == u.usteed) in_sight = TRUE; -#endif switch (tt) { case ARROW_TRAP: if (trap->once && trap->tseen && !rn2(15)) { @@ -2145,10 +2086,8 @@ glovecheck: target = which_armor(mtmp, W_ARMG); 1, TRUE, mtmp); else if ((target = which_armor(mtmp, W_ARM)) != 0) (void) rust_dmg(target, "armor", 1, TRUE, mtmp); -#ifdef TOURIST else if ((target = which_armor(mtmp, W_ARMU)) != 0) (void) rust_dmg(target, "shirt", 1, TRUE, mtmp); -#endif } if (mptr == &mons[PM_IRON_GOLEM]) { @@ -2632,7 +2571,6 @@ float_up() You("gain control over your movements."); else You("start to float in the air!"); -#ifdef STEED if (u.usteed && !is_floater(u.usteed->data) && !is_flyer(u.usteed->data)) { if (Lev_at_will) @@ -2642,7 +2580,6 @@ float_up() dismount_steed(DISMOUNT_GENERIC); } } -#endif if (Flying) You("are no longer able to control your flight."); BFlying |= I_SPECIAL; return; @@ -2743,10 +2680,7 @@ long hmask, emask; /* might cancel timeout */ You_feel("heavier."); /* u.uinwater msgs already in spoteffects()/drown() */ else if (!u.uinwater && !no_msg) { -#ifdef STEED - if (!(emask & W_SADDLE)) -#endif - { + if (!(emask & W_SADDLE)) { if (Sokoban && trap) { /* Justification elsewhere for Sokoban traps * is based on air currents. This is @@ -2760,15 +2694,11 @@ long hmask, emask; /* might cancel timeout */ else You("fall over."); losehp(rnd(2), "dangerous winds", KILLED_BY); -#ifdef STEED if (u.usteed) dismount_steed(DISMOUNT_FELL); -#endif selftouch("As you fall, you"); -#ifdef STEED } else if (u.usteed && (is_floater(u.usteed->data) || is_flyer(u.usteed->data))) { You("settle more firmly in the saddle."); -#endif } else if (Hallucination) pline("Bummer! You've %s.", is_pool(u.ux,u.uy) ? "splashed down" : @@ -2833,19 +2763,15 @@ climb_pit() You("%s to the edge of the pit.", (Sokoban && Levitation) ? "struggle against the air currents and float" : -#ifdef STEED u.usteed ? "ride" : -#endif "crawl"); fill_pit(u.ux, u.uy); vision_full_recalc = 1; /* vision limits change */ } else if (u.dz || flags.verbose) { -#ifdef STEED if (u.usteed) Norep("%s is still in a pit.", upstart(y_monnam(u.usteed))); else -#endif Norep((Hallucination && !rn2(5)) ? "You've fallen, and you can't get up." : "You are still in a pit."); @@ -3240,9 +3166,7 @@ boolean *lostsome; obj == uamul || obj == uleft || obj == uright || obj == ublindf || obj == uarm || obj == uarmc || obj == uarmg || obj == uarmf || -#ifdef TOURIST obj == uarmu || -#endif (obj->cursed && (obj == uarmh || obj == uarms)) || welded(obj))) otmp = obj; @@ -3252,30 +3176,7 @@ boolean *lostsome; /* else continue */ } } -#ifndef GOLDOBJ - if (!otmp) { - /* Nothing available left to drop; try gold */ - if (u.ugold) { - pline("In desperation, you drop your purse."); - /* Hack: gold is not in the inventory, so make a gold object - * and put it at the head of the inventory list. - */ - obj = mkgoldobj(u.ugold); /* removes from u.ugold */ - obj->in_use = TRUE; - u.ugold = obj->quan; /* put the gold back */ - assigninvlet(obj); /* might end up as NOINVSYM */ - obj->nobj = invent; - invent = obj; - *lostsome = TRUE; - dropx(obj); - continue; /* Try again */ - } - /* We can't even drop gold! */ - return (FALSE); - } -#else if (!otmp) return (FALSE); /* nothing to drop! */ -#endif if (otmp->owornmask) remove_worn_item(otmp, FALSE); *lostsome = TRUE; dropx(otmp); @@ -3360,13 +3261,11 @@ drown() return(TRUE); } else pline_The("attempted teleport spell fails."); } -#ifdef STEED if (u.usteed) { dismount_steed(DISMOUNT_GENERIC); if(!is_pool(u.ux,u.uy)) return(TRUE); } -#endif crawl_ok = FALSE; x = y = 0; /* lint suppression */ /* if sleeping, wake up now so that we don't crawl out of water @@ -3602,11 +3501,9 @@ boolean force_failure; } /* untrappable traps are located on the ground. */ if (!can_reach_floor(TRUE)) { -#ifdef STEED if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) rider_cant_reach(); else -#endif You("are unable to reach the %s!", defsyms[trap_to_defsym(ttype)].explanation); return 0; @@ -3626,12 +3523,10 @@ boolean force_failure; if (ttmp2) { pline_The("webbing sticks to you. You're caught too!"); dotrap(ttmp2, NOWEBMSG); -#ifdef STEED if (u.usteed && u.utrap) { /* you, not steed, are trapped */ dismount_steed(DISMOUNT_FELL); } -#endif } } else pline("%s remains entangled.", Monnam(mtmp)); @@ -3936,9 +3831,7 @@ boolean force; useplural ? "are" : "is", the_trap, here ? "here" : "there", useplural ? "them" : "it", -#ifdef STEED u.usteed ? " while mounted" : -#endif ""); trap_skipped = (ttmp != 0); } else { /* deal_with_floor_trap */ @@ -4130,9 +4023,7 @@ boolean *noticed; /* set to true iff hero notices the effect; */ const char *trapdescr, *which; boolean ishero = (mon == &youmonst); -#ifdef STEED if (mon == u.usteed) ishero = TRUE; -#endif t = t_at(ishero ? u.ux : mon->mx, ishero ? u.uy : mon->my); /* if no trap here or it's not a holding trap, we're done */ if (!t || (t->ttyp != BEAR_TRAP && t->ttyp != WEB)) return FALSE; @@ -4147,11 +4038,9 @@ boolean *noticed; /* set to true iff hero notices the effect; */ *noticed = TRUE; /* give message only if trap was the expected type */ if (u.utraptype == TT_BEARTRAP || u.utraptype == TT_WEB) { -#ifdef STEED if (u.usteed) Sprintf(buf, "%s is", noit_Monnam(u.usteed)); else -#endif Strcpy(buf, "You are"); pline("%s released from %s %s.", buf, which, trapdescr); } @@ -4187,9 +4076,7 @@ boolean *noticed; /* set to true iff hero notices the effect; */ unsigned dotrapflags; boolean ishero = (mon == &youmonst), result; -#ifdef STEED if (mon == u.usteed) ishero = TRUE; -#endif t = t_at(ishero ? u.ux : mon->mx, ishero ? u.uy : mon->my); /* if no trap here or it's not a holding trap, we're done */ if (!t || (t->ttyp != BEAR_TRAP && t->ttyp != WEB)) return FALSE; @@ -4198,10 +4085,8 @@ boolean *noticed; /* set to true iff hero notices the effect; */ if (u.utrap) return FALSE; /* already trapped */ *noticed = TRUE; dotrapflags = FORCETRAP; -#ifdef STEED /* dotrap calls mintrap when mounted hero encounters a web */ if (u.usteed) dotrapflags |= NOWEBMSG; -#endif ++force_mintrap; dotrap(t, dotrapflags); --force_mintrap; @@ -4229,9 +4114,7 @@ boolean *noticed; /* set to true iff hero notices the effect; */ struct trap *t; boolean ishero = (mon == &youmonst), result; -#ifdef STEED if (mon == u.usteed) ishero = TRUE; -#endif t = t_at(ishero ? u.ux : mon->mx, ishero ? u.uy : mon->my); /* if no trap here or it's not a falling trap, we're done (note: falling rock traps have a trapdoor in the ceiling) */ diff --git a/src/u_init.c b/src/u_init.c index 77cd0c080..bfe54671c 100644 --- a/src/u_init.c +++ b/src/u_init.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 u_init.c $Date$ $Revision$ */ +/* NetHack 3.5 u_init.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 u_init.c $Date: 2011/10/01 00:25:56 $ $Revision: 1.18 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -137,7 +138,6 @@ static struct trobj Samurai[] = { { SPLINT_MAIL, 0, ARMOR_CLASS, 1, UNDEF_BLESS }, { 0, 0, 0, 0, 0 } }; -#ifdef TOURIST static struct trobj Tourist[] = { #define T_DARTS 0 { DART, 2, WEAPON_CLASS, 25, UNDEF_BLESS }, /* quan is variable */ @@ -149,7 +149,6 @@ static struct trobj Tourist[] = { { CREDIT_CARD, 0, TOOL_CLASS, 1, 0 }, { 0, 0, 0, 0, 0 } }; -#endif static struct trobj Valkyrie[] = { { LONG_SWORD, 1, WEAPON_CLASS, 1, UNDEF_BLESS }, { DAGGER, 0, WEAPON_CLASS, 1, UNDEF_BLESS }, @@ -199,7 +198,6 @@ static struct trobj Xtra_food[] = { { UNDEF_TYP, UNDEF_SPE, FOOD_CLASS, 2, 0 }, { 0, 0, 0, 0, 0 } }; -#ifdef TOURIST static struct trobj Leash[] = { { LEASH, 0, TOOL_CLASS, 1, 0 }, { 0, 0, 0, 0, 0 } @@ -208,17 +206,14 @@ static struct trobj Towel[] = { { TOWEL, 0, TOOL_CLASS, 1, 0 }, { 0, 0, 0, 0, 0 } }; -#endif /* TOURIST */ static struct trobj Wishing[] = { { WAN_WISHING, 3, WAND_CLASS, 1, 0 }, { 0, 0, 0, 0, 0 } }; -#ifdef GOLDOBJ static struct trobj Money[] = { { GOLD_PIECE, 0 , COIN_CLASS, 1, 0 }, { 0, 0, 0, 0, 0 } }; -#endif /* race-based substitutions for initial inventory; the weaker cloak for elven rangers is intentional--they shoot better */ @@ -261,9 +256,7 @@ static const struct def_skill Skill_A[] = { { P_UNICORN_HORN, P_SKILLED }, { P_ATTACK_SPELL, P_BASIC }, { P_HEALING_SPELL, P_BASIC }, { P_DIVINATION_SPELL, P_EXPERT}, { P_MATTER_SPELL, P_BASIC}, -#ifdef STEED { P_RIDING, P_BASIC }, -#endif { P_TWO_WEAPON_COMBAT, P_BASIC }, { P_BARE_HANDED_COMBAT, P_EXPERT }, { P_NONE, 0 } @@ -280,9 +273,7 @@ static const struct def_skill Skill_B[] = { { P_QUARTERSTAFF, P_BASIC }, { P_SPEAR, P_SKILLED }, { P_TRIDENT, P_SKILLED }, { P_BOW, P_BASIC }, { P_ATTACK_SPELL, P_SKILLED }, -#ifdef STEED { P_RIDING, P_BASIC }, -#endif { P_TWO_WEAPON_COMBAT, P_BASIC }, { P_BARE_HANDED_COMBAT, P_MASTER }, { P_NONE, 0 } @@ -331,9 +322,7 @@ static const struct def_skill Skill_K[] = { { P_BOW, P_BASIC }, { P_CROSSBOW, P_SKILLED }, { P_ATTACK_SPELL, P_SKILLED }, { P_HEALING_SPELL, P_SKILLED }, { P_CLERIC_SPELL, P_SKILLED }, -#ifdef STEED { P_RIDING, P_EXPERT }, -#endif { P_TWO_WEAPON_COMBAT, P_SKILLED }, { P_BARE_HANDED_COMBAT, P_EXPERT }, { P_NONE, 0 } @@ -378,9 +367,7 @@ static const struct def_skill Skill_R[] = { { P_DART, P_EXPERT }, { P_SHURIKEN, P_SKILLED }, { P_DIVINATION_SPELL, P_SKILLED }, { P_ESCAPE_SPELL, P_SKILLED }, { P_MATTER_SPELL, P_SKILLED }, -#ifdef STEED { P_RIDING, P_BASIC }, -#endif { P_TWO_WEAPON_COMBAT, P_EXPERT }, { P_BARE_HANDED_COMBAT, P_EXPERT }, { P_NONE, 0 } @@ -400,9 +387,7 @@ static const struct def_skill Skill_Ran[] = { { P_HEALING_SPELL, P_BASIC }, { P_DIVINATION_SPELL, P_EXPERT }, { P_ESCAPE_SPELL, P_BASIC }, -#ifdef STEED { P_RIDING, P_BASIC }, -#endif { P_BARE_HANDED_COMBAT, P_BASIC }, { P_NONE, 0 } }; @@ -417,15 +402,12 @@ static const struct def_skill Skill_S[] = { { P_LANCE, P_SKILLED }, { P_BOW, P_EXPERT }, { P_SHURIKEN, P_EXPERT }, { P_ATTACK_SPELL, P_SKILLED }, { P_CLERIC_SPELL, P_SKILLED }, -#ifdef STEED { P_RIDING, P_SKILLED }, -#endif { P_TWO_WEAPON_COMBAT, P_EXPERT }, { P_MARTIAL_ARTS, P_MASTER }, { P_NONE, 0 } }; -#ifdef TOURIST static const struct def_skill Skill_T[] = { { P_DAGGER, P_EXPERT }, { P_KNIFE, P_SKILLED }, { P_AXE, P_BASIC }, { P_PICK_AXE, P_BASIC }, @@ -443,14 +425,11 @@ static const struct def_skill Skill_T[] = { { P_WHIP, P_BASIC }, { P_UNICORN_HORN, P_SKILLED }, { P_DIVINATION_SPELL, P_BASIC }, { P_ENCHANTMENT_SPELL, P_BASIC }, { P_ESCAPE_SPELL, P_SKILLED }, -#ifdef STEED { P_RIDING, P_BASIC }, -#endif { P_TWO_WEAPON_COMBAT, P_SKILLED }, { P_BARE_HANDED_COMBAT, P_SKILLED }, { P_NONE, 0 } }; -#endif /* TOURIST */ static const struct def_skill Skill_V[] = { { P_DAGGER, P_EXPERT }, { P_AXE, P_EXPERT }, @@ -463,9 +442,7 @@ static const struct def_skill Skill_V[] = { { P_TRIDENT, P_BASIC }, { P_LANCE, P_SKILLED }, { P_SLING, P_BASIC }, { P_ATTACK_SPELL, P_BASIC }, { P_ESCAPE_SPELL, P_BASIC }, -#ifdef STEED { P_RIDING, P_SKILLED }, -#endif { P_TWO_WEAPON_COMBAT, P_SKILLED }, { P_BARE_HANDED_COMBAT, P_EXPERT }, { P_NONE, 0 } @@ -483,9 +460,7 @@ static const struct def_skill Skill_W[] = { { P_DIVINATION_SPELL, P_EXPERT }, { P_ENCHANTMENT_SPELL, P_SKILLED }, { P_CLERIC_SPELL, P_SKILLED }, { P_ESCAPE_SPELL, P_EXPERT }, { P_MATTER_SPELL, P_EXPERT }, -#ifdef STEED { P_RIDING, P_BASIC }, -#endif { P_BARE_HANDED_COMBAT, P_BASIC }, { P_NONE, 0 } }; @@ -529,9 +504,7 @@ u_init() #if 0 /* documentation of more zero values as desirable */ u.usick_cause[0] = 0; u.uluck = u.moreluck = 0; -# ifdef TOURIST uarmu = 0; -# endif uarm = uarmc = uarmh = uarms = uarmg = uarmf = 0; uwep = uball = uchain = uleft = uright = 0; uswapwep = uquiver = 0; @@ -539,9 +512,7 @@ u_init() u.ublessed = 0; /* not worthy yet */ u.ugangr = 0; /* gods not angry */ u.ugifts = 0; /* no divine gifts bestowed */ -# ifdef ELBERETH u.uevent.uhand_of_elbereth = 0; -# endif u.uevent.uheard_tune = 0; u.uevent.uopened_dbridge = 0; u.uevent.udemigod = 0; /* not a demi-god yet... */ @@ -624,11 +595,7 @@ u_init() skill_init(Skill_C); break; case PM_HEALER: -#ifndef GOLDOBJ - u.ugold = u.ugold0 = rn1(1000, 1001); -#else u.umoney0 = rn1(1000, 1001); -#endif ini_inv(Healer); if(!rn2(25)) ini_inv(Lamp); knows_object(POT_FULL_HEALING); @@ -677,11 +644,7 @@ u_init() break; case PM_ROGUE: Rogue[R_DAGGERS].trquan = rn1(10, 6); -#ifndef GOLDOBJ - u.ugold = u.ugold0 = 0; -#else u.umoney0 = 0; -#endif ini_inv(Rogue); if(!rn2(5)) ini_inv(Blindfold); knows_object(SACK); @@ -695,14 +658,9 @@ u_init() knows_class(ARMOR_CLASS); skill_init(Skill_S); break; -#ifdef TOURIST case PM_TOURIST: Tourist[T_DARTS].trquan = rn1(20, 21); -#ifndef GOLDOBJ - u.ugold = u.ugold0 = rnd(1000); -#else u.umoney0 = rnd(1000); -#endif ini_inv(Tourist); if(!rn2(25)) ini_inv(Tinopener); else if(!rn2(25)) ini_inv(Leash); @@ -710,7 +668,6 @@ u_init() else if(!rn2(25)) ini_inv(Magicmarker); skill_init(Skill_T); break; -#endif case PM_VALKYRIE: ini_inv(Valkyrie); if(!rn2(6)) ini_inv(Lamp); @@ -804,17 +761,11 @@ u_init() if (discover) ini_inv(Wishing); -#ifdef WIZARD if (wizard) read_wizkit(); -#endif -#ifndef GOLDOBJ - u.ugold0 += hidden_gold(); /* in case sack has gold in it */ -#else if (u.umoney0) ini_inv(Money); u.umoney0 += hidden_gold(); /* in case sack has gold in it */ -#endif find_ac(); /* get initial ac value */ init_attr(75); /* init attribute values */ @@ -859,9 +810,7 @@ int otyp; case PM_RANGER: skills = Skill_Ran; break; case PM_ROGUE: skills = Skill_R; break; case PM_SAMURAI: skills = Skill_S; break; -#ifdef TOURIST case PM_TOURIST: skills = Skill_T; break; -#endif case PM_VALKYRIE: skills = Skill_V; break; case PM_WIZARD: skills = Skill_W; break; default: skills = 0; break; /* lint suppression */ @@ -916,9 +865,7 @@ register struct trobj *trop; || otyp == nocreate2 || otyp == nocreate3 || otyp == nocreate4 -#ifdef ELBERETH || otyp == RIN_LEVITATION -#endif /* 'useless' items */ || otyp == POT_HALLUCINATION || otyp == POT_ACID @@ -974,12 +921,10 @@ register struct trobj *trop; nocreate4 = otyp; } -#ifdef GOLDOBJ if (trop->trclass == COIN_CLASS) { /* no "blessed" or "identified" money */ obj->quan = u.umoney0; } else { -#endif if (objects[otyp].oc_uses_known) obj->known = 1; obj->dknown = obj->bknown = obj->rknown = 1; if (Is_container(obj) || obj->otyp == STATUE) { @@ -1001,9 +946,7 @@ register struct trobj *trop; obj->spe = trop->trspe; if (trop->trbless != UNDEF_BLESS) obj->blessed = trop->trbless; -#ifdef GOLDOBJ } -#endif /* defined after setting otyp+quan + blessedness */ obj->owt = weight(obj); obj = addinv(obj); @@ -1022,10 +965,8 @@ register struct trobj *trop; setworn(obj, W_ARMH); else if (is_gloves(obj) && !uarmg) setworn(obj, W_ARMG); -#ifdef TOURIST else if (is_shirt(obj) && !uarmu) setworn(obj, W_ARMU); -#endif else if (is_cloak(obj) && !uarmc) setworn(obj, W_ARMC); else if (is_boots(obj) && !uarmf) diff --git a/src/uhitm.c b/src/uhitm.c index cbd0cdbec..bbb3a7fb4 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 uhitm.c $Date$ $Revision$ */ +/* NetHack 3.5 uhitm.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 uhitm.c $Date: 2012/05/01 02:22:33 $ $Revision: 1.116 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -10,9 +11,7 @@ STATIC_DCL boolean FDECL(theft_petrifies, (struct obj *)); STATIC_DCL void FDECL(steal_it, (struct monst *, struct attack *)); STATIC_DCL boolean FDECL(hitum, (struct monst *,struct attack *)); STATIC_DCL boolean FDECL(hmon_hitmon, (struct monst *,struct obj *,int)); -#ifdef STEED STATIC_DCL int FDECL(joust, (struct monst *,struct obj *)); -#endif STATIC_DCL void NDECL(demonpet); STATIC_DCL boolean FDECL(m_slips_free, (struct monst *mtmp,struct attack *mattk)); STATIC_DCL int FDECL(explum, (struct monst *,struct attack *)); @@ -68,10 +67,8 @@ int attk; } if ((target = which_armor(mdef, W_ARM)) != (struct obj *)0) { (void)rust_dmg(target, xname(target), hurt, TRUE, mdef); -#ifdef TOURIST } else if ((target = which_armor(mdef, W_ARMU)) != (struct obj *)0) { (void)rust_dmg(target, xname(target), hurt, TRUE, mdef); -#endif } break; case 2: @@ -558,9 +555,7 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ boolean hand_to_hand = (thrown == HMON_MELEE || /* not grapnels; applied implies uwep */ (thrown == HMON_APPLIED && is_pole(uwep))); -#ifdef STEED int jousting = 0; -#endif int wtype; struct obj *monwep; char unconventional[BUFSZ]; /* substituted for word "attack" in msg */ @@ -606,11 +601,7 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ /* or strike with a missile in your hand... */ (!thrown && (is_missile(obj) || is_ammo(obj))) || /* or use a pole at short range and not mounted... */ - (!thrown && -#ifdef STEED - !u.usteed && -#endif - is_pole(obj)) || + (!thrown && !u.usteed && is_pole(obj)) || /* or throw a missile without the proper bow... */ (is_ammo(obj) && (thrown != HMON_THROWN || !ammo_and_launcher(obj, uwep)))) { @@ -692,14 +683,12 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ && mon_hates_silver(mon)) { silvermsg = TRUE; silverobj = TRUE; } -#ifdef STEED if (u.usteed && !thrown && tmp > 0 && weapon_type(obj) == P_LANCE && mon != u.ustuck) { jousting = joust(mon, obj); /* exercise skill even for minimal damage hits */ if (jousting) valid_weapon_attack = TRUE; } -#endif if (thrown == HMON_THROWN && (is_ammo(obj) || is_missile(obj))) { if (ammo_and_launcher(obj, uwep)) { @@ -754,7 +743,6 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ } tmp = 1; break; -#ifdef TOURIST case EXPENSIVE_CAMERA: You("succeed in destroying %s. Congratulations!", ysimple_name(obj)); @@ -762,7 +750,6 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ return(TRUE); /*NOTREACHED*/ break; -#endif case CORPSE: /* fixed by polder@cs.vu.nl */ if (touch_petrifies(&mons[obj->corpsenm])) { tmp = 1; @@ -990,7 +977,6 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ } } -#ifdef STEED if (jousting) { tmp += d(2, (obj == uwep) ? 10 : 2); /* [was in dmgval()] */ You("joust %s%s", @@ -1011,11 +997,8 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */ if (DEADMONSTER(mon)) already_killed = TRUE; } hittxt = TRUE; - } else -#endif - - /* VERY small chance of stunning opponent if unarmed. */ - if (unarmed && tmp > 1 && !thrown && !obj && !Upolyd) { + } else if (unarmed && tmp > 1 && !thrown && !obj && !Upolyd) { + /* VERY small chance of stunning opponent if unarmed. */ if (rnd(100) < P_SKILL(P_BARE_HANDED_COMBAT) && !bigmonst(mdat) && !thick_skinned(mdat)) { if (canspotmon(mon)) @@ -1165,9 +1148,7 @@ struct attack *mattk; /* grabbing attacks the body */ obj = which_armor(mdef, W_ARMC); /* cloak */ if (!obj) obj = which_armor(mdef, W_ARM); /* suit */ -#ifdef TOURIST if (!obj) obj = which_armor(mdef, W_ARMU); /* shirt */ -#endif } /* if monster's cloak/armor is greased, your grab slips off; this @@ -1471,22 +1452,13 @@ register struct attack *mattk; minstapetrify(mdef, TRUE); tmp = 0; break; -#ifdef SEDUCE case AD_SSEX: -#endif case AD_SEDU: case AD_SITM: steal_it(mdef, mattk); tmp = 0; break; case AD_SGLD: -#ifndef GOLDOBJ - if (mdef->mgold) { - u.ugold += mdef->mgold; - mdef->mgold = 0; - Your("purse feels heavier."); - } -#else /* This you as a leprechaun, so steal real gold only, no lesser coins */ { @@ -1503,7 +1475,6 @@ register struct attack *mattk; } } } -#endif exercise(A_DEX, TRUE); tmp = 0; break; diff --git a/src/vault.c b/src/vault.c index af37a0625..87c13b31a 100644 --- a/src/vault.c +++ b/src/vault.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vault.c $Date$ $Revision$ */ +/* NetHack 3.5 vault.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vault.c $Date: 2011/10/13 00:31:10 $ $Revision: 1.28 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -349,10 +350,7 @@ fnd: } if (!strcmpi(buf, "Croesus") || !strcmpi(buf, "Kroisos") -#ifdef TOURIST - || !strcmpi(buf, "Creosote") -#endif - ) { + || !strcmpi(buf, "Creosote")) { if (!mvitals[PM_CROESUS].died) { verbalize("Oh, yes, of course. Sorry to have disturbed you."); mongone(guard); @@ -368,11 +366,7 @@ fnd: return; } verbalize("I don't know you."); -#ifndef GOLDOBJ - umoney = u.ugold; -#else umoney = money_cnt(invent); -#endif if (Deaf) { ; } else if (!umoney && !hidden_gold()) { @@ -515,12 +509,8 @@ register struct monst *grd; grd_in_vault = *in_rooms(grd->mx, grd->my, VAULT)? TRUE : FALSE; boolean disappear_msg_seen = FALSE, semi_dead = (grd->mhp <= 0); -#ifndef GOLDOBJ - register boolean u_carry_gold = ((u.ugold + hidden_gold()) > 0L); -#else long umoney = money_cnt(invent); register boolean u_carry_gold = ((umoney + hidden_gold()) > 0L); -#endif boolean see_guard, newspot = FALSE; if(!on_level(&(egrd->gdlevel), &u.uz)) return(-1); @@ -562,15 +552,9 @@ register struct monst *grd; if(egrd->warncnt == 3 && !Deaf) verbalize("I repeat, %sfollow me!", u_carry_gold ? ( -#ifndef GOLDOBJ - !u.ugold ? - "drop that hidden gold and " : - "drop that gold and ") : ""); -#else !umoney ? "drop that hidden money and " : "drop that money and ") : ""); -#endif if(egrd->warncnt == 7) { m = grd->mx; n = grd->my; @@ -656,13 +640,8 @@ letknow: if (m == u.ux && n == u.uy) { struct obj *gold = g_at(m,n); /* Grab the gold from between the hero's feet. */ -#ifndef GOLDOBJ - grd->mgold += gold->quan; - delobj(gold); -#else obj_extract_self(gold); add_to_minv(grd, gold); -#endif newsym(m,n); } else if (m == x && n == y) { mpickgold(grd); /* does a newsym */ @@ -830,30 +809,17 @@ void paygd() { register struct monst *grd = findgd(); -#ifndef GOLDOBJ - struct obj *gold; -#else long umoney = money_cnt(invent); struct obj *coins, *nextcoins; -#endif int gx,gy; char buf[BUFSZ]; -#ifndef GOLDOBJ - if (!u.ugold || !grd) return; -#else if (!umoney || !grd) return; -#endif if (u.uinvault) { Your("%ld %s goes into the Magic Memory Vault.", -#ifndef GOLDOBJ - u.ugold, - currency(u.ugold)); -#else umoney, currency(umoney)); -#endif gx = u.ux; gy = u.uy; } else { @@ -870,10 +836,6 @@ paygd() plname, mons[u.umonster].mname); make_grave(gx, gy, buf); } -#ifndef GOLDOBJ - place_object(gold = mkgoldobj(u.ugold), gx, gy); - stackobj(gold); -#else for (coins = invent; coins; coins = nextcoins) { nextcoins = coins->nobj; if (objects[coins->otyp].oc_class == COIN_CLASS) { @@ -882,7 +844,6 @@ paygd() stackobj(coins); } } -#endif mongone(grd); } diff --git a/src/version.c b/src/version.c index 6dbc4e38a..1f58cff1f 100644 --- a/src/version.c +++ b/src/version.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 version.c $Date$ $Revision$ */ +/* NetHack 3.5 version.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 version.c $Date: 2012/01/04 18:52:36 $ $Revision: 1.26 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/vision.c b/src/vision.c index 2f1a62b0c..a6585de14 100644 --- a/src/vision.c +++ b/src/vision.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vision.c $Date$ $Revision$ */ +/* NetHack 3.5 vision.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vision.c $Date: 2009/05/06 10:48:10 $ $Revision: 1.12 $ */ /* SCCS Id: @(#)vision.c 3.5 2007/11/05 */ /* Copyright (c) Dean Luick, with acknowledgements to Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ @@ -102,9 +103,7 @@ STATIC_DCL void NDECL(view_init); STATIC_DCL void FDECL(view_from,(int,int,char **,char *,char *,int, void (*)(int,int,genericptr_t),genericptr_t)); STATIC_DCL void FDECL(get_unused_cs, (char ***,char **,char **)); -#ifdef REINCARNATION STATIC_DCL void FDECL(rogue_vision, (char **,char *,char *)); -#endif /* Macro definitions that I can't find anywhere. */ #define sign(z) ((z) < 0 ? -1 : ((z) ? 1 : 0 )) @@ -284,7 +283,6 @@ get_unused_cs(rows, rmin, rmax) } -#ifdef REINCARNATION /* * rogue_vision() * @@ -348,7 +346,6 @@ rogue_vision(next, rmin, rmax) } } } -#endif /* REINCARNATION */ /*#define EXTEND_SPINE*/ /* possibly better looking wall-angle */ @@ -567,13 +564,9 @@ vision_recalc(control) /* skip the normal update loop */ goto skip; - } -#ifdef REINCARNATION - else if (Is_rogue_level(&u.uz)) { + } else if (Is_rogue_level(&u.uz)) { rogue_vision(next_array,next_rmin,next_rmax); - } -#endif - else { + } else { int has_night_vision = 1; /* hero has night vision */ if (Underwater && !Is_waterlevel(&u.uz)) { @@ -810,9 +803,7 @@ skip: viz_rmin = next_rmin; viz_rmax = next_rmax; -#ifdef DUNGEON_OVERVIEW recalc_mapseen(); -#endif } diff --git a/src/weapon.c b/src/weapon.c index fa902d6e0..5f611ddcf 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 weapon.c $Date$ $Revision$ */ +/* NetHack 3.5 weapon.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 weapon.c $Date: 2011/12/18 05:16:28 $ $Revision: 1.38 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -42,9 +43,7 @@ STATIC_VAR NEARDATA const short skill_names_indices[P_NUM_SKILLS] = { PN_CLERIC_SPELL, PN_ESCAPE_SPELL, PN_MATTER_SPELL, PN_BARE_HANDED, PN_TWO_WEAPONS, -#ifdef STEED PN_RIDING -#endif }; /* note: entry [0] isn't used */ @@ -184,11 +183,6 @@ struct monst *mon; if (is_pick(otmp) && (passes_walls(ptr) && thick_skinned(ptr))) tmp += 2; -#ifdef INVISIBLE_OBJECTS - /* Invisible weapons against monsters who can't see invisible */ - if (otmp->oinvis && !perceives(ptr)) tmp += 3; -#endif - /* Check specially named weapon "to hit" bonuses */ if (otmp->oartifact) tmp += spec_abon(otmp, mon); @@ -371,7 +365,6 @@ static NEARDATA const int rwep[] = ORCISH_ARROW, CROSSBOW_BOLT, SILVER_DAGGER, ELVEN_DAGGER, DAGGER, ORCISH_DAGGER, KNIFE, FLINT, ROCK, LOADSTONE, LUCKSTONE, DART, /* BOOMERANG, */ CREAM_PIE - /* note: CREAM_PIE should NOT be #ifdef KOPS */ }; static NEARDATA const int pwep[] = @@ -390,16 +383,12 @@ register struct monst *mtmp; boolean mweponly; int i; -#ifdef KOPS char mlet = mtmp->data->mlet; -#endif propellor = &zeroobj; Oselect(EGG); /* cockatrice egg */ -#ifdef KOPS if(mlet == S_KOP) /* pies are first choice for Kops */ Oselect(CREAM_PIE); -#endif if(throws_rocks(mtmp->data)) /* ...boulders for giants */ Oselect(BOULDER); @@ -509,12 +498,8 @@ static const NEARDATA short hwep[] = { MORNING_STAR, ELVEN_SHORT_SWORD, DWARVISH_SHORT_SWORD, SHORT_SWORD, ORCISH_SHORT_SWORD, MACE, AXE, DWARVISH_SPEAR, SILVER_SPEAR, ELVEN_SPEAR, SPEAR, ORCISH_SPEAR, FLAIL, BULLWHIP, QUARTERSTAFF, - JAVELIN, AKLYS, CLUB, PICK_AXE, -#ifdef KOPS - RUBBER_HOSE, -#endif /* KOPS */ - WAR_HAMMER, SILVER_DAGGER, ELVEN_DAGGER, DAGGER, ORCISH_DAGGER, - ATHAME, SCALPEL, KNIFE, WORM_TOOTH + JAVELIN, AKLYS, CLUB, PICK_AXE, RUBBER_HOSE, WAR_HAMMER, SILVER_DAGGER, + ELVEN_DAGGER, DAGGER, ORCISH_DAGGER, ATHAME, SCALPEL, KNIFE, WORM_TOOTH }; struct obj * @@ -831,9 +816,7 @@ boolean speedy; { return !P_RESTRICTED(skill) && P_SKILL(skill) < P_MAX_SKILL(skill) && ( -#ifdef WIZARD (wizard && speedy) || -#endif (P_ADVANCE(skill) >= (unsigned) practice_needed_to_advance(P_SKILL(skill)) && u.skills_advanced < P_SKILL_LIMIT @@ -906,10 +889,8 @@ enhance_weapon_skill() winid win; boolean speedy = FALSE; -#ifdef WIZARD if (wizard && yn("Advance skills without practice?") == 'y') speedy = TRUE; -#endif do { /* find longest available skill name, count those that can advance */ @@ -982,7 +963,6 @@ enhance_weapon_skill() prefix = (to_advance + eventually_advance + maxxed_cnt > 0) ? " " : ""; (void) skill_level_name(i, sklnambuf); -#ifdef WIZARD if (wizard) { if (!iflags.menu_tab_sep) Sprintf(buf, " %s%-*s %-12s %5d(%4d)", @@ -994,9 +974,7 @@ enhance_weapon_skill() prefix, P_NAME(i), sklnambuf, P_ADVANCE(i), practice_needed_to_advance(P_SKILL(i))); - } else -#endif - { + } else { if (!iflags.menu_tab_sep) Sprintf(buf, " %s %-*s [%s]", prefix, longest, P_NAME(i), sklnambuf); @@ -1011,11 +989,9 @@ enhance_weapon_skill() Strcpy(buf, (to_advance > 0) ? "Pick a skill to advance:" : "Current skills:"); -#ifdef WIZARD if (wizard && !speedy) Sprintf(eos(buf), " (%d slot%s available)", u.weapon_slots, plur(u.weapon_slots)); -#endif end_menu(win, buf); n = select_menu(win, to_advance ? PICK_ONE : PICK_NONE, &selected); destroy_nhwindow(win); @@ -1183,7 +1159,6 @@ struct obj *weapon; bonus = ((bonus + 2) * (martial_bonus() ? 2 : 1)) / 2; } -#ifdef STEED /* KMH -- It's harder to hit while you are riding */ if (u.usteed) { switch (P_SKILL(P_RIDING)) { @@ -1195,7 +1170,6 @@ struct obj *weapon; } if (u.twoweap) bonus -= 2; } -#endif return bonus; } @@ -1252,7 +1226,6 @@ struct obj *weapon; bonus = ((bonus + 1) * (martial_bonus() ? 3 : 1)) / 2; } -#ifdef STEED /* KMH -- Riding gives some thrusting damage */ if (u.usteed && type != P_TWO_WEAPON_COMBAT) { switch (P_SKILL(P_RIDING)) { @@ -1263,7 +1236,6 @@ struct obj *weapon; case P_EXPERT: bonus += 2; break; } } -#endif return bonus; } @@ -1325,10 +1297,8 @@ const struct def_skill *class_skill; P_SKILL(P_BARE_HANDED_COMBAT) = P_BASIC; /* Roles that start with a horse know how to ride it */ -#ifdef STEED if (urole.petnum == PM_PONY) P_SKILL(P_RIDING) = P_BASIC; -#endif /* * Make sure we haven't missed setting the max on a skill diff --git a/src/were.c b/src/were.c index 864ee5fed..c2df2e20c 100644 --- a/src/were.c +++ b/src/were.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 were.c $Date$ $Revision$ */ +/* NetHack 3.5 were.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 were.c $Date: 2011/02/28 11:29:27 $ $Revision: 1.14 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/wield.c b/src/wield.c index a34d27c6e..dbb5d271f 100644 --- a/src/wield.c +++ b/src/wield.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 wield.c $Date$ $Revision$ */ +/* NetHack 3.5 wield.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wield.c $Date: 2009/05/06 10:48:14 $ $Revision: 1.31 $ */ /* SCCS Id: @(#)wield.c 3.5 2009/01/20 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -105,10 +106,7 @@ register struct obj *obj; unweapon = (obj->oclass == WEAPON_CLASS) ? is_launcher(obj) || is_ammo(obj) || is_missile(obj) || (is_pole(obj) -#ifdef STEED - && !u.usteed -#endif - ) : !is_weptool(obj); + && !u.usteed) : !is_weptool(obj); } else unweapon = TRUE; /* for "bare hands" message */ update_inventory(); @@ -240,17 +238,10 @@ register struct obj *obj; static NEARDATA const char wield_objs[] = { ALL_CLASSES, ALLOW_NONE, WEAPON_CLASS, TOOL_CLASS, 0 }; -#ifdef GOLDOBJ static NEARDATA const char ready_objs[] = { COIN_CLASS, ALL_CLASSES, ALLOW_NONE, WEAPON_CLASS, 0 }; static NEARDATA const char bullets[] = /* (note: different from dothrow.c) */ { COIN_CLASS, ALL_CLASSES, ALLOW_NONE, GEM_CLASS, WEAPON_CLASS, 0 }; -#else -static NEARDATA const char ready_objs[] = - { ALL_CLASSES, ALLOW_NONE, WEAPON_CLASS, 0 }; -static NEARDATA const char bullets[] = /* (note: different from dothrow.c) */ - { ALL_CLASSES, ALLOW_NONE, GEM_CLASS, WEAPON_CLASS, 0 }; -#endif int dowield() @@ -287,11 +278,7 @@ dowield() return (doswapweapon()); else if (wep == uquiver) setuqwep((struct obj *) 0); - else if (wep->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL -#ifdef STEED - | W_SADDLE -#endif - )) { + else if (wep->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL | W_SADDLE)) { You("cannot wield that!"); return (0); } @@ -391,10 +378,7 @@ dowieldquiver() !is_plural(uwep) ? "That is" : "They are"); return(0); } else if (newquiver->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL -#ifdef STEED - | W_SADDLE -#endif - )) { + | W_SADDLE)) { You("cannot ready that!"); return (0); } else { diff --git a/src/windows.c b/src/windows.c index fc13631c0..070658bd1 100644 --- a/src/windows.c +++ b/src/windows.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 windows.c $Date$ $Revision$ */ +/* NetHack 3.5 windows.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 windows.c $Date: 2012/01/23 10:45:28 $ $Revision: 1.23 $ */ /* Copyright (c) D. Cohrs, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/wizard.c b/src/wizard.c index 9d7abacdc..4f184fa97 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 wizard.c $Date$ $Revision$ */ +/* NetHack 3.5 wizard.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wizard.c $Date: 2009/05/06 10:48:16 $ $Revision: 1.32 $ */ /* SCCS Id: @(#)wizard.c 3.5 2008/11/14 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/worm.c b/src/worm.c index b8be560a5..36af566fc 100644 --- a/src/worm.c +++ b/src/worm.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 worm.c $Date$ $Revision$ */ +/* NetHack 3.5 worm.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 worm.c $Date: 2009/05/06 10:48:17 $ $Revision: 1.12 $ */ /* SCCS Id: @(#)worm.c 3.5 2009/03/05 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/src/worn.c b/src/worn.c index f750bf410..32bfe1003 100644 --- a/src/worn.c +++ b/src/worn.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 worn.c $Date$ $Revision$ */ +/* NetHack 3.5 worn.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 worn.c $Date: 2013/11/05 00:57:56 $ $Revision: 1.32 $ */ /* SCCS Id: @(#)worn.c 3.5 2009/02/28 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -19,9 +20,7 @@ const struct worn { { W_ARMS, &uarms }, { W_ARMG, &uarmg }, { W_ARMF, &uarmf }, -#ifdef TOURIST { W_ARMU, &uarmu }, -#endif { W_RINGL, &uleft }, { W_RINGR, &uright }, { W_WEP, &uwep }, @@ -154,9 +153,7 @@ struct obj *obj; case ARM_GLOVES: res = W_ARMG; break; /* WORN_GLOVES */ case ARM_BOOTS: res = W_ARMF; break; /* WORN_BOOTS */ case ARM_CLOAK: res = W_ARMC; break; /* WORN_CLOAK */ -#ifdef TOURIST case ARM_SHIRT: res = W_ARMU; break; /* WORN_SHIRT */ -#endif } break; case WEAPON_CLASS: @@ -168,10 +165,8 @@ struct obj *obj; res = W_TOOL; /* WORN_BLINDF */ else if (is_weptool(obj) || otyp == TIN_OPENER) res = W_WEP|W_SWAPWEP; -#ifdef STEED else if (otyp == SADDLE) res = W_SADDLE; -#endif break; case FOOD_CLASS: if (obj->otyp == MEAT_RING) res = W_RINGL|W_RINGR; @@ -381,10 +376,8 @@ boolean on, silently; break; } -#ifdef STEED if (!on && mon == u.usteed && obj->otyp == SADDLE) dismount_steed(DISMOUNT_FELL); -#endif /* if couldn't see it but now can, or vice versa, update display */ if (!silently && (unseen ^ !canseemon(mon))) @@ -441,11 +434,9 @@ boolean creation; return; m_dowear_type(mon, W_AMUL, creation, FALSE); -#ifdef TOURIST /* can't put on shirt if already wearing suit */ if (!cantweararm(mon->data) && !(mon->misc_worn_check & W_ARM)) m_dowear_type(mon, W_ARMU, creation, FALSE); -#endif /* treating small as a special case allows hobbits, gnomes, and kobolds to wear cloaks */ if (!cantweararm(mon->data) || mon->data->msize == MZ_SMALL) @@ -494,11 +485,9 @@ boolean racialexception; continue; best = obj; goto outer_break; /* no such thing as better amulets */ -#ifdef TOURIST case W_ARMU: if (!is_shirt(obj)) continue; break; -#endif case W_ARMC: if (!is_cloak(obj)) continue; break; @@ -545,11 +534,7 @@ outer_break: best->otyp == DUNCE_CAP) && !best->cursed); /* if wearing a cloak, account for the time spent removing and re-wearing it when putting on a suit or shirt */ - if ((flag == W_ARM -#ifdef TOURIST - || flag == W_ARMU -#endif - ) && (mon->misc_worn_check & W_ARMC)) + if ((flag == W_ARM || flag == W_ARMU) && (mon->misc_worn_check & W_ARMC)) m_delay += 2; /* when upgrading a piece of armor, account for time spent taking off current one */ @@ -744,7 +729,6 @@ boolean polyspot; m_useup(mon, otmp); } } -#ifdef TOURIST if ((otmp = which_armor(mon, W_ARMU)) != 0) { if (vis) pline("%s shirt rips to shreds!", s_suffix(Monnam(mon))); @@ -752,7 +736,6 @@ boolean polyspot; You_hear("a ripping sound."); m_useup(mon, otmp); } -#endif } else if (sliparm(mdat)) { if ((otmp = which_armor(mon, W_ARM)) != 0) { if (vis) @@ -775,7 +758,6 @@ boolean polyspot; if (polyspot) bypass_obj(otmp); m_lose_armor(mon, otmp); } -#ifdef TOURIST if ((otmp = which_armor(mon, W_ARMU)) != 0) { if (vis) { if (sliparm(mon->data)) @@ -788,7 +770,6 @@ boolean polyspot; if (polyspot) bypass_obj(otmp); m_lose_armor(mon, otmp); } -#endif } if (handless_or_tiny) { /* [caller needs to handle weapon checks] */ @@ -836,7 +817,6 @@ boolean polyspot; m_lose_armor(mon, otmp); } } -#ifdef STEED if (!can_saddle(mon)) { if ((otmp = which_armor(mon, W_SADDLE)) != 0) { if (polyspot) bypass_obj(otmp); @@ -860,7 +840,6 @@ boolean polyspot; } dismount_steed(DISMOUNT_FELL); } -#endif return; } diff --git a/src/write.c b/src/write.c index d5f61c67f..6b03ce205 100644 --- a/src/write.c +++ b/src/write.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 write.c $Date$ $Revision$ */ +/* NetHack 3.5 write.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 write.c $Date: 2010/12/28 19:54:41 $ $Revision: 1.9 $ */ /* NetHack may be freely redistributed. See license for details. */ #include "hack.h" diff --git a/src/zap.c b/src/zap.c index e265b898d..dfdf95d4c 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 zap.c $Date$ $Revision$ */ +/* NetHack 3.5 zap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 zap.c $Date: 2013/11/05 00:57:56 $ $Revision: 1.183 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -25,9 +26,7 @@ STATIC_DCL int FDECL(stone_to_flesh_obj, (struct obj *)); STATIC_DCL boolean FDECL(zap_updown, (struct obj *)); STATIC_DCL void FDECL(zhitu, (int,int,const char *,XCHAR_P,XCHAR_P)); STATIC_DCL void FDECL(revive_egg, (struct obj *)); -#ifdef STEED STATIC_DCL boolean FDECL(zap_steed, (struct obj *)); -#endif STATIC_DCL void FDECL(skiprange, (int,int *,int *)); STATIC_DCL int FDECL(zap_hit, (int,int)); @@ -299,7 +298,6 @@ struct obj *otmp; } else if (openfallingtrap(mtmp, TRUE, &learn_it)) { /* mtmp might now be on the migrating monsters list */ break; -#ifdef STEED } else if ((obj = which_armor(mtmp, W_SADDLE)) != 0) { char buf[BUFSZ]; @@ -315,7 +313,6 @@ struct obj *otmp; } obj_extract_self(obj); mdrop_obj(mtmp, obj, FALSE); -#endif /* STEED */ } break; case SPE_HEALING: @@ -439,11 +436,7 @@ struct monst *mtmp; mstatusline(mtmp); if (notonhead) return; /* don't show minvent for long worm tail */ -#ifndef GOLDOBJ - if (mtmp->minvent || mtmp->mgold) { -#else if (mtmp->minvent) { -#endif for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj) { otmp->dknown = 1; /* treat as "seen" */ if (Is_container(otmp) || otmp->otyp == STATUE) { @@ -591,9 +584,7 @@ coord *cc; /* most cancelled monsters return to normal, but some need to stay cancelled */ if (!dmgtype(mtmp2->data, AD_SEDU) -#ifdef SEDUCE && (!SYSOPT_SEDUCE || !dmgtype(mtmp2->data, AD_SSEX)) -#endif ) mtmp2->mcan = 0; mtmp2->mcansee = 1; /* set like in makemon */ mtmp2->mblinded = 0; @@ -988,10 +979,6 @@ register struct obj *obj; } unbless(obj); uncurse(obj); -#ifdef INVISIBLE_OBJECTS - /*[this will be insufficient if it ever reduces obj's shop value]*/ - if (obj->oinvis) obj->oinvis = 0; -#endif return; } @@ -1724,9 +1711,7 @@ struct obj *obj, *otmp; if (context.bypasses) return 0; else { -#ifdef DEBUG - pline("%s for a moment.", Tobjnam(obj, "pulsate")); -#endif + debugpline("%s for a moment.", Tobjnam(obj, "pulsate")); obj->bypass = 0; } } @@ -1844,10 +1829,6 @@ struct obj *obj, *otmp; (void) rloco(obj); break; case WAN_MAKE_INVISIBLE: -#ifdef INVISIBLE_OBJECTS - obj->oinvis = TRUE; - newsym(obj->ox,obj->oy); /* make object disappear */ -#endif break; case WAN_UNDEAD_TURNING: case SPE_TURN_UNDEAD: @@ -2285,10 +2266,8 @@ boolean ordinary; case WAN_LIGHT: /* (broken wand) */ /* assert( !ordinary ); */ damage = d(obj->spe, 25); -#ifdef TOURIST case EXPENSIVE_CAMERA: if (!damage) damage = 5; -#endif damage = lightdamage(obj, ordinary, damage); damage += rnd(25); if (flashburn((long)damage)) learn_it = TRUE; @@ -2432,7 +2411,6 @@ long duration; return FALSE; } -#ifdef STEED /* you've zapped a wand downwards while riding * Return TRUE if the steed was hit by the wand. * Return FALSE if the steed was not hit by the wand. @@ -2494,7 +2472,6 @@ struct obj *obj; /* wand or spell */ } return steedhit; } -#endif /* * cancel a monster (possibly the hero). inventory is cancelled only @@ -2771,13 +2748,10 @@ struct obj *obj; boolean disclose = FALSE, was_unkn = !objects[otyp].oc_name_known; exercise(A_WIS, TRUE); -#ifdef STEED if (u.usteed && (objects[otyp].oc_dir != NODIR) && !u.dx && !u.dy && (u.dz > 0) && zap_steed(obj)) { disclose = TRUE; - } else -#endif - if (objects[otyp].oc_dir == IMMEDIATE) { + } else if (objects[otyp].oc_dir == IMMEDIATE) { zapsetup(); /* reset obj_zapped */ if (u.uswallow) { (void) bhitm(u.ustuck, obj); @@ -3168,10 +3142,8 @@ struct obj **pobj; /* object tossed/used, set to NULL (is_pool(bhitpos.x, bhitpos.y) || is_lava(bhitpos.x, bhitpos.y))) break; -#ifdef SINKS if(IS_SINK(typ) && weapon != FLASHED_LIGHT) break; /* physical objects fall onto sink */ -#endif } /* limit range of ball so hero won't make an invalid move */ if (weapon == THROWN_WEAPON && range > 0 && @@ -3281,10 +3253,8 @@ int dx, dy; } tmp_at(bhitpos.x, bhitpos.y); delay_output(); -#ifdef SINKS if(IS_SINK(levl[bhitpos.x][bhitpos.y].typ)) break; /* boomerang falls on sink */ -#endif /* ct==0, initial position, we want next delta to be same; ct==5, opposite position, repeat delta undoes first one */ if (ct % 5 != 0) i += (counterclockwise ? -1 : 1); @@ -3383,10 +3353,8 @@ struct obj **ootmp; /* to return worn armor for caller to disintegrate */ tmp = MAGIC_COOKIE; if ((otmp2 = which_armor(mon, W_ARMC)) != 0) m_useup(mon, otmp2); -#ifdef TOURIST if ((otmp2 = which_armor(mon, W_ARMU)) != 0) m_useup(mon, otmp2); -#endif } type = -1; /* no saving throw wanted */ break; /* not ordinary damage */ @@ -3438,9 +3406,7 @@ struct obj **ootmp; /* to return worn armor for caller to disintegrate */ resist(mon, type < ZT_SPELL(0) ? WAND_CLASS : '\0', 0, NOTELL)) tmp /= 2; if (tmp < 0) tmp = 0; /* don't allow negative damage */ -#ifdef WIZ_PATCH_DEBUG - pline("zapped monster hp = %d (= %d - %d)", mon->mhp-tmp,mon->mhp,tmp); -#endif + debugpline("zapped monster hp = %d (= %d - %d)", mon->mhp-tmp,mon->mhp,tmp); mon->mhp -= tmp; return(tmp); } @@ -3514,9 +3480,7 @@ xchar sx, sy; /* no shield or suit, you're dead; wipe out cloak and/or shirt in case of life-saving or bones */ if (uarmc) (void) destroy_arm(uarmc); -#ifdef TOURIST if (uarmu) (void) destroy_arm(uarmu); -#endif } else if (nonliving(youmonst.data) || is_demon(youmonst.data)) { shieldeff(sx, sy); You("seem unaffected."); @@ -3679,9 +3643,6 @@ const char *fltxt; obfree(otmp, (struct obj *)0); } } -#ifndef GOLDOBJ - mon->mgold = 0L; -#endif #undef oresist_disintegration @@ -3768,9 +3729,7 @@ register int dx,dy; if (mon) { if (type == ZT_SPELL(ZT_FIRE)) break; if (type >= 0) mon->mstrategy &= ~STRAT_WAITMASK; -#ifdef STEED buzzmonst: -#endif if (zap_hit(find_mac(mon), spell_type)) { if (mon_reflects(mon, (char *)0)) { if(cansee(mon->mx,mon->my)) { @@ -3837,13 +3796,10 @@ register int dx,dy; } } else if (sx == u.ux && sy == u.uy && range >= 0) { nomul(0); -#ifdef STEED if (u.usteed && !rn2(3) && !mon_reflects(u.usteed, (char *)0)) { mon = u.usteed; goto buzzmonst; - } else -#endif - if (zap_hit((int) u.uac, 0)) { + } else if (zap_hit((int) u.uac, 0)) { range -= 2; pline("%s hits you!", The(fltxt)); if (Reflecting) { @@ -4185,10 +4141,8 @@ short exploding_wand_typ; if (see_it) pline("%s %s reveals a secret door.", yourzap ? "Your" : "The", zapverb); -#ifdef REINCARNATION else if (Is_rogue_level(&u.uz)) You_feel("a draft."); /* new open doorway */ -#endif } /* regular door absorbs remaining zap range, possibly gets destroyed */ diff --git a/sys/amiga/.gitattributes b/sys/amiga/.gitattributes new file mode 100644 index 000000000..7a28030a9 --- /dev/null +++ b/sys/amiga/.gitattributes @@ -0,0 +1 @@ +*.p filter=NHtext merge=NHsubst diff --git a/sys/amiga/amidos.c b/sys/amiga/amidos.c index 9444c2b95..fd6d329ad 100644 --- a/sys/amiga/amidos.c +++ b/sys/amiga/amidos.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amidos.c $Date$ $Revision$ */ +/* NetHack 3.5 amidos.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amidos.c $Date: 2009/05/06 10:48:29 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)amidos.c 3.5 2000/01/12 /* Copyright (c) Olaf Seibert, Nijmegen, The Netherlands, 1988,1990. */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991,1992,1993,1996. */ diff --git a/sys/amiga/amidos.p b/sys/amiga/amidos.p index 87e436221..238e7412c 100644 --- a/sys/amiga/amidos.p +++ b/sys/amiga/amidos.p @@ -1,4 +1,5 @@ -/* NetHack 3.5 amidos.p $Date$ $Revision$ */ +/* NetHack 3.5 amidos.p $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amidos.p $Date: 2009/05/06 10:48:29 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)amidos.p 3.5 1993/01/08 /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/amigst.c b/sys/amiga/amigst.c index b12230720..0a74acd9e 100644 --- a/sys/amiga/amigst.c +++ b/sys/amiga/amigst.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amigst.c $Date$ $Revision$ */ +/* NetHack 3.5 amigst.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amigst.c $Date: 2009/05/06 10:48:29 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)amigst.c 3.5 1993/01/08 /* Copyright (c) Gregg Wonderly, Naperville, IL, 1992, 1993 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/amimenu.c b/sys/amiga/amimenu.c index 4314798e7..083ca292f 100644 --- a/sys/amiga/amimenu.c +++ b/sys/amiga/amimenu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amimenu.c $Date$ $Revision$ */ +/* NetHack 3.5 amimenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amimenu.c $Date: 2009/05/06 10:48:29 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)amimenu.c 3.5 1996/02/04 */ /* Copyright (c) Olaf 'Rhialto' Seibert, 1989 */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993, 1996 */ diff --git a/sys/amiga/amirip.c b/sys/amiga/amirip.c index a7460258d..5b625ba6d 100644 --- a/sys/amiga/amirip.c +++ b/sys/amiga/amirip.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amirip.c $Date$ $Revision$ */ +/* NetHack 3.5 amirip.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amirip.c $Date: 2012/01/24 04:26:20 $ $Revision: 1.7 $ */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1991,1992,1993,1995,1996. */ /* NetHack may be freely redistributed. See license for details. */ @@ -182,12 +183,7 @@ time_t when; tomb_text(buf); /* Put $ on stone */ - Sprintf(buf, "%ld Au", -#ifndef GOLDOBJ - u.ugold); -#else - done_money); -#endif + Sprintf(buf, "%ld Au", done_money); buf[STONE_LINE_LEN] = 0; /* It could be a *lot* of gold :-) */ tomb_text(buf); diff --git a/sys/amiga/amisnd.c b/sys/amiga/amisnd.c index ed33e0331..0868332b2 100644 --- a/sys/amiga/amisnd.c +++ b/sys/amiga/amisnd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amisnd.c $Date$ $Revision$ */ +/* NetHack 3.5 amisnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amisnd.c $Date: 2009/05/06 10:48:30 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)amisnd.c 3.5 2000/01/12*/ /* Copyright (c) 1992, 1993, 1995 by Gregg Wonderly */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/amistack.c b/sys/amiga/amistack.c index 16a8a4b64..c83afd1e2 100644 --- a/sys/amiga/amistack.c +++ b/sys/amiga/amistack.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amistack.c $Date$ $Revision$ */ +/* NetHack 3.5 amistack.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amistack.c $Date: 2009/05/06 10:48:30 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)amistack.c 3.5 2000/05/03 */ /* Copyright (c) Janne Salmijärvi, Tampere, Finland, 2000 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/amitty.c b/sys/amiga/amitty.c index 74ab9a1c0..7e960aeff 100644 --- a/sys/amiga/amitty.c +++ b/sys/amiga/amitty.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amitty.c $Date$ $Revision$ */ +/* NetHack 3.5 amitty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amitty.c $Date: 2009/05/06 10:48:30 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)amitty.c 3.5 2000/01/12 /* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993,1996 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/amiwind.c b/sys/amiga/amiwind.c index 798afc9d6..0d45f5685 100644 --- a/sys/amiga/amiwind.c +++ b/sys/amiga/amiwind.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 amiwind.c $Date$ $Revision$ */ +/* NetHack 3.5 amiwind.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amiwind.c $Date: 2009/05/06 10:48:30 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)amiwind.c 3.5 2000/01/12 /* Copyright (c) Olaf Seibert (KosmoSoft), 1989, 1992 */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993,1996 */ diff --git a/sys/amiga/amiwind.p b/sys/amiga/amiwind.p index dd3127284..0eab48f94 100644 --- a/sys/amiga/amiwind.p +++ b/sys/amiga/amiwind.p @@ -1,4 +1,5 @@ -/* NetHack 3.5 amiwind.p $Date$ $Revision$ */ +/* NetHack 3.5 amiwind.p $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 amiwind.p $Date: 2009/05/06 10:48:31 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)amiwind.p 3.5 1993/01/08 */ /* Copyright (c) Gregg Wonderly, Naperville, IL, 1992, 1993 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/cvtsnd.c b/sys/amiga/cvtsnd.c index 7a9f8cda6..ee82c974a 100644 --- a/sys/amiga/cvtsnd.c +++ b/sys/amiga/cvtsnd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 cvtsnd.c $Date$ $Revision$ */ +/* NetHack 3.5 cvtsnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 cvtsnd.c $Date: 2009/05/06 10:48:31 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)cvtsnd.c 3.5 1995/09/10 */ /* Copyright (c) 1995, Andrew Church, Olney, Maryland */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/txt2iff.c b/sys/amiga/txt2iff.c index 3ebbd225b..bd20f3583 100644 --- a/sys/amiga/txt2iff.c +++ b/sys/amiga/txt2iff.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 txt2iff.c $Date$ $Revision$ */ +/* NetHack 3.5 txt2iff.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 txt2iff.c $Date: 2009/05/06 10:48:31 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)txt2iff.c 3.5 1995/07/28 */ /* Copyright (c) 1995 by Gregg Wonderly, Naperville, Illinois */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winami.c b/sys/amiga/winami.c index 10e439e49..c702af237 100644 --- a/sys/amiga/winami.c +++ b/sys/amiga/winami.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winami.c $Date$ $Revision$ */ +/* NetHack 3.5 winami.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winami.c $Date: 2012/01/10 17:47:21 $ $Revision: 1.13 $ */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993,1996. */ /* NetHack may be freely redistributed. See license for details. */ @@ -578,11 +579,7 @@ amii_player_selection() { flags.initrole = randrole(); #if 0 /* OBSOLETE */ -#ifdef TOURIST strcpy( pl_character, roles[ rnd( 11 ) ] ); -#else - strcpy( pl_character, roles[ rnd( 10 ) ] ); -#endif #endif aredone = 1; amii_clear_nhwindow( WIN_BASE ); @@ -607,11 +604,7 @@ amii_player_selection() case 1: /* Random Character */ flags.initrole = randrole(); #if 0 /* OBSOLETE */ -#ifdef TOURIST strcpy( pl_character, roles[ rnd( 11 ) ] ); -#else - strcpy( pl_character, roles[ rnd( 10 ) ] ); -#endif #endif amii_clear_nhwindow( WIN_BASE ); CloseShWindow( cwin ); diff --git a/sys/amiga/winami.p b/sys/amiga/winami.p index 27f3eb8bb..c694628ab 100644 --- a/sys/amiga/winami.p +++ b/sys/amiga/winami.p @@ -1,4 +1,5 @@ -/* NetHack 3.5 winami.p $Date$ $Revision$ */ +/* NetHack 3.5 winami.p $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winami.p $Date: 2009/05/06 10:48:33 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)winami.p 3.5 1993/01/08 */ /* Copyright (c) Gregg Wonderly, Naperville, IL, 1992, 1993 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winchar.c b/sys/amiga/winchar.c index 66ca41275..9c7e573b8 100644 --- a/sys/amiga/winchar.c +++ b/sys/amiga/winchar.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winchar.c $Date$ $Revision$ */ +/* NetHack 3.5 winchar.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winchar.c $Date: 2009/05/06 10:48:33 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)winchar.c 3.5 1993/07/22 */ /* Copyright (c) Olaf Seibert (KosmoSoft), 1989, 1992 */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993 */ diff --git a/sys/amiga/windefs.h b/sys/amiga/windefs.h index 14f46b561..67fb11564 100644 --- a/sys/amiga/windefs.h +++ b/sys/amiga/windefs.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 windefs.h $Date$ $Revision$ */ +/* NetHack 3.5 windefs.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 windefs.h $Date: 2009/05/06 10:48:34 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)windefs.h 3.5 1993/04/02 */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winext.h b/sys/amiga/winext.h index 109c11703..52ebe22d9 100644 --- a/sys/amiga/winext.h +++ b/sys/amiga/winext.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winext.h $Date$ $Revision$ */ +/* NetHack 3.5 winext.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winext.h $Date: 2009/05/06 10:48:35 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)winext.h 3.5 2000/01/12 */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winfuncs.c b/sys/amiga/winfuncs.c index d518fea22..cb9e3a504 100644 --- a/sys/amiga/winfuncs.c +++ b/sys/amiga/winfuncs.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winfuncs.c $Date$ $Revision$ */ +/* NetHack 3.5 winfuncs.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winfuncs.c $Date: 2012/01/10 17:47:21 $ $Revision: 1.8 $ */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993,1996. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2080,12 +2081,7 @@ if(u.uz.dlevel != x){ } } #endif - if( - WINVERS_AMIV -#ifdef REINCARNATION - && !Is_rogue_level(&u.uz) -#endif - ) + if(WINVERS_AMIV && !Is_rogue_level(&u.uz)) { amii_curs(win,x,y); amiga_print_glyph(win,0,glyph); @@ -2094,7 +2090,6 @@ if(u.uz.dlevel != x){ { /* map glyph to character and color */ (void) mapglyph(glyph, &och, &color, &special, x, y); - /* XXX next if should be ifdef REINCARNATION */ ch = (uchar)och; if( WINVERS_AMIV ){ /* implies Rogue level here */ amii_curs(win,x,y); @@ -2105,10 +2100,8 @@ if(u.uz.dlevel != x){ #ifdef TEXTCOLOR /* Turn off color if rogue level. */ -# ifdef REINCARNATION if (Is_rogue_level(&u.uz)) color = NO_COLOR; -# endif amiga_print_glyph(win,color,ch); #else diff --git a/sys/amiga/winkey.c b/sys/amiga/winkey.c index 400aee7a7..b14b5ac06 100644 --- a/sys/amiga/winkey.c +++ b/sys/amiga/winkey.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winkey.c $Date$ $Revision$ */ +/* NetHack 3.5 winkey.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winkey.c $Date: 2009/05/06 10:48:37 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)winkey.c 3.5 1993/04/02 */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winmenu.c b/sys/amiga/winmenu.c index da5067f5f..6aba0c290 100644 --- a/sys/amiga/winmenu.c +++ b/sys/amiga/winmenu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winmenu.c $Date$ $Revision$ */ +/* NetHack 3.5 winmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winmenu.c $Date: 2009/05/06 10:48:38 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)winmenu.c 3.5 1996/02/17 */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993,1996. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winproto.h b/sys/amiga/winproto.h index b3abb712c..06dd621c0 100644 --- a/sys/amiga/winproto.h +++ b/sys/amiga/winproto.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winproto.h $Date$ $Revision$ */ +/* NetHack 3.5 winproto.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winproto.h $Date: 2012/01/24 04:26:20 $ $Revision: 1.4 $ */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winreq.c b/sys/amiga/winreq.c index 6e196657d..e87764434 100644 --- a/sys/amiga/winreq.c +++ b/sys/amiga/winreq.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winreq.c $Date$ $Revision$ */ +/* NetHack 3.5 winreq.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winreq.c $Date: 2009/05/06 10:48:41 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)winreq.c 3.5 1993/04/02 */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/winstr.c b/sys/amiga/winstr.c index 9182f932b..f82c39aed 100644 --- a/sys/amiga/winstr.c +++ b/sys/amiga/winstr.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winstr.c $Date$ $Revision$ */ +/* NetHack 3.5 winstr.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winstr.c $Date: 2009/05/06 10:48:42 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)winstr.c 3.5 1993/04/02 */ /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1991,1992,1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/amiga/xpm2iff.c b/sys/amiga/xpm2iff.c index a5fc976b0..aebe6dcb0 100644 --- a/sys/amiga/xpm2iff.c +++ b/sys/amiga/xpm2iff.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 xpm2iff.c $Date$ $Revision$ */ +/* NetHack 3.5 xpm2iff.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 xpm2iff.c $Date: 2009/05/06 10:48:44 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)xpm2iff.c 3.5 1995/08/04 */ /* Copyright (c) 1995 by Gregg Wonderly, Naperville, Illinois */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/atari/tos.c b/sys/atari/tos.c index 7da8b63b0..9cfc98a39 100644 --- a/sys/atari/tos.c +++ b/sys/atari/tos.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 tos.c $Date$ $Revision$ */ +/* NetHack 3.5 tos.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tos.c $Date: 2009/05/06 10:48:51 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)tos.c 3.5 1990/14/08 /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/be/bemain.c b/sys/be/bemain.c index 1feaa4954..e053718cf 100644 --- a/sys/be/bemain.c +++ b/sys/be/bemain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 bemain.c $Date$ $Revision$ */ +/* NetHack 3.5 bemain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 bemain.c $Date: 2009/05/06 10:48:59 $ $Revision: 1.11 $ */ /* SCCS Id: @(#)bemain.c 3.5 2008/01/30 */ /* Copyright (c) Dean Luick, 1996. */ /* NetHack may be freely redistributed. See license for details. */ @@ -160,10 +161,8 @@ static void process_options(int argc, char **argv) argc--; switch (argv[0][1]) { case 'D': -#ifdef WIZARD wizard = TRUE, discover = FALSE; break; -#endif /* otherwise fall thru to discover */ case 'X': discover = TRUE, wizard = FALSE; @@ -252,12 +251,8 @@ void getlock(void) boolean authorize_wizard_mode() { -#ifdef WIZARD /* other ports validate user name or character name here */ return TRUE; -#else - return FALSE; -#endif } #ifndef __begui__ diff --git a/sys/mac/.gitattributes b/sys/mac/.gitattributes new file mode 100644 index 000000000..62b9832d7 --- /dev/null +++ b/sys/mac/.gitattributes @@ -0,0 +1 @@ +NHDeflts filter=NHtext merge=NHsubst diff --git a/sys/mac/NHDeflts b/sys/mac/NHDeflts index f87b746fd..256105813 100644 --- a/sys/mac/NHDeflts +++ b/sys/mac/NHDeflts @@ -1,4 +1,5 @@ -# NetHack 3.5 NHDeflts $Date$ $Revision$ +# NetHack 3.5 NHDeflts $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 NHDeflts $Date: 2009/05/06 10:49:09 $ $Revision: 1.4 $ # SCCS Id: @(#)NetHack Defaults 3.5 2002/03/15 # Copyright (c) 2002 by Dean Luick, Mark Modrall, and Kevin Hugo # NetHack may be freely redistributed. See license for details. diff --git a/sys/mac/dprintf.c b/sys/mac/dprintf.c index 6a51857d3..c334fd00c 100644 --- a/sys/mac/dprintf.c +++ b/sys/mac/dprintf.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dprintf.c $Date$ $Revision$ */ +/* NetHack 3.5 dprintf.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dprintf.c $Date: 2009/05/06 10:49:10 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)dprintf.c 3.5 1994/01/29 */ /* Copyright (c) Jon W{tte, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/maccurs.c b/sys/mac/maccurs.c index 108718c2e..8e9b9ed46 100644 --- a/sys/mac/maccurs.c +++ b/sys/mac/maccurs.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 maccurs.c $Date$ $Revision$ */ +/* NetHack 3.5 maccurs.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 maccurs.c $Date: 2009/05/06 10:49:10 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)maccurs.c 3.5 1993/01/24 */ /* Copyright (c) Jon W{tte, 1992. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/macerrs.c b/sys/mac/macerrs.c index 7b82733ba..d585f3b5e 100644 --- a/sys/mac/macerrs.c +++ b/sys/mac/macerrs.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macerrs.c $Date$ $Revision$ */ +/* NetHack 3.5 macerrs.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macerrs.c $Date: 2009/05/06 10:49:10 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)macerrs.c 3.5 1993/01/24 */ /* Copyright (c) Michael Hamel, 1991 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/macfile.c b/sys/mac/macfile.c index 347baa06f..e268ba810 100644 --- a/sys/mac/macfile.c +++ b/sys/mac/macfile.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macfile.c $Date$ $Revision$ */ +/* NetHack 3.5 macfile.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macfile.c $Date: 2009/05/06 10:49:10 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)macfile.c 3.5 1993/01/24 */ /* Copyright (c) Jon W{tte, Hao-Yang Wang, Jonathan Handler 1992. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/macmain.c b/sys/mac/macmain.c index fbd36eebe..de48cd2f6 100644 --- a/sys/mac/macmain.c +++ b/sys/mac/macmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macmain.c $Date$ $Revision$ */ +/* NetHack 3.5 macmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macmain.c $Date: 2009/05/06 10:49:11 $ $Revision: 1.15 $ */ /* SCCS Id: @(#)macmain.c 3.5 2008/01/30 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -283,12 +284,8 @@ finder_file_request(void) boolean authorize_wizard_mode() { -#ifdef WIZARD /* other ports validate user name or character name here */ return TRUE; -#else - return FALSE; -#endif } /*macmain.c*/ diff --git a/sys/mac/macmenu.c b/sys/mac/macmenu.c index 0b146aa1a..b12bec9c9 100644 --- a/sys/mac/macmenu.c +++ b/sys/mac/macmenu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macmenu.c $Date$ $Revision$ */ +/* NetHack 3.5 macmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macmenu.c $Date: 2009/05/06 10:49:13 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)macmenu.c 3.5 1999/11/24 */ /* Copyright (c) Macintosh NetHack Port Team, 1993. */ /* NetHack may be freely redistributed. See license for details. */ @@ -618,9 +619,7 @@ void mac_askname () fatal("\pCannot create mode menu"); AppendMenu(askmenu[RSRC_ASK_MODE], "\pNormal"); AppendMenu(askmenu[RSRC_ASK_MODE], "\pExplore"); -#ifdef WIZARD AppendMenu(askmenu[RSRC_ASK_MODE], "\pDebug"); -#endif InsertMenu(askmenu[RSRC_ASK_MODE], hierMenu); currmode = 0; @@ -707,9 +706,7 @@ void mac_askname () /* Adjust the mode popup menu */ CheckMenuItem(askmenu[RSRC_ASK_MODE], 1, currmode == 0); CheckMenuItem(askmenu[RSRC_ASK_MODE], 2, currmode == 1); -#ifdef WIZARD CheckMenuItem(askmenu[RSRC_ASK_MODE], 3, currmode == 2); -#endif /* Wait for an action on an item */ ModalDialog(filter, &item); @@ -772,22 +769,17 @@ void mac_askname () DisposeUserItemUPP(redraw); /* Process the mode */ -#ifdef WIZARD - wizard = -#endif - discover = 0; + wizard = discover = 0; switch (currmode) { case 0: /* Normal */ break; case 1: /* Explore */ discover = 1; break; -#ifdef WIZARD case 2: /* Debug */ wizard = 1; - strcpy(plname, WIZARD); + strcpy(plname, WIZARD_NAME); break; -#endif default: /* Quit */ ExitToShell(); } @@ -934,7 +926,6 @@ AdjustMenus(short dimMenubar) if (newMenubar != mbarRegular) ; /* we've already found its state */ -#ifdef WIZARD else if (wizard) { newMenubar = mbarSpecial; @@ -946,7 +937,6 @@ AdjustMenus(short dimMenubar) SetMenuItemText(MHND_FILE, menuFilePlayMode, "\pDebug"); } } -#endif else if (discover) { diff --git a/sys/mac/macsnd.c b/sys/mac/macsnd.c index 319048fda..bb3dfc65e 100644 --- a/sys/mac/macsnd.c +++ b/sys/mac/macsnd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macsnd.c $Date$ $Revision$ */ +/* NetHack 3.5 macsnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macsnd.c $Date: 2009/05/06 10:49:14 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)macsnd.c 3.5 1992/11/28 */ /* Copyright (c) 1992 by Jon Watte */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/mactopl.c b/sys/mac/mactopl.c index a4a92c5f6..938f4cfd4 100644 --- a/sys/mac/mactopl.c +++ b/sys/mac/mactopl.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mactopl.c $Date$ $Revision$ */ +/* NetHack 3.5 mactopl.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mactopl.c $Date: 2009/05/06 10:49:14 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mactopl.c 3.5 1991/07/23 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/mactty.c b/sys/mac/mactty.c index 8efda1b03..e6006983c 100644 --- a/sys/mac/mactty.c +++ b/sys/mac/mactty.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mactty.c $Date$ $Revision$ */ +/* NetHack 3.5 mactty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mactty.c $Date: 2009/05/06 10:49:14 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mactty.c 3.5 1993/03/01 */ /* Copyright (c) Jon W{tte 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/macunix.c b/sys/mac/macunix.c index fe5735629..18aae8b9a 100644 --- a/sys/mac/macunix.c +++ b/sys/mac/macunix.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macunix.c $Date$ $Revision$ */ +/* NetHack 3.5 macunix.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macunix.c $Date: 2009/05/06 10:49:16 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)macunix.c 3.5 1994/11/07 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/macwin.c b/sys/mac/macwin.c index aeed4356f..3c5e92fd9 100644 --- a/sys/mac/macwin.c +++ b/sys/mac/macwin.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 macwin.c $Date$ $Revision$ */ +/* NetHack 3.5 macwin.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 macwin.c $Date: 2012/01/10 17:47:23 $ $Revision: 1.22 $ */ /* Copyright (c) Jon W{tte, Hao-Yang Wang, Jonathan Handler 1992. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/mgetline.c b/sys/mac/mgetline.c index e5d396a46..1094bcaab 100644 --- a/sys/mac/mgetline.c +++ b/sys/mac/mgetline.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mgetline.c $Date$ $Revision$ */ +/* NetHack 3.5 mgetline.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mgetline.c $Date: 2009/05/06 10:49:18 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)getline.c 3.5 1990/22/02 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/mmodal.c b/sys/mac/mmodal.c index 5faabd337..c11a79ff8 100644 --- a/sys/mac/mmodal.c +++ b/sys/mac/mmodal.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mmodal.c $Date$ $Revision$ */ +/* NetHack 3.5 mmodal.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mmodal.c $Date: 2009/05/06 10:49:18 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)mmodal.c 3.5 1993/01/24 */ /* Copyright (c) Jon W{tte, Hao-Yang Wang, Jonathan Handler 1992. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/mrecover.c b/sys/mac/mrecover.c index 03ef8b763..e8f8793a9 100644 --- a/sys/mac/mrecover.c +++ b/sys/mac/mrecover.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mrecover.c $Date$ $Revision$ */ +/* NetHack 3.5 mrecover.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mrecover.c $Date: 2009/05/06 10:49:19 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mrecover.c 3.5 1996/07/24 */ /* Copyright (c) David Hairston, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/mac/mttymain.c b/sys/mac/mttymain.c index d4b1f2d37..258d93b7c 100644 --- a/sys/mac/mttymain.c +++ b/sys/mac/mttymain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mttymain.c $Date$ $Revision$ */ +/* NetHack 3.5 mttymain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mttymain.c $Date: 2009/05/06 10:49:20 $ $Revision: 1.8 $ */ /* SCCS Id: @(#)mttymain.c 3.5 1993/02/26 */ /* Copyright (c) Jon W{tte, 1993 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/.gitattributes b/sys/msdos/.gitattributes new file mode 100644 index 000000000..baef52e46 --- /dev/null +++ b/sys/msdos/.gitattributes @@ -0,0 +1,4 @@ +*.BC filter=NHtext merge=NHsubst +*.bat filter=NHtext merge=NHsubst +Makefile.* filter=NHtext merge=NHsubst +Install.* filter=NHtext merge=NHsubst diff --git a/sys/msdos/Install.dos b/sys/msdos/Install.dos index cea810ac0..018884bb7 100644 --- a/sys/msdos/Install.dos +++ b/sys/msdos/Install.dos @@ -7,7 +7,8 @@ NetHack 3.5 on a DOS system ====================================================== (or, How to make PC NetHack 3.5) - Last revision: $Date$ + Last revision: $NHDT-Date$ + Last revision: $Date: 2005/01/02 17:16:53 $ Credit for a runnable full PC NetHack 3.5 goes to the PC Development team of Paul Winner, Kevin Smolkowski, Michael Allison, Yitzhak Sapir, Bill Dyer, diff --git a/sys/msdos/Makefile.BC b/sys/msdos/Makefile.BC index 48b412ae4..f64b99305 100644 --- a/sys/msdos/Makefile.BC +++ b/sys/msdos/Makefile.BC @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.BC $Date$ $Revision$ +# NetHack 3.5 Makefile.BC $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.BC $Date: 2012/01/10 17:47:26 $ $Revision: 1.14 $ # Copyright (c) Yitzhak Sapir, 1999-2006. # NetHack may be freely distributed. See license for details. # diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC index 3f4039d8e..d2e64da95 100644 --- a/sys/msdos/Makefile.GCC +++ b/sys/msdos/Makefile.GCC @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.GCC $Date$ $Revision$ +# NetHack 3.5 Makefile.GCC $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.GCC $Date: 2012/01/10 17:47:26 $ $Revision: 1.25 $ # Copyright (c) NetHack PC Development Team 1996-2006. # PC NetHack 3.5 Makefile for djgpp V2 # diff --git a/sys/msdos/Makefile.MSC b/sys/msdos/Makefile.MSC index c5c4926c4..47e474ee2 100644 --- a/sys/msdos/Makefile.MSC +++ b/sys/msdos/Makefile.MSC @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.MSC $Date$ $Revision$ +# NetHack 3.5 Makefile.MSC $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.MSC $Date: 2012/01/22 06:27:07 $ $Revision: 1.18 $ # Copyright (c) NetHack PC Development Team 1997 - 2012. # PC NetHack 3.4x Makefile for MSC V1.52c (16 bit compiler) # diff --git a/sys/msdos/msdos.c b/sys/msdos/msdos.c index 3b194617c..ce713bb9d 100644 --- a/sys/msdos/msdos.c +++ b/sys/msdos/msdos.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 msdos.c $Date$ $Revision$ */ +/* NetHack 3.5 msdos.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 msdos.c $Date: 2012/01/22 06:27:07 $ $Revision: 1.7 $ */ /* Copyright (c) NetHack PC Development Team 1990 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/ovlinit.c b/sys/msdos/ovlinit.c index e3a149fbb..869b7e325 100644 --- a/sys/msdos/ovlinit.c +++ b/sys/msdos/ovlinit.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 ovlinit.c $Date$ $Revision$ */ +/* NetHack 3.5 ovlinit.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 ovlinit.c $Date: 2009/05/06 10:49:38 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)ovlinit.c 3.5 1994/03/20 */ /* Copyright (c) NetHack PC Development Team 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/pckeys.c b/sys/msdos/pckeys.c index 6bd95712d..6551f7df5 100644 --- a/sys/msdos/pckeys.c +++ b/sys/msdos/pckeys.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pckeys.c $Date$ $Revision$ */ +/* NetHack 3.5 pckeys.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pckeys.c $Date: 2009/05/06 10:49:39 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)pckeys.c 3.5 1996/05/11 */ /* Copyright (c) NetHack PC Development Team 1996 */ /* NetHack may be freely redistributed. See license for details. */ @@ -55,24 +56,16 @@ unsigned char shift; vga_userpan(0); break; case 0x3E: /* F4 = toggle overview mode */ - if (iflags.tile_view && - !opening_dialog -#ifdef REINCARNATION - && !Is_rogue_level(&u.uz) -#endif - ) { + if (iflags.tile_view && !opening_dialog + && !Is_rogue_level(&u.uz)) { iflags.traditional_view = FALSE; vga_overview(iflags.over_view ? FALSE : TRUE); vga_refresh(); } break; case 0x3F: /* F5 = toggle traditional mode */ - if (iflags.tile_view && - !opening_dialog -#ifdef REINCARNATION - && !Is_rogue_level(&u.uz) -#endif - ) { + if (iflags.tile_view && !opening_dialog + && !Is_rogue_level(&u.uz)) { iflags.over_view = FALSE; vga_traditional(iflags.traditional_view ? FALSE : TRUE); vga_refresh(); diff --git a/sys/msdos/pctiles.c b/sys/msdos/pctiles.c index f79ca4a81..e60c26f7a 100644 --- a/sys/msdos/pctiles.c +++ b/sys/msdos/pctiles.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pctiles.c $Date$ $Revision$ */ +/* NetHack 3.5 pctiles.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pctiles.c $Date: 2009/05/06 10:49:39 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)pctiles.c 3.5 1995/07/31 */ /* Copyright (c) NetHack PC Development Team 1993, 1994 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/pctiles.h b/sys/msdos/pctiles.h index 9c442a8e8..1f88edd4f 100644 --- a/sys/msdos/pctiles.h +++ b/sys/msdos/pctiles.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 pctiles.h $Date$ $Revision$ */ +/* NetHack 3.5 pctiles.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pctiles.h $Date: 2009/05/06 10:49:40 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)pctiles.h 3.5 1994/04/04 */ /* Copyright (c) NetHack PC Development Team 1993, 1994 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/pcvideo.h b/sys/msdos/pcvideo.h index e08d04fdd..5c24bd7c5 100644 --- a/sys/msdos/pcvideo.h +++ b/sys/msdos/pcvideo.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 pcvideo.h $Date$ $Revision$ */ +/* NetHack 3.5 pcvideo.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pcvideo.h $Date: 2009/05/06 10:49:40 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)pcvideo.h 3.5 1994/06/07 */ /* Copyright (c) NetHack PC Development Team 1993, 1994 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/portio.h b/sys/msdos/portio.h index 280e45885..33e5a20b5 100644 --- a/sys/msdos/portio.h +++ b/sys/msdos/portio.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 portio.h $Date$ $Revision$ */ +/* NetHack 3.5 portio.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 portio.h $Date: 2009/05/06 10:49:41 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)portio.h 3.5 1995/08/05 */ /* Copyright (c) NetHack PC Development Team 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/schema1.BC b/sys/msdos/schema1.BC index e7aebf1d7..db07b0783 100644 --- a/sys/msdos/schema1.BC +++ b/sys/msdos/schema1.BC @@ -1,4 +1,5 @@ -/* NetHack 3.5 schema1.BC $Date$ $Revision$ */ +/* NetHack 3.5 schema1.BC $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 schema1.BC $Date: 2009/05/06 10:49:41 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)schema1.BC 3.5 2008/01/30 */ /* Copyright (c) Yitzhak Sapir, 1999 */ /* */ diff --git a/sys/msdos/schema2.BC b/sys/msdos/schema2.BC index 8a1246369..38a7546ea 100644 --- a/sys/msdos/schema2.BC +++ b/sys/msdos/schema2.BC @@ -1,4 +1,5 @@ -/* NetHack 3.5 schema2.BC $Date$ $Revision$ */ +/* NetHack 3.5 schema2.BC $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 schema2.BC $Date: 2009/05/06 10:49:42 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)schema2.BC 3.5 2008/01/30 */ /* Copyright (c) Yitzhak Sapir, 1999 */ /* */ diff --git a/sys/msdos/setup.bat b/sys/msdos/setup.bat index 3f53c20cf..03fd94d12 100755 --- a/sys/msdos/setup.bat +++ b/sys/msdos/setup.bat @@ -1,5 +1,6 @@ @echo off -REM NetHack 3.5 setup.bat $Date$ $Revision$ +REM NetHack 3.5 setup.bat $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +REM NetHack 3.5 setup.bat $Date: 2012/01/22 06:27:07 $ $Revision: 1.3 $ REM Copyright (c) NetHack PC Development Team 1990 - 2012 REM NetHack may be freely redistributed. See license for details. diff --git a/sys/msdos/sound.c b/sys/msdos/sound.c index 1f13e551e..ef8914869 100644 --- a/sys/msdos/sound.c +++ b/sys/msdos/sound.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 sound.c $Date$ $Revision$ */ +/* NetHack 3.5 sound.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 sound.c $Date: 2009/05/06 10:49:43 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)sound.c 3.5 1996/02/19 */ /* Copyright (c) NetHack PC Development Team 1993,1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/tile2bin.c b/sys/msdos/tile2bin.c index 44323c1ee..e54b83908 100644 --- a/sys/msdos/tile2bin.c +++ b/sys/msdos/tile2bin.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 tile2bin.c $Date$ $Revision$ */ +/* NetHack 3.5 tile2bin.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tile2bin.c $Date: 2009/05/06 10:49:47 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)tile2bin.c 3.5 1995/01/26 */ /* Copyright (c) NetHack PC Development Team 1993, 1994, 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/video.c b/sys/msdos/video.c index a9dd7416e..9b4bc1241 100644 --- a/sys/msdos/video.c +++ b/sys/msdos/video.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 video.c $Date$ $Revision$ */ +/* NetHack 3.5 video.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 video.c $Date: 2009/05/06 10:49:49 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)video.c 3.5 2001/04/07 */ /* Copyright (c) NetHack PC Development Team 1993, 1994, 2001 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/vidtxt.c b/sys/msdos/vidtxt.c index 49962257c..2710dc397 100644 --- a/sys/msdos/vidtxt.c +++ b/sys/msdos/vidtxt.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vidtxt.c $Date$ $Revision$ */ +/* NetHack 3.5 vidtxt.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vidtxt.c $Date: 2009/05/06 10:49:49 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)vidtxt.c 3.5 1994/04/04 */ /* Copyright (c) NetHack PC Development Team 1993 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/msdos/vidvga.c b/sys/msdos/vidvga.c index 057e6a2a2..0784cf007 100644 --- a/sys/msdos/vidvga.c +++ b/sys/msdos/vidvga.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vidvga.c $Date$ $Revision$ */ +/* NetHack 3.5 vidvga.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vidvga.c $Date: 2009/05/06 10:49:50 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)vidvga.c 3.5 2006/07/08 */ /* Copyright (c) NetHack PC Development Team 1995 */ /* NetHack may be freely redistributed. See license for details. */ @@ -1170,14 +1171,9 @@ vga_DrawCursor() unsigned char first,second; /* char on[2] = {0xFF,0xFF}; */ /* char off[2] = {0x00,0x00}; */ -#ifdef REINCARNATION boolean isrogue = Is_rogue_level(&u.uz); boolean singlebyte = (isrogue || iflags.over_view || iflags.traditional_view || !inmap); -#else - boolean singlebyte = (iflags.over_view - || iflags.traditional_view || !inmap); -#endif int curtyp; if (!cursor_type && inmap) return; /* CURSOR_INVIS - nothing to do */ @@ -1375,14 +1371,9 @@ vga_HideCursor() int i,pixx,pixy,x,y; char __far *tmp1; char __far *tmp2; -#ifdef REINCARNATION boolean isrogue = Is_rogue_level(&u.uz); boolean singlebyte = (isrogue || iflags.over_view || iflags.traditional_view || !inmap); -#else - boolean singlebyte = (iflags.over_view - || iflags.traditional_view || !inmap); -#endif int curtyp; if (inmap && !cursor_type) return; /* CURSOR_INVIS - nothing to do */ diff --git a/sys/os2/.gitattributes b/sys/os2/.gitattributes new file mode 100644 index 000000000..8cffb77ae --- /dev/null +++ b/sys/os2/.gitattributes @@ -0,0 +1 @@ +Makefile.* filter=NHtext merge=NHsubst diff --git a/sys/os2/Makefile.os2 b/sys/os2/Makefile.os2 index 0f60e2307..09ee9ca80 100644 --- a/sys/os2/Makefile.os2 +++ b/sys/os2/Makefile.os2 @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.os2 $Date$ $Revision$ +# NetHack 3.5 Makefile.os2 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.os2 $Date: 2012/01/10 17:47:28 $ $Revision: 1.16 $ # OS/2 NetHack 3.5 Makefile for OS/2 versions 1.x and 2.x # Copyright (C) 1990, 1991, 1992, 1993, 1996 Timo Hakulinen # diff --git a/sys/os2/os2.c b/sys/os2/os2.c index 45d6f6924..625b7168c 100644 --- a/sys/os2/os2.c +++ b/sys/os2/os2.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 os2.c $Date$ $Revision$ */ +/* NetHack 3.5 os2.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 os2.c $Date: 2009/05/06 10:50:12 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)os2.c 3.5 1996/02/29 */ /* Copyright (c) Timo Hakulinen, 1990, 1991, 1992, 1993, 1996. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/.gitattributes b/sys/share/.gitattributes new file mode 100644 index 000000000..8cffb77ae --- /dev/null +++ b/sys/share/.gitattributes @@ -0,0 +1 @@ +Makefile.* filter=NHtext merge=NHsubst diff --git a/sys/share/Makefile.lib b/sys/share/Makefile.lib index a94b37c88..86d72186b 100644 --- a/sys/share/Makefile.lib +++ b/sys/share/Makefile.lib @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.lib $Date$ $Revision$ +# NetHack 3.5 Makefile.lib $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.lib $Date: 2009/05/06 10:50:26 $ $Revision: 1.4 $ # SCCS Id: @(#)Makefile.lib 3.5 1990/22/02 # Nethack makefile for Fred fish termlib -- Norman Meluch # diff --git a/sys/share/NetHack.cnf b/sys/share/NetHack.cnf index 9b30b0b4d..29d8ce910 100644 --- a/sys/share/NetHack.cnf +++ b/sys/share/NetHack.cnf @@ -1,6 +1,9 @@ # NetHack Copyright (c) NetHack PC Development Team 1993 - 2006 # NetHack may be freely redistributed. See license for details. # +# $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# $Date: 2006/09/23 04:40:09 $ $Revision: 1.7 $ +# # A '#' at the beginning of a line means the rest of the line is a comment. # # Some options MUST be set in this file, other options can be toggled while diff --git a/sys/share/ioctl.c b/sys/share/ioctl.c index 09c181be0..ee86074ac 100644 --- a/sys/share/ioctl.c +++ b/sys/share/ioctl.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 ioctl.c $Date$ $Revision$ */ +/* NetHack 3.5 ioctl.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 ioctl.c $Date: 2011/06/16 15:10:14 $ $Revision: 1.8 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/nhlan.c b/sys/share/nhlan.c index d0e18c7e9..506a41455 100644 --- a/sys/share/nhlan.c +++ b/sys/share/nhlan.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 nhlan.c $Date$ $Revision$ */ +/* NetHack 3.5 nhlan.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 nhlan.c $Date: 2009/05/06 10:50:26 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)nhlan.c 3.5 1999/11/21 */ /* Copyright (c) Michael Allison, 1997 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/pcmain.c b/sys/share/pcmain.c index 6e9fc68ac..6635c56ad 100644 --- a/sys/share/pcmain.c +++ b/sys/share/pcmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pcmain.c $Date$ $Revision$ */ +/* NetHack 3.5 pcmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pcmain.c $Date: 2012/01/20 03:41:31 $ $Revision: 1.48 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -302,19 +303,15 @@ char *argv[]; process_options(argc, argv); #endif -#ifdef LOADSYMSETS -# if defined(MSDOS) || defined(WIN32) +#if defined(MSDOS) || defined(WIN32) /* Player didn't specify any symbol set so use IBM defaults */ if (!symset[PRIMARY].name) { load_symset("IBMGraphics_2", PRIMARY); } -# ifdef REINCARNATION if (!symset[ROGUESET].name) { load_symset("RogueEpyx", ROGUESET); } -# endif -# endif -#endif /*LOADSYMSETS*/ +#endif #ifdef MSDOS init_nhwindows(&argc,argv); @@ -537,20 +534,16 @@ char *argv[]; case 'I': case 'i': if (!strncmpi(argv[0]+1, "IBM", 3)) { -# ifdef LOADSYMSETS load_symset("IBMGraphics", PRIMARY); load_symset("RogueIBM", ROGUESET); switch_symbols(TRUE); -# endif } break; /* case 'D': */ case 'd': if (!strncmpi(argv[0]+1, "DEC", 3)) { -# ifdef LOADSYMSETS load_symset("DECGraphics", PRIMARY); switch_symbols(TRUE); -# endif } break; #endif @@ -703,21 +696,11 @@ port_help() # endif /* MSDOS || WIN32 */ #endif /* PORT_HELP */ -/* for KR1ED config, WIZARD is 0 or 1 and WIZARD_NAME is a string; - for usual config, WIZARD is the string; forcing WIZARD_NAME to match it - eliminates conditional testing for which one to use in string ops */ -#ifndef KR1ED -# undef WIZARD_NAME -# define WIZARD_NAME WIZARD -#endif - /* validate wizard mode if player has requested access to it */ boolean authorize_wizard_mode() { -#ifdef WIZARD if (!strcmp(plname, WIZARD_NAME)) return TRUE; -#endif return FALSE; } diff --git a/sys/share/pcsys.c b/sys/share/pcsys.c index 8ebcd4319..16d36bbb7 100644 --- a/sys/share/pcsys.c +++ b/sys/share/pcsys.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pcsys.c $Date$ $Revision$ */ +/* NetHack 3.5 pcsys.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pcsys.c $Date: 2012/01/22 06:33:47 $ $Revision: 1.18 $ */ /* SCCS Id: @(#)pcsys.c 3.5 2002/01/22 */ /* NetHack may be freely redistributed. See license for details. */ @@ -406,7 +407,7 @@ const char *str; #else msmsg("Hit %s.", str); #endif - while (Getchar() != '\n') ; + while (pgetchar() != '\n') ; return; } diff --git a/sys/share/pctty.c b/sys/share/pctty.c index d5364b5fe..85c364669 100644 --- a/sys/share/pctty.c +++ b/sys/share/pctty.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pctty.c $Date$ $Revision$ */ +/* NetHack 3.5 pctty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pctty.c $Date: 2009/05/06 10:50:30 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)pctty.c 3.5 1990/22/02 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/pcunix.c b/sys/share/pcunix.c index 824149733..24316aac2 100644 --- a/sys/share/pcunix.c +++ b/sys/share/pcunix.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 pcunix.c $Date$ $Revision$ */ +/* NetHack 3.5 pcunix.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 pcunix.c $Date: 2009/05/06 10:50:30 $ $Revision: 1.27 $ */ /* SCCS Id: @(#)pcunix.c 3.5 1994/11/07 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/random.c b/sys/share/random.c index 6905f48aa..ba1937bb4 100644 --- a/sys/share/random.c +++ b/sys/share/random.c @@ -32,6 +32,9 @@ * - remove useless variable `j' from srandom() * - cast result of pointer subtraction to long since ptrdiff_t could * be bigger than that and trigger warnings when assigning to long + * + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2007/12/23 00:59:25 $ $Revision: 1.2 $ */ #include "hack.h" diff --git a/sys/share/tclib.c b/sys/share/tclib.c index a22578367..b6aa91665 100644 --- a/sys/share/tclib.c +++ b/sys/share/tclib.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 tclib.c $Date$ $Revision$ */ +/* NetHack 3.5 tclib.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tclib.c $Date: 2009/05/06 10:50:31 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)tclib.c 3.5 1996/02/25 */ /* Copyright (c) Robert Patrick Rankin, 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/share/unixtty.c b/sys/share/unixtty.c index f691d5a6f..678ab565d 100644 --- a/sys/share/unixtty.c +++ b/sys/share/unixtty.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 unixtty.c $Date$ $Revision$ */ +/* NetHack 3.5 unixtty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 unixtty.c $Date: 2012/01/23 07:11:09 $ $Revision: 1.10 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -363,11 +364,9 @@ init_sco_cons() if (!strcmp(windowprocs.name, "tty") && sco_flag_console) { atexit(sco_mapon); sco_mapoff(); -# ifdef LOADSYMSETS load_symset("IBMGraphics", PRIMARY); load_symset("RogueIBM", ROGUESET); switch_symbols(TRUE); -# endif # ifdef TEXTCOLOR if (has_colors()) iflags.use_color = TRUE; diff --git a/sys/share/uudecode.c b/sys/share/uudecode.c index 8da6e714f..440bcaf14 100644 --- a/sys/share/uudecode.c +++ b/sys/share/uudecode.c @@ -41,6 +41,8 @@ * Modified 08 July 2006 to cast strlen() result to int to suppress a * warning on platforms where size_t > sizeof(int). * + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2006/07/09 16:42:21 $ $Revision: 1.4 $ */ #ifndef lint diff --git a/sys/unix/.gitattributes b/sys/unix/.gitattributes new file mode 100644 index 000000000..8cffb77ae --- /dev/null +++ b/sys/unix/.gitattributes @@ -0,0 +1 @@ +Makefile.* filter=NHtext merge=NHsubst diff --git a/sys/unix/Makefile.dat b/sys/unix/Makefile.dat index 609672540..ad9cb6e2d 100644 --- a/sys/unix/Makefile.dat +++ b/sys/unix/Makefile.dat @@ -1,5 +1,6 @@ # NetHack Makefile. -# NetHack 3.5 Makefile.dat $Date$ $Revision$ +# NetHack 3.5 Makefile.dat $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.dat $Date: 2012/01/10 17:47:30 $ $Revision: 1.11 $ # Root of source tree: NHSROOT=.. diff --git a/sys/unix/Makefile.doc b/sys/unix/Makefile.doc index 83f493004..606867b75 100644 --- a/sys/unix/Makefile.doc +++ b/sys/unix/Makefile.doc @@ -1,5 +1,6 @@ # NetHack Makefile. -# NetHack 3.5 Makefile.doc $Date$ $Revision$ +# NetHack 3.5 Makefile.doc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.doc $Date: 2010/05/01 23:10:22 $ $Revision: 1.11 $ # Root of source tree: NHSROOT=.. diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 11d9f86f0..b64a838c9 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -1,5 +1,6 @@ # NetHack Makefile. -# NetHack 3.5 Makefile.src $Date$ $Revision$ +# NetHack 3.5 Makefile.src $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.src $Date: 2012/01/20 03:41:33 $ $Revision: 1.37 $ # Root of source tree: NHSROOT=.. diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top index ca32f08c3..6d94d6908 100644 --- a/sys/unix/Makefile.top +++ b/sys/unix/Makefile.top @@ -1,5 +1,6 @@ # NetHack Makefile. -# NetHack 3.5 Makefile.top $Date$ $Revision$ +# NetHack 3.5 Makefile.top $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.top $Date: 2012/01/10 17:47:30 $ $Revision: 1.19 $ # Root of source tree: NHSROOT=. diff --git a/sys/unix/Makefile.utl b/sys/unix/Makefile.utl index def3b67f4..e1c677c2f 100644 --- a/sys/unix/Makefile.utl +++ b/sys/unix/Makefile.utl @@ -1,5 +1,6 @@ # Makefile for NetHack's utility programs. -# NetHack 3.5 Makefile.utl $Date$ $Revision$ +# NetHack 3.5 Makefile.utl $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.utl $Date: 2012/01/10 17:47:30 $ $Revision: 1.18 $ # Root of source tree: NHSROOT=.. diff --git a/sys/unix/README.linux b/sys/unix/README.linux index e214f423d..e79359392 100644 --- a/sys/unix/README.linux +++ b/sys/unix/README.linux @@ -1,5 +1,8 @@ NetHack 3.5.0 Linux Elf +$NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$Date: 2005/01/02 17:17:28 $ $Revision: 1.16 $ + This README provides the instructions for using the official Linux binary, system platform requirements, as well as steps used to create that binary. The same steps can be used from the source distribution to create a similar diff --git a/sys/unix/depend.awk b/sys/unix/depend.awk index 47d107325..f78e24484 100644 --- a/sys/unix/depend.awk +++ b/sys/unix/depend.awk @@ -1,5 +1,7 @@ # depend.awk -- awk script used to construct makefile dependencies # for nethack's source files (`make depend' support for Makefile.src). +# $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# $Date: 2005/12/15 03:42:52 $ $Revision: 1.3 $ # # usage: # cd src ; nawk -f depend.awk ../include/*.h list-of-.c/.cpp-files diff --git a/sys/unix/hints/.gitattributes b/sys/unix/hints/.gitattributes new file mode 100644 index 000000000..a079959f1 --- /dev/null +++ b/sys/unix/hints/.gitattributes @@ -0,0 +1 @@ +* filter=NHtext merge=NHsubst diff --git a/sys/unix/hints/linux b/sys/unix/hints/linux index 9ff45ff00..3ae677d00 100644 --- a/sys/unix/hints/linux +++ b/sys/unix/hints/linux @@ -1,5 +1,6 @@ # -# NetHack 3.5 linux $Date$ $Revision$ +# NetHack 3.5 linux $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 linux $Date: 2010/01/15 19:54:37 $ $Revision: 1.8 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/hints/linux-x11 b/sys/unix/hints/linux-x11 index 48d46f940..e0d98badd 100644 --- a/sys/unix/hints/linux-x11 +++ b/sys/unix/hints/linux-x11 @@ -1,5 +1,6 @@ # -# NetHack 3.5 linux-x11 $Date$ $Revision$ +# NetHack 3.5 linux-x11 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 linux-x11 $Date: 2009/12/23 20:02:29 $ $Revision: 1.5 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/hints/macosx b/sys/unix/hints/macosx index 0ef9c342c..8d1f9d327 100644 --- a/sys/unix/hints/macosx +++ b/sys/unix/hints/macosx @@ -1,5 +1,6 @@ # -# NetHack 3.5 macosx $Date$ $Revision$ +# NetHack 3.5 macosx $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 macosx $Date: 2009/12/23 20:02:29 $ $Revision: 1.9 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/hints/macosx.sh b/sys/unix/hints/macosx.sh index 3296963b2..a4091204a 100755 --- a/sys/unix/hints/macosx.sh +++ b/sys/unix/hints/macosx.sh @@ -1,5 +1,6 @@ #!/bin/sh -# NetHack 3.5 macosx.sh $Date$ $Revision$ +# NetHack 3.5 macosx.sh $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 macosx.sh $Date: 2011/10/17 01:29:17 $ $Revision: 1.5 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/hints/macosx10.5 b/sys/unix/hints/macosx10.5 index c426629db..7ab5c760d 100644 --- a/sys/unix/hints/macosx10.5 +++ b/sys/unix/hints/macosx10.5 @@ -1,5 +1,6 @@ # -# NetHack 3.5 macosx10.5 $Date$ $Revision$ +# NetHack 3.5 macosx10.5 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 macosx10.5 $Date: 2011/10/17 01:29:17 $ $Revision: 1.11 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/hints/macosx10.7 b/sys/unix/hints/macosx10.7 index 76f7b6862..fa3cc1e9c 100644 --- a/sys/unix/hints/macosx10.7 +++ b/sys/unix/hints/macosx10.7 @@ -1,5 +1,6 @@ # -# NetHack 3.5 macosx10.7 $Date$ $Revision$ +# NetHack 3.5 macosx10.7 $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 macosx10.7 $Date: 2012/01/18 22:32:24 $ $Revision: 1.4 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/hints/unix b/sys/unix/hints/unix index d6f230e44..bea73b58b 100644 --- a/sys/unix/hints/unix +++ b/sys/unix/hints/unix @@ -1,5 +1,6 @@ # -# NetHack 3.5 unix $Date$ $Revision$ +# NetHack 3.5 unix $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 unix $Date: 2009/12/23 20:02:29 $ $Revision: 1.5 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/mkmkfile.sh b/sys/unix/mkmkfile.sh index 9055cd465..179e0bc90 100755 --- a/sys/unix/mkmkfile.sh +++ b/sys/unix/mkmkfile.sh @@ -1,5 +1,6 @@ #!/bin/sh -# NetHack 3.5 mkmkfile.sh $Date$ $Revision$ +# NetHack 3.5 mkmkfile.sh $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 mkmkfile.sh $Date: 2011/12/27 00:34:52 $ $Revision: 1.5 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. diff --git a/sys/unix/nethack.sh b/sys/unix/nethack.sh index 00d2c409a..27278079b 100755 --- a/sys/unix/nethack.sh +++ b/sys/unix/nethack.sh @@ -1,5 +1,6 @@ #!/bin/sh -# NetHack 3.5 nethack.sh $Date$ $Revision$ +# NetHack 3.5 nethack.sh $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 nethack.sh $Date: 2009/05/06 10:50:54 $ $Revision: 1.9 $ # SCCS Id: @(#)nethack.sh 3.5 2007/12/12 HACKDIR=/usr/games/lib/nethackdir diff --git a/sys/unix/setup.sh b/sys/unix/setup.sh index 38f3e9d8d..2c1cbedca 100755 --- a/sys/unix/setup.sh +++ b/sys/unix/setup.sh @@ -1,5 +1,6 @@ #!/bin/sh -# NetHack 3.5 setup.sh $Date$ $Revision$ +# NetHack 3.5 setup.sh $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 setup.sh $Date: 2011/12/27 00:34:52 $ $Revision: 1.6 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007. # NetHack may be freely redistributed. See license for details. # diff --git a/sys/unix/sysconf b/sys/unix/sysconf index 99bcab3d8..74e7fb1ae 100644 --- a/sys/unix/sysconf +++ b/sys/unix/sysconf @@ -1,5 +1,6 @@ # -# NetHack 3.5 sysconf $Date$ $Revision$ +# NetHack 3.5 sysconf $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 sysconf $Date: 2012/01/27 20:15:31 $ $Revision: 1.6 $ # # Sample sysconf file. # The sysconf file is only used if NetHack is compiled with SYSCF defined. @@ -13,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=* + # Limit the number of simultaneous games (see also nethack.sh). MAXPLAYERS=10 diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index be3617170..c470dc6e0 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 unixmain.c $Date$ $Revision$ */ +/* NetHack 3.5 unixmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 unixmain.c $Date: 2012/01/27 20:15:31 $ $Revision: 1.42 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -223,13 +224,10 @@ char *argv[]; or holds a generic user name like "player" or "games" */ plnamesuffix(); -#ifdef WIZARD if (wizard) { /* use character name rather than lock letter for file names */ locknum = 0; - } else -#endif - { + } else { /* suppress interrupts while processing lock file */ (void) signal(SIGQUIT,SIG_IGN); (void) signal(SIGINT,SIG_IGN); @@ -359,20 +357,16 @@ char *argv[]; case 'I': case 'i': if (!strncmpi(argv[0]+1, "IBM", 3)) { -#ifdef LOADSYMSETS load_symset("IBMGraphics", PRIMARY); load_symset("RogueIBM", ROGUESET); switch_symbols(TRUE); -#endif } break; /* case 'D': */ case 'd': if (!strncmpi(argv[0]+1, "DEC", 3)) { -#ifdef LOADSYMSETS load_symset("DECGraphics", PRIMARY); switch_symbols(TRUE); -#endif } break; case 'p': /* profession (role) */ @@ -559,12 +553,10 @@ port_help() boolean authorize_wizard_mode() { -#ifdef WIZARD struct passwd *pw = get_unix_pw(); if (pw && sysopt.wizards && sysopt.wizards[0]) { if(check_user_string(sysopt.wizards)) return TRUE; } -#endif /* WIZARD */ wiz_error_flag = TRUE; /* not being allowed into wizard mode */ return FALSE; } @@ -573,16 +565,12 @@ static void wd_message() { if (wiz_error_flag) { -#ifdef WIZARD if (sysopt.wizards && sysopt.wizards[0]) { char *tmp = build_english_list(sysopt.wizards); pline("Only user%s %s may access debug (wizard) mode.", index(sysopt.wizards, ' ')?"s":"", tmp); free(tmp); } else -#else - pline("Debug mode is not available."); -#endif pline("Entering explore/discovery mode instead."); wizard = 0, discover = 1; /* (paranoia) */ } else if (discover) diff --git a/sys/unix/unixres.c b/sys/unix/unixres.c index 645e313ad..6d647103a 100644 --- a/sys/unix/unixres.c +++ b/sys/unix/unixres.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 unixres.c $Date$ $Revision$ */ +/* NetHack 3.5 unixres.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 unixres.c $Date: 2009/05/06 10:50:57 $ $Revision: 1.8 $ */ /* SCCS Id: @(#)unixres.c 3.5 2001/07/08 */ /* Copyright (c) Slash'EM development team, 2001. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/unix/unixunix.c b/sys/unix/unixunix.c index 978dd477a..202dd85de 100644 --- a/sys/unix/unixunix.c +++ b/sys/unix/unixunix.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 unixunix.c $Date$ $Revision$ */ +/* NetHack 3.5 unixunix.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 unixunix.c $Date: 2012/01/27 20:15:31 $ $Revision: 1.16 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -310,9 +311,7 @@ int wt; #endif #ifndef NO_SIGNAL (void) signal(SIGINT, (SIG_RET_TYPE) done1); -# ifdef WIZARD if(wizard) (void) signal(SIGQUIT,SIG_DFL); -# endif #endif if(wt) { raw_print(""); diff --git a/sys/vms/.gitattributes b/sys/vms/.gitattributes new file mode 100644 index 000000000..8cffb77ae --- /dev/null +++ b/sys/vms/.gitattributes @@ -0,0 +1 @@ +Makefile.* filter=NHtext merge=NHsubst diff --git a/sys/vms/Makefile.dat b/sys/vms/Makefile.dat index ec3af0aea..0a6bcf896 100644 --- a/sys/vms/Makefile.dat +++ b/sys/vms/Makefile.dat @@ -1,5 +1,6 @@ # NetHack Makefile (VMS) - data files: special levels and other data. -# NetHack 3.5 Makefile.dat $Date$ $Revision$ +# NetHack 3.5 Makefile.dat $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.dat $Date: 2011/05/23 03:27:10 $ $Revision: 1.5 $ # Copy this file to [.dat]Makefile.; no editing needed. diff --git a/sys/vms/Makefile.doc b/sys/vms/Makefile.doc index 7c7587a82..01e8158e4 100644 --- a/sys/vms/Makefile.doc +++ b/sys/vms/Makefile.doc @@ -1,5 +1,6 @@ # NetHack Makefile (VMS) - for the [Unix] documentation. -# NetHack 3.5 Makefile.doc $Date$ $Revision$ +# NetHack 3.5 Makefile.doc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.doc $Date: 2011/05/23 03:27:10 $ $Revision: 1.5 $ # Copy this file to [.doc]Makefile. and edit it if needed. diff --git a/sys/vms/Makefile.src b/sys/vms/Makefile.src index a50ee357b..38f3ec266 100644 --- a/sys/vms/Makefile.src +++ b/sys/vms/Makefile.src @@ -1,5 +1,6 @@ # NetHack Makefile (VMS) - for building nethack itself. -# NetHack 3.5 Makefile.src $Date$ $Revision$ +# NetHack 3.5 Makefile.src $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.src $Date: 2011/10/11 02:37:18 $ $Revision: 1.23 $ # Copy this file to [.src]Makefile. and then edit it as needed. # The default configuration is for building with DEC C (aka Compaq C). diff --git a/sys/vms/Makefile.top b/sys/vms/Makefile.top index 01e9de1d6..04451124c 100644 --- a/sys/vms/Makefile.top +++ b/sys/vms/Makefile.top @@ -1,5 +1,6 @@ # NetHack Makefile (VMS) - top level for making & installing everything. -# NetHack 3.5 Makefile.top $Date$ $Revision$ +# NetHack 3.5 Makefile.top $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.top $Date: 2011/05/23 03:27:10 $ $Revision: 1.6 $ # Copy this file to Makefile.; edit the appropriate values for # GAMEDIR ("playground" location) and GAMEOWNER (UIC or identifier diff --git a/sys/vms/Makefile.utl b/sys/vms/Makefile.utl index 82eae9f8c..b132dcf9a 100644 --- a/sys/vms/Makefile.utl +++ b/sys/vms/Makefile.utl @@ -1,5 +1,6 @@ # NetHack Makefile (VMS) - for utility programs. -# NetHack 3.5 Makefile.utl $Date$ $Revision$ +# NetHack 3.5 Makefile.utl $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.utl $Date: 2011/05/23 03:27:10 $ $Revision: 1.10 $ # Copy this file to [.util]Makefile. and then edit it as needed. # The default configuration is for building with DEC C (aka Compaq C). diff --git a/sys/vms/install.com b/sys/vms/install.com index aec87fe05..3cf0fc590 100755 --- a/sys/vms/install.com +++ b/sys/vms/install.com @@ -1,5 +1,8 @@ $ ! vms/install.com -- set up nethack 'playground' $ ! +$ ! $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$ ! $Date: 2006/09/23 04:45:56 $ $Revision: 1.4 $ +$ ! $ ! Use vmsbuild.com to create nethack.exe, makedefs, and lev_comp *first*. $ ! $ ! Edit this file to define gamedir & gameuic, or else invoke it with two diff --git a/sys/vms/lev_lex.h b/sys/vms/lev_lex.h index 0d26fed53..5dbde3521 100644 --- a/sys/vms/lev_lex.h +++ b/sys/vms/lev_lex.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 lev_lex.h $Date$ $Revision$ */ +/* NetHack 3.5 lev_lex.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lev_lex.h $Date: 2009/05/06 10:51:24 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)lev_lex.h 3.5 1999/08/08 */ /* "vms/lev_lex.h" copied into "util/stdio.h" for use in *_lex.c only! * This is an awful kludge to allow util/*_lex.c made by SunOS's `lex' diff --git a/sys/vms/nethack.com b/sys/vms/nethack.com index 164852f6c..93c76be11 100755 --- a/sys/vms/nethack.com +++ b/sys/vms/nethack.com @@ -1,6 +1,9 @@ $! NetHack.Com -- sample command procedure for invoking NetHack 9-JAN-1993 $ v = 'f$verify(0)' $! +$! $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$! $Date: 2002/01/05 21:06:00 $ $Revision: 1.1 $ +$! $! Possible command line arguments include $! "-uConan-B" !play a barbarian named Conan $! "-u" "Merlin-W" !play a wizard named Merlin (slight variant of above) diff --git a/sys/vms/oldcrtl.c b/sys/vms/oldcrtl.c index e7bad5663..bb167cde5 100644 --- a/sys/vms/oldcrtl.c +++ b/sys/vms/oldcrtl.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 oldcrtl.c $Date$ $Revision$ */ +/* NetHack 3.5 oldcrtl.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 oldcrtl.c $Date: 2009/05/06 10:51:24 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)oldcrtl.c 3.5 1995/06/01 */ /* Pat Rankin May'90 */ /* VMS NetHack support, not needed for vms 4.6,4.7,5.x,or later */ diff --git a/sys/vms/spec_lev.com b/sys/vms/spec_lev.com index 9076933c2..fc680b572 100755 --- a/sys/vms/spec_lev.com +++ b/sys/vms/spec_lev.com @@ -1,5 +1,8 @@ $ ! sys/vms/spec_lev.com -- preprocess nethack's special level compiler code $ ! +$ ! $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$ ! $Date: 2002/01/05 21:06:00 $ $Revision: 1.1 $ +$ ! $ ! This operation needs to be performed prior to executing vmsbuild.com. $ ! Process the scanning and parsing code for NetHack's special level $ ! and dungeon compilers. *.l and *.y are converted into *'.c and *.h. diff --git a/sys/vms/vmsbuild.com b/sys/vms/vmsbuild.com index 20b4f01f4..b754601a5 100755 --- a/sys/vms/vmsbuild.com +++ b/sys/vms/vmsbuild.com @@ -1,5 +1,7 @@ $ ! vms/vmsbuild.com -- compile and link NetHack 3.5.* [pr] $ version_number = "3.5.0" +$ ! $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$ ! $Date: 2011/05/23 03:27:10 $ $Revision: 1.8 $ $ ! $ ! usage: $ ! $ set default [.src] !or [-.-.src] if starting from [.sys.vms] diff --git a/sys/vms/vmsfiles.c b/sys/vms/vmsfiles.c index a714cce84..5eac49b5e 100644 --- a/sys/vms/vmsfiles.c +++ b/sys/vms/vmsfiles.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmsfiles.c $Date$ $Revision$ */ +/* NetHack 3.5 vmsfiles.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmsfiles.c $Date: 2009/05/06 10:51:25 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)vmsfiles.c 3.5 2007/10/27 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/vms/vmsmail.c b/sys/vms/vmsmail.c index 2b00ff511..d5358eb7f 100644 --- a/sys/vms/vmsmail.c +++ b/sys/vms/vmsmail.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmsmail.c $Date$ $Revision$ */ +/* NetHack 3.5 vmsmail.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmsmail.c $Date: 2009/05/06 10:51:25 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)vmsmail.c 3.5 2006/04/14 */ /* Copyright (c) Robert Patrick Rankin, 1991. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/vms/vmsmain.c b/sys/vms/vmsmain.c index 7992c806c..abeff040e 100644 --- a/sys/vms/vmsmain.c +++ b/sys/vms/vmsmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmsmain.c $Date$ $Revision$ */ +/* NetHack 3.5 vmsmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmsmain.c $Date: 2011/04/23 01:51:01 $ $Revision: 1.22 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ /* main.c - VMS NetHack */ @@ -135,13 +136,10 @@ char *argv[]; or holds a generic user name like "player" or "games" */ plnamesuffix(); -#ifdef WIZARD if (wizard) { /* use character name rather than lock letter for file names */ locknum = 0; - } else -#endif - { + } else { /* suppress interrupts while processing lock file */ (void) signal(SIGQUIT, SIG_IGN); (void) signal(SIGINT, SIG_IGN); @@ -268,20 +266,16 @@ char *argv[]; case 'I': case 'i': if (!strncmpi(argv[0]+1, "IBM", 3)) { -#ifdef LOADSYMSETS load_symset("IBMGraphics", PRIMARY); load_symset("RogueIBM", ROGUESET); switch_symbols(TRUE); -#endif } break; /* case 'D': */ case 'd': if (!strncmpi(argv[0]+1, "DEC", 3)) { -#ifdef LOADSYMSETS load_symset("DECGraphics", PRIMARY); switch_symbols(TRUE); -#endif } break; case 'p': /* profession (role) */ @@ -415,12 +409,10 @@ genericptr_t sigargs, mechargs; /* [0] is argc, [1..argc] are the real args */ || (condition >= SS$_ASTFLT && condition <= SS$_TBIT) || (condition >= SS$_ARTRES && condition <= SS$_INHCHME)) { program_state.done_hup = TRUE; /* pretend hangup has been attempted */ -# if defined(WIZARD) && !defined(BETA) +# ifndef BETA if (wizard) -# endif /*WIZARD && !BETA*/ -# if defined(WIZARD) || defined(BETA) +# endif /* !BETA */ abort(); /* enter the debugger */ -# endif /*WIZARD || BETA*/ } return SS$_RESIGNAL; } @@ -453,9 +445,7 @@ port_help() boolean authorize_wizard_mode() { -#ifdef WIZARD if (!strcmpi(nh_getenv("USER"), WIZARD_NAME)) return TRUE; -#endif wiz_error_flag = TRUE; /* not being allowed into wizard mode */ return FALSE; } @@ -464,12 +454,8 @@ static void wd_message() { if (wiz_error_flag) { -#ifdef WIZARD pline("Only user \"%s\" may access debug (wizard) mode.", WIZARD_NAME); -#else - pline("Debug mode is not available."); -#endif pline("Entering explore/discovery mode instead."); wizard = 0, discover = 1; /* (paranoia) */ } else if (discover) diff --git a/sys/vms/vmsmisc.c b/sys/vms/vmsmisc.c index b5446a0fb..b5b2cf4cd 100644 --- a/sys/vms/vmsmisc.c +++ b/sys/vms/vmsmisc.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmsmisc.c $Date$ $Revision$ */ +/* NetHack 3.5 vmsmisc.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmsmisc.c $Date: 2011/09/01 01:47:00 $ $Revision: 1.6 $ */ /* NetHack may be freely redistributed. See license for details. */ #include "config.h" diff --git a/sys/vms/vmstty.c b/sys/vms/vmstty.c index 29d72bae5..548e476b2 100644 --- a/sys/vms/vmstty.c +++ b/sys/vms/vmstty.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmstty.c $Date$ $Revision$ */ +/* NetHack 3.5 vmstty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmstty.c $Date: 2011/04/13 01:48:13 $ $Revision: 1.10 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ /* tty.c - (VMS) version */ diff --git a/sys/vms/vmsunix.c b/sys/vms/vmsunix.c index 364c96d66..90e2bd855 100644 --- a/sys/vms/vmsunix.c +++ b/sys/vms/vmsunix.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 vmsunix.c $Date$ $Revision$ */ +/* NetHack 3.5 vmsunix.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 vmsunix.c $Date: 2011/09/01 01:47:00 $ $Revision: 1.8 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -366,9 +367,7 @@ hack_resume(screen_manip) boolean screen_manip; { (void) signal(SIGINT, (SIG_RET_TYPE) done1); -# ifdef WIZARD if (wizard) (void) signal(SIGQUIT,SIG_DFL); -# endif if (screen_manip) resume_nhwindows(); /* setup terminal modes, redraw screen, &c */ } diff --git a/sys/wince/.gitattributes b/sys/wince/.gitattributes new file mode 100644 index 000000000..e034edc5e --- /dev/null +++ b/sys/wince/.gitattributes @@ -0,0 +1,3 @@ +*.ce filter=NHtext merge=NHsubst +*.mak filter=NHtext merge=NHsubst +*.bat filter=NHtext merge=NHsubst diff --git a/sys/wince/Install.ce b/sys/wince/Install.ce index 50fd50477..60c7ee081 100644 --- a/sys/wince/Install.ce +++ b/sys/wince/Install.ce @@ -4,7 +4,8 @@ NetHack may be freely redistributed. See license for details. Instructions for compiling and installing NetHack 3.5 on a Windows CE or PocketPC system ======================================================================== - Last revision: $Date$ + Last revision: $NHDT-Date$ + Last revision: $Date: 2005/01/02 20:55:41 $ Credit for the porting of NetHack to Windows CE goes to Alex Kompel who initially developed and contributed the port. diff --git a/sys/wince/bootstrp.mak b/sys/wince/bootstrp.mak index 9a04417df..4066b63d1 100644 --- a/sys/wince/bootstrp.mak +++ b/sys/wince/bootstrp.mak @@ -1,4 +1,5 @@ -# NetHack 3.5 bootstrp.mak $Date$ $Revision$ +# NetHack 3.5 bootstrp.mak $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 bootstrp.mak $Date: 2012/01/10 17:47:33 $ $Revision: 1.10 $ # Copyright (c) Michael Allison # # NetHack Windows CE bootstrap file for MS Visual C++ V6.x and diff --git a/sys/wince/celib.c b/sys/wince/celib.c index 4c0d0b487..a8e38ccc7 100644 --- a/sys/wince/celib.c +++ b/sys/wince/celib.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 celib.c $Date$ $Revision$ */ +/* NetHack 3.5 celib.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 celib.c $Date: 2009/10/22 02:59:30 $ $Revision: 1.6 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/cesetup.bat b/sys/wince/cesetup.bat index 9f7215434..28d3bf6ce 100755 --- a/sys/wince/cesetup.bat +++ b/sys/wince/cesetup.bat @@ -1,4 +1,5 @@ -@REM NetHack 3.5 cesetup.bat $Date$ $Revision$ */ +@REM NetHack 3.5 cesetup.bat $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +@REM NetHack 3.5 cesetup.bat $Date: 2009/10/22 02:59:30 $ $Revision: 1.9 $ */ @REM Copyright (c) Alex Kompel, 2002 @REM NetHack may be freely redistributed. See license for details. @REM Win32 nhsetup batch file, see Install.ce for details diff --git a/sys/wince/cesound.c b/sys/wince/cesound.c index 8071abc42..6df289f3d 100644 --- a/sys/wince/cesound.c +++ b/sys/wince/cesound.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 cesound.c $Date$ $Revision$ */ -/* SCCS Id: @(#)cesound.c 3.5 $Date$ */ +/* NetHack 3.5 cesound.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 cesound.c $Date: 2009/05/06 10:52:00 $ $Revision: 1.4 $ */ +/* SCCS Id: @(#)cesound.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)cesound.c 3.5 $Date: 2009/05/06 10:52:00 $ */ /* Copyright (c) NetHack PC Development Team 1993 */ /* NetHack may be freely redistributed. See license for details. */ /* */ diff --git a/sys/wince/mhaskyn.c b/sys/wince/mhaskyn.c index a46e0f0ad..fa4dd8629 100644 --- a/sys/wince/mhaskyn.c +++ b/sys/wince/mhaskyn.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhaskyn.c $Date$ $Revision$ */ +/* NetHack 3.5 mhaskyn.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhaskyn.c $Date: 2009/05/06 10:52:00 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhaskyn.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhaskyn.h b/sys/wince/mhaskyn.h index 0754723fb..e034486a8 100644 --- a/sys/wince/mhaskyn.h +++ b/sys/wince/mhaskyn.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhaskyn.h $Date$ $Revision$ */ +/* NetHack 3.5 mhaskyn.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhaskyn.h $Date: 2009/05/06 10:52:03 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhaskyn.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhcmd.c b/sys/wince/mhcmd.c index 8000db9ad..29d13be0b 100644 --- a/sys/wince/mhcmd.c +++ b/sys/wince/mhcmd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhcmd.c $Date$ $Revision$ */ +/* NetHack 3.5 mhcmd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhcmd.c $Date: 2009/10/22 02:59:30 $ $Revision: 1.8 $ */ /* NetHack may be freely redistributed. See license for details. */ #include "winMS.h" @@ -295,7 +296,6 @@ NHCmdPadCell cells_layout_lookup[NH_CMDPAD_CELLNUM] = { -1, "X", "X", 13, NH_CELL_LAYOUT_MENU, 1 , 0 } }; -#ifdef WIZARD /* wizard mode layout */ NHCmdPadCell cells_layout_wizard[NH_CMDPAD_CELLNUM] = { @@ -312,7 +312,6 @@ NHCmdPadCell cells_layout_wizard[NH_CMDPAD_CELLNUM] = { -1, "", "", -NH_CMDPAD_FONT_NORMAL, NH_CELL_REG, 1, (void*)-1 }, { -1, "X", "X", 13, NH_CELL_LAYOUT_MENU, 1 , 0 } }; -#endif #else /* !WIN_CE_SMARTPHONE */ @@ -556,13 +555,11 @@ void register_command_window_class() nhcmdlayout_init(plt, cells_layout_lookup); nhcmdset_add(nhcmdset_current, plt); -#ifdef WIZARD if( wizard ) { plt = nhcmdlayout_create("Wizard Mode", NH_CMDPAD_ROWS, NH_CMDPAD_COLS); nhcmdlayout_init(plt, cells_layout_wizard); nhcmdset_add(nhcmdset_current, plt); } -#endif #else /* ! WIN_CE_SMARTPHONE */ plt = nhcmdlayout_create("lowercase", NH_CMDPAD_ROWS, NH_CMDPAD_COLS); diff --git a/sys/wince/mhcolor.c b/sys/wince/mhcolor.c index a68056fb5..285861da5 100644 --- a/sys/wince/mhcolor.c +++ b/sys/wince/mhcolor.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhcolor.c $Date$ $Revision$ */ +/* NetHack 3.5 mhcolor.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhcolor.c $Date: 2009/05/06 10:52:03 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhcolor.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhcolor.h b/sys/wince/mhcolor.h index 392da954b..8ebb7dc50 100644 --- a/sys/wince/mhcolor.h +++ b/sys/wince/mhcolor.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhcolor.h $Date$ $Revision$ */ +/* NetHack 3.5 mhcolor.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhcolor.h $Date: 2009/05/06 10:52:04 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhcolor.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhdlg.c b/sys/wince/mhdlg.c index 81017832f..edaca4cc4 100644 --- a/sys/wince/mhdlg.c +++ b/sys/wince/mhdlg.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhdlg.c $Date$ $Revision$ */ +/* NetHack 3.5 mhdlg.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhdlg.c $Date: 2009/10/13 01:55:10 $ $Revision: 1.8 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhdlg.h b/sys/wince/mhdlg.h index 78540b1a5..40ed9154a 100644 --- a/sys/wince/mhdlg.h +++ b/sys/wince/mhdlg.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhdlg.h $Date$ $Revision$ */ +/* NetHack 3.5 mhdlg.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhdlg.h $Date: 2009/05/06 10:52:06 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhdlg.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhfont.c b/sys/wince/mhfont.c index 9d30c87da..4b8ec12f6 100644 --- a/sys/wince/mhfont.c +++ b/sys/wince/mhfont.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhfont.c $Date$ $Revision$ */ +/* NetHack 3.5 mhfont.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhfont.c $Date: 2009/05/06 10:52:08 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)mhfont.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhfont.h b/sys/wince/mhfont.h index 7b6aeb1cf..00928b5de 100644 --- a/sys/wince/mhfont.h +++ b/sys/wince/mhfont.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhfont.h $Date$ $Revision$ */ +/* NetHack 3.5 mhfont.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhfont.h $Date: 2009/05/06 10:52:08 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhfont.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhinput.c b/sys/wince/mhinput.c index 129d790df..29b765470 100644 --- a/sys/wince/mhinput.c +++ b/sys/wince/mhinput.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhinput.c $Date$ $Revision$ */ +/* NetHack 3.5 mhinput.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhinput.c $Date: 2009/05/06 10:52:10 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mhinput.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhinput.h b/sys/wince/mhinput.h index c2d73aa5c..dce815301 100644 --- a/sys/wince/mhinput.h +++ b/sys/wince/mhinput.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhinput.h $Date$ $Revision$ */ +/* NetHack 3.5 mhinput.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhinput.h $Date: 2009/05/06 10:52:10 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhinput.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhmain.c b/sys/wince/mhmain.c index 28a29c137..943ab111f 100644 --- a/sys/wince/mhmain.c +++ b/sys/wince/mhmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmain.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmain.c $Date: 2011/10/11 02:37:20 $ $Revision: 1.14 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ @@ -1052,9 +1053,7 @@ void mswin_select_map_mode(int mode) #endif /* override for Rogue level */ -#ifdef REINCARNATION if( Is_rogue_level(&u.uz) && !IS_MAP_ASCII(mode) ) return; -#endif /* set map mode menu mark */ if( IS_MAP_ASCII(mode) ) { diff --git a/sys/wince/mhmain.h b/sys/wince/mhmain.h index c8d79dbee..6bca6d674 100644 --- a/sys/wince/mhmain.h +++ b/sys/wince/mhmain.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmain.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmain.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmain.h $Date: 2009/05/06 10:52:13 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhmain.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhmap.c b/sys/wince/mhmap.c index 156a8f8b0..f2b611f9c 100644 --- a/sys/wince/mhmap.c +++ b/sys/wince/mhmap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmap.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmap.c $Date: 2009/10/13 01:55:11 $ $Revision: 1.10 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ @@ -568,12 +569,8 @@ void onPaint(HWND hWnd) paint_rt.right = min(data->xPos + (ps.rcPaint.right - data->map_orig.x)/data->xScrTile+1, COLNO); paint_rt.bottom = min(data->yPos + (ps.rcPaint.bottom - data->map_orig.y)/data->yScrTile+1, ROWNO); - if( data->bAsciiMode -#ifdef REINCARNATION - || Is_rogue_level(&u.uz) + if(data->bAsciiMode || Is_rogue_level(&u.uz)) { /* You enter a VERY primitive world! */ -#endif - ) { HGDIOBJ oldFont; oldFont = SelectObject(hDC, data->hMapFont); diff --git a/sys/wince/mhmap.h b/sys/wince/mhmap.h index e29aca51f..a418d0f64 100644 --- a/sys/wince/mhmap.h +++ b/sys/wince/mhmap.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmap.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmap.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmap.h $Date: 2009/10/13 01:55:12 $ $Revision: 1.6 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhmenu.h b/sys/wince/mhmenu.h index 15c4759ac..e1ec643f5 100644 --- a/sys/wince/mhmenu.h +++ b/sys/wince/mhmenu.h @@ -1,4 +1,8 @@ /* NetHack may be freely redistributed. See license for details. */ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2002/07/22 03:19:13 $ $Revision: 1.1 $ + */ #ifndef MSWINMenuWindow_h #define MSWINMenuWindow_h diff --git a/sys/wince/mhmsg.h b/sys/wince/mhmsg.h index 6e2629ab4..56f8841d8 100644 --- a/sys/wince/mhmsg.h +++ b/sys/wince/mhmsg.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmsg.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmsg.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmsg.h $Date: 2009/05/06 10:52:21 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhmsg.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhmsgwnd.c b/sys/wince/mhmsgwnd.c index ffe3fc10a..6d2804f61 100644 --- a/sys/wince/mhmsgwnd.c +++ b/sys/wince/mhmsgwnd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmsgwnd.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmsgwnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmsgwnd.c $Date: 2009/10/13 01:55:12 $ $Revision: 1.7 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhmsgwnd.h b/sys/wince/mhmsgwnd.h index 7638eaa2c..a0e4ee13c 100644 --- a/sys/wince/mhmsgwnd.h +++ b/sys/wince/mhmsgwnd.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmsgwnd.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmsgwnd.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmsgwnd.h $Date: 2009/05/06 10:52:26 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhmsgwnd.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhrip.c b/sys/wince/mhrip.c index 5de8f0957..8b6957569 100644 --- a/sys/wince/mhrip.c +++ b/sys/wince/mhrip.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhrip.c $Date$ $Revision$ */ +/* NetHack 3.5 mhrip.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhrip.c $Date: 2009/05/06 10:52:26 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mhrip.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhrip.h b/sys/wince/mhrip.h index bd4b74eee..f5a4d7d44 100644 --- a/sys/wince/mhrip.h +++ b/sys/wince/mhrip.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhrip.h $Date$ $Revision$ */ +/* NetHack 3.5 mhrip.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhrip.h $Date: 2009/05/06 10:52:28 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhrip.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhstatus.c b/sys/wince/mhstatus.c index 786d2a8c2..397f2dcb8 100644 --- a/sys/wince/mhstatus.c +++ b/sys/wince/mhstatus.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhstatus.c $Date$ $Revision$ */ +/* NetHack 3.5 mhstatus.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.8 $ */ +/* NetHack 3.5 mhstatus.c $Date: 2009/05/06 10:52:28 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)mhstatus.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ @@ -232,19 +233,13 @@ void FormatStatusString(char* text, int format) (void) describe_level(nb=eos(nb)); Sprintf(nb = eos(nb), "%c:%-2ld HP:%d(%d) Pw:%d(%d) AC:%-2d", showsyms[COIN_CLASS + SYM_OFF_O], -#ifndef GOLDOBJ - u.ugold, -#else money_cnt(invent), -#endif hp, hpmax, u.uen, u.uenmax, u.uac); if (Upolyd) Sprintf(nb = eos(nb), " HD:%d", mons[u.umonnum].mlevel); -#ifdef EXP_ON_BOTL else if(flags.showexp) Sprintf(nb = eos(nb), " Xp:%u/%-1ld", u.ulevel,u.uexp); -#endif else Sprintf(nb = eos(nb), " Exp:%u", u.ulevel); if( format==NHSTAT_LINES_4 ) strcat(text, "\r\n"); diff --git a/sys/wince/mhstatus.h b/sys/wince/mhstatus.h index 18df7a9f2..fcd186162 100644 --- a/sys/wince/mhstatus.h +++ b/sys/wince/mhstatus.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhstatus.h $Date$ $Revision$ */ +/* NetHack 3.5 mhstatus.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhstatus.h $Date: 2009/05/06 10:52:29 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhstatus.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhtext.c b/sys/wince/mhtext.c index 01581df62..3b61dab66 100644 --- a/sys/wince/mhtext.c +++ b/sys/wince/mhtext.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhtext.c $Date$ $Revision$ */ +/* NetHack 3.5 mhtext.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhtext.c $Date: 2009/10/22 02:59:34 $ $Revision: 1.8 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhtext.h b/sys/wince/mhtext.h index ed12ec815..fdbae63f1 100644 --- a/sys/wince/mhtext.h +++ b/sys/wince/mhtext.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhtext.h $Date$ $Revision$ */ +/* NetHack 3.5 mhtext.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhtext.h $Date: 2009/05/06 10:52:32 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)mhtext.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhtxtbuf.c b/sys/wince/mhtxtbuf.c index 5523d0f02..1be9af440 100644 --- a/sys/wince/mhtxtbuf.c +++ b/sys/wince/mhtxtbuf.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhtxtbuf.c $Date$ $Revision$ */ +/* NetHack 3.5 mhtxtbuf.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhtxtbuf.c $Date: 2009/10/13 01:55:12 $ $Revision: 1.6 $ */ /* Copyright (C) 2003 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mhtxtbuf.h b/sys/wince/mhtxtbuf.h index fb38affb8..a61265796 100644 --- a/sys/wince/mhtxtbuf.h +++ b/sys/wince/mhtxtbuf.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhtxtbuf.h $Date$ $Revision$ */ +/* NetHack 3.5 mhtxtbuf.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhtxtbuf.h $Date: 2009/10/13 01:55:12 $ $Revision: 1.5 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/mswproc.c b/sys/wince/mswproc.c index b069d1284..84c2b092c 100644 --- a/sys/wince/mswproc.c +++ b/sys/wince/mswproc.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mswproc.c $Date$ $Revision$ */ +/* NetHack 3.5 mswproc.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mswproc.c $Date: 2012/01/24 04:26:22 $ $Revision: 1.19 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ @@ -792,14 +793,12 @@ void mswin_clear_nhwindow(winid wid) (wid < MAXWINDOWS) && (GetNHApp()->windowlist[wid].win != NULL)) { -#ifdef REINCARNATION if( GetNHApp()->windowlist[wid].type == NHW_MAP ) { if( Is_rogue_level(&u.uz) ) mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), ROGUE_LEVEL_MAP_MODE); else mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), iflags.wc_map_mode); } -#endif SendMessage( GetNHApp()->windowlist[wid].win, diff --git a/sys/wince/winMS.h b/sys/wince/winMS.h index c8df31219..31856e71f 100644 --- a/sys/wince/winMS.h +++ b/sys/wince/winMS.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winMS.h $Date$ $Revision$ */ +/* NetHack 3.5 winMS.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winMS.h $Date: 2012/01/24 04:26:22 $ $Revision: 1.9 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/wince/winhack.c b/sys/wince/winhack.c index 17ecf17eb..25a0a80cd 100644 --- a/sys/wince/winhack.c +++ b/sys/wince/winhack.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winhack.c $Date$ $Revision$ */ +/* NetHack 3.5 winhack.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winhack.c $Date: 2009/10/22 02:59:35 $ $Revision: 1.11 $ */ /* Copyright (C) 2001 by Alex Kompel */ // winhack.cpp : Defines the entry point for the application. // @@ -339,10 +340,8 @@ register char *s; void win32_abort() { -#ifdef WIZARD if (wizard) DebugBreak(); -#endif abort(); } diff --git a/sys/wince/winmain.c b/sys/wince/winmain.c index 0bb3d67b9..1d1a29a4b 100644 --- a/sys/wince/winmain.c +++ b/sys/wince/winmain.c @@ -1,4 +1,7 @@ // winmain.cpp : Defines the entry point for the application. +// +// $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +// $Date: 2002/12/18 03:51:34 $ $Revision: 1.2 $ #include "winMS.h" #include diff --git a/sys/winnt/.gitattributes b/sys/winnt/.gitattributes new file mode 100644 index 000000000..2a38b029c --- /dev/null +++ b/sys/winnt/.gitattributes @@ -0,0 +1,4 @@ +Install.nt filter=NHtext merge=NHsubst +Makefile.* filter=NHtext merge=NHsubst +*.rc filter=NHtext merge=NHsubst +*.bat filter=NHtext merge=NHsubst diff --git a/sys/winnt/Install.nt b/sys/winnt/Install.nt index cc7af7962..b4beb8f87 100644 --- a/sys/winnt/Install.nt +++ b/sys/winnt/Install.nt @@ -5,7 +5,8 @@ NetHack 3.5 on a Windows system (Windows XP and Windows 2003 or later only) ============================================================== - Last revision: $Date$ + Last revision: $NHDT-Date$ + Last revision: $Date: 2012/01/15 17:43:54 $ Credit for the porting of NetHack to the Win32 Console Subsystem goes to the NT Porting Team started by Michael Allison. diff --git a/sys/winnt/Makefile.bcc b/sys/winnt/Makefile.bcc index 358feb966..018baecb8 100644 --- a/sys/winnt/Makefile.bcc +++ b/sys/winnt/Makefile.bcc @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.bcc $Date$ $Revision$ +# NetHack 3.5 Makefile.bcc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.bcc $Date: 2011/10/11 02:37:22 $ $Revision: 1.46 $ # Copyright (c) NetHack PC Development Team 1993-2010 # # diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index a6e618386..eb436fbf2 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.gcc $Date$ $Revision$ +# NetHack 3.5 Makefile.gcc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.gcc $Date: 2011/10/11 02:37:22 $ $Revision: 1.38 $ # Copyright (c) NetHack PC Development Team 1993-2010 # # NetHack 3.5.x Makefile for MinGW diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index c4d013c0a..4d2b4c066 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -1,4 +1,5 @@ -# NetHack 3.5 Makefile.msc $Date$ $Revision$ +# NetHack 3.5 Makefile.msc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 Makefile.msc $Date: 2012/04/14 00:38:09 $ $Revision: 1.54 $ # Copyright (c) NetHack PC Development Team 1993-2012 # # NetHack 3.5.x Makefile for MS Visual Studio Visual C++ compiler diff --git a/sys/winnt/console.rc b/sys/winnt/console.rc index 1f3824561..e76d9cdd3 100644 --- a/sys/winnt/console.rc +++ b/sys/winnt/console.rc @@ -1,5 +1,7 @@ -/* NetHack 3.5 console.rc $Date$ $Revision$ */ -/* SCCS Id: @(#)console.rc 3.5 $Date$ */ +/* NetHack 3.5 console.rc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 console.rc $Date: 2009/05/06 10:53:27 $ $Revision: 1.7 $ */ +/* SCCS Id: @(#)console.rc 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)console.rc 3.5 $Date: 2009/05/06 10:53:27 $ */ /* Copyright (c) Yitzhak Sapir, 2002. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/winnt/defaults.nh b/sys/winnt/defaults.nh index 425edbf69..9de67ee85 100644 --- a/sys/winnt/defaults.nh +++ b/sys/winnt/defaults.nh @@ -6,6 +6,9 @@ # # To change the configuration, comment out the unwanted lines, and # uncomment the configuration you want. +# +# $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# $Date: 2006/09/23 04:40:15 $ $Revision: 1.16 $ # *** OPTIONS *** # diff --git a/sys/winnt/nh340key.c b/sys/winnt/nh340key.c index e42b9b8ae..1506bbfd7 100644 --- a/sys/winnt/nh340key.c +++ b/sys/winnt/nh340key.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 nh340key.c $Date$ $Revision$ */ -/* SCCS Id: @(#)nh340key.c 3.5 $Date$ */ +/* NetHack 3.5 nh340key.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 nh340key.c $Date: 2009/05/06 10:53:29 $ $Revision: 1.7 $ */ +/* SCCS Id: @(#)nh340key.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)nh340key.c 3.5 $Date: 2009/05/06 10:53:29 $ */ /* Copyright (c) NetHack PC Development Team 2003 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/winnt/nhdefkey.c b/sys/winnt/nhdefkey.c index caae7b09c..3f40c0c38 100644 --- a/sys/winnt/nhdefkey.c +++ b/sys/winnt/nhdefkey.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 nhdefkey.c $Date$ $Revision$ */ -/* SCCS Id: @(#)nhdefkey.c 3.5 $Date$ */ +/* NetHack 3.5 nhdefkey.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 nhdefkey.c $Date: 2009/05/06 10:53:29 $ $Revision: 1.10 $ */ +/* SCCS Id: @(#)nhdefkey.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)nhdefkey.c 3.5 $Date: 2009/05/06 10:53:29 $ */ /* Copyright (c) NetHack PC Development Team 2003 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/winnt/nhraykey.c b/sys/winnt/nhraykey.c index 73a4ed0ec..9c5d2b7a3 100644 --- a/sys/winnt/nhraykey.c +++ b/sys/winnt/nhraykey.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 nhraykey.c $Date$ $Revision$ */ -/* SCCS Id: @(#)nhraykey.c 3.5 $Date$ */ +/* NetHack 3.5 nhraykey.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 nhraykey.c $Date: 2009/05/06 10:53:31 $ $Revision: 1.8 $ */ +/* SCCS Id: @(#)nhraykey.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)nhraykey.c 3.5 $Date: 2009/05/06 10:53:31 $ */ /* Copyright (c) NetHack PC Development Team 2003 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/winnt/nhsetup.bat b/sys/winnt/nhsetup.bat index 066390560..42aee4708 100755 --- a/sys/winnt/nhsetup.bat +++ b/sys/winnt/nhsetup.bat @@ -1,4 +1,5 @@ -@REM NetHack 3.5 nhsetup.bat $Date$ $Revision$ */ +@REM NetHack 3.5 nhsetup.bat $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +@REM NetHack 3.5 nhsetup.bat $Date: 2010/09/05 14:22:16 $ $Revision: 1.21 $ */ @REM Copyright (c) NetHack PC Development Team 1993-2010 @REM NetHack may be freely redistributed. See license for details. @REM Win32 setup batch file, see Install.nt for details diff --git a/sys/winnt/ntsound.c b/sys/winnt/ntsound.c index c3008eb2e..0c2f1763d 100644 --- a/sys/winnt/ntsound.c +++ b/sys/winnt/ntsound.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 ntsound.c $Date$ $Revision$ */ -/* SCCS Id: @(#)ntsound.c 3.5 $Date$ */ +/* NetHack 3.5 ntsound.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 ntsound.c $Date: 2009/05/06 10:53:33 $ $Revision: 1.7 $ */ +/* SCCS Id: @(#)ntsound.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)ntsound.c 3.5 $Date: 2009/05/06 10:53:33 $ */ /* Copyright (c) NetHack PC Development Team 1993 */ /* NetHack may be freely redistributed. See license for details. */ /* */ diff --git a/sys/winnt/nttty.c b/sys/winnt/nttty.c index 39144e4ae..9b9b186bc 100644 --- a/sys/winnt/nttty.c +++ b/sys/winnt/nttty.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 nttty.c $Date$ $Revision$ */ -/* SCCS Id: @(#)nttty.c 3.5 $Date$ */ +/* NetHack 3.5 nttty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 nttty.c $Date: 2009/05/06 10:53:34 $ $Revision: 1.54 $ */ +/* SCCS Id: @(#)nttty.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)nttty.c 3.5 $Date: 2009/05/06 10:53:34 $ */ /* Copyright (c) NetHack PC Development Team 1993 */ /* NetHack may be freely redistributed. See license for details. */ @@ -62,6 +64,9 @@ int GUILaunched; extern int redirect_stdout; static BOOL FDECL(CtrlHandler, (DWORD)); +/* Flag for whether unicode is supported */ +static boolean has_unicode; + #ifdef PORT_DEBUG static boolean display_cursor_info = FALSE; #endif @@ -144,12 +149,6 @@ static void NDECL(init_ttycolor); # endif static void NDECL(really_move_cursor); -#ifdef UNICODE_WIDEWINPORT -void FDECL(xputc_core,(NHWCHAR_P)); -#else -void FDECL(xputc_core,(int)); -#endif - #define MAX_OVERRIDES 256 unsigned char key_overrides[MAX_OVERRIDES]; @@ -197,14 +196,11 @@ const char *s; void setftty() { - static int cp = 0; - if (!cp) cp = GetConsoleOutputCP(); - /* SetConsoleOutputCP(1250); */ #ifdef CHANGE_COLOR if (altered_palette) adjust_palette(); #endif start_screen(); - iflags.unicodecapable = ((GetVersion() & 0x80000000) == 0); + has_unicode = ((GetVersion() & 0x80000000) == 0); } void @@ -415,7 +411,7 @@ int *x, *y, *mod; static void really_move_cursor() { -#if defined(PORT_DEBUG) && defined(WIZARD) +#ifdef PORT_DEBUG char oldtitle[BUFSZ], newtitle[BUFSZ]; if (display_cursor_info && wizard) { oldtitle[0] = '\0'; @@ -455,61 +451,24 @@ int x,y; ttyDisplay->cury = y; } -#ifdef UNICODE_WIDEWINPORT -#define T(x) L##x -#else -#define T(x) x -#endif - void -xputc_core(ich) -#ifdef UNICODE_WIDEWINPORT -nhwchar ich; -#else -int ich; -#endif +xputc_core(ch) +char ch; { - static uchar c[2] = {0,0}; - char ch = (char)ich; - -#if 0 - /*EURO symbol*/ - if (ich == 0x20AC) { - if (!c[0]) { - wchar_t t[2]={0x20ac, 0x0000}; - int cp = GetConsoleOutputCP(); - (void) WideCharToMultiByte(cp, - 0, - t, 1, - c, 2, - (LPCSTR)0, - (LPBOOL)0); - } - ich = (nhwchar)c[0]; - } -#endif -#ifdef UNICODE_WIDEWINPORT - switch(ich) { -#else switch(ch) { -#endif - case T('\n'): + case '\n': cursor.Y++; /* fall through */ - case T('\r'): + case '\r': cursor.X = 1; break; - case T('\b'): + case '\b': cursor.X--; break; default: WriteConsoleOutputAttribute(hConOut,&attr,1, cursor,&acount); - if (iflags.unicodedisp) { -#ifdef UNICODE_WIDEWINPORT - WriteConsoleOutputCharacterW(hConOut,&ich,1, - cursor,&ccount); -#else + if (has_unicode) { /* Avoid bug in ANSI API on WinNT */ WCHAR c2[2]; int rc; @@ -520,7 +479,6 @@ int ich; c2, 2); WriteConsoleOutputCharacterW(hConOut,c2,rc, cursor,&ccount); -#endif } else { WriteConsoleOutputCharacterA(hConOut,&ch,1, @@ -532,11 +490,7 @@ int ich; void xputc(ch) -#ifdef UNICODE_WIDEWINPORT -nhwchar ch; -#else -int ch; -#endif +char ch; { cursor.X = ttyDisplay->curx; cursor.Y = ttyDisplay->cury; @@ -567,8 +521,8 @@ const char *s; * for win32. It is used for glyphs only, not text. */ void -g_putch(in_sym) -int in_sym; +g_putch(in_ch) +int in_ch; { /* CP437 to Unicode mapping according to the Unicode Consortium */ static const WCHAR cp437[] = @@ -606,18 +560,12 @@ int in_sym; 0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248, 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0 }; - uchar ch = (uchar)in_sym; + unsigned char ch = (unsigned char)in_ch; cursor.X = ttyDisplay->curx; cursor.Y = ttyDisplay->cury; WriteConsoleOutputAttribute(hConOut,&attr,1,cursor,&acount); -#ifdef UNICODE_DRAWING - if (symset[currentgraphics].name && - symset[currentgraphics].unicode && iflags.unicodedisp) - WriteConsoleOutputCharacterW(hConOut,(LPCWSTR)&in_sym,1,cursor,&ccount); - else -#endif - if (SYMHANDLING(H_IBM)) + if (has_unicode) WriteConsoleOutputCharacterW(hConOut,&cp437[ch],1,cursor,&ccount); else WriteConsoleOutputCharacterA(hConOut,&ch,1,cursor,&ccount); diff --git a/sys/winnt/win32api.h b/sys/winnt/win32api.h index 84d040560..3ea9f0598 100644 --- a/sys/winnt/win32api.h +++ b/sys/winnt/win32api.h @@ -1,5 +1,7 @@ -/* NetHack 3.5 win32api.h $Date$ $Revision$ */ -/* SCCS Id: @(#)win32api.h 3.5 $Date$ */ +/* NetHack 3.5 win32api.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 win32api.h $Date: 2009/05/06 10:53:39 $ $Revision: 1.6 $ */ +/* SCCS Id: @(#)win32api.h 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)win32api.h 3.5 $Date: 2009/05/06 10:53:39 $ */ /* Copyright (c) NetHack PC Development Team 1996 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/sys/winnt/winnt.c b/sys/winnt/winnt.c index 0817e4858..c36175424 100644 --- a/sys/winnt/winnt.c +++ b/sys/winnt/winnt.c @@ -1,5 +1,7 @@ -/* NetHack 3.5 winnt.c $Date$ $Revision$ */ -/* SCCS Id: @(#)winnt.c 3.5 $Date$ */ +/* NetHack 3.5 winnt.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winnt.c $Date: 2012/01/15 19:11:41 $ $Revision: 1.18 $ */ +/* SCCS Id: @(#)winnt.c 3.5 $NHDT-Date$ */ +/* SCCS Id: @(#)winnt.c 3.5 $Date: 2012/01/15 19:11:41 $ */ /* Copyright (c) NetHack PC Development Team 1993, 1994 */ /* NetHack may be freely redistributed. See license for details. */ @@ -234,7 +236,6 @@ extern void NDECL(backsp); void win32_abort() { -#ifdef WIZARD if (wizard) { # ifdef WIN32CON int c, ci, ct; @@ -261,7 +262,6 @@ void win32_abort() DebugBreak(); # endif } -#endif abort(); } diff --git a/util/.gitignore b/util/.gitignore index 43e9f40df..98b003527 100644 --- a/util/.gitignore +++ b/util/.gitignore @@ -8,3 +8,5 @@ lev_yacc.c tile2x11 lev_comp tileedit +dlb +recover diff --git a/util/dgn_comp.l b/util/dgn_comp.l index 19e1546da..5841d0e7c 100644 --- a/util/dgn_comp.l +++ b/util/dgn_comp.l @@ -1,5 +1,6 @@ %{ -/* NetHack 3.5 dgn_comp.l $Date$ $Revision$ */ +/* NetHack 3.5 dgn_comp.l $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dgn_comp.l $Date: 2009/05/06 10:54:26 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)dgn_lex.c 3.5 2002/03/27 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ diff --git a/util/dgn_comp.y b/util/dgn_comp.y index 83dbf78a5..eec4fa496 100644 --- a/util/dgn_comp.y +++ b/util/dgn_comp.y @@ -1,5 +1,6 @@ %{ -/* NetHack 3.5 dgn_comp.y $Date$ $Revision$ */ +/* NetHack 3.5 dgn_comp.y $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dgn_comp.y $Date: 2009/05/06 10:54:26 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)dgn_comp.c 3.5 1996/06/22 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ diff --git a/util/dgn_main.c b/util/dgn_main.c index 5d1cccb32..2544755c3 100644 --- a/util/dgn_main.c +++ b/util/dgn_main.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dgn_main.c $Date$ $Revision$ */ +/* NetHack 3.5 dgn_main.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dgn_main.c $Date: 2009/05/06 10:54:27 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)dgn_main.c 3.5 1994/09/23 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* Copyright (c) 1990 by M. Stephenson */ diff --git a/util/dlb_main.c b/util/dlb_main.c index 8821139b3..17025570b 100644 --- a/util/dlb_main.c +++ b/util/dlb_main.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 dlb_main.c $Date$ $Revision$ */ +/* NetHack 3.5 dlb_main.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 dlb_main.c $Date: 2012/01/16 03:56:08 $ $Revision: 1.6 $ */ /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1993. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/util/lev_comp.l b/util/lev_comp.l index e3bd584d7..2b0ad5188 100644 --- a/util/lev_comp.l +++ b/util/lev_comp.l @@ -1,5 +1,6 @@ %{ -/* NetHack 3.5 lev_comp.l $Date$ $Revision$ */ +/* NetHack 3.5 lev_comp.l $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lev_comp.l $Date: 2009/05/06 10:54:31 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)lev_lex.c 3.5 2002/03/27 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/util/lev_comp.y b/util/lev_comp.y index 7cb7df25d..c2fe15fb6 100644 --- a/util/lev_comp.y +++ b/util/lev_comp.y @@ -1,5 +1,6 @@ %{ -/* NetHack 3.5 lev_comp.y $Date$ $Revision$ */ +/* NetHack 3.5 lev_comp.y $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lev_comp.y $Date: 2009/05/06 10:54:31 $ $Revision: 1.8 $ */ /* SCCS Id: @(#)lev_yacc.c 3.5 2007/08/01 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/util/lev_main.c b/util/lev_main.c index 6cc9d4f35..fa539f5e2 100644 --- a/util/lev_main.c +++ b/util/lev_main.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 lev_main.c $Date$ $Revision$ */ +/* NetHack 3.5 lev_main.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 lev_main.c $Date: 2012/01/12 04:48:12 $ $Revision: 1.20 $ */ /* SCCS Id: @(#)lev_main.c 3.5 2007/01/17 */ /* Copyright (c) 1989 by Jean-Christophe Collet */ /* NetHack may be freely redistributed. See license for details. */ @@ -493,12 +494,7 @@ char c; case '{' : return(FOUNTAIN); case '\\' : return(THRONE); case 'K' : -#ifdef SINKS return(SINK); -#else - yywarning("Sinks are not allowed in this version! Ignoring..."); - return(ROOM); -#endif case '}' : return(MOAT); case 'P' : return(POOL); case 'L' : return(LAVAPOOL); diff --git a/util/makedefs.c b/util/makedefs.c index 1f8752893..ad37677bc 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1,11 +1,11 @@ -/* NetHack 3.5 makedefs.c $Date$ $Revision$ */ +/* NetHack 3.5 makedefs.c $NHDT-Date: 1425083082 2015/02/28 00:24:42 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.63 $ */ +/* NetHack 3.5 makedefs.c $Date: 2012/01/15 09:27:03 $ $Revision: 1.50 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ /* Copyright (c) Dean Luick, 1990. */ /* NetHack may be freely redistributed. See license for details. */ #define MAKEDEFS_C /* use to conditionally include file sections */ -/* #define DEBUG */ /* uncomment for debugging info */ #include "config.h" #include "permonst.h" @@ -384,6 +384,7 @@ getfp(template, tag, mode) return rv; } +static boolean debug = FALSE; static FILE *inputfp; static FILE *outputfp; @@ -430,6 +431,15 @@ do_ext_makedefs(int argc, char **argv){ Fprintf(stdout, "%s", version_string(buf, delim)); exit(EXIT_SUCCESS); } + IS_OPTION("debug"){ + debug = TRUE; + CONTINUE; + } + IS_OPTION("make"){ + CONSUME; + do_makedefs(argv[0]); + exit(EXIT_SUCCESS); + } IS_OPTION("input"){ CONSUME; if(!strcmp(argv[0], "-")){ @@ -959,9 +969,7 @@ do_rumors() * */ #define IGNORED_FEATURES ( 0L \ - | (1L << 12) /* GOLDOBJ */ \ - | (1L << 20) /* EXP_ON_BOTL */ \ - | (1L << 21) /* SCORE_ON_BOTL */ \ + | (1L << 19) /* SCORE_ON_BOTL */ \ | (1L << 27) /* ZEROCOMP */ \ | (1L << 28) /* RLECOMP */ \ ) @@ -987,29 +995,11 @@ make_version() */ version.feature_set = (unsigned long)(0L /* levels and/or topology (0..4) */ -#ifdef REINCARNATION - | (1L << 1) -#endif -#ifdef SINKS - | (1L << 2) -#endif /* monsters (5..9) */ -#ifdef KOPS +#ifdef MAIL | (1L << 6) -#endif -#ifdef MAIL - | (1L << 7) #endif /* objects (10..14) */ -#ifdef TOURIST - | (1L << 10) -#endif -#ifdef STEED - | (1L << 11) -#endif -#ifdef GOLDOBJ - | (1L << 12) -#endif /* flag bits and/or other global variables (15..26) */ #ifdef TEXTCOLOR | (1L << 17) @@ -1017,14 +1007,8 @@ make_version() #ifdef INSURANCE | (1L << 18) #endif -#ifdef ELBERETH - | (1L << 19) -#endif -#ifdef EXP_ON_BOTL - | (1L << 20) -#endif #ifdef SCORE_ON_BOTL - | (1L << 21) + | (1L << 19) #endif /* data format (27..31) * External compression methods such as COMPRESS and ZLIB_COMP @@ -1229,9 +1213,6 @@ static const char *build_opts[] = { #ifdef ANSI_DEFAULT "ANSI default terminal", #endif -#ifdef AUTOPICKUP_EXCEPTIONS - "autopickup exceptions", -#endif #ifdef TEXTCOLOR "color", #endif @@ -1250,30 +1231,12 @@ static const char *build_opts[] = { #ifdef DLB "data librarian", #endif -#ifdef WIZARD - "debug mode", -#endif -#ifdef DUNGEON_OVERVIEW - "dungeon map overview patch", -#endif -#ifdef ELBERETH - "Elbereth", -#endif -#ifdef EXP_ON_BOTL - "experience points on status line", -#endif #ifdef MFLOPPY "floppy drive support", #endif -#ifdef GOLDOBJ - "gold object in inventories", -#endif #ifdef INSURANCE "insurance files for recovering from crashes", #endif -#ifdef KOPS - "Keystone Kops", -#endif #ifdef HOLD_LOCKFILE_OPEN "exclusive lock on level 0 file", #endif @@ -1283,9 +1246,6 @@ static const char *build_opts[] = { #ifdef MAIL "mail daemon", #endif -#ifdef BARGETHROUGH - "monsters moving monsters", -#endif #ifdef GNUDOS "MSDOS protected mode", #endif @@ -1303,18 +1263,9 @@ static const char *build_opts[] = { # endif # endif #endif -#ifdef REDO - "redo command", -#endif #ifdef SELECTSAVED "restore saved games via menu", #endif -#ifdef REINCARNATION - "rogue level", -#endif -#ifdef STEED - "saddles and riding", -#endif #ifdef SCORE_ON_BOTL "score on status line", #endif @@ -1340,15 +1291,9 @@ static const char *build_opts[] = { # endif # endif #endif -#ifdef SEDUCE - "seduction", -#endif #ifdef SHELL "shell command", #endif -#ifdef SINKS - "sinks", -#endif #ifdef SUSPEND "suspend command", #endif @@ -1362,9 +1307,6 @@ static const char *build_opts[] = { #ifdef TIMED_DELAY "timed wait for display effects", #endif -#ifdef TOURIST - "tourists", -#endif #ifdef USER_SOUNDS # ifdef USER_SOUNDS_REGEX "user sounds via regular expressions", @@ -1681,12 +1623,6 @@ h_filter(line) if (*line == '#') return TRUE; /* ignore comment lines */ if (sscanf(line, "----- %s", tag) == 1) { skip = FALSE; -#ifndef SINKS - if (!strcmp(tag, "SINKS")) skip = TRUE; -#endif -#ifndef ELBERETH - if (!strcmp(tag, "ELBERETH")) skip = TRUE; -#endif } else if (skip && !strncmp(line, "-----", 5)) skip = FALSE; return skip; @@ -1858,12 +1794,9 @@ static struct deflist { const char *defname; boolean true_or_false; } deflist[] = { -#ifdef REINCARNATION { "REINCARNATION", TRUE }, -#else - { "REINCARNATION", FALSE }, -#endif - { 0, 0 } }; + { 0, 0 } +}; static int check_control(s) @@ -2322,36 +2255,30 @@ put_qt_hdrs() /* * The main header record. */ -#ifdef DEBUG - Fprintf(stderr, "%ld: header info.\n", ftell(ofp)); -#endif + if (debug) Fprintf(stderr, "%ld: header info.\n", ftell(ofp)); (void) fwrite((genericptr_t)&(qt_hdr.n_hdr), sizeof(int), 1, ofp); (void) fwrite((genericptr_t)&(qt_hdr.id[0][0]), sizeof(char)*LEN_HDR, qt_hdr.n_hdr, ofp); (void) fwrite((genericptr_t)&(qt_hdr.offset[0]), sizeof(long), qt_hdr.n_hdr, ofp); -#ifdef DEBUG - for(i = 0; i < qt_hdr.n_hdr; i++) - Fprintf(stderr, "%c @ %ld, ", qt_hdr.id[i], qt_hdr.offset[i]); - - Fprintf(stderr, "\n"); -#endif + if (debug) { + for(i = 0; i < qt_hdr.n_hdr; i++) + Fprintf(stderr, "%s @ %ld, ", qt_hdr.id[i], qt_hdr.offset[i]); + Fprintf(stderr, "\n"); + } /* * The individual class headers. */ for(i = 0; i < qt_hdr.n_hdr; i++) { -#ifdef DEBUG - Fprintf(stderr, "%ld: %c header info.\n", ftell(ofp), - qt_hdr.id[i]); -#endif + if (debug) Fprintf(stderr, "%ld: %s header info.\n", ftell(ofp), + qt_hdr.id[i]); (void) fwrite((genericptr_t)&(msg_hdr[i].n_msg), sizeof(int), 1, ofp); (void) fwrite((genericptr_t)&(msg_hdr[i].qt_msg[0]), sizeof(struct qtmsg), msg_hdr[i].n_msg, ofp); -#ifdef DEBUG - { int j; + if (debug) { int j; for(j = 0; j < msg_hdr[i].n_msg; j++) { Fprintf(stderr, "msg %d @ %ld (%ld)", msg_hdr[i].qt_msg[j].msgnum, @@ -2363,7 +2290,6 @@ put_qt_hdrs() Fprintf(stderr, "\n"); } } -#endif } } @@ -2416,9 +2342,7 @@ do_questtxt() /* we have summary text; replace raw %E record with it */ Strcpy(in_line, summary_p); /* (guaranteed to fit) */ } else if(qt_comment(in_line)) continue; -#ifdef DEBUG - Fprintf(stderr, "%ld: %s", ftell(stdout), in_line); -#endif + if (debug) Fprintf(stderr, "%ld: %s", ftell(stdout), in_line); (void) fputs(xcrypt(in_line), ofp); } Fclose(ifp); @@ -2544,11 +2468,9 @@ do_objs() if (!strncmp(objnam, "THE_", 4)) objnam += 4; -#ifdef TOURIST /* fudge _platinum_ YENDORIAN EXPRESS CARD */ if (!strncmp(objnam, "PLATINUM_", 9)) objnam += 9; -#endif Fprintf(ofp,"#define\tART_%s\t%d\n", limit(objnam, 1), i); } diff --git a/util/mdgrep.h b/util/mdgrep.h index a70e1d645..823c269d3 100644 --- a/util/mdgrep.h +++ b/util/mdgrep.h @@ -1,5 +1,6 @@ /* - * NetHack 3.5 mdgrep.h $Date$ $Revision$ + * NetHack 3.5 mdgrep.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * NetHack 3.5 mdgrep.h $Date: 2010/05/01 20:57:17 $ $Revision: 1.5 $ * Copyright (c) Kenneth Lorber, Kensington, Maryland, 2008 * NetHack may be freely redistributed. See license for details. * @@ -256,11 +257,7 @@ static struct grep_var grep_vars[]={ #else {"WIN_CE_SMARTPHONE", 0}, #endif -#if defined(WIZARD) {"WIZARD", 1}, -#else - {"WIZARD", 0}, -#endif #if defined(X11_GRAPHICS) {"X11_GRAPHICS", 1}, #else diff --git a/util/mdgrep.pl b/util/mdgrep.pl index d291b1464..27e78fe47 100644 --- a/util/mdgrep.pl +++ b/util/mdgrep.pl @@ -1,5 +1,5 @@ #!perl -# NetHack 3.5 mdgrep.pl $NHDT-Date: 1423877528 2015/02/14 01:32:08 $ $NHDT-Revision: 1.7 $ +# NetHack 3.5 mdgrep.pl $NHDT-Date: 1423877528 2015/02/14 01:32:08 $ $NHDT-Branch$:$NHDT-Revision: 1.7 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland # NetHack may be freely redistributed. See license for details. @@ -18,7 +18,7 @@ # Game Features: @feature = qw/ZEROCOMP USE_TILES ASCIIGRAPH CLIPPING TEXTCOLOR - COMPRESS ZLIB_COMP RANDOM SECURE USER_SOUNDS WIZARD + COMPRESS ZLIB_COMP RANDOM SECURE USER_SOUNDS SAFERHANGUP MFLOPPY NOCWD_ASSUMPTIONS VAR_PLAYGROUND DLB SHELL SUSPEND NOSAVEONHANGUP HANGUPHANDLING BSD_JOB_CONTROL MAIL POSIX_JOB_CONTROL INSURANCE @@ -56,6 +56,7 @@ $outfile = "mdgrep.h"; sub start_file { ($rev) = ('$NHDT-Revision: 1.7 $') =~ m/: (.*) .$/; my $date = '$NHDT-Date: 1423877529 2015/02/14 01:32:09 $'; + my $branch = '$NHDT-Branch$'; my $revision = '$NHDT-Revision: 1.7 $'; open(OUT, ">$outfile") || die "open $outfile: $!"; # NB: Date and Revision below will be modified when mdgrep.h is written to @@ -63,7 +64,7 @@ sub start_file { # before generating mdgrep.h and committing that file). print OUT <map_information; - if (( -#ifdef REINCARNATION - Is_rogue_level(&u.uz) ? map_info->is_tile : -#endif + if ((Is_rogue_level(&u.uz) ? map_info->is_tile : (map_info->is_tile != iflags.wc_tiled_map)) && map_info->tile_map.image_width) { /* changed map display mode, re-display the full map */ @@ -849,11 +847,7 @@ display_map_window(wp) sizeof(map_info->t_start)); (void) memset((genericptr_t) map_info->t_stop, (char) COLNO-1, sizeof(map_info->t_stop)); - map_info->is_tile = iflags.wc_tiled_map -#ifdef REINCARNATION - && !Is_rogue_level(&u.uz) -#endif - ; + map_info->is_tile = iflags.wc_tiled_map && !Is_rogue_level(&u.uz); XClearWindow(XtDisplay(wp->w), XtWindow(wp->w)); set_map_size(wp, COLNO, ROWNO); check_cursor_visibility(wp); diff --git a/win/X11/winmenu.c b/win/X11/winmenu.c index 5f76942a7..b28dc3361 100644 --- a/win/X11/winmenu.c +++ b/win/X11/winmenu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winmenu.c $Date$ $Revision$ */ +/* NetHack 3.5 winmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winmenu.c $Date: 2009/05/06 10:55:53 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)winmenu.c 3.5 1996/08/15 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/X11/winmesg.c b/win/X11/winmesg.c index 039309729..7acb61e14 100644 --- a/win/X11/winmesg.c +++ b/win/X11/winmesg.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winmesg.c $Date$ $Revision$ */ +/* NetHack 3.5 winmesg.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winmesg.c $Date: 2009/05/06 10:55:57 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)winmesg.c 3.5 1996/04/05 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/X11/winmisc.c b/win/X11/winmisc.c index f93b51938..f26c42615 100644 --- a/win/X11/winmisc.c +++ b/win/X11/winmisc.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winmisc.c $Date$ $Revision$ */ +/* NetHack 3.5 winmisc.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winmisc.c $Date: 2009/05/06 10:55:57 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)winmisc.c 3.5 2000/05/21 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/X11/winstat.c b/win/X11/winstat.c index abd918fd7..ae2a3ce83 100644 --- a/win/X11/winstat.c +++ b/win/X11/winstat.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winstat.c $Date$ $Revision$ */ +/* NetHack 3.5 winstat.c $NHDT-Date: 1425083083 2015/02/28 00:24:43 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.5 $ */ +/* NetHack 3.5 winstat.c $Date: 2009/05/06 10:55:59 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)winstat.c 3.5 1996/04/05 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ @@ -426,7 +427,6 @@ update_val(attr_rec, new_value) /* special case: exp can be enabled & disabled */ else if (attr_rec == &shown_stats[F_EXP]) { static boolean flagexp = TRUE; -#ifdef EXP_ON_BOTL if (flags.showexp && !flagexp) { set_name(attr_rec->w, shown_stats[F_EXP].name); @@ -438,14 +438,6 @@ update_val(attr_rec, new_value) flagexp = flags.showexp; } if (!flagexp) return; -#else - if (flagexp) { - set_name(attr_rec->w, ""); - set_value(attr_rec->w, ""); - flagexp = FALSE; - } - return; /* don't show it at all */ -#endif } /* special case: score can be enabled & disabled */ @@ -599,11 +591,7 @@ update_fancy_status(wp) case F_NAME: val = (long) 0L; break; /* special */ case F_DLEVEL: val = (long) 0L; break; /* special */ -#ifndef GOLDOBJ - case F_GOLD: val = (long) u.ugold; break; -#else case F_GOLD: val = money_cnt(invent); break; -#endif case F_HP: val = (long) (u.mtimedone ? (u.mh > 0 ? u.mh : 0): (u.uhp > 0 ? u.uhp : 0)); break; @@ -615,11 +603,7 @@ update_fancy_status(wp) case F_LEVEL: val = (long) (u.mtimedone ? mons[u.umonnum].mlevel : u.ulevel); break; -#ifdef EXP_ON_BOTL case F_EXP: val = flags.showexp ? u.uexp : 0L; break; -#else - case F_EXP: val = 0L; break; -#endif case F_ALIGN: val = (long) u.ualign.type; break; case F_TIME: val = flags.time ? (long) moves : 0L; break; #ifdef SCORE_ON_BOTL diff --git a/win/X11/wintext.c b/win/X11/wintext.c index 1af4e3d57..795b765a7 100644 --- a/win/X11/wintext.c +++ b/win/X11/wintext.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 wintext.c $Date$ $Revision$ */ +/* NetHack 3.5 wintext.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wintext.c $Date: 2012/01/24 04:26:27 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)wintext.c 3.5 1996/04/05 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ @@ -468,11 +469,7 @@ calculate_rip_text(int how, time_t when) /* Put $ on stone */ Sprintf(rip_line[GOLD_LINE], "%ld Au", -#ifndef GOLDOBJ - u.ugold); -#else done_money); -#endif /* Put together death description */ formatkiller(buf, sizeof buf, how); diff --git a/win/X11/winval.c b/win/X11/winval.c index 433435941..a5b6463aa 100644 --- a/win/X11/winval.c +++ b/win/X11/winval.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winval.c $Date$ $Revision$ */ +/* NetHack 3.5 winval.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winval.c $Date: 2009/05/06 10:56:06 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)winval.c 3.5 1992/3/7 */ /* Copyright (c) Dean Luick, 1992 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/chain/wc_chainin.c b/win/chain/wc_chainin.c index 1508affd7..e4013bca3 100644 --- a/win/chain/wc_chainin.c +++ b/win/chain/wc_chainin.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 wc_chainin.c $Date$ $Revision$ */ +/* NetHack 3.5 wc_chainin.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wc_chainin.c $Date: 2012/01/23 10:45:31 $ $Revision: 1.2 $ */ /* Copyright (c) Kenneth Lorber, 2012 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/chain/wc_chainout.c b/win/chain/wc_chainout.c index 286942009..2fad27240 100644 --- a/win/chain/wc_chainout.c +++ b/win/chain/wc_chainout.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 wc_chainout.c $Date$ $Revision$ */ +/* NetHack 3.5 wc_chainout.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wc_chainout.c $Date: 2012/01/23 10:45:31 $ $Revision: 1.2 $ */ /* Copyright (c) Kenneth Lorber, 2012 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/chain/wc_trace.c b/win/chain/wc_trace.c index b89bcf935..76439af74 100644 --- a/win/chain/wc_trace.c +++ b/win/chain/wc_trace.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 wc_trace.c $Date$ $Revision$ */ +/* NetHack 3.5 wc_trace.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wc_trace.c $Date: 2012/01/23 10:45:31 $ $Revision: 1.2 $ */ /* Copyright (c) Kenneth Lorber, 2012 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gem/Install.gem b/win/gem/Install.gem index 3880fe0dc..38c5740dd 100644 --- a/win/gem/Install.gem +++ b/win/gem/Install.gem @@ -1,3 +1,6 @@ +$NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$Date: 2005/01/02 17:20:12 $ $Revision: 1.4 $ + Hi, This is nethack3.5.0 for Atari Gem and tty diff --git a/win/gem/bitmfile.c b/win/gem/bitmfile.c index 13e0073a9..fe6ccf5f4 100644 --- a/win/gem/bitmfile.c +++ b/win/gem/bitmfile.c @@ -7,6 +7,10 @@ * Bieber, Dez. 1994 * * -> Programmcode * \****************************/ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2002/01/05 21:06:00 $ $Revision: 1.1 $ + */ #include #include diff --git a/win/gem/gr_rect.c b/win/gem/gr_rect.c index 7a109cdb4..57bd72c5b 100644 --- a/win/gem/gr_rect.c +++ b/win/gem/gr_rect.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gr_rect.c $Date$ $Revision$ */ +/* NetHack 3.5 gr_rect.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gr_rect.c $Date: 2009/05/06 10:56:40 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)gr_rect.c 3.5 2001/12/10 */ /* Copyright (c) Christian Bressler, 2001 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gem/gr_rect.h b/win/gem/gr_rect.h index 0e4a0bdc8..3927340f6 100644 --- a/win/gem/gr_rect.h +++ b/win/gem/gr_rect.h @@ -1,4 +1,8 @@ /* gr_rect.h */ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2002/03/20 03:50:49 $ $Revision: 1.1 $ + */ #include /********** structs **********/ typedef struct { diff --git a/win/gem/load_img.c b/win/gem/load_img.c index 16d8fe82c..fe995d6f5 100644 --- a/win/gem/load_img.c +++ b/win/gem/load_img.c @@ -1,3 +1,7 @@ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2002/03/20 03:45:03 $ $Revision: 1.2 $ + */ #define __TCC_COMPAT__ #include #include diff --git a/win/gem/tile2img.c b/win/gem/tile2img.c index 28cb1f6ca..ee59ce146 100644 --- a/win/gem/tile2img.c +++ b/win/gem/tile2img.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 tile2img.c $Date$ $Revision$ */ +/* NetHack 3.5 tile2img.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tile2img.c $Date: 2009/05/06 10:56:40 $ $Revision: 1.2 $ */ /* SCCS Id: @(#)tile2bmp.c 3.2 95/09/06 */ /* Copyright (c) NetHack PC Development Team 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gem/wingem.c b/win/gem/wingem.c index abfdd5c6a..ccc076bdf 100644 --- a/win/gem/wingem.c +++ b/win/gem/wingem.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 wingem.c $Date$ $Revision$ */ +/* NetHack 3.5 wingem.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wingem.c $Date: 2012/01/24 04:26:29 $ $Revision: 1.16 $ */ /* Copyright (c) Christian Bressler, 1999 */ /* NetHack may be freely redistributed. See license for details. */ @@ -910,9 +911,7 @@ int x, y; void mar_print_gl_char(winid,xchar,xchar,int); -#ifdef REINCARNATION extern int mar_set_rogue(int); -#endif extern void mar_add_pet_sign(winid,int,int); @@ -925,9 +924,7 @@ Gem_print_glyph(window, x, y, glyph) /* Move the cursor. */ Gem_curs(window, x,y); -# ifdef REINCARNATION - mar_set_rogue(Is_rogue_level(&u.uz) ? TRUE : FALSE); -# endif + mar_set_rogue(Is_rogue_level(&u.uz) ? TRUE : FALSE); x--; /* MAR -- because x ranges from 1 to COLNO */ if(mar_set_tile_mode(-1)){ @@ -959,9 +956,7 @@ void mar_print_gl_char(window, x, y, glyph) #ifdef TEXTCOLOR /* Turn off color if rogue level. */ -# ifdef REINCARNATION if (Is_rogue_level(&u.uz)) color = NO_COLOR; -# endif #endif /* TEXTCOLOR */ mar_print_char(window,x,y,ch,color); @@ -1093,11 +1088,7 @@ time_t when; Sprintf(rip_line[NAME_LINE], "%s", plname); /* Put $ on stone */ Sprintf(rip_line[GOLD_LINE], "%ld Au", -#ifndef GOLDOBJ - u.ugold); -#else done_money); -#endif /* Put together death description */ formatkiller(buf, sizeof buf, how); diff --git a/win/gem/wingem1.c b/win/gem/wingem1.c index 3689be66e..76d1b0746 100644 --- a/win/gem/wingem1.c +++ b/win/gem/wingem1.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 wingem1.c $Date$ $Revision$ */ +/* NetHack 3.5 wingem1.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wingem1.c $Date: 2009/05/06 10:56:42 $ $Revision: 1.8 $ */ /* SCCS Id: @(#)wingem1.c 3.5 1999/12/10 */ /* Copyright (c) Christian Bressler 1999 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gem/xpm2img.c b/win/gem/xpm2img.c index 69a1949c1..46c2c445a 100644 --- a/win/gem/xpm2img.c +++ b/win/gem/xpm2img.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 xpm2img.c $Date$ $Revision$ */ +/* NetHack 3.5 xpm2img.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 xpm2img.c $Date: 2009/05/06 10:56:48 $ $Revision: 1.3 $ */ /* SCCS Id: @(#)xpm2img.c 3.5 2002/03/17 */ /* Copyright (c) Christian Bressler 2002 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gn_xpms.h b/win/gnome/gn_xpms.h index 13a3baeb1..281c09807 100644 --- a/win/gnome/gn_xpms.h +++ b/win/gnome/gn_xpms.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gn_xpms.h $Date$ $Revision$ */ +/* NetHack 3.5 gn_xpms.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gn_xpms.h $Date: 2009/05/06 10:57:19 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnxpms.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnaskstr.c b/win/gnome/gnaskstr.c index 652f1ddb6..eeeba31a2 100644 --- a/win/gnome/gnaskstr.c +++ b/win/gnome/gnaskstr.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnaskstr.c $Date$ $Revision$ */ +/* NetHack 3.5 gnaskstr.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnaskstr.c $Date: 2009/05/06 10:57:24 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnaskstr.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnaskstr.h b/win/gnome/gnaskstr.h index 16aeb7da8..056434adb 100644 --- a/win/gnome/gnaskstr.h +++ b/win/gnome/gnaskstr.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnaskstr.h $Date$ $Revision$ */ +/* NetHack 3.5 gnaskstr.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnaskstr.h $Date: 2009/05/06 10:57:24 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnaskstr.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnbind.c b/win/gnome/gnbind.c index 14b315392..b001de04f 100644 --- a/win/gnome/gnbind.c +++ b/win/gnome/gnbind.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnbind.c $Date$ $Revision$ */ +/* NetHack 3.5 gnbind.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnbind.c $Date: 2012/01/24 04:26:31 $ $Revision: 1.25 $ */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ @@ -1182,12 +1183,7 @@ void gnome_outrip(winid wid, int how, time_t when) Strcat(ripString, buf); /* Put $ on stone */ - Sprintf(buf, "%ld Au\n", -#ifndef GOLDOBJ - u.ugold); -#else - done_money); -#endif + Sprintf(buf, "%ld Au\n", done_money); Strcat(ripString, buf); /* Put together death description */ diff --git a/win/gnome/gnbind.h b/win/gnome/gnbind.h index dc1bd5986..e7d9ad3c7 100644 --- a/win/gnome/gnbind.h +++ b/win/gnome/gnbind.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnbind.h $Date$ $Revision$ */ +/* NetHack 3.5 gnbind.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnbind.h $Date: 2012/01/24 04:26:31 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)gnbind.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnglyph.c b/win/gnome/gnglyph.c index c22a2f15b..b4c9547ec 100644 --- a/win/gnome/gnglyph.c +++ b/win/gnome/gnglyph.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnglyph.c $Date$ $Revision$ */ +/* NetHack 3.5 gnglyph.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnglyph.c $Date: 2009/05/06 10:57:29 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)gnglyph.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnglyph.h b/win/gnome/gnglyph.h index 9b49eff92..2f7ea032c 100644 --- a/win/gnome/gnglyph.h +++ b/win/gnome/gnglyph.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnglyph.h $Date$ $Revision$ */ +/* NetHack 3.5 gnglyph.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnglyph.h $Date: 2009/05/06 10:57:30 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnglyph.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnmain.c b/win/gnome/gnmain.c index 7f9a24a6b..53273c407 100644 --- a/win/gnome/gnmain.c +++ b/win/gnome/gnmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmain.c $Date$ $Revision$ */ +/* NetHack 3.5 gnmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmain.c $Date: 2009/05/06 10:57:32 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)gnmain.c 3.5 2008/01/30 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ @@ -365,14 +366,12 @@ GnomeUIInfo action_menu[] = { ghack_accelerator_selected, GINT_TO_POINTER(M('j')), NULL, GNOME_APP_PIXMAP_NONE, NULL, 'j',GDK_MOD1_MASK }, -#ifdef STEED { GNOME_APP_UI_ITEM, N_("Ride"), N_("Ride (or stop riding) a monster"), doride, GINT_TO_POINTER(M('r')), NULL, GNOME_APP_PIXMAP_NONE, NULL, 'R',GDK_MOD1_MASK }, -#endif { GNOME_APP_UI_ITEM, N_("Wipe face"), N_("wipe off your face"), diff --git a/win/gnome/gnmain.h b/win/gnome/gnmain.h index 8fd78fe3b..92d7f4bd6 100644 --- a/win/gnome/gnmain.h +++ b/win/gnome/gnmain.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmain.h $Date$ $Revision$ */ +/* NetHack 3.5 gnmain.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmain.h $Date: 2009/05/06 10:57:32 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnmain.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnmap.c b/win/gnome/gnmap.c index f5ea9d107..6f40505a3 100644 --- a/win/gnome/gnmap.c +++ b/win/gnome/gnmap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmap.c $Date$ $Revision$ */ +/* NetHack 3.5 gnmap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmap.c $Date: 2009/05/06 10:57:34 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)gnmap.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* Copyright (C) 1998 by Anthony Taylor */ diff --git a/win/gnome/gnmap.h b/win/gnome/gnmap.h index 31ed17c48..7a1fcd9fc 100644 --- a/win/gnome/gnmap.h +++ b/win/gnome/gnmap.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmap.h $Date$ $Revision$ */ +/* NetHack 3.5 gnmap.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmap.h $Date: 2009/05/06 10:57:35 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnmap.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnmenu.c b/win/gnome/gnmenu.c index 2b2ecb587..abe5ed6c1 100644 --- a/win/gnome/gnmenu.c +++ b/win/gnome/gnmenu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmenu.c $Date$ $Revision$ */ +/* NetHack 3.5 gnmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmenu.c $Date: 2009/05/06 10:57:36 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)gnmenu.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnmenu.h b/win/gnome/gnmenu.h index 88ed6bca9..6d243ad40 100644 --- a/win/gnome/gnmenu.h +++ b/win/gnome/gnmenu.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmenu.h $Date$ $Revision$ */ +/* NetHack 3.5 gnmenu.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmenu.h $Date: 2009/05/06 10:57:39 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnmenu.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnmesg.c b/win/gnome/gnmesg.c index b213fc819..ab75c0cd1 100644 --- a/win/gnome/gnmesg.c +++ b/win/gnome/gnmesg.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmesg.c $Date$ $Revision$ */ +/* NetHack 3.5 gnmesg.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmesg.c $Date: 2009/05/06 10:57:39 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnmesg.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnmesg.h b/win/gnome/gnmesg.h index 1c35d96cf..7ea0110e0 100644 --- a/win/gnome/gnmesg.h +++ b/win/gnome/gnmesg.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnmesg.h $Date$ $Revision$ */ +/* NetHack 3.5 gnmesg.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnmesg.h $Date: 2009/05/06 10:57:39 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnmesg.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnomeprv.h b/win/gnome/gnomeprv.h index ff3415b58..4062e87d0 100644 --- a/win/gnome/gnomeprv.h +++ b/win/gnome/gnomeprv.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnomeprv.h $Date$ $Revision$ */ +/* NetHack 3.5 gnomeprv.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnomeprv.h $Date: 2009/05/06 10:57:40 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnomeprv.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnopts.c b/win/gnome/gnopts.c index bbfe63ab6..9c68be769 100644 --- a/win/gnome/gnopts.c +++ b/win/gnome/gnopts.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnopts.c $Date$ $Revision$ */ +/* NetHack 3.5 gnopts.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnopts.c $Date: 2009/05/06 10:57:40 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnopts.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnopts.h b/win/gnome/gnopts.h index aad71618b..888ded2ba 100644 --- a/win/gnome/gnopts.h +++ b/win/gnome/gnopts.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnopts.h $Date$ $Revision$ */ +/* NetHack 3.5 gnopts.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnopts.h $Date: 2009/05/06 10:57:42 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnopts.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnplayer.c b/win/gnome/gnplayer.c index c0edf69de..cb0ba24e7 100644 --- a/win/gnome/gnplayer.c +++ b/win/gnome/gnplayer.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnplayer.c $Date$ $Revision$ */ +/* NetHack 3.5 gnplayer.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnplayer.c $Date: 2009/05/06 10:57:42 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)gnplayer.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnplayer.h b/win/gnome/gnplayer.h index 88b25e445..d30f44d28 100644 --- a/win/gnome/gnplayer.h +++ b/win/gnome/gnplayer.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnplayer.h $Date$ $Revision$ */ +/* NetHack 3.5 gnplayer.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnplayer.h $Date: 2009/05/06 10:57:44 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnplayer.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnsignal.c b/win/gnome/gnsignal.c index 8a8586b71..fc3b2b713 100644 --- a/win/gnome/gnsignal.c +++ b/win/gnome/gnsignal.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnsignal.c $Date$ $Revision$ */ +/* NetHack 3.5 gnsignal.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnsignal.c $Date: 2009/05/06 10:57:45 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)gnsignal.c 3.5 2005/11/19 */ /* Copyright (C) 1998 by Anthony Taylor */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnsignal.h b/win/gnome/gnsignal.h index c1f7b08db..b35f4d0af 100644 --- a/win/gnome/gnsignal.h +++ b/win/gnome/gnsignal.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnsignal.h $Date$ $Revision$ */ +/* NetHack 3.5 gnsignal.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnsignal.h $Date: 2009/05/06 10:57:51 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnsignal.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Anthony Taylor */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnstatus.c b/win/gnome/gnstatus.c index 085d6b150..5109f5bb7 100644 --- a/win/gnome/gnstatus.c +++ b/win/gnome/gnstatus.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnstatus.c $Date$ $Revision$ */ +/* NetHack 3.5 gnstatus.c $NHDT-Date: 1425083083 2015/02/28 00:24:43 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.6 $ */ +/* NetHack 3.5 gnstatus.c $Date: 2009/05/06 10:57:54 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gnstatus.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ @@ -433,9 +434,7 @@ void ghack_status_window_update_stats() const char* hung; const char* enc; static int firstTime=TRUE; -#ifdef GOLDOBJ long umoney; -#endif /* First, fill in the player name and the dungeon level */ strcpy(buf, plname); @@ -564,30 +563,17 @@ void ghack_status_window_update_stats() gtk_label_set( GTK_LABEL( chaLabel), buf); /* Now do the non-pixmaped stats (gold and such) */ -#ifndef GOLDOBJ - sprintf(buf,"Au:%ld", u.ugold); - if (lastAu < u.ugold && firstTime==FALSE) { -#else umoney = money_cnt(invent); sprintf(buf,"Au:%ld", umoney); if (lastAu < umoney && firstTime==FALSE) { -#endif /* Ok, this changed so add it to the highlighing list */ ghack_highlight_widget( goldLabel, normalStyle, greenStyle); } -#ifndef GOLDOBJ - else if (lastAu > u.ugold && firstTime==FALSE) { -#else else if (lastAu > umoney && firstTime==FALSE) { -#endif /* Ok, this changed so add it to the highlighing list */ ghack_highlight_widget( goldLabel, normalStyle, redStyle); } -#ifndef GOLDOBJ - lastAu = u.ugold; -#else lastAu = umoney; -#endif gtk_label_set( GTK_LABEL( goldLabel), buf); if (u.mtimedone) { @@ -669,7 +655,6 @@ void ghack_status_window_update_stats() lastAC = u.uac; gtk_label_set( GTK_LABEL( acLabel), buf); -#ifdef EXP_ON_BOTL if (flags.showexp) { sprintf(buf,"Exp:%ld", u.uexp); if (lastExp < u.uexp && firstTime==FALSE) { @@ -683,7 +668,6 @@ void ghack_status_window_update_stats() lastExp = u.uexp; gtk_label_set( GTK_LABEL( expLabel), buf); } else -#endif { gtk_label_set( GTK_LABEL( expLabel), ""); } diff --git a/win/gnome/gnstatus.h b/win/gnome/gnstatus.h index 7746445f3..f6be02de0 100644 --- a/win/gnome/gnstatus.h +++ b/win/gnome/gnstatus.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnstatus.h $Date$ $Revision$ */ +/* NetHack 3.5 gnstatus.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnstatus.h $Date: 2009/05/06 10:57:57 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnstatus.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gntext.c b/win/gnome/gntext.c index 8bc6b6386..8f5734627 100644 --- a/win/gnome/gntext.c +++ b/win/gnome/gntext.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gntext.c $Date$ $Revision$ */ +/* NetHack 3.5 gntext.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gntext.c $Date: 2009/05/06 10:58:00 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)gntext.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gntext.h b/win/gnome/gntext.h index 101c32bb4..934b4d05c 100644 --- a/win/gnome/gntext.h +++ b/win/gnome/gntext.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gntext.h $Date$ $Revision$ */ +/* NetHack 3.5 gntext.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gntext.h $Date: 2009/05/06 10:58:03 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gntext.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnworn.c b/win/gnome/gnworn.c index dce035a94..ee5e704b5 100644 --- a/win/gnome/gnworn.c +++ b/win/gnome/gnworn.c @@ -1,4 +1,8 @@ /* NetHack 3.5 gnworn.c 2009/05/06 10:58:06 1.3 */ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2012/01/10 17:47:38 $ $Revision: 1.4 $ + */ /* Copyright (C) 2002, Dylan Alex Simon */ /* NetHack may be freely redistributed. See license for details. */ @@ -10,7 +14,6 @@ #define WORN_WIDTH 3 #define WORN_HEIGHT 6 -#ifdef TOURIST #define WORN_OBJECT_LIST /* struct obj *[WORN_HEIGHT][WORN_WIDTH] = */ { \ { uquiver, uarmh, u.twoweap ? NULL : uswapwep }, \ { u.twoweap ? uswapwep : NULL, ublindf, uwep }, \ @@ -19,16 +22,6 @@ { uarmu, uarm, uskin }, \ { uball, uarmf, uchain } \ } -#else -#define WORN_OBJECT_LIST /* struct obj *[WORN_HEIGHT][WORN_WIDTH] = */ { \ - { uquiver, uarmh, u.twoweap ? NULL : uswapwep }, \ - { u.twoweap ? uswapwep : NULL, ublindf, uwep }, \ - { uleft, uamul, uright }, \ - { uarms, uarmc, uarmg }, \ - { NULL, uarm, uskin }, \ - { uball, uarmf, uchain } \ -} -#endif static GtkWidget *worn_contents[WORN_HEIGHT][WORN_WIDTH]; static struct obj *last_worn_objects[WORN_HEIGHT][WORN_WIDTH]; diff --git a/win/gnome/gnworn.h b/win/gnome/gnworn.h index db5169508..14e1a4fc9 100644 --- a/win/gnome/gnworn.h +++ b/win/gnome/gnworn.h @@ -1,4 +1,8 @@ /* NetHack 3.5 gnworn.h 2009/05/06 10:58:06 1.3 */ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2012/01/10 17:47:38 $ $Revision: 1.4 $ + */ /* Copyright (C) 2002 by Dylan Alex Simon */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnyesno.c b/win/gnome/gnyesno.c index b53db8b9d..793663e44 100644 --- a/win/gnome/gnyesno.c +++ b/win/gnome/gnyesno.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnyesno.c $Date$ $Revision$ */ +/* NetHack 3.5 gnyesno.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnyesno.c $Date: 2009/05/06 10:58:06 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnyesno.c 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/gnome/gnyesno.h b/win/gnome/gnyesno.h index 2c2deb832..93979bf3c 100644 --- a/win/gnome/gnyesno.h +++ b/win/gnome/gnyesno.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 gnyesno.h $Date$ $Revision$ */ +/* NetHack 3.5 gnyesno.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 gnyesno.h $Date: 2009/05/06 10:58:08 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)gnyesno.h 3.5 2000/07/16 */ /* Copyright (C) 1998 by Erik Andersen */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/macosx/NetHackGuidebook.applescript b/win/macosx/NetHackGuidebook.applescript index 0060b6d80..4310b1e43 100644 --- a/win/macosx/NetHackGuidebook.applescript +++ b/win/macosx/NetHackGuidebook.applescript @@ -1,5 +1,6 @@ #!/usr/bin/osascript -# NetHack 3.5.0 NetHackGuidebook.applescript $Date$ $Revision$ +# NetHack 3.5.0 NetHackGuidebook.applescript $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5.0 NetHackGuidebook.applescript $Date: 2011/10/17 01:29:20 $ $Revision: 1.2 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011 # NetHack may be freely redistributed. See license for details. diff --git a/win/macosx/NetHackRecover.applescript b/win/macosx/NetHackRecover.applescript index 93d792208..50569656e 100644 --- a/win/macosx/NetHackRecover.applescript +++ b/win/macosx/NetHackRecover.applescript @@ -1,5 +1,6 @@ #!/usr/bin/osascript -# NetHack 3.5 NetHackRecover.applescript $Date$ $Revision$ +# NetHack 3.5 NetHackRecover.applescript $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 NetHackRecover.applescript $Date: 2011/10/17 01:29:20 $ $Revision: 1.3 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009 # NetHack may be freely redistributed. See license for details. diff --git a/win/macosx/NetHackTerm.applescript b/win/macosx/NetHackTerm.applescript index 648128096..c8274ebc5 100644 --- a/win/macosx/NetHackTerm.applescript +++ b/win/macosx/NetHackTerm.applescript @@ -1,5 +1,6 @@ #!/usr/bin/osascript -# NetHack 3.5.0 NetHackTerm.applescript $Date$ $Revision$ +# NetHack 3.5.0 NetHackTerm.applescript $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5.0 NetHackTerm.applescript $Date: 2011/10/17 01:29:20 $ $Revision: 1.2 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011 # NetHack may be freely redistributed. See license for details. diff --git a/win/macosx/recover.pl b/win/macosx/recover.pl index 65aa68dfc..95b299cf9 100755 --- a/win/macosx/recover.pl +++ b/win/macosx/recover.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl -# NetHack 3.5 recover.pl $Date$ $Revision$ +# NetHack 3.5 recover.pl $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +# NetHack 3.5 recover.pl $Date: 2011/10/17 01:29:20 $ $Revision: 1.3 $ # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009 # NetHack may be freely redistributed. See license for details. diff --git a/win/share/gifread.c b/win/share/gifread.c index 9757227ea..824393af9 100644 --- a/win/share/gifread.c +++ b/win/share/gifread.c @@ -12,6 +12,10 @@ /* | provided "as is" without express or implied warranty. | */ /* +-------------------------------------------------------------------+ */ +/* + * $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ + * $Date: 2002/01/05 21:06:02 $ $Revision: 1.1 $ + */ #include "config.h" #include "tile.h" diff --git a/win/share/ppmwrite.c b/win/share/ppmwrite.c index c20e02c1e..32b98373f 100644 --- a/win/share/ppmwrite.c +++ b/win/share/ppmwrite.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 ppmwrite.c $Date$ $Revision$ */ +/* NetHack 3.5 ppmwrite.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 ppmwrite.c $Date: 2009/05/06 10:59:00 $ $Revision: 1.2 $ */ /* this produces a raw ppm file, with a 15-character header of * "P6 3-digit-width 3-digit-height 255\n" */ diff --git a/win/share/thintile.c b/win/share/thintile.c index 10ac899ed..def85c5af 100644 --- a/win/share/thintile.c +++ b/win/share/thintile.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 thintile.c $Date$ $Revision$ */ +/* NetHack 3.5 thintile.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 thintile.c $Date: 2012/01/10 17:47:40 $ $Revision: 1.5 $ */ /* Copyright (c) NetHack Development Team 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/share/tile.doc b/win/share/tile.doc index c3b24e68f..7b776813c 100644 --- a/win/share/tile.doc +++ b/win/share/tile.doc @@ -1,4 +1,5 @@ -NetHack 3.5 tile.doc $Date$ $Revision$ +NetHack 3.5 tile.doc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +NetHack 3.5 tile.doc $Date: 2009/05/06 10:59:00 $ $Revision: 1.2 $ Window ports can optionally make use of the tiles (pictures for NetHack symbols) found in this directory. They are distributed in a text format diff --git a/win/share/tile.h b/win/share/tile.h index e2249414f..037f7f95f 100644 --- a/win/share/tile.h +++ b/win/share/tile.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 tile.h $Date$ $Revision$ */ +/* NetHack 3.5 tile.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tile.h $Date: 2009/05/06 21:59:39 $ $Revision: 1.6 $ */ typedef unsigned char pixval; typedef struct pixel_s { diff --git a/win/share/tile2bmp.c b/win/share/tile2bmp.c index 775c2ff68..fde808967 100644 --- a/win/share/tile2bmp.c +++ b/win/share/tile2bmp.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 tile2bmp.c $Date$ $Revision$ */ +/* NetHack 3.5 tile2bmp.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tile2bmp.c $Date: 2009/05/06 10:59:00 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)tile2bmp.c 3.5 2002/03/14 */ /* Copyright (c) NetHack PC Development Team 1995 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/share/tilemap.c b/win/share/tilemap.c index ab118cad1..06c966113 100644 --- a/win/share/tilemap.c +++ b/win/share/tilemap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 tilemap.c $Date$ $Revision$ */ +/* NetHack 3.5 tilemap.c $NHDT-Date: 1425082379 2015/02/28 00:12:59 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.12 $ */ +/* NetHack 3.5 tilemap.c $Date: 2009/05/06 10:59:02 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)tilemap.c 3.5 2000/06/04 */ /* NetHack may be freely redistributed. See license for details. */ @@ -41,49 +42,22 @@ struct conditionals { { MON_GLYPH, PM_BABY_SILVER_DRAGON, "baby shimmering dragon" }, { MON_GLYPH, PM_SILVER_DRAGON, "shimmering dragon" }, { MON_GLYPH, PM_JABBERWOCK, "vorpal jabberwock" }, -#ifndef KOPS - { MON_GLYPH, PM_JABBERWOCK, "Keystone Kop" }, - { MON_GLYPH, PM_JABBERWOCK, "Kop Sergeant" }, - { MON_GLYPH, PM_JABBERWOCK, "Kop Lieutenant" }, - { MON_GLYPH, PM_JABBERWOCK, "Kop Kaptain" }, -#endif { MON_GLYPH, PM_VAMPIRE_LORD, "vampire mage" }, #ifndef CHARON /* not supported yet */ { MON_GLYPH, PM_CROESUS, "Charon" }, #endif #ifndef MAIL { MON_GLYPH, PM_FAMINE, "mail daemon" }, -#endif -#ifndef TOURIST - { MON_GLYPH, PM_SAMURAI, "tourist" }, #endif /* commented out in monst.c at present */ { MON_GLYPH, PM_SHAMAN_KARNOV, "Earendil" }, { MON_GLYPH, PM_SHAMAN_KARNOV, "Elwing" }, -#ifndef TOURIST - { MON_GLYPH, PM_LORD_SATO, "Twoflower" }, -#endif /* commented out in monst.c at present */ { MON_GLYPH, PM_CHROMATIC_DRAGON, "Goblin King" }, { MON_GLYPH, PM_NEANDERTHAL, "High-elf" }, -#ifndef TOURIST - { MON_GLYPH, PM_ROSHI, "guide" }, -#endif -#ifndef KOPS - { OBJ_GLYPH, CLUB, "rubber hose" }, -#endif /* objects commented out in objects.c at present */ { OBJ_GLYPH, SILVER_DRAGON_SCALE_MAIL, "shimmering dragon scale mail" }, { OBJ_GLYPH, SILVER_DRAGON_SCALES, "shimmering dragon scales" }, -#ifndef TOURIST - { OBJ_GLYPH, LEATHER_JACKET, "Hawaiian shirt" }, - { OBJ_GLYPH, LEATHER_JACKET, "T-shirt" }, - { OBJ_GLYPH, LOCK_PICK, "credit card" }, - { OBJ_GLYPH, MAGIC_LAMP, "expensive camera" }, -#endif -#ifndef STEED - { OBJ_GLYPH, TOWEL, "saddle" }, -#endif /* allow slime mold to look like slice of pizza, since we * don't know what a slime mold should look like when renamed anyway */ @@ -183,23 +157,10 @@ int set, entry; tilenum = 0; /* set-relative number */ for (i = 0; i < (MAXPCHARS - MAXEXPCHARS); i++) { if (set == OTH_GLYPH && tilenum == entry) { - if (*defsyms[i].explanation) + if (*defsyms[i].explanation) { return defsyms[i].explanation; - else { - /* if SINKS are turned off, this - * string won't be there (and can't be there - * to prevent symbol-identification and - * special-level mimic appearances from - * thinking the items exist) - */ - switch (i) { - case S_sink: - Sprintf(buf, "sink"); - break; - default: - Sprintf(buf, "cmap %d", tilenum); - break; - } + } else { + Sprintf(buf, "cmap %d", tilenum); return buf; } } diff --git a/win/share/tiletext.c b/win/share/tiletext.c index f17716251..d8a9c41db 100644 --- a/win/share/tiletext.c +++ b/win/share/tiletext.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 tiletext.c $Date$ $Revision$ */ +/* NetHack 3.5 tiletext.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 tiletext.c $Date: 2009/05/06 10:59:03 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)tiletext.c 3.5 1999/10/24 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/tty/getline.c b/win/tty/getline.c index 60d97e7fe..4a2d8c251 100644 --- a/win/tty/getline.c +++ b/win/tty/getline.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 getline.c $Date$ $Revision$ */ +/* NetHack 3.5 getline.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 getline.c $Date: 2011/12/11 01:54:56 $ $Revision: 1.18 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -23,25 +24,6 @@ extern int NDECL(extcmd_via_menu); /* cmd.c */ extern char erase_char, kill_char; /* from appropriate tty.c file */ -/* cloned from topl.c, but not identical - */ -#ifdef UNICODE_WIDEWINPORT - /* nhwchar is wchar; data from core needs narrow-to-wide conversion; - data going back to core needs wide-to-narrow conversion; data - used within tty routines typically needs wide-to-wide awareness */ -STATIC_VAR nhwchar getl_wbuf[BUFSZ]; -STATIC_VAR char getl_nbuf[BUFSZ]; -#define T(x) L##x -#define Waddtopl(str) addtopl(nhwstrcpy(getl_wbuf,str)) -#define Wputsyms(str) putsyms(nhwstrcpy(getl_wbuf,str)) -#define NWstrcpy(wdst,src) nhwstrcpy(wdst,src) /* narrow-to-wide */ -#else /*!UNICODE_WIDEWINPORT*/ - /* nhwchar is char; no conversions needed */ -#define T(x) x -#define Waddtopl(str) addtopl(str) -#define Wputsyms(str) putsyms(str) -#endif /*?UNICODE_WIDEWINPORT*/ - /* * Read a line closed with '\n' into the array char bufp[BUFSZ]. * (The '\n' is not stored. The string is closed with a '\0'.) @@ -75,13 +57,8 @@ getlin_hook_proc hook; *obufp = 0; for(;;) { (void) fflush(stdout); -#ifdef UNICODE_WIDEWINPORT - Strcat(strcat(strcpy(getl_nbuf, query), " "), obufp); - (void)NWstrcpy(toplines, getl_nbuf); -#else Strcat(strcat(strcpy(toplines, query), " "), obufp); -#endif - c = Getchar(); + c = pgetchar(); if (c == '\033' || c == EOF) { obufp[0] = '\033'; obufp[1] = '\0'; @@ -99,10 +76,10 @@ getlin_hook_proc hook; ttyDisplay->inread = sav; tty_clear_nhwindow(WIN_MESSAGE); cw->maxcol = cw->maxrow; - Waddtopl(query); - Waddtopl(T(" ")); + addtopl(query); + addtopl(" "); *bufp = 0; - Waddtopl(obufp); + addtopl(obufp); } else { if (!doprev) (void) tty_doprev_message();/* need two initially */ @@ -114,10 +91,10 @@ getlin_hook_proc hook; tty_clear_nhwindow(WIN_MESSAGE); cw->maxcol = cw->maxrow; doprev = 0; - Waddtopl(query); - Waddtopl(T(" ")); + addtopl(query); + addtopl(" "); *bufp = 0; - Waddtopl(obufp); + addtopl(obufp); } if(c == erase_char || c == '\b') { if(bufp != obufp) { @@ -127,11 +104,11 @@ getlin_hook_proc hook; #endif /* NEWAUTOCOMP */ bufp--; #ifndef NEWAUTOCOMP - putsyms(T("\b \b"));/* putsym converts \b */ + putsyms("\b \b");/* putsym converts \b */ #else /* NEWAUTOCOMP */ - putsyms(T("\b")); - for (i = bufp; *i; ++i) putsyms(T(" ")); - for (; i > bufp; --i) putsyms(T("\b")); + putsyms("\b"); + for (i = bufp; *i; ++i) putsyms(" "); + for (; i > bufp; --i) putsyms("\b"); *bufp = 0; #endif /* NEWAUTOCOMP */ } else tty_nhbell(); @@ -154,21 +131,21 @@ getlin_hook_proc hook; #endif /* NEWAUTOCOMP */ *bufp = c; bufp[1] = 0; - Wputsyms(bufp); + putsyms(bufp); bufp++; if (hook && (*hook)(obufp)) { - Wputsyms(bufp); + putsyms(bufp); #ifndef NEWAUTOCOMP bufp = eos(bufp); #else /* NEWAUTOCOMP */ /* pointer and cursor left where they were */ - for (i = bufp; *i; ++i) putsyms(T("\b")); + for (i = bufp; *i; ++i) putsyms("\b"); } else if (i > bufp) { char *s = i; /* erase rest of prior guess */ - for (; i > bufp; --i) putsyms(T(" ")); - for (; s > bufp; --s) putsyms(T("\b")); + for (; i > bufp; --i) putsyms(" "); + for (; s > bufp; --s) putsyms("\b"); #endif /* NEWAUTOCOMP */ } } else if(c == kill_char || c == '\177') { /* Robert Viduya */ @@ -176,11 +153,11 @@ getlin_hook_proc hook; #ifndef NEWAUTOCOMP while(bufp != obufp) { bufp--; - putsyms(T("\b \b")); + putsyms("\b \b"); } #else /* NEWAUTOCOMP */ - for (; *bufp; ++bufp) putsyms(T(" ")); - for (; bufp != obufp; --bufp) putsyms(T("\b \b")); + for (; *bufp; ++bufp) putsyms(" "); + for (; bufp != obufp; --bufp) putsyms("\b \b"); *bufp = 0; #endif /* NEWAUTOCOMP */ } else @@ -191,8 +168,6 @@ getlin_hook_proc hook; clear_nhwindow(WIN_MESSAGE); /* clean up after ourselves */ } -#undef T - void xwaitforspace(s) register const char *s; /* chars allowed besides return */ @@ -270,26 +245,20 @@ tty_get_ext_cmd() if (iflags.extmenu) return extcmd_via_menu(); /* maybe a runtime option? */ /* hooked_tty_getlin("#", buf, flags.cmd_comp ? ext_cmd_getlin_hook : (getlin_hook_proc) 0); */ -#ifdef REDO hooked_tty_getlin("#", buf, in_doagain ? (getlin_hook_proc)0 : ext_cmd_getlin_hook); -#else - hooked_tty_getlin("#", buf, ext_cmd_getlin_hook); -#endif (void) mungspaces(buf); if (buf[0] == 0 || buf[0] == '\033') return -1; for (i = 0; extcmdlist[i].ef_txt != (char *)0; i++) if (!strcmpi(buf, extcmdlist[i].ef_txt)) break; -#ifdef REDO if (!in_doagain) { int j; for (j = 0; buf[j]; j++) savech(buf[j]); savech('\n'); } -#endif if (extcmdlist[i].ef_txt == (char *)0) { pline("%s: unknown extended command.", buf); diff --git a/win/tty/termcap.c b/win/tty/termcap.c index d3bd5d661..563491c48 100644 --- a/win/tty/termcap.c +++ b/win/tty/termcap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 termcap.c $Date$ $Revision$ */ +/* NetHack 3.5 termcap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 termcap.c $Date: 2009/05/06 10:59:19 $ $Revision: 1.13 $ */ /* SCCS Id: @(#)termcap.c 3.5 2007/12/12 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/tty/topl.c b/win/tty/topl.c index ed735f375..db307b73a 100644 --- a/win/tty/topl.c +++ b/win/tty/topl.c @@ -1,4 +1,4 @@ -/* NetHack 3.5 topl.c $Date$ $Revision$ */ +/* NetHack 3.5 topl.c $NHDT-Date: 1425081315 2015/02/27 23:55:15 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.24 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -14,44 +14,8 @@ #define C(c) (0x1f & (c)) #endif -/* use caution with this stuff; it's very easy to get things mixed up... - */ -#ifdef UNICODE_WIDEWINPORT - /* nhwchar is wchar; data from core needs narrow-to-wide conversion; - data going back to core needs wide-to-narrow conversion; data - used within tty routines typically needs wide-to-wide awareness */ -STATIC_VAR nhwchar topl_wbuf[BUFSZ]; -STATIC_VAR char topl_nbuf[BUFSZ]; -#define T(x) L##x -#define DoGputch(x) ((x) >= 0x80) -#define Waddtopl(str) addtopl(nhwstrcpy(topl_wbuf,str)) -#define Wputstr(win,atr,wstr) putstr(win,atr,strnhwcpy(topl_nbuf,wstr)) -#define Windex(wstr,wchr) nhwindex(wstr,wchr) -#define Wstrlen(wstr) (int)nhwlen(wstr) -#define NWstrcpy(wdst,src) nhwstrcpy(wdst,src) /* narrow-to-wide */ -#define WNstrcpy(dst,wsrc) strnhwcpy(dst,wsrc) /* wide-to-narrow */ -#define WWstrcpy(wdst,wsrc) nhwcpy(wdst,wsrc) /* wide-to-wide */ -#define WWstrcat(wdst,wsrc) nhwcat(wdst,wsrc) -#define WWstrncpy(wdst,wsrc,ln nhwncpy(wdst,wsrc,ln) -#define WWstrncmp(wst1,wst2,ln) nhwncmp(wst1,wst2,ln) -#else /*!UNICODE_WIDEWINPORT*/ - /* nhwchar is char; no conversions needed */ -#define T(x) x -#define DoGputch(x) ((x) & 0x80) -#define Waddtopl(str) addtopl(str) -#define Wputstr(win,atr,str) putstr(win,atr,str) -#define Windex(wstr,wchr) index(wstr,wchr) -#define Wstrlen(wstr) (int)strlen(wstr) -#define NWstrcpy(wdst,src) strcpy(wdst,src) -#define WNstrcpy(dst,wsrc) strcpy(dst,wsrc) -#define WWstrcpy(wdst,wsrc) strcpy(wdst,wsrc) -#define WWstrcat(wdst,wsrc) strcat(wdst,wsrc) -#define WWstrncpy(wdst,wsrc,ln) strncpy(wdst,wsrc,ln) -#define WWstrncmp(wst1,wst2,ln) strncmp(wst1,wst2,ln) -#endif /*?UNICODE_WIDEWINPORT*/ - -STATIC_DCL void FDECL(redotoplin, (const nhwchar*)); -STATIC_DCL void FDECL(topl_putsym, (NHWCHAR_P)); +STATIC_DCL void FDECL(redotoplin, (const char*)); +STATIC_DCL void FDECL(topl_putsym, (CHAR_P)); STATIC_DCL void NDECL(remember_topl); STATIC_DCL void FDECL(removetopl, (int)); STATIC_DCL void FDECL(msghistory_snapshot, (BOOLEAN_P)); @@ -61,9 +25,9 @@ int tty_doprev_message() { register struct WinDesc *cw = wins[WIN_MESSAGE]; + winid prevmsg_win; int i; - if ((iflags.prevmsg_window != 's') && !ttyDisplay->inread) { /* not single */ if(iflags.prevmsg_window == 'f') { /* full */ prevmsg_win = create_nhwindow(NHW_MENU); @@ -72,11 +36,11 @@ tty_doprev_message() cw->maxcol = cw->maxrow; i = cw->maxcol; do { - if (cw->data[i] && *cw->data[i]) - Wputstr(prevmsg_win, 0, cw->data[i]); + if(cw->data[i] && strcmp(cw->data[i], "") ) + putstr(prevmsg_win, 0, cw->data[i]); i = (i + 1) % cw->rows; } while (i != cw->maxcol); - Wputstr(prevmsg_win, 0, toplines); + putstr(prevmsg_win, 0, toplines); display_nhwindow(prevmsg_win, TRUE); destroy_nhwindow(prevmsg_win); } else if (iflags.prevmsg_window == 'c') { /* combination */ @@ -103,12 +67,11 @@ tty_doprev_message() cw->maxcol = cw->maxrow; i = cw->maxcol; do { - if (cw->data[i] && *cw->data[i]) - Wputstr(prevmsg_win, 0, cw->data[i]); + if(cw->data[i] && strcmp(cw->data[i], "") ) + putstr(prevmsg_win, 0, cw->data[i]); i = (i + 1) % cw->rows; } while (i != cw->maxcol); - - Wputstr(prevmsg_win, 0, toplines); + putstr(prevmsg_win, 0, toplines); display_nhwindow(prevmsg_win, TRUE); destroy_nhwindow(prevmsg_win); } @@ -120,11 +83,11 @@ tty_doprev_message() prevmsg_win = create_nhwindow(NHW_MENU); putstr(prevmsg_win, 0, "Message History"); putstr(prevmsg_win, 0, ""); - Wputstr(prevmsg_win, 0, toplines); + putstr(prevmsg_win, 0, toplines); cw->maxcol=cw->maxrow-1; if(cw->maxcol < 0) cw->maxcol = cw->rows-1; do { - Wputstr(prevmsg_win, 0, cw->data[cw->maxcol]); + putstr(prevmsg_win, 0, cw->data[cw->maxcol]); cw->maxcol--; if (cw->maxcol < 0) cw->maxcol = cw->rows-1; if (!cw->data[cw->maxcol]) @@ -155,19 +118,19 @@ tty_doprev_message() } STATIC_OVL void -redotoplin(symstr) - const nhwchar *symstr; +redotoplin(str) + const char *str; { int otoplin = ttyDisplay->toplin; home(); - if (DoGputch(*symstr)) { + if(*str & 0x80) { /* kludge for the / command, the only time we ever want a */ /* graphics character on the top line */ - g_putch((int)*symstr++); + g_putch((int)*str++); ttyDisplay->curx++; } end_glyphout(); /* in case message printed during graphics output */ - putsyms(symstr); + putsyms(str); cl_end(); ttyDisplay->toplin = 1; if(ttyDisplay->cury && otoplin != 3) @@ -179,25 +142,25 @@ remember_topl() { register struct WinDesc *cw = wins[WIN_MESSAGE]; int idx = cw->maxrow; - unsigned len; + unsigned len = strlen(toplines) + 1; if ((cw->flags & WIN_LOCKHISTORY) || !*toplines) return; - len = Wstrlen(toplines) + 1; + if (len > (unsigned)cw->datlen[idx]) { if (cw->data[idx]) free(cw->data[idx]); len += (8 - (len & 7)); /* pad up to next multiple of 8 */ - cw->data[idx] = (nhwchar *)alloc(sizeof(nhwchar) * len); + cw->data[idx] = (char *)alloc(len); cw->datlen[idx] = (short)len; } - (void)WWstrcpy(cw->data[idx], toplines); + Strcpy(cw->data[idx], toplines); *toplines = '\0'; cw->maxcol = cw->maxrow = (idx + 1) % cw->rows; } void addtopl(s) -const nhwchar *s; +const char *s; { register struct WinDesc *cw = wins[WIN_MESSAGE]; @@ -218,8 +181,7 @@ more() if(ttyDisplay->toplin) { tty_curs(BASE_WINDOW, cw->curx+1, cw->cury); - if(cw->curx >= CO - 8) - topl_putsym(T('\n')); + if(cw->curx >= CO - 8) topl_putsym('\n'); } if(flags.standout) @@ -248,22 +210,22 @@ more() void update_topl(bp) - register const nhwchar *bp; + register const char *bp; { - register nhwchar *tl, *otl; + register char *tl, *otl; register int n0; int notdied = 1; struct WinDesc *cw = wins[WIN_MESSAGE]; /* If there is room on the line, print message on same line */ /* But messages like "You die..." deserve their own line */ - n0 = Wstrlen(bp); + n0 = strlen(bp); if ((ttyDisplay->toplin == 1 || (cw->flags & WIN_STOP)) && cw->cury == 0 && - n0 + Wstrlen(toplines) + 3 < CO-8 && /* room for --More-- */ - (notdied = WWstrncmp(bp, T("You die"), 7))) { - (void)WWstrcat(toplines, T(" ")); - (void)WWstrcat(toplines, bp); + n0 + (int)strlen(toplines) + 3 < CO-8 && /* room for --More-- */ + (notdied = strncmp(bp, "You die", 7))) { + Strcat(toplines, " "); + Strcat(toplines, bp); cw->curx += 2; if(!(cw->flags & WIN_STOP)) addtopl(bp); @@ -276,7 +238,7 @@ update_topl(bp) } } remember_topl(); - (void)WWstrncpy(toplines, bp, TBUFSZ); + (void) strncpy(toplines, bp, TBUFSZ); toplines[TBUFSZ - 1] = 0; for(tl = toplines; n0 >= CO; ){ @@ -284,11 +246,11 @@ update_topl(bp) for(tl+=CO-1; tl != otl && !isspace(*tl); --tl) ; if(tl == otl) { /* Eek! A huge token. Try splitting after it. */ - tl = Windex(otl, T(' ')); + tl = index(otl, ' '); if (!tl) break; /* No choice but to spit it out whole. */ } - *tl++ = T('\n'); - n0 = Wstrlen(tl); + *tl++ = '\n'; + n0 = strlen(tl); } if(!notdied) cw->flags &= ~WIN_STOP; if(!(cw->flags & WIN_STOP)) redotoplin(toplines); @@ -297,21 +259,21 @@ update_topl(bp) STATIC_OVL void topl_putsym(c) - nhwchar c; + char c; { register struct WinDesc *cw = wins[WIN_MESSAGE]; if(cw == (struct WinDesc *) 0) panic("Putsym window MESSAGE nonexistant"); switch(c) { - case T('\b'): + case '\b': if(ttyDisplay->curx == 0 && ttyDisplay->cury > 0) tty_curs(BASE_WINDOW, CO, (int)ttyDisplay->cury-1); backsp(); ttyDisplay->curx--; cw->curx = ttyDisplay->curx; return; - case T('\n'): + case '\n': cl_end(); ttyDisplay->curx = 0; ttyDisplay->cury++; @@ -322,7 +284,7 @@ topl_putsym(c) break; default: if(ttyDisplay->curx == CO-1) - topl_putsym(T('\n')); /* 1 <= curx <= CO; avoid CO */ + topl_putsym('\n'); /* 1 <= curx <= CO; avoid CO */ #ifdef WIN32CON (void) putchar(c); #endif @@ -336,11 +298,11 @@ topl_putsym(c) } void -putsyms(symstr) - const nhwchar *symstr; +putsyms(str) + const char *str; { - while(*symstr) - topl_putsym(*symstr++); + while(*str) + topl_putsym(*str++); } STATIC_OVL void @@ -348,8 +310,7 @@ removetopl(n) register int n; { /* assume addtopl() has been done, so ttyDisplay->toplin is already set */ - while (n-- > 0) - putsyms(T("\b \b")); + while (n-- > 0) putsyms("\b \b"); } extern char erase_char; /* from xxxtty.c; don't need kill_char */ @@ -412,7 +373,7 @@ char def; ttyDisplay->inread = sav; tty_clear_nhwindow(WIN_MESSAGE); cw->maxcol = cw->maxrow; - Waddtopl(prompt); + addtopl(prompt); } else { if(!doprev) (void) tty_doprev_message(); /* need two initially */ @@ -428,7 +389,7 @@ char def; tty_clear_nhwindow(WIN_MESSAGE); cw->maxcol = cw->maxrow; doprev = 0; - Waddtopl(prompt); + addtopl(prompt); q = '\0'; /* force another loop iteration */ continue; } @@ -449,14 +410,13 @@ char def; tty_nhbell(); q = (char)0; } else if (q == '#' || digit_ok) { - char z; - nhwchar digit_string[2]; + char z, digit_string[2]; int n_len = 0; long value = 0; - addtopl(T("#")), n_len++; - digit_string[1] = (nhwchar)0; + addtopl("#"), n_len++; + digit_string[1] = '\0'; if (q != '#') { - digit_string[0] = (nhwchar)q; + digit_string[0] = q; addtopl(digit_string), n_len++; value = q - '0'; q = '#'; @@ -466,7 +426,7 @@ char def; if (digit(z)) { value = (10 * value) + (z - '0'); if (value < 0) break; /* overflow: try again */ - digit_string[0] = (nhwchar)z; + digit_string[0] = z; addtopl(digit_string), n_len++; } else if (z == 'y' || index(quitchars, z)) { if (z == '\033') value = -1; /* abort */ @@ -491,7 +451,7 @@ char def; if (q != '#') { Sprintf(rtmp, "%c", q); - Waddtopl(rtmp); + addtopl(rtmp); } clean_up: ttyDisplay->inread--; @@ -504,7 +464,7 @@ char def; } /* shared by tty_getmsghistory() and tty_putmsghistory() */ -static nhwchar **snapshot_mesgs = 0; +static char **snapshot_mesgs = 0; /* collect currently available message history data into a sequential array; optionally, purge that data from the active circular buffer set as we go */ @@ -512,7 +472,7 @@ STATIC_OVL void msghistory_snapshot(purge) boolean purge; /* clear message history buffer as we copy it */ { - nhwchar *mesg; + char *mesg; int i, inidx, outidx; struct WinDesc *cw; @@ -527,24 +487,24 @@ boolean purge; /* clear message history buffer as we copy it */ history updating to take place because that could clobber them */ if (!purge) cw->flags |= WIN_LOCKHISTORY; - snapshot_mesgs = (nhwchar **)alloc((cw->rows + 1) * sizeof (nhwchar *)); + snapshot_mesgs = (char **)alloc((cw->rows + 1) * sizeof (char *)); outidx = 0; inidx = cw->maxrow; for (i = 0; i < cw->rows; ++i) { - snapshot_mesgs[i] = (nhwchar *)0; + snapshot_mesgs[i] = (char *)0; mesg = cw->data[inidx]; if (mesg && *mesg) { snapshot_mesgs[outidx++] = mesg; if (purge) { /* we're taking this pointer away; subsequest history updates will eventually allocate a new one to replace it */ - cw->data[inidx] = (nhwchar *)0; + cw->data[inidx] = (char *)0; cw->datlen[inidx] = 0; } } inidx = (inidx + 1) % cw->rows; } - snapshot_mesgs[cw->rows] = (nhwchar *)0; /* sentinel */ + snapshot_mesgs[cw->rows] = (char *)0; /* sentinel */ /* for a destructive snapshot, history is now completely empty */ if (purge) cw->maxcol = cw->maxrow = 0; @@ -564,7 +524,7 @@ boolean purged; /* True: took history's pointers, False: just cloned them */ free((genericptr_t)snapshot_mesgs[i]); } - free((genericptr_t)snapshot_mesgs), snapshot_mesgs = (nhwchar **)0; + free((genericptr_t)snapshot_mesgs), snapshot_mesgs = (char **)0; /* history can resume being updated at will now... */ if (!purged) wins[WIN_MESSAGE]->flags &= ~WIN_LOCKHISTORY; @@ -586,7 +546,7 @@ tty_getmsghistory(init) boolean init; { static int nxtidx; - nhwchar *nextmesg; + char *nextmesg; char *result = 0; if (init) { @@ -597,11 +557,7 @@ boolean init; if (snapshot_mesgs) { nextmesg = snapshot_mesgs[nxtidx++]; if (nextmesg) { -#ifdef UNICODE_WIDEWINPORT - result = WNstrcpy(topl_nbuf, nextmesg); /* wide-to-narrow */ -#else result = (char *)nextmesg; -#endif } else { free_msghistory_snapshot(FALSE); } @@ -647,12 +603,12 @@ boolean restoring_msghist; if (msg) { /* move most recent message to history, make this become most recent */ remember_topl(); - (void)NWstrcpy(toplines, msg); /* narrow-to-wide */ + Strcpy(toplines, msg); } else if (snapshot_mesgs) { /* done putting arbitrary messages in; put the snapshot ones back */ for (idx = 0; snapshot_mesgs[idx]; ++idx) { remember_topl(); - (void)WWstrcpy(toplines, snapshot_mesgs[idx]); /* wide-to-wide */ + Strcpy(toplines, snapshot_mesgs[idx]); } /* now release the snapshot */ free_msghistory_snapshot(TRUE); diff --git a/win/tty/wintty.c b/win/tty/wintty.c index 1d56f49ad..a526897b7 100644 --- a/win/tty/wintty.c +++ b/win/tty/wintty.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 wintty.c $Date$ $Revision$ */ +/* NetHack 3.5 wintty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 wintty.c $Date: 2012/01/22 06:27:09 $ $Revision: 1.66 $ */ /* Copyright (c) David Cohrs, 1991 */ /* NetHack may be freely redistributed. See license for details. */ @@ -42,11 +43,6 @@ extern char mapped_menu_cmds[]; /* from options.c */ /* this is only needed until tty_status_* routines are written */ extern NEARDATA winid WIN_STATUS; -#ifdef UNICODE_WIDEWINPORT -void FDECL(tty_putmixed,(winid,int,const char *)); -void FDECL(tty_putstr_core,(winid,int,const nhwchar *)); -#endif - /* Interface definition, for windows.c */ struct window_procs tty_procs = { "tty", @@ -74,11 +70,7 @@ struct window_procs tty_procs = { tty_destroy_nhwindow, tty_curs, tty_putstr, -#ifdef UNICODE_WIDEWINPORT - tty_putmixed, -#else genl_putmixed, -#endif tty_display_file, tty_start_menu, tty_add_menu, @@ -150,12 +142,7 @@ static char obuf[BUFSIZ]; /* BUFSIZ is defined in stdio.h */ #endif static char winpanicstr[] = "Bad window id %d"; -#ifdef UNICODE_WIDEWINPORT -nhwchar defmorestr[] = L"--More--"; -#else -nhwchar defmorestr[] = "--More--"; -#endif -nhwchar emptysym[1] = {0}; +char defmorestr[] = "--More--"; #ifdef CLIPPING # if defined(USE_TILES) && defined(MSDOS) @@ -195,11 +182,8 @@ STATIC_DCL void FDECL(process_menu_window, (winid,struct WinDesc *)); STATIC_DCL void FDECL(process_text_window, (winid,struct WinDesc *)); STATIC_DCL tty_menu_item *FDECL(reverse, (tty_menu_item *)); STATIC_DCL const char * FDECL(compress_str, (const char *)); -STATIC_DCL void FDECL(tty_putsym, (winid, int, int, NHWCHAR_P)); +STATIC_DCL void FDECL(tty_putsym, (winid, int, int, CHAR_P)); STATIC_DCL char *FDECL(copy_of, (const char *)); -#ifdef UNICODE_WIDEWINPORT -STATIC_DCL nhwchar *FDECL(nhwchar_copy_of, (const nhwchar *)); -#endif STATIC_DCL void FDECL(bail, (const char *)); /* __attribute__((noreturn)) */ /* @@ -294,11 +278,7 @@ if(wc_tracelogf) for(i=WIN_INVEN; i < MAXWIN; i++) if(wins[i] && wins[i]->active) { /* cop-out */ -#ifdef UNICODE_WIDEWINPORT - addtopl(L"Press Return to continue: "); -#else addtopl("Press Return to continue: "); -#endif break; } (void) fflush(stdout); @@ -1119,24 +1099,24 @@ tty_create_nhwindow(type) if(newwin->maxrow) { newwin->data = - (nhwchar **) alloc(sizeof(nhwchar *) * (unsigned)newwin->maxrow); + (char **) alloc(sizeof(char *) * (unsigned)newwin->maxrow); newwin->datlen = (short *) alloc(sizeof(short) * (unsigned)newwin->maxrow); if(newwin->maxcol) { for (i = 0; i < newwin->maxrow; i++) { - newwin->data[i] = (nhwchar *) alloc(sizeof(nhwchar) * (unsigned)newwin->maxcol); + newwin->data[i] = (char *) alloc((unsigned)newwin->maxcol); newwin->datlen[i] = newwin->maxcol; } } else { for (i = 0; i < newwin->maxrow; i++) { - newwin->data[i] = (nhwchar *) 0; + newwin->data[i] = (char *) 0; newwin->datlen[i] = 0; } } if(newwin->type == NHW_MESSAGE) newwin->maxrow = 0; } else { - newwin->data = (nhwchar **)0; + newwin->data = (char **)0; newwin->datlen = (short *)0; } @@ -1174,12 +1154,12 @@ free_window_info(cw, free_data) for(i=0; imaxrow; i++) if(cw->data[i]) { free((genericptr_t)cw->data[i]); - cw->data[i] = (nhwchar *)0; + cw->data[i] = (char *)0; if (cw->datlen) cw->datlen[i] = 0; } if (free_data) { free((genericptr_t)cw->data); - cw->data = (nhwchar **)0; + cw->data = (char **)0; if (cw->datlen) free((genericptr_t)cw->datlen); cw->datlen = (short *)0; cw->rows = 0; @@ -1253,25 +1233,15 @@ dmore(cw, s) register struct WinDesc *cw; const char *s; /* valid responses */ { -#ifdef UNICODE_WIDEWINPORT - char buf[BUFSZ]; -#endif - const nhwchar *prompt = cw->morestr ? cw->morestr : defmorestr; - + const char *prompt = cw->morestr ? cw->morestr : defmorestr; int offset = (cw->type == NHW_TEXT) ? 1 : 2; tty_curs(BASE_WINDOW, (int)ttyDisplay->curx + offset, (int)ttyDisplay->cury); if(flags.standout) standoutbeg(); -#ifdef UNICODE_WIDEWINPORT - strnhwcpy(buf, prompt); - xputs(buf); - ttyDisplay->curx += strlen(buf); -#else xputs(prompt); ttyDisplay->curx += strlen(prompt); -#endif if(flags.standout) standoutend(); @@ -1386,13 +1356,13 @@ struct WinDesc *cw; long count; int n, curr_page, page_lines; boolean finished, counting, reset_count; - char *cp, *rp, resp[QBUFSZ], gacc[QBUFSZ]; - nhwchar *msave, *morestr; + char *cp, *rp, resp[QBUFSZ], gacc[QBUFSZ], + *msave, *morestr; curr_page = page_lines = 0; page_start = page_end = 0; msave = cw->morestr; /* save the morestr */ - cw->morestr = morestr = (nhwchar*) alloc(sizeof(nhwchar) * (unsigned) QBUFSZ); + cw->morestr = morestr = (char*) alloc((unsigned) QBUFSZ); counting = FALSE; count = 0L; reset_count = TRUE; @@ -1509,41 +1479,20 @@ struct WinDesc *cw; Strcat(resp, gacc); /* group accelerators */ Strcat(resp, mapped_menu_cmds); - if (cw->npages > 1) { -#ifdef UNICODE_WIDEWINPORT - char buf[BUFSZ]; - Sprintf(buf, "(%d of %d)", - curr_page + 1, (int) cw->npages); - (void)nhwstrcpy(cw->morestr, buf); -#else + if (cw->npages > 1) Sprintf(cw->morestr, "(%d of %d)", curr_page + 1, (int) cw->npages); -#endif - } else if (msave) { -#ifdef UNICODE_WIDEWINPORT - (void)nhwcpy(cw->morestr, msave); -#else + else if (msave) Strcpy(cw->morestr, msave); -#endif - } else { -#ifdef UNICODE_WIDEWINPORT - (void)nhwcpy(cw->morestr, defmorestr); -#else + else Strcpy(cw->morestr, defmorestr); -#endif - } + tty_curs(window, 1, page_lines); cl_end(); dmore(cw, resp); } else { /* just put the cursor back... */ - tty_curs(window, -#ifdef UNICODE_WIDEWINPORT - (int) nhwlen(cw->morestr) + 2, -#else - (int) strlen(cw->morestr) + 2, -#endif - page_lines); + tty_curs(window, (int) strlen(cw->morestr) + 2, page_lines); xwaitforspace(resp); } @@ -1707,7 +1656,7 @@ winid window; struct WinDesc *cw; { int i, n, attr; - register nhwchar *cp; + register char *cp; for (n = 0, i = 0; i < cw->maxrow; i++) { if (!cw->offx && (n + cw->offy == ttyDisplay->rows - 1)) { @@ -1745,11 +1694,7 @@ struct WinDesc *cw; *cp && (int) ttyDisplay->curx < (int) ttyDisplay->cols; cp++, ttyDisplay->curx++) #endif -#ifdef UNICODE_WIDEWINPORT - u_putch(*cp); -#else (void) putchar(*cp); -#endif term_end_attr(attr); } } @@ -1945,7 +1890,7 @@ register int x, y; /* not xchar: perhaps xchar is unsigned and case NHW_TEXT: s = "[text window]"; break; case NHW_BASE: s = "[base window]"; break; } - impossible("bad curs positioning win %d %s (%d,%d)", window, s, x, y); + debugpline("bad curs positioning win %d %s (%d,%d)", window, s, x, y); return; } #endif @@ -1995,7 +1940,7 @@ STATIC_OVL void tty_putsym(window, x, y, ch) winid window; int x, y; - nhwchar ch; + char ch; { register struct WinDesc *cw = 0; @@ -2007,11 +1952,7 @@ tty_putsym(window, x, y, ch) case NHW_MAP: case NHW_BASE: tty_curs(window, x, y); -#ifdef UNICODE_WIDEWINPORT - u_putch(ch); -#else (void) putchar(ch); -#endif ttyDisplay->curx++; cw->curx++; break; @@ -2054,14 +1995,9 @@ tty_putstr(window, attr, str) const char *str; { register struct WinDesc *cw = 0; -#ifdef UNICODE_WIDEWINPORT - nhwchar symbuf[BUFSZ]; - register const nhwchar *symstr = symbuf; -#else - register const nhwchar *nb; - register nhwchar *ob; + register char *ob; + register const char *nb; register int i, j, n0; -#endif /* Assume there's a real problem if the window is missing -- * probably a panic message @@ -2076,52 +2012,21 @@ tty_putstr(window, attr, str) return; if(cw->type != NHW_MESSAGE) str = compress_str(str); -#if defined(USER_SOUNDS) && defined(WIN32CON) - else - play_sound_for_message(str); -#endif - -#ifdef UNICODE_WIDEWINPORT - nhwstrcpy(symbuf, str); - tty_putstr_core(window, attr, symstr); -} - -void -tty_putstr_core(window, attr, symstr) - winid window; - int attr; - const nhwchar *symstr; -{ - register struct WinDesc *cw = wins[window]; - register const nhwchar *nb; - register nhwchar *ob; - register int i, j, n0; -#endif ttyDisplay->lastwin = window; switch(cw->type) { case NHW_MESSAGE: /* really do this later */ -#ifdef UNICODE_WIDEWINPORT - update_topl(symstr); -#else - update_topl(str); +#if defined(USER_SOUNDS) && defined(WIN32CON) + play_sound_for_message(str); #endif + update_topl(str); break; case NHW_STATUS: ob = &cw->data[cw->cury][j = cw->curx]; if(context.botlx) *ob = 0; -#ifdef UNICODE_WIDEWINPORT - if(!cw->cury && (int)nhwlen(symstr) >= CO) { - /* the characters before "St:" are unnecessary */ - nb = nhwindex(symstr, L':'); - if(nb && nb > symstr+2) - symstr = nb - 2; - } - nb = symstr; -#else if(!cw->cury && (int)strlen(str) >= CO) { /* the characters before "St:" are unnecessary */ nb = index(str, ':'); @@ -2129,8 +2034,6 @@ tty_putstr_core(window, attr, symstr) str = nb - 2; } nb = str; -#endif - for(i = cw->curx+1, n0 = cw->cols; i < n0; i++, nb++) { if(!*nb) { if(*ob || context.botlx) { @@ -2145,31 +2048,19 @@ tty_putstr_core(window, attr, symstr) if(*ob) ob++; } -#ifdef UNICODE_WIDEWINPORT - (void) nhwncpy(&cw->data[cw->cury][j], symstr, cw->cols - j - 1); -#else (void) strncpy(&cw->data[cw->cury][j], str, cw->cols - j - 1); -#endif - cw->data[cw->cury][cw->cols-1] = (nhwchar)0; /* null terminate */ + cw->data[cw->cury][cw->cols-1] = '\0'; /* null terminate */ cw->cury = (cw->cury+1) % 2; cw->curx = 0; break; case NHW_MAP: tty_curs(window, cw->curx+1, cw->cury); term_start_attr(attr); -#ifdef UNICODE_WIDEWINPORT - while(*symstr && (int) ttyDisplay->curx < (int) ttyDisplay->cols-1) { - u_putch(*symstr); - symstr++; - ttyDisplay->curx++; - } -#else while(*str && (int) ttyDisplay->curx < (int) ttyDisplay->cols-1) { (void) putchar(*str); str++; ttyDisplay->curx++; } -#endif cw->curx = 0; cw->cury++; term_end_attr(attr); @@ -2177,23 +2068,14 @@ tty_putstr_core(window, attr, symstr) case NHW_BASE: tty_curs(window, cw->curx+1, cw->cury); term_start_attr(attr); -#ifdef UNICODE_WIDEWINPORT - while (*symstr) { -#else while (*str) { -#endif if ((int) ttyDisplay->curx >= (int) ttyDisplay->cols-1) { cw->curx = 0; cw->cury++; tty_curs(window, cw->curx+1, cw->cury); } -#ifdef UNICODE_WIDEWINPORT - u_putch(*symstr); - symstr++; -#else (void) putchar(*str); str++; -#endif ttyDisplay->curx++; } cw->curx = 0; @@ -2220,10 +2102,10 @@ tty_putstr_core(window, attr, symstr) } /* always grows one at a time, but alloc 12 at a time */ if(cw->cury >= cw->rows) { - nhwchar **tmp; + char **tmp; cw->rows += 12; - tmp = (nhwchar **) alloc(sizeof(nhwchar *) * (unsigned)cw->rows); + tmp = (char **) alloc(sizeof(char *) * (unsigned)cw->rows); for(i=0; imaxrow; i++) tmp[i] = cw->data[i]; if(cw->data) @@ -2235,19 +2117,10 @@ tty_putstr_core(window, attr, symstr) } if(cw->data[cw->cury]) free((genericptr_t)cw->data[cw->cury]); -#ifdef UNICODE_WIDEWINPORT - n0 = nhwlen(symstr) + 1; -#else n0 = strlen(str) + 1; -#endif - - ob = cw->data[cw->cury] = (nhwchar *)alloc(sizeof(nhwchar) * ((unsigned)n0 + 1)); - *ob++ = (nhwchar)(attr + 1); /* avoid nuls, for convenience */ -#ifdef UNICODE_WIDEWINPORT - (void)nhwcpy(ob, symstr); -#else + ob = cw->data[cw->cury] = (char *)alloc((unsigned)n0 + 1); + *ob++ = (char)(attr + 1); /* avoid nuls, for convenience */ Strcpy(ob, str); -#endif if(n0 > cw->maxcol) cw->maxcol = n0; @@ -2255,19 +2128,11 @@ tty_putstr_core(window, attr, symstr) cw->maxrow = cw->cury; if(n0 > CO) { /* attempt to break the line */ -#ifdef UNICODE_WIDEWINPORT - for(i = CO-1; i && symstr[i] != L' ' && symstr[i] != L'\n';) -#else for(i = CO-1; i && str[i] != ' ' && str[i] != '\n';) -#endif i--; if(i) { - cw->data[cw->cury-1][++i] = (nhwchar)0; -#ifdef UNICODE_WIDEWINPORT - tty_putstr_core(window, attr, &symstr[i]); -#else + cw->data[cw->cury-1][++i] = '\0'; tty_putstr(window, attr, &str[i]); -#endif } } @@ -2275,60 +2140,6 @@ tty_putstr_core(window, attr, symstr) } } -#ifdef UNICODE_WIDEWINPORT -/* - * This differs from putstr() because the str parameter can - * contain a sequence of characters representing: - * \GXXXXNNNN a glyph value, encoded by encglyph(). - * - */ -void -tty_putmixed(window, attr, str) - winid window; - int attr; - const char *str; -{ - nhwchar wbuf[BUFSZ]; - const char *cp = str; - nhwchar *put = wbuf; - while (*cp) { - if (*cp == '\\') { - int rndchk = 0, so = 0, gv = 0, ch, oc, dcount; - unsigned os; - const char *dp, *hex = "00112233445566778899aAbBcCdDeEfF"; - const char *save_cp = cp; - - cp++; - switch(*cp) { - case 'G': /* glyph value \GXXXXNNNN*/ - dcount = 0; - for (++cp; *cp && (dp = index(hex, *cp)) && (dcount++ < 4); cp++) - rndchk = (int)((rndchk * 16) + ((int)(dp - hex) / 2)); - - if (rndchk == context.rndencode) { - dcount = 0; - for (; *cp && (dp = index(hex, *cp)) && (dcount++ < 4); cp++) - gv = (int)((gv * 16) + ((int)(dp - hex) / 2)); - so = mapglyph(gv, &ch, &oc, &os, 0, 0); - *put++ = (nhwchar)showsyms[so]; - continue; - } else { - /* possible forgery - leave it the way it is */ - cp = save_cp; - } - break; - case '\\': - break; - } - } - *put++ = (nhwchar)*cp++; - } - *put = (nhwchar)0; - /* now send it to tty_putstr_core() */ - tty_putstr_core(window, attr, wbuf); -} -#endif /*UNICODE_WIDEWINPORT*/ - void tty_display_file(fname, complain) const char *fname; @@ -2514,7 +2325,7 @@ tty_end_menu(window, prompt) /* Reverse the list so that items are in correct order. */ cw->mlist = reverse(cw->mlist); - /* Put the prompt at the beginning of the menu. */ + /* Put the promt at the beginning of the menu. */ if (prompt) { anything any; @@ -2566,19 +2377,10 @@ tty_end_menu(window, prompt) /* produce the largest demo string */ Sprintf(buf, "(%d of %d) ", cw->npages, cw->npages); len = strlen(buf); -#ifdef UNICODE_WIDEWINPORT - cw->morestr = nhwchar_copy_of(emptysym); -#else cw->morestr = copy_of(""); -#endif } else { -#ifdef UNICODE_WIDEWINPORT - cw->morestr = nhwchar_copy_of(L"(end) "); - len = nhwlen(cw->morestr); -#else cw->morestr = copy_of("(end) "); len = strlen(cw->morestr); -#endif } if (len > (int)ttyDisplay->cols) { @@ -2698,11 +2500,7 @@ tty_wait_synch() } else { tty_display_nhwindow(WIN_MAP, FALSE); if(ttyDisplay->inmore) { -#ifdef UNICODE_WIDEWINPORT - addtopl(L"--More--"); -#else addtopl("--More--"); -#endif (void) fflush(stdout); } else if(ttyDisplay->inread > program_state.gameover) { /* this can only happen if we were reading and got interrupted */ @@ -2774,58 +2572,6 @@ end_glyphout() #endif } -#ifdef UNICODE_WIDEWINPORT -/* - * Parts of u_putch() were contributed by Adam Wozniak, 2005. - */ -void -u_putch(sym) -nhwchar sym; -{ - unsigned long unicode = sym; - if (!iflags.unicodedisp) - putchar((char)sym); - else { -#if defined(UNIX) || defined(VMS) - /* send utf8 to display */ - if (unicode < 0x80) { - (void) putchar(unicode); - } else if (unicode < 0x00000800) { - (void) putchar(0xC0 | (unicode >> 6)); - (void) putchar(0x80 | (unicode & 0x3F)); - } else if (unicode < 0x00010000) { - (void) putchar(0xE0 | (unicode >> 12)); - (void) putchar(0x80 | ((unicode >> 6) & 0x3F)); - (void) putchar(0x80 | (unicode & 0x3F)); - } else if (unicode < 0x00200000) { - (void) putchar(0xF0 | (unicode >> 18)); - (void) putchar(0x80 | ((unicode >> 12) & 0x3F)); - (void) putchar(0x80 | ((unicode >> 6) & 0x3F)); - (void) putchar(0x80 | (unicode & 0x3F)); - } else if (unicode < 0x04000000) { - (void) putchar(0xF8 | (unicode >> 24)); - (void) putchar(0x80 | ((unicode >> 18) & 0x3F)); - (void) putchar(0x80 | ((unicode >> 12) & 0x3F)); - (void) putchar(0x80 | ((unicode >> 6) & 0x3F)); - (void) putchar(0x80 | (unicode & 0x3F)); - } else { - (void) putchar(0xFC | (unicode >> 30)); - (void) putchar(0x80 | ((unicode >> 24) & 0x3F)); - (void) putchar(0x80 | ((unicode >> 18) & 0x3F)); - (void) putchar(0x80 | ((unicode >> 12) & 0x3F)); - (void) putchar(0x80 | ((unicode >> 6) & 0x3F)); - (void) putchar(0x80 | (unicode & 0x3F)); - } -#else - /* it is assumed that whatever is being substituted for - putchar() can handle unicode characters directly at - this point (nttty's xputc() for example) */ - (void) putchar(sym); -#endif - } -} -#endif /*UNICODE_WIDEWINPORT*/ - #ifndef WIN32 void g_putch(in_ch) @@ -2834,11 +2580,6 @@ int in_ch; register char ch = (char)in_ch; # if defined(ASCIIGRAPH) && !defined(NO_TERMS) -# if defined(UNICODE_WIDEWINPORT) && defined(UNICODE_DRAWING) - if (iflags.unicodedisp && symset[currentgraphics].name) { - u_putch(in_ch); - } else -# endif if (SYMHANDLING(H_IBM) || iflags.eight_bit_tty) { /* IBM-compatible displays don't need other stuff */ (void) putchar(ch); @@ -2922,9 +2663,9 @@ tty_print_glyph(window, x, y, glyph) xchar x, y; int glyph; { - int ch, idx; + int ch; boolean reverse_on = FALSE; - int color; + int color; unsigned special; #ifdef CLIPPING @@ -2934,7 +2675,7 @@ tty_print_glyph(window, x, y, glyph) } #endif /* map glyph to character and color */ - idx = mapglyph(glyph, &ch, &color, &special, x, y); + (void)mapglyph(glyph, &ch, &color, &special, x, y); /* Move the cursor. */ tty_curs(window, x,y); @@ -2967,11 +2708,6 @@ tty_print_glyph(window, x, y, glyph) if (iflags.grmode && iflags.tile_view) xputg(glyph,ch,special); else -#endif -#if defined(UNICODE_WIDEWINPORT) && defined(UNICODE_DRAWING) - if (iflags.unicodedisp && symset[currentgraphics].name) - g_putch(showsyms[idx]); /* use the unicode symset */ - else #endif g_putch(ch); /* print the character */ @@ -3126,15 +2862,6 @@ copy_of(s) return strcpy((char *) alloc((unsigned) (strlen(s) + 1)), s); } -# ifdef UNICODE_WIDEWINPORT -STATIC_OVL nhwchar * -nhwchar_copy_of(s) - const nhwchar *s; -{ - if (!s) s = emptysym; - return nhwcpy((nhwchar *) alloc(sizeof(nhwchar) * (unsigned) (nhwlen(s) + 1)), s); -} -# endif /*UNICODE_WIDEWINPORT*/ #endif /* TTY_GRAPHICS */ /*wintty.c*/ diff --git a/win/win32/dgnstuff.mak b/win/win32/dgnstuff.mak index 8e5aa81fa..a23aadfd8 100644 --- a/win/win32/dgnstuff.mak +++ b/win/win32/dgnstuff.mak @@ -1,3 +1,6 @@ +# $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 diff --git a/win/win32/levstuff.mak b/win/win32/levstuff.mak index c7540c4bd..cf749c6ce 100644 --- a/win/win32/levstuff.mak +++ b/win/win32/levstuff.mak @@ -1,3 +1,5 @@ +# $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 diff --git a/win/win32/mhaskyn.c b/win/win32/mhaskyn.c index a46e0f0ad..db682be28 100644 --- a/win/win32/mhaskyn.c +++ b/win/win32/mhaskyn.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhaskyn.c $Date$ $Revision$ */ +/* NetHack 3.5 mhaskyn.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhaskyn.c $Date: 2009/05/06 10:59:46 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mhaskyn.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhaskyn.h b/win/win32/mhaskyn.h index cc91a02ec..5b0863b6e 100644 --- a/win/win32/mhaskyn.h +++ b/win/win32/mhaskyn.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhaskyn.h $Date$ $Revision$ */ +/* NetHack 3.5 mhaskyn.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhaskyn.h $Date: 2009/05/06 10:59:46 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhaskyn.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhdlg.c b/win/win32/mhdlg.c index 4c1158a45..dc871aed7 100644 --- a/win/win32/mhdlg.c +++ b/win/win32/mhdlg.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhdlg.c $Date$ $Revision$ */ +/* NetHack 3.5 mhdlg.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhdlg.c $Date: 2012/01/11 01:45:02 $ $Revision: 1.18 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhdlg.h b/win/win32/mhdlg.h index 42551a460..df9746dbf 100644 --- a/win/win32/mhdlg.h +++ b/win/win32/mhdlg.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhdlg.h $Date$ $Revision$ */ +/* NetHack 3.5 mhdlg.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhdlg.h $Date: 2012/01/11 01:15:36 $ $Revision: 1.5 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhfont.c b/win/win32/mhfont.c index 23ae7770e..cfbec944e 100644 --- a/win/win32/mhfont.c +++ b/win/win32/mhfont.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhfont.c $Date$ $Revision$ */ +/* NetHack 3.5 mhfont.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhfont.c $Date: 2009/05/06 10:59:46 $ $Revision: 1.17 $ */ /* SCCS Id: @(#)mhfont.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhfont.h b/win/win32/mhfont.h index 9017da9d7..f097b9e38 100644 --- a/win/win32/mhfont.h +++ b/win/win32/mhfont.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhfont.h $Date$ $Revision$ */ +/* NetHack 3.5 mhfont.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhfont.h $Date: 2009/05/06 10:59:46 $ $Revision: 1.8 $ */ /* SCCS Id: @(#)mhfont.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhinput.c b/win/win32/mhinput.c index 99789fb14..92ea84364 100644 --- a/win/win32/mhinput.c +++ b/win/win32/mhinput.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhinput.c $Date$ $Revision$ */ +/* NetHack 3.5 mhinput.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhinput.c $Date: 2009/05/06 10:59:48 $ $Revision: 1.7 $ */ /* SCCS Id: @(#)mhinput.c 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhinput.h b/win/win32/mhinput.h index 75ce3639d..d06c7b8f9 100644 --- a/win/win32/mhinput.h +++ b/win/win32/mhinput.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhinput.h $Date$ $Revision$ */ +/* NetHack 3.5 mhinput.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhinput.h $Date: 2009/05/06 10:59:49 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)mhinput.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmain.c b/win/win32/mhmain.c index 1f7f2e6cb..4373d58aa 100644 --- a/win/win32/mhmain.c +++ b/win/win32/mhmain.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmain.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmain.c $Date: 2012/01/11 01:53:44 $ $Revision: 1.49 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ @@ -1042,9 +1043,7 @@ void mswin_select_map_mode(int mode) data = (PNHMainWindow)GetWindowLong(GetNHApp()->hMainWnd, GWL_USERDATA); /* override for Rogue level */ -#ifdef REINCARNATION if( Is_rogue_level(&u.uz) && !IS_MAP_ASCII(mode) ) return; -#endif /* set map mode menu mark */ if( IS_MAP_ASCII(mode) ) { diff --git a/win/win32/mhmain.h b/win/win32/mhmain.h index bd5cebd76..7a6593d5e 100644 --- a/win/win32/mhmain.h +++ b/win/win32/mhmain.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmain.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmain.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmain.h $Date: 2009/05/06 10:59:52 $ $Revision: 1.10 $ */ /* SCCS Id: @(#)mhmain.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmap.c b/win/win32/mhmap.c index cd801c021..c87c1ac8f 100644 --- a/win/win32/mhmap.c +++ b/win/win32/mhmap.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmap.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmap.c $Date: 2012/01/11 01:45:02 $ $Revision: 1.37 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ @@ -602,12 +603,8 @@ void onPaint(HWND hWnd) paint_rt.right = min(data->xPos + (ps.rcPaint.right - data->map_orig.x)/data->xScrTile+1, COLNO); paint_rt.bottom = min(data->yPos + (ps.rcPaint.bottom - data->map_orig.y)/data->yScrTile+1, ROWNO); - if( data->bAsciiMode -#ifdef REINCARNATION - || Is_rogue_level(&u.uz) + if( data->bAsciiMode || Is_rogue_level(&u.uz) ) { /* You enter a VERY primitive world! */ -#endif - ) { HGDIOBJ oldFont; oldFont = SelectObject(hDC, data->hMapFont); diff --git a/win/win32/mhmap.h b/win/win32/mhmap.h index 23be87fa6..54a614730 100644 --- a/win/win32/mhmap.h +++ b/win/win32/mhmap.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmap.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmap.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmap.h $Date: 2009/05/06 10:59:56 $ $Revision: 1.10 $ */ /* SCCS Id: @(#)mhmap.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmenu.c b/win/win32/mhmenu.c index b79c262ea..654bac8fa 100644 --- a/win/win32/mhmenu.c +++ b/win/win32/mhmenu.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmenu.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmenu.c $Date: 2012/01/11 01:53:44 $ $Revision: 1.36 $ */ /* Copyright (c) Alex Kompel, 2002 */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmenu.h b/win/win32/mhmenu.h index 258c457eb..658a94a5b 100644 --- a/win/win32/mhmenu.h +++ b/win/win32/mhmenu.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmenu.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmenu.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmenu.h $Date: 2009/05/06 11:00:00 $ $Revision: 1.4 $ */ /* SCCS Id: @(#)mhmenu.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmsg.h b/win/win32/mhmsg.h index 42a012ed2..8030b4391 100644 --- a/win/win32/mhmsg.h +++ b/win/win32/mhmsg.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmsg.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmsg.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmsg.h $Date: 2009/05/06 11:00:00 $ $Revision: 1.9 $ */ /* SCCS Id: @(#)mhmsg.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmsgwnd.c b/win/win32/mhmsgwnd.c index 8fe2235de..a718db959 100644 --- a/win/win32/mhmsgwnd.c +++ b/win/win32/mhmsgwnd.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmsgwnd.c $Date$ $Revision$ */ +/* NetHack 3.5 mhmsgwnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmsgwnd.c $Date: 2012/01/11 01:45:02 $ $Revision: 1.25 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhmsgwnd.h b/win/win32/mhmsgwnd.h index d3513c97c..68ca53baf 100644 --- a/win/win32/mhmsgwnd.h +++ b/win/win32/mhmsgwnd.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhmsgwnd.h $Date$ $Revision$ */ +/* NetHack 3.5 mhmsgwnd.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhmsgwnd.h $Date: 2009/05/06 11:00:10 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mhmsgwnd.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhrip.c b/win/win32/mhrip.c index a10601f1c..38dd0a520 100644 --- a/win/win32/mhrip.c +++ b/win/win32/mhrip.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhrip.c $Date$ $Revision$ */ +/* NetHack 3.5 mhrip.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhrip.c $Date: 2012/01/11 01:45:02 $ $Revision: 1.13 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhrip.h b/win/win32/mhrip.h index c05542dfd..4c2927c2c 100644 --- a/win/win32/mhrip.h +++ b/win/win32/mhrip.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhrip.h $Date$ $Revision$ */ +/* NetHack 3.5 mhrip.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhrip.h $Date: 2009/05/06 11:00:15 $ $Revision: 1.6 $ */ /* SCCS Id: @(#)mhrip.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhsplash.c b/win/win32/mhsplash.c index 1acab82eb..76345dd64 100644 --- a/win/win32/mhsplash.c +++ b/win/win32/mhsplash.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhsplash.c $Date$ $Revision$ */ +/* NetHack 3.5 mhsplash.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhsplash.c $Date: 2012/01/11 01:15:37 $ $Revision: 1.17 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhsplash.h b/win/win32/mhsplash.h index da6143c54..7d8ab4eb4 100644 --- a/win/win32/mhsplash.h +++ b/win/win32/mhsplash.h @@ -1,5 +1,9 @@ /* Copyright (C) 2002 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ +/* +$NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +$Date: 2003/03/03 23:31:36 $ $Revision: 1.3 $ +*/ #ifndef MSWINSplashWindow_h #define MSWINSplashWindow_h diff --git a/win/win32/mhstatus.c b/win/win32/mhstatus.c index f300b9f8c..b81988ad5 100644 --- a/win/win32/mhstatus.c +++ b/win/win32/mhstatus.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhstatus.c $Date$ $Revision$ */ +/* NetHack 3.5 mhstatus.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhstatus.c $Date: 2012/01/11 01:45:02 $ $Revision: 1.14 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhstatus.h b/win/win32/mhstatus.h index 5455a9505..273db526f 100644 --- a/win/win32/mhstatus.h +++ b/win/win32/mhstatus.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhstatus.h $Date$ $Revision$ */ +/* NetHack 3.5 mhstatus.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhstatus.h $Date: 2009/05/06 11:00:19 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mhstatus.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhtext.c b/win/win32/mhtext.c index 527f54050..03b01132d 100644 --- a/win/win32/mhtext.c +++ b/win/win32/mhtext.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhtext.c $Date$ $Revision$ */ +/* NetHack 3.5 mhtext.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhtext.c $Date: 2012/01/11 01:53:44 $ $Revision: 1.17 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mhtext.h b/win/win32/mhtext.h index 21439f052..3cda167db 100644 --- a/win/win32/mhtext.h +++ b/win/win32/mhtext.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 mhtext.h $Date$ $Revision$ */ +/* NetHack 3.5 mhtext.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mhtext.h $Date: 2009/05/06 11:00:26 $ $Revision: 1.5 $ */ /* SCCS Id: @(#)mhtext.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 3dd2a5528..7d2177286 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 mswproc.c $Date$ $Revision$ */ +/* NetHack 3.5 mswproc.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 mswproc.c $Date: 2012/01/24 04:26:33 $ $Revision: 1.71 $ */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ @@ -801,14 +802,12 @@ void mswin_clear_nhwindow(winid wid) (wid < MAXWINDOWS) && (GetNHApp()->windowlist[wid].win != NULL)) { -#ifdef REINCARNATION if( GetNHApp()->windowlist[wid].type == NHW_MAP ) { if( Is_rogue_level(&u.uz) ) mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), ROGUE_LEVEL_MAP_MODE); else mswin_map_mode(mswin_hwnd_from_winid(WIN_MAP), iflags.wc_map_mode); } -#endif SendMessage( GetNHApp()->windowlist[wid].win, @@ -1797,11 +1796,7 @@ void mswin_outrip(winid wid, int how, time_t when) putstr(wid, 0, buf); /* Put $ on stone */ -#ifndef GOLDOBJ - Sprintf(buf, "%ld Au", u.ugold); -#else Sprintf(buf, "%ld Au", done_money); -#endif buf[STONE_LINE_LEN] = 0; /* It could be a *lot* of gold :-) */ putstr(wid, 0, buf); diff --git a/win/win32/tiles.mak b/win/win32/tiles.mak index 26af1eada..0e76e1c53 100644 --- a/win/win32/tiles.mak +++ b/win/win32/tiles.mak @@ -1,3 +1,6 @@ +#$NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ +#$Date: 2002/01/18 12:55:00 $ $Revision: 1.1 $ + default: all all: ..\win\win32\tiles.bmp diff --git a/win/win32/winMS.h b/win/win32/winMS.h index 1e1352670..5b08c8a34 100644 --- a/win/win32/winMS.h +++ b/win/win32/winMS.h @@ -1,4 +1,5 @@ -/* NetHack 3.5 winMS.h $Date$ $Revision$ */ +/* NetHack 3.5 winMS.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winMS.h $Date: 2012/01/24 04:26:33 $ $Revision: 1.28 $ */ /* SCCS Id: @(#)winMS.h 3.5 2005/01/23 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */ diff --git a/win/win32/winhack.c b/win/win32/winhack.c index 7134ef902..dd0f6c14a 100644 --- a/win/win32/winhack.c +++ b/win/win32/winhack.c @@ -1,4 +1,5 @@ -/* NetHack 3.5 winhack.c $Date$ $Revision$ */ +/* NetHack 3.5 winhack.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */ +/* NetHack 3.5 winhack.c $Date: 2009/05/06 11:00:43 $ $Revision: 1.32 $ */ /* SCCS Id: @(#)winhack.c 3.5 2006/04/01 */ /* Copyright (C) 2001 by Alex Kompel */ /* NetHack may be freely redistributed. See license for details. */