├── Bugs.page ├── Files ├── Front Page.page ├── Gitit User's Guide.page ├── Help.page ├── Ideas.page ├── Porting ├── README ├── REPOSITORIES ├── TODO.page ├── configure ├── dat ├── Arch.des ├── Barb.des ├── Caveman.des ├── Healer.des ├── Knight.des ├── Monk.des ├── Priest.des ├── Ranger.des ├── Rogue.des ├── Samurai.des ├── Tourist.des ├── Valkyrie.des ├── Wizard.des ├── bigroom.des ├── castle.des ├── cmdhelp ├── data.base ├── dungeon.def ├── endgame.des ├── gehennom.des ├── help ├── hh ├── history ├── knox.des ├── license ├── logo.vt100 ├── medusa.des ├── mines.des ├── modemenu ├── opthelp ├── oracle.des ├── oracles.txt ├── quest.txt ├── rumors.fal ├── rumors.tru ├── sokoban.des ├── tower.des ├── wizhelp └── yendor.des ├── doc ├── Guidebook.mn ├── Guidebook.tex ├── README.menucolor ├── dgn_comp.6 ├── dgn_comp.txt ├── dlb.6 ├── dlb.txt ├── fixes22.0 ├── fixes30.0 ├── fixes31.1 ├── fixes31.2 ├── fixes31.3 ├── fixes32.0 ├── fixes32.1 ├── fixes32.2 ├── fixes32.3 ├── fixes33.0 ├── fixes33.1 ├── fixes34.0 ├── fixes34.1 ├── fixes34.2 ├── fixes34.3 ├── fixes36.0 ├── lev_comp.6 ├── lev_comp.txt ├── nethack.6 ├── nethack.txt ├── pacifist.nh ├── qwertz.nh ├── recover.6 ├── recover.txt ├── tmac.n └── window.doc ├── include ├── align.h ├── amiconf.h ├── artifact.h ├── artilist.h ├── attrib.h ├── beconf.h ├── bitmfile.h ├── color.h ├── config.h ├── config1.h ├── coord.h ├── decl.h ├── def_os2.h ├── dgn_file.h ├── display.h ├── dlb.h ├── dungeon.h ├── edog.h ├── emin.h ├── engrave.h ├── epri.h ├── eshk.h ├── extern.h ├── flag.h ├── func_tab.h ├── gem_rsc.h ├── global.h ├── hack.h ├── lev.h ├── load_img.h ├── mac-carbon.h ├── mac-qt.h ├── mac-term.h ├── macconf.h ├── macpopup.h ├── mactty.h ├── macwin.h ├── mail.h ├── mfndpos.h ├── micro.h ├── mkroom.h ├── monattk.h ├── mondata.h ├── monflag.h ├── monst.h ├── monsym.h ├── mttypriv.h ├── nhlan.h ├── ntconf.h ├── obj.h ├── objclass.h ├── os2conf.h ├── patchlevel.h ├── pcconf.h ├── permonst.h ├── prop.h ├── qt_clust.h ├── qt_kde0.h ├── qt_win.h ├── qt_xpms.h ├── qtext.h ├── qttableview.h ├── quest.h ├── rect.h ├── region.h ├── rm.h ├── skills.h ├── sp_lev.h ├── spell.h ├── system.h ├── tcap.h ├── tile.h ├── tile2x11.h ├── timeout.h ├── tosconf.h ├── tradstdc.h ├── trampoli.h ├── trap.h ├── unixconf.h ├── vault.h ├── vision.h ├── vmsconf.h ├── wceconf.h ├── winGL.h ├── winGnome.h ├── winX.h ├── winami.h ├── wingem.h ├── winprocs.h ├── wintty.h ├── wintype.h ├── xwindow.h ├── xwindowp.h ├── you.h └── youprop.h ├── news ├── src ├── allmain.c ├── alloc.c ├── apply.c ├── artifact.c ├── attrib.c ├── ball.c ├── bones.c ├── botl.c ├── cmd.c ├── dbridge.c ├── decl.c ├── detect.c ├── dig.c ├── display.c ├── dlb.c ├── do.c ├── do_name.c ├── do_wear.c ├── dog.c ├── dogmove.c ├── dokick.c ├── dothrow.c ├── drawing.c ├── dungeon.c ├── eat.c ├── end.c ├── engrave.c ├── exper.c ├── explode.c ├── extralev.c ├── files.c ├── fountain.c ├── hack.c ├── hacklib.c ├── invent.c ├── light.c ├── lock.c ├── mail.c ├── makemon.c ├── mapglyph.c ├── mcastu.c ├── mhitm.c ├── mhitu.c ├── minion.c ├── mklev.c ├── mkmap.c ├── mkmaze.c ├── mkobj.c ├── mkroom.c ├── mon.c ├── mondata.c ├── monmove.c ├── monst.c ├── mplayer.c ├── mthrowu.c ├── muse.c ├── music.c ├── o_init.c ├── objects.c ├── objnam.c ├── options.c ├── pager.c ├── pickup.c ├── pline.c ├── polyself.c ├── potion.c ├── pray.c ├── priest.c ├── quest.c ├── questpgr.c ├── read.c ├── rect.c ├── region.c ├── restore.c ├── rip.c ├── rnd.c ├── role.c ├── rumors.c ├── save.c ├── shk.c ├── shknam.c ├── sit.c ├── sounds.c ├── sp_lev.c ├── spell.c ├── steal.c ├── steed.c ├── teleport.c ├── timeout.c ├── topten.c ├── track.c ├── trap.c ├── tutorial.c ├── u_init.c ├── uhitm.c ├── vault.c ├── version.c ├── vision.c ├── weapon.c ├── were.c ├── wield.c ├── windows.c ├── wizard.c ├── worm.c ├── worn.c ├── write.c └── zap.c ├── sys ├── amiga │ ├── Build.ami │ ├── Install.ami │ ├── Makefile.agc │ ├── Makefile.ami │ ├── NetHack.cnf │ ├── amidos.c │ ├── amidos.p │ ├── amifont.uu │ ├── amifont8.uu │ ├── amigst.c │ ├── amii.hlp │ ├── amimenu.c │ ├── amirip.c │ ├── amisnd.c │ ├── amistack.c │ ├── amitty.c │ ├── amiwind.c │ ├── amiwind.p │ ├── clipwin.c │ ├── colorwin.c │ ├── cvtsnd.c │ ├── grave16.xpm │ ├── ifchange │ ├── mkdmake │ ├── txt2iff.c │ ├── winami.c │ ├── winami.p │ ├── winchar.c │ ├── windefs.h │ ├── winext.h │ ├── winfuncs.c │ ├── winkey.c │ ├── winmenu.c │ ├── winproto.h │ ├── winreq.c │ ├── winstr.c │ └── xpm2iff.c ├── atari │ ├── Install.tos │ ├── atarifnt.uue │ ├── nethack.mnu │ ├── setup.g │ ├── tos.c │ └── unx2atar.sed ├── autoconf │ ├── Install.ac │ ├── Makefile.dat │ ├── Makefile.doc │ ├── Makefile.src │ ├── Makefile.top │ ├── Makefile.utl │ ├── acinclude.m4 │ ├── autoconf.hin │ ├── bootstrap.sh │ ├── config.guess │ ├── config.sub │ ├── configure.ac │ ├── depend.awk │ ├── depend.in │ └── install-sh ├── be │ ├── README │ └── bemain.c ├── mac │ ├── Files.r │ ├── Install.mw │ ├── MacHelp │ ├── NHDeflts │ ├── NHrsrc.hqx │ ├── NHsound.hqx │ ├── News │ ├── README │ ├── dprintf.c │ ├── maccurs.c │ ├── macerrs.c │ ├── macfile.c │ ├── machelp.hqx │ ├── macmain.c │ ├── macmenu.c │ ├── macsnd.c │ ├── mactopl.c │ ├── mactty.c │ ├── macunix.c │ ├── macwin.c │ ├── mgetline.c │ ├── mmodal.c │ ├── mrecover.c │ ├── mrecover.hqx │ └── mttymain.c ├── msdos │ ├── Install.dos │ ├── Makefile.BC │ ├── Makefile.GCC │ ├── Makefile.MSC │ ├── NHAccess.nh │ ├── moveinit.pat │ ├── msdos.c │ ├── msdoshlp.txt │ ├── nhico.uu │ ├── nhpif.uu │ ├── ovlinit.c │ ├── pckeys.c │ ├── pctiles.c │ ├── pctiles.h │ ├── pcvideo.h │ ├── portio.h │ ├── schema1.BC │ ├── schema2.BC │ ├── schema3.MSC │ ├── setup.bat │ ├── sound.c │ ├── tile2bin.c │ ├── video.c │ ├── vidtxt.c │ └── vidvga.c ├── os2 │ ├── Install.os2 │ ├── Makefile.os2 │ ├── nhpmico.uu │ └── os2.c ├── share │ ├── Makefile.lib │ ├── NetHack.cnf │ ├── dgn_comp.h │ ├── dgn_lex.c │ ├── dgn_yacc.c │ ├── ioctl.c │ ├── lev_comp.h │ ├── lev_lex.c │ ├── lev_yacc.c │ ├── nhlan.c │ ├── pcmain.c │ ├── pcsys.c │ ├── pctty.c │ ├── pcunix.c │ ├── random.c │ ├── sounds │ │ ├── README │ │ ├── bell.uu │ │ ├── bugle.uu │ │ ├── erthdrum.uu │ │ ├── firehorn.uu │ │ ├── frsthorn.uu │ │ ├── lethdrum.uu │ │ ├── mgcflute.uu │ │ ├── mgcharp.uu │ │ ├── toolhorn.uu │ │ ├── wdnflute.uu │ │ └── wdnharp.uu │ ├── tclib.c │ ├── termcap │ ├── termcap.uu │ ├── unixtty.c │ └── uudecode.c ├── unix │ ├── Install.unx │ ├── Makefile.dat │ ├── Makefile.doc │ ├── Makefile.src │ ├── Makefile.top │ ├── Makefile.utl │ ├── README.linux │ ├── acehack.sh │ ├── cpp1.shr │ ├── cpp2.shr │ ├── cpp3.shr │ ├── depend.awk │ ├── setup.sh │ ├── snd86unx.shr │ ├── unixmain.c │ ├── unixres.c │ └── unixunix.c ├── vms │ ├── Install.vms │ ├── Makefile.dat │ ├── Makefile.doc │ ├── Makefile.src │ ├── Makefile.top │ ├── Makefile.utl │ ├── install.com │ ├── lev_lex.h │ ├── nethack.com │ ├── oldcrtl.c │ ├── spec_lev.com │ ├── vmsbuild.com │ ├── vmsfiles.c │ ├── vmsmail.c │ ├── vmsmain.c │ ├── vmsmisc.c │ ├── vmstty.c │ └── vmsunix.c ├── wince │ ├── Install.ce │ ├── bootstrp.mak │ ├── ceinc │ │ ├── assert.h │ │ ├── errno.h │ │ ├── fcntl.h │ │ └── sys │ │ │ └── stat.h │ ├── celib.c │ ├── cesetup.bat │ ├── cesound.c │ ├── defaults.nh │ ├── keypad.uu │ ├── menubar.uu │ ├── mhaskyn.c │ ├── mhaskyn.h │ ├── mhcmd.c │ ├── mhcmd.h │ ├── mhcolor.c │ ├── mhcolor.h │ ├── mhdlg.c │ ├── mhdlg.h │ ├── mhfont.c │ ├── mhfont.h │ ├── mhinput.c │ ├── mhinput.h │ ├── mhmain.c │ ├── mhmain.h │ ├── mhmap.c │ ├── mhmap.h │ ├── mhmenu.c │ ├── mhmenu.h │ ├── mhmsg.h │ ├── mhmsgwnd.c │ ├── mhmsgwnd.h │ ├── mhrip.c │ ├── mhrip.h │ ├── mhstatus.c │ ├── mhstatus.h │ ├── mhtext.c │ ├── mhtext.h │ ├── mhtxtbuf.c │ ├── mhtxtbuf.h │ ├── mswproc.c │ ├── newres.h │ ├── resource.h │ ├── winMS.h │ ├── winhack.c │ ├── winhack.rc │ ├── winhcksp.rc │ └── winmain.c └── winnt │ ├── Install.nt │ ├── Makefile.bcc │ ├── Makefile.gcc │ ├── Makefile.msc │ ├── console.rc │ ├── defaults.nh │ ├── mapimail.c │ ├── nethack.def │ ├── nh340key.c │ ├── nhdefkey.c │ ├── nhico.uu │ ├── nhraykey.c │ ├── nhsetup.bat │ ├── ntsound.c │ ├── nttty.c │ ├── porthelp │ ├── win32api.h │ └── winnt.c ├── util ├── dgn_comp.l ├── dgn_comp.y ├── dgn_main.c ├── dlb_main.c ├── lev_comp.l ├── lev_comp.y ├── lev_main.c ├── makedefs.c ├── panic.c └── recover.c └── win ├── Qt ├── Info.plist ├── Install.Qt ├── knethack.lnk ├── knh-mini.xpm ├── knh.xpm ├── nhicns.uu ├── nhsplash.xpm ├── qpe-nethack.control ├── qt_clust.cpp ├── qt_win.cpp ├── qttableview.cpp ├── tileedit.cpp └── tileedit.h ├── X11 ├── Install.X11 ├── NetHack.ad ├── Window.c ├── dialogs.c ├── ibm.bdf ├── nethack.rc ├── nh10.bdf ├── nh32icon ├── nh56icon ├── nh72icon ├── nh_icon.xpm ├── pet_mark.xbm ├── rip.xpm ├── tile2x11.c ├── winX.c ├── winmap.c ├── winmenu.c ├── winmesg.c ├── winmisc.c ├── winstat.c ├── wintext.c └── winval.c ├── gem ├── Install.gem ├── bitmfile.c ├── gem_rsc.uu ├── gem_rso.uu ├── gr_rect.c ├── gr_rect.h ├── load_img.c ├── tile2img.c ├── title.uu ├── wingem.c ├── wingem1.c └── xpm2img.c ├── gl ├── Install.GL ├── font14.txt ├── font20.txt ├── font22.txt ├── font8.txt ├── gl_conf.c ├── gl_emul.c ├── gl_font.c ├── gl_hardw.c ├── gl_image.c ├── gl_main.c ├── gl_map.c ├── gl_menu.c ├── gl_opt.c ├── gl_rendu.c ├── gl_role.c ├── gl_softw.c ├── gl_stat.c ├── gl_text.c ├── gl_tile.c ├── gl_unit.c ├── gl_win.c ├── logo.txt └── rip.txt ├── gnome ├── README ├── gn_xpms.h ├── gnaskstr.c ├── gnaskstr.h ├── gnbind.c ├── gnbind.h ├── gnglyph.c ├── gnglyph.h ├── gnmain.c ├── gnmain.h ├── gnmap.c ├── gnmap.h ├── gnmenu.c ├── gnmenu.h ├── gnmesg.c ├── gnmesg.h ├── gnomeprv.h ├── gnopts.c ├── gnopts.h ├── gnplayer.c ├── gnplayer.h ├── gnsignal.c ├── gnsignal.h ├── gnstatus.c ├── gnstatus.h ├── gntext.c ├── gntext.h ├── gnworn.c ├── gnworn.h ├── gnyesno.c ├── gnyesno.h └── mapbg.xpm ├── share ├── bigtile.c ├── magtile.c ├── mon32alg.txt ├── mon32aw.txt ├── mon32mi.txt ├── mon3dmi.txt ├── monsters.txt ├── obj32alg.txt ├── obj32mi.txt ├── objects.txt ├── oth-2kmi.txt ├── oth32alg.txt ├── oth32mi.txt ├── oth3dmi.txt ├── other.txt ├── palette.txt ├── tile.doc ├── tile2png.c ├── tile_t.h ├── tilemap.c ├── tiletext.c ├── txtbg.c └── txtmerge.c ├── tty ├── getline.c ├── termcap.c ├── topl.c └── wintty.c └── win32 ├── dgncomp.dsp ├── dgnstuff.dsp ├── dgnstuff.mak ├── dlb_main.dsp ├── levcomp.dsp ├── levstuff.dsp ├── levstuff.mak ├── makedefs.dsp ├── mhaskyn.c ├── mhaskyn.h ├── mhdlg.c ├── mhdlg.h ├── mhfont.c ├── mhfont.h ├── mhinput.c ├── mhinput.h ├── mhmain.c ├── mhmain.h ├── mhmap.c ├── mhmap.h ├── mhmenu.c ├── mhmenu.h ├── mhmsg.h ├── mhmsgwnd.c ├── mhmsgwnd.h ├── mhrip.c ├── mhrip.h ├── mhsplash.c ├── mhsplash.h ├── mhstatus.c ├── mhstatus.h ├── mhtext.c ├── mhtext.h ├── mnsel.uu ├── mnselcnt.uu ├── mnunsel.uu ├── mswproc.c ├── nethack.dsw ├── nethackw.dsp ├── petmark.uu ├── recover.dsp ├── resource.h ├── rip.uu ├── splash.uu ├── tile2bmp.dsp ├── tilemap.dsp ├── tiles.dsp ├── tiles.mak ├── uudecode.dsp ├── winMS.h ├── winhack.c └── winhack.rc /Front Page.page: -------------------------------------------------------------------------------- 1 | **AceHack** is a variant of the computer game [NetHack](http://nethack.org), aimed to keep similar (although not necessarily identical) gameplay to the original game, while improving its interface. 2 | 3 | Sorry for the lack of polish; although playable, this fork is still under development and has not yet had an official release (mostly because it still retains some rather weird bugs, that may make the game less enjoyable, or more, depending on your point of view). 4 | 5 | You may be interested in the following links: 6 | 7 | - [Manually-updated log of differences between NetHack and AceHack](http://patch-tag.com/r/ais523/acehack/snapshot/current/content/raw/doc/fixes36.0) 8 | - [Automatically generated list of recent changes to AceHack](https://patch-tag.com/r/ais523/acehack/snapshots/all/history) 9 | - [acehack.us](http://acehack.us) - public AceHack server 10 | - [Development source](http://patch-tag.com/r/ais523/acehack) (darcs repository) 11 | 12 | This wiki also contains information relevant to the development of AceHack: 13 | 14 | - The [TODO]() page lists things that will likely be in AceHack eventually; 15 | - The [Ideas]() page contains ideas for future changes; 16 | - The [Bugs]() page contains bugs in AceHack that should ideally be fixed (many of which are also in NetHack). 17 | 18 | As AceHack's gameplay is so similar to NetHack's, if you're looking for, or want to add, gameplay advice about AceHack, a good place is the [NetHack Wiki](http://nethackwiki.com). Most of the information there will also apply to AceHack, and AceHack-specific information will likely be welcomed if its context is made clear. -------------------------------------------------------------------------------- /Ideas.page: -------------------------------------------------------------------------------- 1 | Many people have ideas for variants. If there's something you think would be particularly suited to AceHack, feel free to add it/discuss it here. (Use a full description of your changes, and mention that you're adding an idea; unlike on many wikis, the edit summary may be shown out of the context of the page on occasion.) 2 | 3 | Note that AceHack is mostly focused on improving NetHack's interface, while keeping gameplay much the same. If you have ideas that would make significant changes to the game's gameplay, especially if it would make it harder, you might want to consider suggesting it to a different variant instead; such changes are interesting, but not the aim of this project. 4 | 5 | Most of the ideas from here are moved to the TODO page, or deleted, when ais523 has had a look at them and decided whether to use them or not. 6 | 7 | ## List of ideas 8 | 9 | - *currently empty* (they've all been moved to TODO) 10 | -------------------------------------------------------------------------------- /REPOSITORIES: -------------------------------------------------------------------------------- 1 | Vanilla AceHack: 2 | darcs get http://patch-tag.com/r/ais523/acehack 3 | darcs get ais523@patch-tag.com:/r/ais523/acehack 4 | darcs get http://darcsden.com/ais523/acehack 5 | darcs get ais523@darcsden.com:acehack 6 | 7 | Multiplayer AceHack: 8 | darcs get http://darcsden.com/ais523/acehack-multiplayer 9 | darcs get ais523@darcsden.com:acehack-multiplayer 10 | -------------------------------------------------------------------------------- /TODO.page: -------------------------------------------------------------------------------- 1 | This is a mostly unsorted and vague list of changes which will probably eventually be in AceHack. 2 | 3 | If you have ideas of your own, add them to the [Ideas]() page. 4 | 5 | - default DEC/IBM/Unicode graphics 6 | - stash tracking 7 | - some way to save notes with the character 8 | - unequip one item to equip another 9 | - uniqueness in trap colors 10 | - cursed armor should autoBCU when worn 11 | - ID kicking boots when they make things reel 12 | - travel position should reset between levels 13 | - new statuses need to cause a botl update 14 | - applying keys should not ask so many questions 15 | - travel should route past peacefuls more sensibly 16 | - traps need a valid glyph in IBM rogue graphics 17 | - lit middot vs. unlit lowdot; a consequence of darkroom vs. rogue? (it went away when I changed to IBM and back to DEC, so probably) 18 | - option to stop autoexplore with unexplored objects in LOS 19 | - show prices of items in containers 20 | - wipe out engravings from the engrave menu 21 | - price memory in \ 22 | - ^X going back to its own menu 23 | - shift-walking into doors? 24 | - name levels you aren't on 25 | - second confirm on overwriting perm engraving with semiperm 26 | - some way to mark squares on a level by hand 27 | - extra question upon #loot/a, 28 | - track down nooodl's double-branch thing 29 | - livelog 30 | - Windows support (far in the future) 31 | - use targethighlight to show range on jumps/pounds (even with the option off?) 32 | - allow E and . over h in the engrave menu (different people think this should be on different keys...) 33 | - list wishes in ^Xc (and thus dumplog) 34 | - fix wresting somehow 35 | - fix m-move into shopkeepers/trices (I consider this a vanilla bug, the devteam probably don't) 36 | - do something about autopickup picking up the player's stash 37 | - warn on self-zaps of known dangerous wands 38 | - ID base types of wished-for items 39 | - farlooking doors in tutorial mode should trigger the talk about doors 40 | - tutorial shouldn't recommend force bolt to valks if they find a random book of it 41 | - show turncounts in ^P 42 | - [Itemcat patch](http://nh.gmuf.com/#itemcat) 43 | - shift-move should be saner (especially wrt boulders) 44 | - control-move should also be saner (especially wrt diagonal corridors) 45 | - make #untrap less in need of repetition/spamming 46 | - blanking sickness should formally ID it and fruit juice 47 | - a1 to light just one of a stack of candles 48 | - hallucination messages for Sokoban -------------------------------------------------------------------------------- /dat/hh: -------------------------------------------------------------------------------- 1 | The full list of commands is now automatically generated. View it 2 | in-game using ?b. 3 | -------------------------------------------------------------------------------- /dat/logo.vt100: -------------------------------------------------------------------------------- 1 |  _oo\. AceHack (c) 2009-2012 Alex Smith 2 |  _o#MMM9MMHb\. and many other contributors. 3 |  ._o#M#"]M*' `HM?*HHb\_ Based on NetHack (c) 1985-2003 4 |  .,dHH*"" ,HH' `*Mb ``"#M#o_ Stichting Mathematisch Centrum 5 |  .,dHH*'' .dM* `HH\ ""#M#o_ and M. Stephenson. 6 |  JMH########MMH#############MMH########MM. See credits, licence for details. 7 |  .MMdMMb .dM' `9M\MMM .MMMM 8 |  |MAMMMMA ?M*' _o###o. ####### `MMM JMMMM o##o _o###o. ## ,## 9 |  MdMMP9MMbH' .#MA*""*# MM^^^^^ MMM MTMMM dMMMMb .#MA*""*# MM _oMM*" 10 |  |.MMTM TMM. HMP MMooooo MMMMMMMMMMM ,MMTTMM, HMP MMHMM*^ 11 |  HHMMboodMMH MML MM""""" MMM*MMP MMM|  dMG__9Mb MML MMHMMb. 12 |  ,oMMH""""HMML `MHo.__.o MM_____ MMM |MH\MMMb JMM****MMk `MHo.__.o MM `*MMb_ 13 |  JMM*'P`M|`*MMk `*MMM*" MMMMMMM MMM MP`MMMMM,MMP *MM `*MMM*" MM *MM 14 | .MLHH' HH |M| `*M?ML 15 | JMM*' |M| HH `HMM. c - Continue game 16 | MMb_ HH |M| .,MM| n - New game 17 | `HMMM#o_ |M, dM .,dHMMM? j - Join game 18 |  `HH:"#M#Mb. ,MHHH*'$M*' t - Tutorial 19 |  `*Mb `TMMHb\. _o#MMM" ,HH' m - Other modes 20 |  `HH\ Mb``*HH#o_ .,d#M#"",M| .dM* 21 |  ?Mb.|M. ""#M#o,dHH*'' JM ,HH' s - High scores 22 |  `*M$ML _o#MH#MHb\. .M[HH' o - Options 23 |  `HMM._o#M#"" ``*HHb\.JMM*' ? - Help 24 |  *MMMMM############HMMMMH' q - Exit -------------------------------------------------------------------------------- /dat/modemenu: -------------------------------------------------------------------------------- 1 | Play in which game mode? 2 | 3 | t - Tutorial 4 | Gain hints about controls and gameplay, while playing an otherwise normal 5 | game. Tutorial games are eligible for scoring, if you do well enough. 6 | 7 | x - Explore mode 8 | A more forgiving version of the game, for experimentation; save files can 9 | be loaded without deleting them, you resurrect infinite times upon death, 10 | and you start with a free wand of wishing. Not eligible for scoring. 11 | 12 | n - Normal mode 13 | The normal game. Death is permanent and deletes your save file. 14 | 15 | s - Solo mode 16 | A version of the normal game slightly modified to prevent interaction 17 | between players; all levels generated will be fresh, rather than copied 18 | from the bones of previous games. You also do not see your character's 19 | stats until you start playing. 20 | 21 | d - Debug mode 22 | Gain free rein over everything that exists in the game world, for debugging 23 | the game. The game may not be stable in this mode, due to the ability to 24 | change game internals. Obviously not eligible for scoring. -------------------------------------------------------------------------------- /dat/oracle.des: -------------------------------------------------------------------------------- 1 | # SCCS Id: @(#)oracle.des 3.4 1995/10/07 2 | # NetHack may be freely redistributed. See license for details. 3 | # 4 | # Oracle level 5 | # 6 | 7 | LEVEL: "oracle" 8 | 9 | ROOM: "ordinary" , lit, (3,3), (center,center), (11,9) 10 | NAME: "central" 11 | OBJECT:'`',"statue",(0,0),"forest centaur",1 12 | OBJECT:'`',"statue",(0,8),"mountain centaur",1 13 | OBJECT:'`',"statue",(10,0),"mountain centaur",1 14 | OBJECT:'`',"statue",(10,8),"forest centaur",1 15 | OBJECT:'`',"statue",(5,1),"plains centaur",1 16 | OBJECT:'`',"statue",(5,7),"plains centaur",1 17 | OBJECT:'`',"statue",(2,4),"plains centaur",1 18 | OBJECT:'`',"statue",(8,4),"plains centaur",1 19 | MONSTER: random, random, random 20 | MONSTER: random, random, random 21 | 22 | SUBROOM: "delphi" , lit , (4,3) , (3,3), "central" 23 | FOUNTAIN: (0, 1) 24 | FOUNTAIN: (1, 0) 25 | FOUNTAIN: (1, 2) 26 | FOUNTAIN: (2, 1) 27 | MONSTER: '@', "Oracle", (1,1) 28 | DOOR: false , nodoor , random, random 29 | 30 | ROOM: "ordinary" , random, random, random, random 31 | STAIR: random, up 32 | OBJECT: random,random,random 33 | 34 | ROOM: "ordinary" , random, random, random, random 35 | STAIR: random, down 36 | OBJECT: random, random, random 37 | TRAP: random, random 38 | MONSTER: random, random, random 39 | MONSTER: random, random, random 40 | 41 | ROOM: "ordinary" , random, random, random, random 42 | OBJECT: random, random, random 43 | OBJECT: random, random, random 44 | MONSTER: random, random, random 45 | 46 | ROOM: "ordinary" , random, random, random, random 47 | OBJECT: random, random, random 48 | TRAP: random, random 49 | MONSTER: random, random, random 50 | 51 | ROOM: "ordinary" , random, random, random, random 52 | OBJECT: random, random, random 53 | TRAP: random, random 54 | MONSTER: random, random, random 55 | 56 | RANDOM_CORRIDORS 57 | -------------------------------------------------------------------------------- /dat/wizhelp: -------------------------------------------------------------------------------- 1 | New commands in debug mode: 2 | 3 | Note that these commands are accessible only via #repeat (#), which allows 4 | arbitrary commands to be entered. Note also that careless use of debug mode 5 | features can easily crash the game; debug-mode bugs are low priority, and the 6 | amount of power that debug mode gives you includes the ability to do things 7 | that are impossible in normal play, and that the game does not allow for. (In 8 | fact, at least one of the commands is designed to crash the game.) 9 | 10 | #detect Detect secret doors and traps 11 | #genesis Create a monster 12 | #identify Identify your inventory 13 | #levelchange Change your experience level 14 | #lightsources Show mobile light sources 15 | #map Magic-map the current level 16 | #monpolycontrol Control what polymorphing monsters polymorph into 17 | #panic Test panic routines, crashing the game in the process 18 | #polyself Polymorph the player character 19 | #seenv Show seen vectors 20 | #stats Show memory statistics 21 | #timeout Show timeout queue 22 | #vision Show vision array 23 | #where Show the dungeon layout 24 | #wish Create an item 25 | #wmode Show wall modes 26 | 27 | Additionally, for historical reasons, #tutorial allows you to level-teleport 28 | while in debug mode (they used to have the same keybinding, control-V). 29 | 30 | Also note that many other commands are enhanced to give you extra power in 31 | debug mode, notably control-X. -------------------------------------------------------------------------------- /doc/dlb.6: -------------------------------------------------------------------------------- 1 | .TH DLB 6 "28 Oct 1993" 2 | .UC 4 3 | .SH NAME 4 | dlb \- NetHack data librarian 5 | .SH SYNOPSIS 6 | .B dlb 7 | { 8 | .B xct 9 | } 10 | [ 11 | .B vfIC 12 | ] 13 | arguments... 14 | [ 15 | .B files... 16 | ] 17 | .SH DESCRIPTION 18 | .PP 19 | .I Dlb 20 | is a file archiving tool in the spirit (and tradition) of tar for 21 | NetHack version 3.1 and higher. It is used to maintain the 22 | archive files from which NetHack reads special level files and other 23 | read-only information. Note that like tar the command and option 24 | specifiers are specified as a continuous string and are followed 25 | by any arguments required in the same order as the option specifiers. 26 | .PP 27 | This facility is optional and may be excluded during NetHack 28 | configuration. 29 | .SH COMMANDS 30 | The 31 | .B x 32 | command causes 33 | .I dlb 34 | to extract the contents of the archive into the current directory. 35 | .PP 36 | The 37 | .B c 38 | command causes 39 | .I dlb 40 | to create a new archive from files in the current directory. 41 | .PP 42 | The 43 | .B t 44 | command lists the files in the archive. 45 | .SH OPTIONS AND ARGUMENTS 46 | .DT 47 | .ta \w'f archive\ \ \ 'u 48 | v verbose output 49 | .br 50 | .sp 1 51 | f archive specify the archive. Default if f not specified is 52 | LIBFILE (usually the nhdat file in the playground). 53 | .br 54 | .sp 1 55 | I lfile specify the file containing the list of files to 56 | put in to or extract from the archive if no files are listed 57 | on the command line. Default for archive creation if no files 58 | are listed is LIBLISTFILE. 59 | .br 60 | .sp 1 61 | C dir change directory. Changes directory before trying to 62 | read any files (including the archive and the lfile). 63 | .br 64 | .SH EXAMPLES 65 | Create the default archive from the default file list: 66 | .br 67 | dlb c 68 | .sp 1 69 | List the contents of the archive 'foo': 70 | .br 71 | dlb tf foo 72 | .SH AUTHOR 73 | .PP 74 | Kenneth Lorber 75 | .SH "SEE ALSO" 76 | .PP 77 | nethack(6), tar(1) 78 | .SH BUGS 79 | .PP 80 | Not a good tar emulation; - does not mean stdin or stdout. 81 | Should include an optional compression facility. 82 | Not all read-only files for NetHack can be read out of an archive; 83 | examining the source is the only way to know which files can be. 84 | -------------------------------------------------------------------------------- /doc/fixes31.3: -------------------------------------------------------------------------------- 1 | avoid divide by zero crash for eggs produced from horn of plenty 2 | prevent monsters from eating the invocation tools or Rider corpses 3 | make artifacts much less likely to be destroyed 4 | fix freezing lava in front a raised drawbridge 5 | fix digging pits in front of raised drawbridge; improve digging next to pools 6 | since random teleports have no --More-- prompt, have them purge REDO data 7 | to avoid repeating previous command before noticing changed context 8 | make magic portals function for monsters 9 | make numerous priest blessings increasingly rare, with an upper limit 10 | fix missing quotation marks in quest speech 11 | prevent monsters like killer bees from opening tins 12 | add: keep track of # player deaths, save game start time in struct u 13 | don't used "uncursed" with gold in containers in ending inventory display 14 | 15 | PC: Fix black/gray/white display problem 16 | 17 | X11: set input text portion of the dialog box so it is the width of the box 18 | X11: fix message window seperator redraw problem (thanks to 19 | Ivan D. Brawley ) 20 | VMS: avoid false "trickery" detection for bonesX#.##;1 levels 21 | VMS: prevent display of really long broadcast messages from clobbering stack 22 | VMS: prevent endless input loop upon remote terminal disconnect 23 | -------------------------------------------------------------------------------- /doc/fixes32.3: -------------------------------------------------------------------------------- 1 | General Fixes and Modified Features 2 | ----------------------------------- 3 | Y2K fix: use 4 digit year values for the dates in the score file 4 | updated COPYRIGHT_BANNER_A to reflect year of release 5 | prevent "late" pline calls from triggering a crash when the RIP window was 6 | displayed at end of game (observed when bones file rename failure 7 | under Win95 was reported to wizard mode users) 8 | being punished on the Plane of Water doesn't trigger a panic when air bubbles 9 | try to move the ball&chain or you around 10 | avoid rn2(0) divide by 0 for empty inventory when trying to crawl out of water 11 | don't let randomly placed monsters on special levels prevent explicitly 12 | placed monsters who target that location from being created (a web 13 | trap's spider resulted in no quest nemesis) 14 | don't let randomly placed stairs on special levels be covered by explicitly 15 | placed features such as fountains 16 | pager: guard against '%' in output from being treated as a printf formatting 17 | directive (using '/' or ';' to look at food yields "% blah blah") 18 | prayer result of ``escape from solid rock'' isn't inhibited by teleport 19 | restrictions (attempting to fix all troubles got stuck in a loop) 20 | report "file empty?" rather than "version mismatch" when that's the reason 21 | why a data file fails its validation check 22 | drum of earthquake can't destroy the high altars 23 | 24 | 25 | Platform- and/or Interface-Specific Fixes 26 | ----------------------------------------- 27 | micro (assorted): readmail()--don't show fake mail text when blind; also, 28 | update the "report bugs to" message to specify 29 | msdos: fix missing $(INCL) in dependency in djgpp Makefile 30 | mac: Will only dispatch events if the window system is initialized 31 | -------------------------------------------------------------------------------- /doc/pacifist.nh: -------------------------------------------------------------------------------- 1 | # A sample options file for pacifists 2 | # This removes all interactions with monsters, other than pet displacements, 3 | # from the standard movement commands, but otherwise leaves them unchanged 4 | # (they can even be used for direction selection). 5 | 6 | REBIND=l:#eastmove 7 | REBIND=h:#westmove 8 | REBIND=k:#northmove 9 | REBIND=j:#southmove 10 | REBIND=y:#northwestmove 11 | REBIND=u:#northeastmove 12 | REBIND=b:#southwestmove 13 | REBIND=n:#southeastmove 14 | REBIND=6:#eastmove 15 | REBIND=4:#westmove 16 | REBIND=8:#northmove 17 | REBIND=2:#southmove 18 | REBIND=7:#northwestmove 19 | REBIND=9:#northeastmove 20 | REBIND=1:#southwestmove 21 | REBIND=3:#southeastmove 22 | -------------------------------------------------------------------------------- /doc/qwertz.nh: -------------------------------------------------------------------------------- 1 | # A sample options file fragment for QWERTZ-based keyboards 2 | # This just swaps the 'y' and 'z' characters 3 | 4 | REBIND=y:#zap 5 | REBIND=z:#northwest 6 | REBIND=Y:#cast 7 | REBIND=Z:#northwestfar 8 | REBIND=^Y:#suspend 9 | REBIND=^Z:#northwestfarcareful 10 | -------------------------------------------------------------------------------- /include/align.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)align.h 3.4 1991/12/29 */ 2 | /* Copyright (c) Mike Stephenson, Izchak Miller 1991. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef ALIGN_H 6 | #define ALIGN_H 7 | 8 | typedef schar aligntyp; /* basic alignment type */ 9 | 10 | typedef struct align { /* alignment & record */ 11 | aligntyp type; 12 | int record; 13 | } align; 14 | 15 | /* bounds for "record" -- respect initial alignments of 10 */ 16 | #define ALIGNLIM (10L + (moves/200L)) 17 | 18 | #define A_NONE (-128) /* the value range of type */ 19 | 20 | #define A_CHAOTIC (-1) 21 | #define A_NEUTRAL 0 22 | #define A_LAWFUL 1 23 | 24 | #define A_COALIGNED 1 25 | #define A_OPALIGNED (-1) 26 | 27 | #define AM_NONE 0 28 | #define AM_CHAOTIC 1 29 | #define AM_NEUTRAL 2 30 | #define AM_LAWFUL 4 31 | 32 | #define AM_MASK 7 33 | 34 | #define AM_SPLEV_CO 3 35 | #define AM_SPLEV_NONCO 7 36 | 37 | #define Amask2align(x) ((aligntyp) ((!(x)) ? A_NONE \ 38 | : ((x) == AM_LAWFUL) ? A_LAWFUL : ((int)x) - 2)) 39 | #define Align2amask(x) (((x) == A_NONE) ? AM_NONE \ 40 | : ((x) == A_LAWFUL) ? AM_LAWFUL : (x) + 2) 41 | 42 | #endif /* ALIGN_H */ 43 | -------------------------------------------------------------------------------- /include/attrib.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)attrib.h 3.4 1990/22/02 */ 2 | /* Copyright 1988, Mike Stephenson */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* attrib.h - Header file for character class processing. */ 6 | 7 | #ifndef ATTRIB_H 8 | #define ATTRIB_H 9 | 10 | #define A_STR 0 11 | #define A_INT 1 12 | #define A_WIS 2 13 | #define A_DEX 3 14 | #define A_CON 4 15 | #define A_CHA 5 16 | 17 | #define A_MAX 6 /* used in rn2() selection of attrib */ 18 | 19 | #define ABASE(x) (u.acurr.a[x]) 20 | #define ABON(x) (u.abon.a[x]) 21 | #define AEXE(x) (u.aexe.a[x]) 22 | #define ACURR(x) (acurr(x)) 23 | #define ACURRSTR (acurrstr()) 24 | /* should be: */ 25 | /* #define ACURR(x) (ABON(x) + ATEMP(x) + (Upolyd ? MBASE(x) : ABASE(x)) */ 26 | #define MCURR(x) (u.macurr.a[x]) 27 | #define AMAX(x) (u.amax.a[x]) 28 | #define MMAX(x) (u.mamax.a[x]) 29 | 30 | #define ATEMP(x) (u.atemp.a[x]) 31 | #define ATIME(x) (u.atime.a[x]) 32 | 33 | /* KMH -- Conveniences when dealing with strength constants */ 34 | #define STR18(x) (18+(x)) /* 18/xx */ 35 | #define STR19(x) (100+(x)) /* For 19 and above */ 36 | 37 | struct attribs { 38 | schar a[A_MAX]; 39 | }; 40 | 41 | #define ATTRMAX(x) ((x == A_STR && Upolyd && strongmonst(youmonst.data)) ? STR18(100) : urace.attrmax[x]) 42 | #define ATTRMIN(x) (urace.attrmin[x]) 43 | 44 | #endif /* ATTRIB_H */ 45 | -------------------------------------------------------------------------------- /include/beconf.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)beconf.h 3.4 1998/07/08 */ 2 | /* Copyright (c) Dean Luick 1996. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* Configuration for Be Inc.'s BeOS */ 6 | 7 | #ifndef BECONF_H 8 | #define BECONF_H 9 | 10 | /* 11 | * We must use UNWIDENED_PROTOTYPES because we mix C++ and C. 12 | */ 13 | 14 | #define index strchr 15 | #define rindex strrchr 16 | #define Rand rand /* Be should have a better rand function! */ 17 | #define tgetch getchar 18 | #define FCMASK 0666 19 | #define PORT_ID "BeOS" 20 | #define TEXTCOLOR 21 | #define POSIX_TYPES 22 | #define SIG_RET_TYPE __signal_func_ptr 23 | 24 | #include /* for time_t */ 25 | #include /* for lseek() */ 26 | 27 | /* could go in extern.h, under bemain.c (or something..) */ 28 | void regularize(char *); 29 | 30 | 31 | /* instead of including system.h... */ 32 | #include 33 | #include 34 | #include 35 | 36 | #endif /* BECONF_H */ 37 | -------------------------------------------------------------------------------- /include/bitmfile.h: -------------------------------------------------------------------------------- 1 | /****************************\ 2 | * Bitmap mit Farbtabelle als * 3 | * Graphik-Datei speichern * 4 | * Autor: Gabriel Schmidt * 5 | * (c} 1992 by MAXON-Computer * 6 | * -> Header-Datei * 7 | \****************************/ 8 | 9 | #ifndef H_TO_FILE 10 | #define H_TO_FILE 11 | 12 | /* #include */ 13 | #define UWORD unsigned short 14 | #define ULONG unsigned long 15 | #define UBYTE unsigned char 16 | 17 | #define XIMG_MAGIC 0x58494D47 18 | 19 | 20 | typedef enum { IMG, XIMG } FILE_TYP; 21 | 22 | const char *get_file_ext(FILE_TYP typ); 23 | 24 | struct RGB 25 | { 26 | UWORD r, g, b; 27 | }; 28 | 29 | int bitmap_to_file(FILE_TYP typ, int ww, int wh, 30 | unsigned int pwx, unsigned int pwy, 31 | unsigned int planes, unsigned int colors, 32 | const char *filename, 33 | void (*get_color) (unsigned int colind, struct RGB *rgb) , 34 | void (*get_pixel) (int x, int y, unsigned int *colind) ) ; 35 | 36 | #endif 37 | 38 | -------------------------------------------------------------------------------- /include/color.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)color.h 3.4 1992/02/02 */ 2 | /* Copyright (c) Steve Linhart, Eric Raymond, 1989. */ 3 | /* Modified 29 Oct 2011 by Alex Smith */ 4 | /* NetHack may be freely redistributed. See license for details. */ 5 | 6 | #ifndef COLOR_H 7 | #define COLOR_H 8 | 9 | #ifdef MENU_COLOR 10 | # ifdef MENU_COLOR_REGEX 11 | # include 12 | # endif 13 | #endif 14 | 15 | /* 16 | * The color scheme used is tailored for an IBM PC. It consists of the 17 | * standard 8 colors, folowed by their bright counterparts. There are 18 | * exceptions, these are listed below. Bright black doesn't mean very 19 | * much, so it is used as the "default" foreground color of the screen. 20 | */ 21 | #define CLR_BLACK 0 22 | #define CLR_RED 1 23 | #define CLR_GREEN 2 24 | #define CLR_BROWN 3 /* on IBM, low-intensity yellow is brown */ 25 | #define CLR_BLUE 4 26 | #define CLR_MAGENTA 5 27 | #define CLR_CYAN 6 28 | #define CLR_GRAY 7 /* low-intensity white */ 29 | #define NO_COLOR 8 30 | #define CLR_ORANGE 9 31 | #define CLR_BRIGHT_GREEN 10 32 | #define CLR_YELLOW 11 33 | #define CLR_BRIGHT_BLUE 12 34 | #define CLR_BRIGHT_MAGENTA 13 35 | #define CLR_BRIGHT_CYAN 14 36 | #define CLR_WHITE 15 37 | #define CLR_MAX 16 38 | 39 | /* The "half-way" point for tty based color systems. This is used in */ 40 | /* the tty color setup code; and in other window ports to work out the */ 41 | /* meaning of bold + color. */ 42 | #define BRIGHT 8 43 | 44 | /* these can be configured */ 45 | #define HI_OBJ CLR_MAGENTA 46 | #define HI_METAL CLR_CYAN 47 | #define HI_COPPER CLR_YELLOW 48 | #define HI_SILVER CLR_GRAY 49 | #define HI_GOLD CLR_YELLOW 50 | #define HI_LEATHER CLR_BROWN 51 | #define HI_CLOTH CLR_BROWN 52 | #define HI_ORGANIC CLR_BROWN 53 | #define HI_WOOD CLR_BROWN 54 | #define HI_PAPER CLR_WHITE 55 | #define HI_GLASS CLR_BRIGHT_CYAN 56 | #define HI_MINERAL CLR_GRAY 57 | #define DRAGON_SILVER CLR_BRIGHT_CYAN 58 | #define HI_ZAP CLR_BRIGHT_BLUE 59 | 60 | #ifdef MENU_COLOR 61 | struct menucoloring { 62 | # ifdef MENU_COLOR_REGEX 63 | # ifdef MENU_COLOR_REGEX_POSIX 64 | regex_t match; 65 | # else 66 | struct re_pattern_buffer match; 67 | # endif 68 | # else 69 | char *match; 70 | # endif 71 | int color, attr; 72 | struct menucoloring *next; 73 | }; 74 | #endif /* MENU_COLOR */ 75 | 76 | #endif /* COLOR_H */ 77 | -------------------------------------------------------------------------------- /include/coord.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)coord.h 3.4 1990/02/22 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef COORD_H 6 | #define COORD_H 7 | 8 | typedef struct nhcoord { 9 | xchar x,y; 10 | } coord; 11 | 12 | #endif /* COORD_H */ 13 | -------------------------------------------------------------------------------- /include/dgn_file.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)dgn_file.h 3.4 1993/01/17 */ 2 | /* Copyright (c) 1989 by M. Stephenson */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef DGN_FILE_H 6 | #define DGN_FILE_H 7 | 8 | #ifndef ALIGN_H 9 | #include "align.h" 10 | #endif 11 | 12 | /* 13 | * Structures manipulated by the dungeon loader & compiler 14 | */ 15 | 16 | struct couple { 17 | short base, rand; 18 | }; 19 | 20 | struct tmpdungeon { 21 | char name[24], 22 | protoname[24]; 23 | struct couple lev; 24 | int flags, 25 | chance, 26 | levels, 27 | branches, 28 | entry_lev; /* entry level for this dungeon */ 29 | char boneschar; 30 | }; 31 | 32 | struct tmplevel { 33 | char name[24]; 34 | struct couple lev; 35 | int chance, rndlevs, chain, flags; 36 | char boneschar; 37 | }; 38 | 39 | struct tmpbranch { 40 | char name[24]; /* destination dungeon name */ 41 | struct couple lev; 42 | int chain; /* index into tmplevel array (chained branch)*/ 43 | int type; /* branch type (see below) */ 44 | int up; /* branch is up or down */ 45 | }; 46 | 47 | /* 48 | * Values for type for tmpbranch structure. 49 | */ 50 | #define TBR_STAIR 0 /* connection with both ends having a staircase */ 51 | #define TBR_NO_UP 1 /* connection with no up staircase */ 52 | #define TBR_NO_DOWN 2 /* connection with no down staircase */ 53 | #define TBR_PORTAL 3 /* portal connection */ 54 | 55 | /* 56 | * Flags that map into the dungeon flags bitfields. 57 | */ 58 | #define TOWN 1 /* levels only */ 59 | #define HELLISH 2 60 | #define MAZELIKE 4 61 | #define ROGUELIKE 8 62 | 63 | #define D_ALIGN_NONE 0 64 | #define D_ALIGN_CHAOTIC (AM_CHAOTIC << 4) 65 | #define D_ALIGN_NEUTRAL (AM_NEUTRAL << 4) 66 | #define D_ALIGN_LAWFUL (AM_LAWFUL << 4) 67 | 68 | #define D_ALIGN_MASK 0x70 69 | 70 | /* 71 | * Max number of prototype levels and branches. 72 | */ 73 | #define LEV_LIMIT 50 74 | #define BRANCH_LIMIT 32 75 | 76 | #endif /* DGN_FILE_H */ 77 | -------------------------------------------------------------------------------- /include/edog.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)edog.h 3.4 1997/10/23 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef EDOG_H 6 | #define EDOG_H 7 | 8 | /* various types of food, the lower, the better liked. */ 9 | 10 | #define DOGFOOD 0 11 | #define CADAVER 1 12 | #define ACCFOOD 2 13 | #define MANFOOD 3 14 | #define APPORT 4 15 | #define POISON 5 16 | #define UNDEF 6 17 | #define TABU 7 18 | 19 | struct edog { 20 | long droptime; /* moment dog dropped object */ 21 | unsigned dropdist; /* dist of drpped obj from @ */ 22 | int apport; /* amount of training */ 23 | long whistletime; /* last time he whistled */ 24 | long hungrytime; /* will get hungry at this time */ 25 | coord ogoal; /* previous goal location */ 26 | int abuse; /* track abuses to this pet */ 27 | int revivals; /* count pet deaths */ 28 | int mhpmax_penalty; /* while starving, points reduced */ 29 | Bitfield(killed_by_u, 1); /* you attempted to kill him */ 30 | }; 31 | #define EDOG(mon) ((struct edog *)&(mon)->mextra[0]) 32 | 33 | #endif /* EDOG_H */ 34 | -------------------------------------------------------------------------------- /include/emin.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)emin.h 3.4 1997/05/01 */ 2 | /* Copyright (c) David Cohrs, 1990. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef EMIN_H 6 | #define EMIN_H 7 | 8 | struct emin { 9 | aligntyp min_align; /* alignment of minion */ 10 | }; 11 | 12 | #define EMIN(mon) ((struct emin *)&(mon)->mextra[0]) 13 | 14 | #endif /* EMIN_H */ 15 | -------------------------------------------------------------------------------- /include/engrave.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)engrave.h 3.4 1991/07/31 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef ENGRAVE_H 6 | #define ENGRAVE_H 7 | 8 | struct engr { 9 | struct engr *nxt_engr; 10 | char *engr_txt; 11 | xchar engr_x, engr_y; 12 | unsigned engr_lth; /* for save & restore; not length of text */ 13 | long engr_time; /* moment engraving was (will be) finished */ 14 | xchar engr_type; 15 | #define DUST 1 16 | #define ENGRAVE 2 17 | #define BURN 3 18 | #define MARK 4 19 | #define ENGR_BLOOD 5 20 | #define HEADSTONE 6 21 | #define N_ENGRAVE 6 22 | }; 23 | 24 | #define newengr(lth) (struct engr *)alloc((unsigned)(lth) + sizeof(struct engr)) 25 | #define dealloc_engr(engr) free((genericptr_t) (engr)) 26 | 27 | #endif /* ENGRAVE_H */ 28 | -------------------------------------------------------------------------------- /include/epri.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)epri.h 3.4 1997/05/01 */ 2 | /* Copyright (c) Izchak Miller, 1989. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef EPRI_H 6 | #define EPRI_H 7 | 8 | struct epri { 9 | aligntyp shralign; /* alignment of priest's shrine */ 10 | /* leave as first field to match emin */ 11 | schar shroom; /* index in rooms */ 12 | coord shrpos; /* position of shrine */ 13 | d_level shrlevel; /* level (& dungeon) of shrine */ 14 | }; 15 | 16 | #define EPRI(mon) ((struct epri *)&(mon)->mextra[0]) 17 | 18 | /* A priest without ispriest is a roaming priest without a shrine, so 19 | * the fields (except shralign, which becomes only the priest alignment) 20 | * are available for reuse. 21 | */ 22 | #define renegade shroom 23 | 24 | #endif /* EPRI_H */ 25 | -------------------------------------------------------------------------------- /include/eshk.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)eshk.h 3.4 1997/05/01 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef ESHK_H 6 | #define ESHK_H 7 | 8 | #define REPAIR_DELAY 5 /* minimum delay between shop damage & repair */ 9 | 10 | #define BILLSZ 200 11 | 12 | struct bill_x { 13 | unsigned bo_id; 14 | boolean useup; 15 | long price; /* price per unit */ 16 | long bquan; /* amount used up */ 17 | }; 18 | 19 | struct eshk { 20 | long robbed; /* amount stolen by most recent customer */ 21 | long credit; /* amount credited to customer */ 22 | long debit; /* amount of debt for using unpaid items */ 23 | long loan; /* shop-gold picked (part of debit) */ 24 | int shoptype; /* the value of rooms[shoproom].rtype */ 25 | schar shoproom; /* index in rooms; set by inshop() */ 26 | schar unused; /* to force alignment for stupid compilers */ 27 | boolean following; /* following customer since he owes us sth */ 28 | boolean surcharge; /* angry shk inflates prices */ 29 | coord shk; /* usual position shopkeeper */ 30 | coord shd; /* position shop door */ 31 | d_level shoplevel; /* level (& dungeon) of his shop */ 32 | int billct; /* no. of entries of bill[] in use */ 33 | struct bill_x bill[BILLSZ]; 34 | struct bill_x *bill_p; 35 | int visitct; /* nr of visits by most recent customer */ 36 | char customer[PL_NSIZ]; /* most recent customer */ 37 | char shknam[PL_NSIZ]; 38 | }; 39 | 40 | #define ESHK(mon) ((struct eshk *)&(mon)->mextra[0]) 41 | 42 | #define NOTANGRY(mon) ((mon)->mpeaceful) 43 | #define ANGRY(mon) (!NOTANGRY(mon)) 44 | 45 | #endif /* ESHK_H */ 46 | -------------------------------------------------------------------------------- /include/func_tab.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)func_tab.h 3.4 1992/04/03 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* Modified 29 Jul 2010 by Alex Smith */ 4 | /* NetHack may be freely redistributed. See license for details. */ 5 | 6 | #ifndef FUNC_TAB_H 7 | #define FUNC_TAB_H 8 | 9 | struct func_tab { 10 | char f_char; 11 | boolean can_if_buried; 12 | int NDECL((*f_funct)); 13 | const char *f_text; 14 | }; 15 | 16 | struct ext_func_tab { 17 | const char *ef_txt, *ef_desc; /* text, description */ 18 | int NDECL((*ef_funct)); /* function to call */ 19 | boolean can_if_buried; 20 | int prio; /* lower makes it more likely to autocomplete */ 21 | char binding1, binding2, binding3; /* default keybindings */ 22 | char replacewithkey; /* to implement movement and redo */ 23 | }; 24 | 25 | extern struct ext_func_tab extcmdlist[]; 26 | 27 | #endif /* FUNC_TAB_H */ 28 | -------------------------------------------------------------------------------- /include/lev.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)lev.h 3.4 1994/03/18 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* Common include file for save and restore routines */ 6 | 7 | #ifndef LEV_H 8 | #define LEV_H 9 | 10 | #define COUNT_SAVE 0x1 11 | #define WRITE_SAVE 0x2 12 | #define FREE_SAVE 0x4 13 | 14 | /* operations of the various saveXXXchn & co. routines */ 15 | #define perform_bwrite(mode) ((mode) & (COUNT_SAVE|WRITE_SAVE)) 16 | #define release_data(mode) ((mode) & FREE_SAVE) 17 | 18 | /* The following are used in mkmaze.c */ 19 | struct container { 20 | struct container *next; 21 | xchar x, y; 22 | short what; 23 | genericptr_t list; 24 | }; 25 | 26 | #define CONS_OBJ 0 27 | #define CONS_MON 1 28 | #define CONS_HERO 2 29 | #define CONS_TRAP 3 30 | 31 | struct bubble { 32 | xchar x, y; /* coordinates of the upper left corner */ 33 | schar dx, dy; /* the general direction of the bubble's movement */ 34 | uchar *bm; /* pointer to the bubble bit mask */ 35 | struct bubble *prev, *next; /* need to traverse the list up and down */ 36 | struct container *cons; 37 | }; 38 | 39 | /* used in light.c */ 40 | typedef struct ls_t { 41 | struct ls_t *next; 42 | xchar x, y; /* source's position */ 43 | short range; /* source's current range */ 44 | short flags; 45 | short type; /* type of light source */ 46 | genericptr_t id; /* source's identifier */ 47 | } light_source; 48 | 49 | #endif /* LEV_H */ 50 | -------------------------------------------------------------------------------- /include/load_img.h: -------------------------------------------------------------------------------- 1 | 2 | /* ------------------------------------------- */ 3 | #define XIMG 0x58494D47 4 | 5 | /* Header of GEM Image Files */ 6 | typedef struct IMG_HEADER{ 7 | short version; /* Img file format version (1) */ 8 | short length; /* Header length in words (8) */ 9 | short planes; /* Number of bit-planes (1) */ 10 | short pat_len; /* length of Patterns (2) */ 11 | short pix_w; /* Pixel width in 1/1000 mmm (372) */ 12 | short pix_h; /* Pixel height in 1/1000 mmm (372) */ 13 | short img_w; /* Pixels per line (=(x+7)/8 Bytes) */ 14 | short img_h; /* Total number of lines */ 15 | long magic; /* Contains "XIMG" if standard color */ 16 | short paltype; /* palette type (0=RGB (short each)) */ 17 | short *palette; /* palette etc. */ 18 | char *addr; /* Address for the depacked bit-planes */ 19 | } IMG_header; 20 | 21 | /* ------------------------------------------- */ 22 | /* error codes */ 23 | #define ERR_HEADER 1 24 | #define ERR_ALLOC 2 25 | #define ERR_FILE 3 26 | #define ERR_DEPACK 4 27 | #define ERR_COLOR 5 28 | 29 | /* saves the current colorpalette with col colors in palette */ 30 | void get_colors(int handle, short *palette, int col); 31 | 32 | /* sets col colors from palette */ 33 | void img_set_colors(int handle,short *palette, int col); 34 | 35 | /* converts MFDB of size from standard to deviceformat (0 if succeded, else error). */ 36 | int convert(MFDB *, long ); 37 | 38 | /* transforms image in VDI-Device format */ 39 | int transform_img(MFDB *); 40 | 41 | /* Loads & depacks IMG (0 if succeded, else error). */ 42 | /* Bitplanes are one after another in address IMG_HEADER.addr. */ 43 | int depack_img(char *, IMG_header *); 44 | 45 | /* Halves IMG in Device-format, dest memory has to be allocated*/ 46 | int half_img(MFDB *,MFDB *); 47 | -------------------------------------------------------------------------------- /include/mac-carbon.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)mac-carbon.h 3.4 2003/06/01 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* Compiler prefix file for the Macintosh Carbon port. 6 | * 7 | * IMPORTANT: This file is intended only as a compiler prefix 8 | * file and must NEVER be included by other source (.c or .h) 9 | * files. 10 | * 11 | * Usage for MacOS X Project Builder: 12 | * Project menu -> Edit Active Target '_target_' -> 13 | * target settings dialog -> Settings -> Simple View -> 14 | * GCC Compiler Settings -> 15 | * set "Prefix Header" to include/mac-carbon.h 16 | * 17 | * Usage for Metrowerks CodeWarrior: 18 | * Edit menu -> _target_ Settings -> Language Settings -> 19 | * C/C++ Language -> 20 | * set "Prefix File" to include/mac-carbon.h 21 | */ 22 | 23 | #define MAC 24 | #undef UNIX 25 | 26 | /* May already be defined by CodeWarrior as 0 or 1 */ 27 | #ifdef TARGET_API_MAC_CARBON 28 | # undef TARGET_API_MAC_CARBON 29 | #endif 30 | #define TARGET_API_MAC_CARBON 1 31 | 32 | #define GCC_WARN 33 | -------------------------------------------------------------------------------- /include/mac-qt.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)mac-qt.h 3.4 2003/06/01 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* Compiler prefix file for the Macintosh Qt port. 6 | * 7 | * IMPORTANT: This file is intended only as a compiler prefix 8 | * file and must NEVER be included by other source (.c or .h) 9 | * files. 10 | * 11 | * Usage for MacOS X Project Builder: 12 | * Project menu -> Edit Active Target '_target_' -> 13 | * target settings dialog -> Settings -> Simple View -> 14 | * GCC Compiler Settings -> 15 | * set "Prefix Header" to include/mac-qt.h 16 | * 17 | * Usage for Metrowerks CodeWarrior: 18 | * Edit menu -> _target_ Settings -> Language Settings -> 19 | * C/C++ Language -> 20 | * set "Prefix File" to include/mac-qt.h 21 | */ 22 | 23 | #undef MAC 24 | #define UNIX 25 | #define BSD 26 | 27 | /* May already be defined by CodeWarrior as 0 or 1 */ 28 | #ifdef TARGET_API_MAC_CARBON 29 | # undef TARGET_API_MAC_CARBON 30 | #endif 31 | #define TARGET_API_MAC_CARBON 0 32 | 33 | #define GCC_WARN 34 | -------------------------------------------------------------------------------- /include/mac-term.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)mac-term.h 3.4 2003/06/01 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 2003. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* Compiler prefix file for the MacOS X Terminal.app port. 6 | * 7 | * IMPORTANT: This file is intended only as a compiler prefix 8 | * file and must NEVER be included by other source (.c or .h) 9 | * files. 10 | * 11 | * Usage for MacOS X Project Builder: 12 | * Project menu -> Edit Active Target '_target_' -> 13 | * target settings dialog -> Settings -> Simple View -> 14 | * GCC Compiler Settings -> 15 | * set "Prefix Header" to include/mac-term.h 16 | * 17 | * Usage for Metrowerks CodeWarrior: 18 | * Edit menu -> _target_ Settings -> Language Settings -> 19 | * C/C++ Language -> 20 | * set "Prefix File" to include/mac-term.h 21 | */ 22 | 23 | /* Stuff needed for the core of NetHack */ 24 | #undef MAC 25 | #define UNIX 26 | #define BSD 27 | #define __FreeBSD__ /* Darwin is based on FreeBSD */ 28 | #define GCC_WARN 29 | 30 | /* May already be defined by CodeWarrior as 0 or 1 */ 31 | #ifdef TARGET_API_MAC_CARBON 32 | # undef TARGET_API_MAC_CARBON 33 | #endif 34 | #define TARGET_API_MAC_CARBON 0 /* Not Carbon */ 35 | -------------------------------------------------------------------------------- /include/macpopup.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)macpopup.h 3.4 1999/10/25 */ 2 | /* Copyright (c) Nethack Develpment Team, 1999. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef MACPOPUP_H 6 | # define MACPOPUP_H 7 | 8 | /* ### mmodal.c ### */ 9 | 10 | extern void FlashButton(DialogRef, short); 11 | extern char queued_resp(char *resp); 12 | extern char topl_yn_function(const char *query, const char *resp, char def); 13 | extern int get_line_from_key_queue(char *bufp); 14 | 15 | #endif /* MACPOPUP_H */ 16 | -------------------------------------------------------------------------------- /include/mail.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)mail.h 3.4 1991/10/11 */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | /* used by ckmailstatus() to pass information to the mail-daemon in newmail() */ 5 | 6 | #ifndef MAIL_H 7 | #define MAIL_H 8 | 9 | #define MSG_OTHER 0 /* catch-all; none of the below... */ 10 | #define MSG_MAIL 1 /* unimportant, uninteresting mail message */ 11 | #define MSG_CALL 2 /* annoying phone/talk/chat-type interruption */ 12 | 13 | struct mail_info { 14 | int message_typ; /* MSG_foo value */ 15 | const char *display_txt; /* text for daemon to verbalize */ 16 | const char *object_nam; /* text to tag object with */ 17 | const char *response_cmd; /* command to eventually execute */ 18 | }; 19 | 20 | #endif /* MAIL_H */ 21 | -------------------------------------------------------------------------------- /include/mfndpos.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)mfndpos.h 3.4 2002/04/06 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef MFNDPOS_H 6 | #define MFNDPOS_H 7 | 8 | #define ALLOW_TRAPS 0x00020000L /* can enter traps */ 9 | #define ALLOW_U 0x00040000L /* can attack you */ 10 | #define ALLOW_M 0x00080000L /* can attack other monsters */ 11 | #define ALLOW_TM 0x00100000L /* can attack tame monsters */ 12 | #define ALLOW_ALL (ALLOW_U | ALLOW_M | ALLOW_TM | ALLOW_TRAPS) 13 | #define NOTONL 0x00200000L /* avoids direct line to player */ 14 | #define OPENDOOR 0x00400000L /* opens closed doors */ 15 | #define UNLOCKDOOR 0x00800000L /* unlocks locked doors */ 16 | #define BUSTDOOR 0x01000000L /* breaks any doors */ 17 | #define ALLOW_ROCK 0x02000000L /* pushes rocks */ 18 | #define ALLOW_WALL 0x04000000L /* walks thru walls */ 19 | #define ALLOW_DIG 0x08000000L /* digs */ 20 | #define ALLOW_BARS 0x10000000L /* may pass thru iron bars */ 21 | #define ALLOW_SANCT 0x20000000L /* enters temples */ 22 | #define ALLOW_SSM 0x40000000L /* ignores scare monster */ 23 | #ifdef NHSTDC 24 | #define NOGARLIC 0x80000000UL /* hates garlic */ 25 | #else 26 | #define NOGARLIC 0x80000000L /* hates garlic */ 27 | #endif 28 | 29 | #endif /* MFNDPOS_H */ 30 | -------------------------------------------------------------------------------- /include/micro.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)micro.h 3.4 1990/02/22 */ 2 | /* micro.h - function declarations for various microcomputers */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef MICRO_H 6 | #define MICRO_H 7 | 8 | extern const char *alllevels, *allbones; 9 | extern char levels[], bones[], permbones[], hackdir[]; 10 | 11 | extern int ramdisk; 12 | 13 | #ifndef C 14 | #define C(c) (0x1f & (c)) 15 | #endif 16 | #ifndef M 17 | #define M(c) (((char)0x80) | (c)) 18 | #endif 19 | #define ABORT C('a') 20 | 21 | #endif /* MICRO_H */ 22 | -------------------------------------------------------------------------------- /include/mttypriv.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)mttypriv.h 3.4 1993/03/01 */ 2 | /* Copyright (c) Jon W{tte 1993. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* 6 | * This file contains private structures used to implement the 7 | * tty windows - note that these structures may change between 8 | * minor releases! 9 | */ 10 | 11 | #ifndef _H_tty_private 12 | # define _H_tty_private 13 | 14 | # ifndef _H_tty_public 15 | #include "mactty.h" 16 | # endif 17 | 18 | #if !TARGET_API_MAC_CARBON 19 | # include 20 | # include 21 | # include 22 | #endif 23 | 24 | #define TA_TO_RGB(ta,rgb) (((rgb).red=(((ta)>>16)&0xff)*257),((rgb).green=(((ta)>>8)&0xff)*257),\ 25 | ((rgb).blue=((ta)&0xff)*257)),rgb 26 | 27 | typedef struct tty_record { 28 | WindowPtr its_window ; 29 | 30 | short font_number ; 31 | short font_size ; 32 | short char_width ; 33 | short row_height ; 34 | short ascent_height ; 35 | 36 | short x_size ; 37 | short y_size ; 38 | short x_curs ; 39 | short y_curs ; 40 | 41 | GWorldPtr its_window_world ; 42 | BitMap its_bits ; 43 | GrafPtr offscreen_port ; 44 | GWorldPtr offscreen_world ; 45 | #if CLIP_RECT_ONLY 46 | Rect invalid_rect ; 47 | #else 48 | RgnHandle invalid_part ; 49 | #endif 50 | 51 | long attribute [ TTY_NUMBER_ATTRIBUTES ] ; 52 | long last_cursor ; 53 | 54 | Boolean was_allocated ; 55 | Boolean curs_state ; 56 | Boolean uses_gworld ; 57 | } tty_record ; 58 | 59 | 60 | #endif /* _H_tty_private */ 61 | -------------------------------------------------------------------------------- /include/nhlan.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)nhlan.h 3.4 1997/04/12 */ 2 | /* Copyright (c) Michael Allison, 1997 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef NHLAN_H 6 | #define NHLAN_H 7 | /* 8 | * Here are the LAN features currently implemented: 9 | * LAN_MAIL Mail facility allowing receipt and 10 | * reading of mail. 11 | * LAN_SHARED_BONES Allows bones files to be stored on a 12 | * network share. (Does NOT imply compatibiliy 13 | * between unlike platforms) 14 | */ 15 | 16 | # ifdef LAN_FEATURES 17 | # ifdef LAN_MAIL 18 | #define MAIL 19 | #ifndef WIN32 20 | #define MAILCKFREQ 50 21 | #else 22 | /* 23 | * WIN32 port does the real mail lookups in a separate thread 24 | * and the NetHack core code really just checks a flag, 25 | * so that part of it can be done more often. The throttle 26 | * for how often the mail thread should contact the mail 27 | * system is controlled by MAILTHREADFREQ and is expressed 28 | * in milliseconds. 29 | */ 30 | #define MAILCKFREQ 5 31 | #define MAILTHREADFREQ 50000 32 | #endif 33 | 34 | #ifndef MAX_BODY_SIZE 35 | #define MAX_BODY_SIZE 1024 36 | #endif 37 | 38 | struct lan_mail_struct { 39 | char sender[120]; 40 | char subject[120]; 41 | boolean body_in_ram; /* TRUE means body in memory not file */ 42 | char filename[_MAX_PATH]; 43 | char body[MAX_BODY_SIZE]; 44 | }; 45 | # endif 46 | 47 | # endif /*LAN_FEATURES*/ 48 | #endif /*NHLAN_H*/ 49 | -------------------------------------------------------------------------------- /include/qt_clust.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)qt_clust.h 3.4 1999/11/19 */ 2 | /* Copyright (c) Warwick Allison, 1999. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef clusterizer_H 6 | #define clusterizer_H 7 | 8 | #include 9 | 10 | class Clusterizer { 11 | public: 12 | Clusterizer(int maxclusters); 13 | ~Clusterizer(); 14 | 15 | void add(int x, int y); // 1x1 rectangle (point) 16 | void add(int x, int y, int w, int h); 17 | void add(const QRect& rect); 18 | 19 | void clear(); 20 | int clusters() { return count; } 21 | const QRect& operator[](int i); 22 | 23 | private: 24 | QRect* cluster; 25 | int count; 26 | const int max; 27 | }; 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /include/qt_kde0.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)qt_kde0.h 3.4 1999/11/19 */ 2 | /* Copyright (c) Warwick Allison, 1999. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef QT_DUMMYKDE 6 | #define QT_DUMMYKDE 7 | class KTopLevelWidget : public QMainWindow { 8 | Q_OBJECT 9 | }; 10 | #endif 11 | -------------------------------------------------------------------------------- /include/quest.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)quest.h 3.4 1992/11/15 */ 2 | /* Copyright (c) Mike Stephenson 1991. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef QUEST_H 6 | #define QUEST_H 7 | 8 | struct q_score { /* Quest "scorecard" */ 9 | Bitfield(first_start,1); /* only set the first time */ 10 | Bitfield(met_leader,1); /* has met the leader */ 11 | Bitfield(not_ready,3); /* rejected due to alignment, etc. */ 12 | Bitfield(pissed_off,1); /* got the leader angry */ 13 | Bitfield(got_quest,1); /* got the quest assignment */ 14 | 15 | Bitfield(first_locate,1); /* only set the first time */ 16 | Bitfield(met_intermed,1); /* used if the locate is a person. */ 17 | Bitfield(got_final,1); /* got the final quest assignment */ 18 | 19 | Bitfield(made_goal,3); /* # of times on goal level */ 20 | Bitfield(met_nemesis,1); /* has met the nemesis before */ 21 | Bitfield(killed_nemesis,1); /* set when the nemesis is killed */ 22 | Bitfield(in_battle,1); /* set when nemesis fighting you */ 23 | 24 | Bitfield(cheater,1); /* set if cheating detected */ 25 | Bitfield(touched_artifact,1); /* for a special message */ 26 | Bitfield(offered_artifact,1); /* offered to leader */ 27 | Bitfield(got_thanks,1); /* final message from leader */ 28 | 29 | /* keep track of leader presence/absence even if leader is 30 | polymorphed, raised from dead, etc */ 31 | Bitfield(leader_is_dead,1); 32 | unsigned leader_m_id; 33 | }; 34 | 35 | #define MAX_QUEST_TRIES 7 /* exceed this and you "fail" */ 36 | #define MIN_QUEST_ALIGN 3 /* at least this align.record to start */ 37 | /* note: align 3 matches "aligned" as reported by enlightenment (cmd.c) */ 38 | #define MIN_QUEST_LEVEL 10 /* at least this u.ulevel to start */ 39 | /* note: exp.lev. 10 is threshold level for 4th rank (class title, role.c) */ 40 | 41 | #endif /* QUEST_H */ 42 | -------------------------------------------------------------------------------- /include/rect.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)rect.h 3.4 1990/02/22 */ 2 | /* Copyright (c) 1990 by Jean-Christophe Collet */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef RECT_H 6 | #define RECT_H 7 | 8 | typedef struct nhrect { 9 | xchar lx, ly; 10 | xchar hx, hy; 11 | } NhRect; 12 | 13 | #endif /* RECT_H */ 14 | -------------------------------------------------------------------------------- /include/spell.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)spell.h 3.4 1995/06/01 */ 2 | /* Copyright 1986, M. Stephenson */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef SPELL_H 6 | #define SPELL_H 7 | 8 | struct spell { 9 | short sp_id; /* spell id (== object.otyp) */ 10 | xchar sp_lev; /* power level */ 11 | int sp_know; /* knowlege of spell */ 12 | }; 13 | 14 | /* levels of memory destruction with a scroll of amnesia */ 15 | #define ALL_MAP 0x1 16 | #define ALL_SPELLS 0x2 17 | 18 | #define decrnknow(spell) spl_book[spell].sp_know-- 19 | #define spellid(spell) spl_book[spell].sp_id 20 | #define spellknow(spell) spl_book[spell].sp_know 21 | 22 | #endif /* SPELL_H */ 23 | -------------------------------------------------------------------------------- /include/tcap.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)tcap.h 3.4 1992/10/21 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1989. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* not named termcap.h because it may conflict with a system header */ 6 | 7 | #ifndef TCAP_H 8 | #define TCAP_H 9 | 10 | #ifndef MICRO 11 | # define TERMLIB /* include termcap code */ 12 | #endif 13 | 14 | /* might display need graphics code? */ 15 | #if !defined(AMIGA) && !defined(TOS) && !defined(MAC) 16 | # if defined(TERMLIB) || defined(OS2) || defined(MSDOS) 17 | # define ASCIIGRAPH 18 | # endif 19 | #endif 20 | 21 | #ifndef DECL_H 22 | extern struct tc_gbl_data { /* also declared in decl.h; defined in decl.c */ 23 | char *tc_AS, *tc_AE; /* graphics start and end (tty font swapping) */ 24 | int tc_LI, tc_CO; /* lines and columns */ 25 | } tc_gbl_data; 26 | #define AS tc_gbl_data.tc_AS 27 | #define AE tc_gbl_data.tc_AE 28 | #define LI tc_gbl_data.tc_LI 29 | #define CO tc_gbl_data.tc_CO 30 | #endif 31 | 32 | extern struct tc_lcl_data { /* defined and set up in termcap.c */ 33 | char *tc_CM, *tc_ND, *tc_CD; 34 | char *tc_HI, *tc_HE, *tc_US, *tc_UE; 35 | boolean tc_ul_hack; 36 | } tc_lcl_data; 37 | /* some curses.h declare CM etc. */ 38 | #define nh_CM tc_lcl_data.tc_CM 39 | #define nh_ND tc_lcl_data.tc_ND 40 | #define nh_CD tc_lcl_data.tc_CD 41 | #define nh_HI tc_lcl_data.tc_HI 42 | #define nh_HE tc_lcl_data.tc_HE 43 | #define nh_US tc_lcl_data.tc_US 44 | #define nh_UE tc_lcl_data.tc_UE 45 | #define ul_hack tc_lcl_data.tc_ul_hack 46 | 47 | extern short ospeed; /* set up in termcap.c */ 48 | 49 | #ifdef TEXTCOLOR 50 | # ifdef TOS 51 | extern const char *hilites[CLR_MAX]; 52 | # else 53 | extern NEARDATA char *hilites[CLR_MAX]; 54 | # endif 55 | #endif 56 | 57 | #endif /* TCAP_H */ 58 | -------------------------------------------------------------------------------- /include/tile.h: -------------------------------------------------------------------------------- 1 | /* This file is automatically generated. Do not edit. */ 2 | 3 | #define TOTAL_TILES_USED 1045 4 | #define TILES_PER_ROW 33 5 | #define TILES_PER_COL 32 6 | 7 | /* Definitions for creating compiling tiles. */ 8 | /* This is a mix of the vanilla NetHack and Slash'EM code. */ 9 | /* Modified 29 Oct 2010 by Alex Smith */ 10 | 11 | typedef unsigned char pixval; 12 | 13 | typedef struct { 14 | pixval r, g, b; 15 | } pixel; 16 | 17 | #define MAXCOLORMAPSIZE 256 18 | 19 | #define CM_RED 0 20 | #define CM_GREEN 1 21 | #define CM_BLUE 2 22 | 23 | #define DEFAULT_BACKGROUND { 71, 108, 108 } /* For transparency */ 24 | 25 | /* shared between reader and writer */ 26 | extern pixval ColorMap[3][MAXCOLORMAPSIZE]; 27 | extern int colorsinmap; 28 | /* writer's accumulated colormap */ 29 | extern pixval MainColorMap[3][MAXCOLORMAPSIZE]; 30 | extern int colorsinmainmap; 31 | 32 | #include "dlb.h" /* for MODEs */ 33 | 34 | /* maximum possible size of tiles */ 35 | #define MAX_TILE_X 128 36 | #define MAX_TILE_Y 128 37 | 38 | extern int tile_x, tile_y; 39 | 40 | #define Fprintf (void) fprintf 41 | 42 | #define pixel_equal(x,y) ((x.r == y.r) && (x.g == y.g) && (x.b == y.b)) 43 | 44 | extern boolean FDECL(fopen_text_file, (const char *, const char *)); 45 | extern boolean FDECL(read_text_tile, (pixel (*)[MAX_TILE_X])); 46 | extern boolean FDECL(write_text_tile, (pixel (*)[MAX_TILE_X])); 47 | extern boolean NDECL(fclose_text_file); 48 | 49 | extern void NDECL(init_colormap); 50 | extern void NDECL(merge_colormap); 51 | 52 | #if defined(MICRO) || defined(WIN32) 53 | #undef exit 54 | # if !defined(MSDOS) && !defined(WIN32) 55 | extern void FDECL(exit, (int)); 56 | # endif 57 | #endif 58 | 59 | /*tile.h*/ 60 | -------------------------------------------------------------------------------- /include/tile2x11.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)tile2x11.h 3.4 1995/01/25 */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef TILE2X11_H 5 | #define TILE2X11_H 6 | 7 | /* 8 | * Header for the x11 tile map. 9 | */ 10 | typedef struct { 11 | unsigned long version; 12 | unsigned long ncolors; 13 | unsigned long tile_width; 14 | unsigned long tile_height; 15 | unsigned long ntiles; 16 | unsigned long per_row; 17 | } x11_header; 18 | 19 | /* how wide each row in the tile file is, in tiles */ 20 | #define TILES_PER_ROW (40) 21 | 22 | #endif /* TILE2X11_H */ 23 | -------------------------------------------------------------------------------- /include/timeout.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)timeout.h 3.4 1999/02/13 */ 2 | /* Copyright 1994, Dean Luick */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef TIMEOUT_H 6 | #define TIMEOUT_H 7 | 8 | /* generic timeout function */ 9 | typedef void FDECL((*timeout_proc), (genericptr_t, long)); 10 | 11 | /* kind of timer */ 12 | #define TIMER_LEVEL 0 /* event specific to level */ 13 | #define TIMER_GLOBAL 1 /* event follows current play */ 14 | #define TIMER_OBJECT 2 /* event follows a object */ 15 | #define TIMER_MONSTER 3 /* event follows a monster */ 16 | 17 | /* save/restore timer ranges */ 18 | #define RANGE_LEVEL 0 /* save/restore timers staying on level */ 19 | #define RANGE_GLOBAL 1 /* save/restore timers following global play */ 20 | 21 | /* 22 | * Timeout functions. Add a define here, then put it in the table 23 | * in timeout.c. "One more level of indirection will fix everything." 24 | */ 25 | #define ROT_ORGANIC 0 /* for buried organics */ 26 | #define ROT_CORPSE 1 27 | #define REVIVE_MON 2 28 | #define BURN_OBJECT 3 29 | #define HATCH_EGG 4 30 | #define FIG_TRANSFORM 5 31 | #define NUM_TIME_FUNCS 6 32 | 33 | /* used in timeout.c */ 34 | typedef struct fe { 35 | struct fe *next; /* next item in chain */ 36 | long timeout; /* when we time out */ 37 | unsigned long tid; /* timer ID */ 38 | short kind; /* kind of use */ 39 | short func_index; /* what to call when we time out */ 40 | genericptr_t arg; /* pointer to timeout argument */ 41 | Bitfield (needs_fixup,1); /* does arg need to be patched? */ 42 | } timer_element; 43 | 44 | #endif /* TIMEOUT_H */ 45 | -------------------------------------------------------------------------------- /include/tosconf.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)tosconf.h 3.2 90/02/22 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifdef TOS 6 | #ifndef TOSCONF_H 7 | #define TOSCONF_H 8 | 9 | #define MICRO /* must be defined to allow some inclusions */ 10 | 11 | /* 12 | Adjust these options to suit your compiler. The default here is for 13 | GNU C with the MiNT library. 14 | */ 15 | 16 | /*#define NO_SIGNAL /* library doesn't support signals */ 17 | /*#define NO_FSTAT /* library doesn't have fstat() call */ 18 | #define MINT /* library supports MiNT extensions to TOS */ 19 | 20 | #ifdef __MINT__ 21 | #define MINT 22 | #endif 23 | 24 | #ifdef O_BINARY 25 | #define FCMASK O_BINARY 26 | #else 27 | #define FCMASK 0660 28 | #define O_BINARY 0 29 | #endif 30 | 31 | #ifdef UNIXDEBUG 32 | #define remove(x) unlink(x) 33 | #endif 34 | 35 | /* configurable options */ 36 | #define MFLOPPY /* floppy support */ 37 | #define RANDOM /* improved random numbers */ 38 | #define SHELL /* allow spawning of shell */ 39 | #define TERMLIB /* use termcap */ 40 | #define TEXTCOLOR /* allow color */ 41 | #define MAIL /* enable the fake maildemon */ 42 | #ifdef MINT 43 | #define SUSPEND /* allow suspending the game */ 44 | #endif 45 | 46 | #ifndef TERMLIB 47 | #define ANSI_DEFAULT /* use vt52 by default */ 48 | #endif 49 | 50 | #if defined(__GNUC__) || defined(__MINT__) 51 | /* actually, only more recent GNU C libraries have strcmpi 52 | * on the other hand, they're free -- if yours is out of 53 | * date, grab the most recent from atari.archive.umich.edu 54 | */ 55 | #define STRNCMPI 56 | #undef strcmpi 57 | extern int FDECL(strcmpi,(const char *, const char *)); 58 | extern int FDECL(strncmpi,(const char *, const char *, size_t)); 59 | #endif 60 | 61 | #include 62 | #include 63 | /* instead of including system.h from pcconf.h */ 64 | #include 65 | #include 66 | #include 67 | #define SIG_RET_TYPE __Sigfunc 68 | #define SYSTEM_H 69 | 70 | #ifndef MICRO_H 71 | #include "micro.h" 72 | #endif 73 | #ifndef PCCONF_H 74 | #include "pcconf.h" /* remainder of stuff is same as the PC */ 75 | #endif 76 | 77 | #ifdef TEXTCOLOR 78 | extern boolean colors_changed; /* in tos.c */ 79 | #endif 80 | 81 | #ifdef __GNUC__ 82 | #define GCC_BUG /* correct a gcc bug involving double for loops */ 83 | #endif 84 | 85 | #endif /* TOSCONF_H */ 86 | #endif /* TOS */ 87 | -------------------------------------------------------------------------------- /include/trap.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)trap.h 3.4 2000/08/30 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* note for 3.1.0 and later: no longer manipulated by 'makedefs' */ 6 | 7 | #ifndef TRAP_H 8 | #define TRAP_H 9 | 10 | union vlaunchinfo { 11 | short v_launch_otyp; /* type of object to be triggered */ 12 | coord v_launch2; /* secondary launch point (for boulders) */ 13 | }; 14 | 15 | struct trap { 16 | struct trap *ntrap; 17 | xchar tx,ty; 18 | d_level dst; /* destination for portals */ 19 | coord launch; 20 | Bitfield(ttyp,5); 21 | Bitfield(tseen,1); 22 | Bitfield(once,1); 23 | Bitfield(madeby_u,1); /* So monsters may take offence when you trap 24 | them. Recognizing who made the trap isn't 25 | completely unreasonable, everybody has 26 | their own style. This flag is also needed 27 | when you untrap a monster. It would be too 28 | easy to make a monster peaceful if you could 29 | set a trap for it and then untrap it. */ 30 | union vlaunchinfo vl; 31 | #define launch_otyp vl.v_launch_otyp 32 | #define launch2 vl.v_launch2 33 | }; 34 | 35 | extern struct trap *ftrap; 36 | #define newtrap() (struct trap *) alloc(sizeof(struct trap)) 37 | #define dealloc_trap(trap) free((genericptr_t) (trap)) 38 | 39 | /* reasons for statue animation */ 40 | #define ANIMATE_NORMAL 0 41 | #define ANIMATE_SHATTER 1 42 | #define ANIMATE_SPELL 2 43 | 44 | /* reasons for animate_statue's failure */ 45 | #define AS_OK 0 /* didn't fail */ 46 | #define AS_NO_MON 1 /* makemon failed */ 47 | #define AS_MON_IS_UNIQUE 2 /* statue monster is unique */ 48 | 49 | /* Note: if adding/removing a trap, adjust trap_engravings[] in mklev.c */ 50 | 51 | /* unconditional traps */ 52 | #define NO_TRAP 0 53 | #define ARROW_TRAP 1 54 | #define DART_TRAP 2 55 | #define ROCKTRAP 3 56 | #define SQKY_BOARD 4 57 | #define BEAR_TRAP 5 58 | #define LANDMINE 6 59 | #define ROLLING_BOULDER_TRAP 7 60 | #define SLP_GAS_TRAP 8 61 | #define RUST_TRAP 9 62 | #define FIRE_TRAP 10 63 | #define PIT 11 64 | #define SPIKED_PIT 12 65 | #define HOLE 13 66 | #define TRAPDOOR 14 67 | #define TELEP_TRAP 15 68 | #define LEVEL_TELEP 16 69 | #define MAGIC_PORTAL 17 70 | #define WEB 18 71 | #define STATUE_TRAP 19 72 | #define MAGIC_TRAP 20 73 | #define ANTI_MAGIC 21 74 | #define POLY_TRAP 22 75 | #define TRAPNUM 23 76 | 77 | #endif /* TRAP_H */ 78 | -------------------------------------------------------------------------------- /include/vault.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)vault.h 3.4 1997/05/01 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef VAULT_H 6 | #define VAULT_H 7 | 8 | #define FCSIZ (ROWNO+COLNO) 9 | struct fakecorridor { 10 | xchar fx,fy,ftyp; 11 | }; 12 | 13 | struct egd { 14 | int fcbeg, fcend; /* fcend: first unused pos */ 15 | int vroom; /* room number of the vault */ 16 | xchar gdx, gdy; /* goal of guard's walk */ 17 | xchar ogx, ogy; /* guard's last position */ 18 | d_level gdlevel; /* level (& dungeon) guard was created in */ 19 | xchar warncnt; /* number of warnings to follow */ 20 | Bitfield(gddone,1); /* true iff guard has released player */ 21 | Bitfield(unused,7); 22 | struct fakecorridor fakecorr[FCSIZ]; 23 | }; 24 | 25 | #define EGD(mon) ((struct egd *)&(mon)->mextra[0]) 26 | 27 | #endif /* VAULT_H */ 28 | -------------------------------------------------------------------------------- /include/vision.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)vision.h 3.4 1995/01/26 */ 2 | /* Copyright (c) Dean Luick, with acknowledgements to Dave Cohrs, 1990. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef VISION_H 6 | #define VISION_H 7 | 8 | #if 0 /* (moved to decl.h) */ 9 | extern boolean vision_full_recalc; /* TRUE if need vision recalc */ 10 | extern char **viz_array; /* could see/in sight row pointers */ 11 | extern char *viz_rmin; /* min could see indices */ 12 | extern char *viz_rmax; /* max could see indices */ 13 | #endif 14 | #define COULD_SEE 0x1 /* location could be seen, if it were lit */ 15 | #define IN_SIGHT 0x2 /* location can be seen */ 16 | #define TEMP_LIT 0x4 /* location is temporarily lit */ 17 | 18 | /* 19 | * Light source sources 20 | */ 21 | #define LS_OBJECT 0 22 | #define LS_MONSTER 1 23 | 24 | /* 25 | * cansee() - Returns true if the hero can see the location. 26 | * 27 | * couldsee() - Returns true if the hero has a clear line of sight to 28 | * the location. 29 | */ 30 | #define cansee(x,y) (viz_array[y][x] & IN_SIGHT) 31 | #define couldsee(x,y) (viz_array[y][x] & COULD_SEE) 32 | #define templit(x,y) (viz_array[y][x] & TEMP_LIT) 33 | 34 | /* 35 | * The following assume the monster is not blind. 36 | * 37 | * m_cansee() - Returns true if the monster can see the given location. 38 | * 39 | * m_canseeu() - Returns true if the monster could see the hero. Assumes 40 | * that if the hero has a clear line of sight to the monster's 41 | * location and the hero is visible, then monster can see the 42 | * hero. 43 | */ 44 | #define m_cansee(mtmp,x2,y2) clear_path((mtmp)->mx,(mtmp)->my,(x2),(y2)) 45 | 46 | #define m_canseeu(m) ((!Invis || perceives((m)->data)) && \ 47 | !(Underwater || u.uburied || (m)->mburied) ? \ 48 | couldsee((m)->mx,(m)->my) : 0) 49 | 50 | /* 51 | * Circle information 52 | */ 53 | #define MAX_RADIUS 15 /* this is in points from the source */ 54 | 55 | /* Use this macro to get a list of distances of the edges (see vision.c). */ 56 | #define circle_ptr(z) (&circle_data[(int)circle_start[z]]) 57 | 58 | #endif /* VISION_H */ 59 | -------------------------------------------------------------------------------- /include/winGnome.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)winGnome.h 3.4. 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* Copyright (C) 1998 by Anthony Taylor */ 4 | /* NetHack may be freely redistributed. See license for details. */ 5 | 6 | #ifndef WINGNOME_H 7 | #define WINGNOME_H 8 | 9 | #define E extern 10 | 11 | E struct window_procs Gnome_procs; 12 | 13 | #undef E 14 | 15 | #define NHW_WORN 6 16 | extern winid WIN_WORN; 17 | 18 | #endif /* WINGNOME_H */ 19 | -------------------------------------------------------------------------------- /include/wintype.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)wintype.h 3.4 1996/02/18 */ 2 | /* Copyright (c) David Cohrs, 1991 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef WINTYPE_H 6 | #define WINTYPE_H 7 | 8 | typedef int winid; /* a window identifier */ 9 | 10 | /* generic parameter - must not be any larger than a pointer */ 11 | typedef union any { 12 | genericptr_t a_void; 13 | struct obj *a_obj; 14 | int a_int; 15 | char a_char; 16 | schar a_schar; 17 | /* add types as needed */ 18 | } anything; 19 | #define ANY_P union any /* avoid typedef in prototypes */ 20 | /* (buggy old Ultrix compiler) */ 21 | 22 | /* menu return list */ 23 | typedef struct mi { 24 | anything item; /* identifier */ 25 | long count; /* count */ 26 | } menu_item; 27 | #define MENU_ITEM_P struct mi 28 | 29 | /* select_menu() "how" argument types */ 30 | #define PICK_NONE 0 /* user picks nothing (display only) */ 31 | #define PICK_ONE 1 /* only pick one */ 32 | #define PICK_ANY 2 /* can pick any amount */ 33 | 34 | /* window types */ 35 | /* any additional port specific types should be defined in win*.h */ 36 | #define NHW_MESSAGE 1 37 | #define NHW_STATUS 2 38 | #define NHW_MAP 3 39 | #define NHW_MENU 4 40 | #define NHW_TEXT 5 41 | 42 | /* attribute types for putstr; the same as the ANSI value, for convenience */ 43 | #define ATR_NONE 0 44 | #define ATR_BOLD 1 45 | #define ATR_DIM 2 46 | #define ATR_ULINE 4 47 | #define ATR_BLINK 5 48 | #define ATR_INVERSE 7 49 | 50 | /* nh_poskey() modifier types */ 51 | #define CLICK_1 1 52 | #define CLICK_2 2 53 | 54 | /* invalid winid */ 55 | #define WIN_ERR ((winid) -1) 56 | 57 | /* menu window keyboard commands (may be mapped) */ 58 | #define MENU_FIRST_PAGE '^' 59 | #define MENU_LAST_PAGE '|' 60 | #define MENU_NEXT_PAGE '>' 61 | #define MENU_PREVIOUS_PAGE '<' 62 | #define MENU_SELECT_ALL '.' 63 | #define MENU_UNSELECT_ALL '-' 64 | #define MENU_INVERT_ALL '@' 65 | #define MENU_SELECT_PAGE ',' 66 | #define MENU_UNSELECT_PAGE '\\' 67 | #define MENU_INVERT_PAGE '~' 68 | #define MENU_SEARCH ':' 69 | 70 | 71 | #endif /* WINTYPE_H */ 72 | -------------------------------------------------------------------------------- /include/xwindowp.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)xwindowp.h 3.4 1992/03/07 */ 2 | /* Copyright (c) Dean Luick, 1992 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef _xwindowp_h 6 | #define _xwindowp_h 7 | 8 | #include "xwindow.h" 9 | 10 | #ifndef SYSV 11 | #define PRESERVE_NO_SYSV /* X11 include files may define SYSV */ 12 | #endif 13 | 14 | /* include superclass private header file */ 15 | #include 16 | 17 | #ifdef PRESERVE_NO_SYSV 18 | # ifdef SYSV 19 | # undef SYSV 20 | # endif 21 | # undef PRESERVE_NO_SYSV 22 | #endif 23 | 24 | /* define unique representation types not found in */ 25 | 26 | #define XtRWindowResource "WindowResource" 27 | 28 | typedef struct { 29 | int empty; 30 | } WindowClassPart; 31 | 32 | typedef struct _WindowClassRec { 33 | CoreClassPart core_class; 34 | WindowClassPart window_class; 35 | } WindowClassRec; 36 | 37 | extern WindowClassRec windowClassRec; 38 | 39 | typedef struct { 40 | /* resources */ 41 | Dimension rows; 42 | Dimension columns; 43 | Pixel foreground; 44 | Pixel black; 45 | Pixel red; 46 | Pixel green; 47 | Pixel brown; 48 | Pixel blue; 49 | Pixel magenta; 50 | Pixel cyan; 51 | Pixel gray; 52 | Pixel orange; 53 | Pixel bright_green; 54 | Pixel yellow; 55 | Pixel bright_blue; 56 | Pixel bright_magenta; 57 | Pixel bright_cyan; 58 | Pixel white; 59 | XFontStruct *font; 60 | XtCallbackList expose_callback; 61 | XtCallbackList input_callback; 62 | XtCallbackList resize_callback; 63 | /* private state */ 64 | /* (none) */ 65 | } WindowPart; 66 | 67 | typedef struct _WindowRec { 68 | CorePart core; 69 | WindowPart window; 70 | } WindowRec; 71 | 72 | #endif /* _xwindowp_h */ 73 | -------------------------------------------------------------------------------- /news: -------------------------------------------------------------------------------- 1 | 2 | WARNING: multiplayer mode is still incredibly experimental; when playing in 3 | multiplayer mode, there's no way to recover a game in case of a crash, and 4 | there are still plenty of game-breaking bugs. If you still want to try it, 5 | please make sure your connection is good (disconnecting causes one of those 6 | bugs) and #invite your friends; being engulfed while someone else is on the 7 | level can also cause a panic - it won't crash the other person's game, 8 | though - and trying to heal or haste another player will cause one side to 9 | crash and the other to get stuck, so avoid doing that too; please report any 10 | weird behaviour you encounter to the #acehack IRC channel on freenode. 11 | 12 | Single player mode should work fine. 13 | 14 | --kerio 15 | -------------------------------------------------------------------------------- /src/track.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)track.c 3.4 87/08/08 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | /* track.c - version 1.0.2 */ 5 | 6 | #include "hack.h" 7 | 8 | #define UTSZ 50 9 | 10 | STATIC_VAR NEARDATA int utcnt, utpnt; 11 | STATIC_VAR NEARDATA coord utrack[UTSZ]; 12 | 13 | #ifdef OVLB 14 | 15 | void 16 | initrack() 17 | { 18 | utcnt = utpnt = 0; 19 | } 20 | 21 | #endif /* OVLB */ 22 | #ifdef OVL1 23 | 24 | /* add to track */ 25 | void 26 | settrack() 27 | { 28 | if(utcnt < UTSZ) utcnt++; 29 | if(utpnt == UTSZ) utpnt = 0; 30 | utrack[utpnt].x = u.ux; 31 | utrack[utpnt].y = u.uy; 32 | utpnt++; 33 | } 34 | 35 | #endif /* OVL1 */ 36 | #ifdef OVL0 37 | 38 | coord * 39 | gettrack(x, y) 40 | register int x, y; 41 | { 42 | register int cnt, ndist; 43 | register coord *tc; 44 | cnt = utcnt; 45 | for(tc = &utrack[utpnt]; cnt--; ){ 46 | if(tc == utrack) tc = &utrack[UTSZ-1]; 47 | else tc--; 48 | ndist = distmin(x,y,tc->x,tc->y); 49 | 50 | /* if far away, skip track entries til we're closer */ 51 | if(ndist > 2) { 52 | ndist -= 2; /* be careful due to extra decrement at top of loop */ 53 | cnt -= ndist; 54 | if(cnt <= 0) 55 | return (coord *) 0; /* too far away, no matches possible */ 56 | if(tc < &utrack[ndist]) 57 | tc += (UTSZ-ndist); 58 | else 59 | tc -= ndist; 60 | } else if(ndist <= 1) 61 | return(ndist ? tc : 0); 62 | } 63 | return (coord *)0; 64 | } 65 | 66 | #endif /* OVL0 */ 67 | 68 | /*track.c*/ 69 | -------------------------------------------------------------------------------- /sys/amiga/Install.ami: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deepy/acehack/9a4c7671a8d8de6c0a7ab4718382b49cf5ec61f5/sys/amiga/Install.ami -------------------------------------------------------------------------------- /sys/amiga/amidos.p: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)amidos.p 3.1 93/01/08 2 | /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* amidos.c */ 6 | void NDECL(flushout ); 7 | #ifndef getuid 8 | int NDECL(getuid ); 9 | #endif 10 | #ifndef getpid 11 | int NDECL(getpid ); 12 | #endif 13 | #ifndef getlogin 14 | char *NDECL(getlogin ); 15 | #endif 16 | #ifndef abs 17 | int FDECL(abs, (int )); 18 | #endif 19 | int NDECL(tgetch ); 20 | int NDECL(dosh ); 21 | long FDECL(freediskspace, (char *)); 22 | long FDECL(filesize, (char *)); 23 | void FDECL(eraseall, (const char * , const char *)); 24 | char *FDECL(CopyFile, (const char * , const char *)); 25 | void FDECL(copybones, (int )); 26 | void NDECL(playwoRAMdisk ); 27 | int FDECL(saveDiskPrompt, (int )); 28 | void NDECL(gameDiskPrompt ); 29 | void FDECL(append_slash, (char *)); 30 | void FDECL(getreturn, (const char *)); 31 | #ifndef msmsg 32 | void FDECL(msmsg, ( const char *, ... )); 33 | #endif 34 | #if !defined(__SASC_60) && !defined(_DCC) 35 | int FDECL(chdir, (char *)); 36 | #endif 37 | #ifndef strcmpi 38 | int FDECL(strcmpi, (char * , char *)); 39 | #endif 40 | #if !defined(memcmp) && !defined(AZTEC_C) && !defined(_DCC) && !defined(__GNUC__) 41 | int FDECL(memcmp, (unsigned char * , unsigned char * , int )); 42 | #endif 43 | -------------------------------------------------------------------------------- /sys/amiga/amifont.uu: -------------------------------------------------------------------------------- 1 | begin 777 hack.font 2 | M#P```6AA8VLO.``````````````````````````````````````````````` 3 | M```````````````````````````````````````````````````````````` 4 | M```````````````````````````````````````````````````````````` 5 | M```````````````````````````````````````````````````````````` 6 | M```````````````````````````````````````````````````````````` 7 | G````````````````````````````````````````````````"`!` 8 | ` 9 | end 10 | -------------------------------------------------------------------------------- /sys/amiga/amigst.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)amigst.c 3.1 93/01/08 2 | /* Copyright (c) Gregg Wonderly, Naperville, IL, 1992, 1993 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #undef strcmpi 17 | #include 18 | #include 19 | 20 | #ifdef __SASC 21 | #include /* for __emit */ 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #endif 30 | 31 | #include "hack.h" 32 | #include "winprocs.h" 33 | #include "winami.h" 34 | 35 | #ifdef AZTEC 36 | #include 37 | #endif 38 | 39 | #include "NH:sys/amiga/winami.p" 40 | #include "NH:sys/amiga/amiwind.p" 41 | #include "NH:sys/amiga/amidos.p" 42 | 43 | /* end amigst.c */ 44 | -------------------------------------------------------------------------------- /sys/amiga/amii.hlp: -------------------------------------------------------------------------------- 1 | Amiga-specific help file for NetHack 3.4 2 | 3 | The Amiga port of NetHack supports a number of additional commands 4 | and facilities specific to the Amiga. Listed below are the things 5 | which are either specific to the Amiga port or might not appear 6 | in other ports. 7 | 8 | While playing NetHack you can press: 9 | 10 | ALT-HELP Color requestor. 11 | CTL-HELP Scale display (amitile only). 12 | SHIFT-HELP Overview window (amitile only). 13 | 14 | Amiga-specific run-time options: 15 | altmeta use the alt keys as meta keys 16 | flush throw away keyboard type-ahead 17 | 18 | Command line options recognized are 19 | 20 | -n No News at game startup. 21 | -X Play in discovery mode. 22 | -D Play in debug mode. 23 | -L Interlaced screen. 24 | -l Never Interlaced screen. 25 | -u Play as player given as 26 | an argument. 27 | -r Pick a race given as an 28 | argument. 29 | -p Pick a profession given 30 | as an argument 31 | -? Gives command line usage. 32 | -------------------------------------------------------------------------------- /sys/amiga/amimenu.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deepy/acehack/9a4c7671a8d8de6c0a7ab4718382b49cf5ec61f5/sys/amiga/amimenu.c -------------------------------------------------------------------------------- /sys/amiga/amistack.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deepy/acehack/9a4c7671a8d8de6c0a7ab4718382b49cf5ec61f5/sys/amiga/amistack.c -------------------------------------------------------------------------------- /sys/amiga/amitty.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)amitty.c 3.2 2000/01/12 2 | /* Copyright (c) Kenneth Lorber, Bethesda, Maryland 1993,1996 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* TTY-specific code for the Amiga 6 | * This is still experimental. 7 | * Still to do: 8 | * add real termcap handling - currently requires ANSI_DEFAULT 9 | */ 10 | 11 | #include "hack.h" 12 | #include "tcap.h" 13 | #include 14 | #include 15 | 16 | #ifdef _DCC 17 | # define getch() getchar() 18 | #endif 19 | #ifdef __SASC_60 20 | # include 21 | #endif 22 | 23 | void NDECL( tty_change_color ); 24 | char *NDECL( tty_get_color_string ); 25 | 26 | #ifdef TTY_GRAPHICS 27 | 28 | int amibbs=0; /* BBS mode */ 29 | char bbs_id[80]=""; /* BBS uid equivalent */ 30 | long afh_in, afh_out; /* BBS mode Amiga filehandles */ 31 | 32 | void settty(const char *s){ 33 | end_screen(); 34 | if(s)raw_print(s); 35 | iflags.cbreak=ON; /* this is too easy: probably wrong */ 36 | #if 1 /* should be version>=36 */ 37 | /* if(IsInteractive(afh_in)){ */ 38 | SetMode(afh_in,0); /* con mode */ 39 | /* } */ 40 | #endif 41 | } 42 | void gettty(){ 43 | #if 1 /* should be VERSION >=36 */ 44 | /* if(IsInteractive(afh_in)){ */ 45 | SetMode(afh_in,1); /* raw mode */ 46 | /* } */ 47 | #endif 48 | } 49 | void setftty(){ 50 | iflags.cbreak=ON; /* ditto */ 51 | } 52 | char kill_char='X'-'@'; 53 | char erase_char='\b'; 54 | tgetch(){ 55 | char x; 56 | Read(afh_in,&x,1); 57 | return (x=='\r')?'\n':x; 58 | } 59 | void get_scr_size(){ 60 | CO=80; 61 | LI=24; 62 | } 63 | 64 | #endif 65 | 66 | void tty_change_color() {} 67 | char *tty_get_color_string() { return( "" ); } 68 | -------------------------------------------------------------------------------- /sys/amiga/amiwind.p: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)amiwind.p 3.1 93/01/08 */ 2 | /* Copyright (c) Gregg Wonderly, Naperville, IL, 1992, 1993 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* amiwind.c */ 6 | #ifdef INTUI_NEW_LOOK 7 | struct Window *FDECL( OpenShWindow, (struct ExtNewWindow *) ); 8 | #else 9 | struct Window *FDECL( OpenShWindow, (struct NewWindow *) ); 10 | #endif 11 | void FDECL( CloseShWindow, (struct Window *)); 12 | int NDECL( kbhit ); 13 | int NDECL( amikbhit ); 14 | int NDECL( WindowGetchar ); 15 | WETYPE NDECL( WindowGetevent ); 16 | void NDECL( WindowFlush ); 17 | void FDECL( WindowPutchar, (char )); 18 | void FDECL( WindowFPuts, (const char *)); 19 | void FDECL( WindowPuts, (const char *)); 20 | void FDECL( WindowPrintf, ( char *,... )); 21 | void NDECL( CleanUp ); 22 | int FDECL( ConvertKey, ( struct IntuiMessage * )); 23 | #ifndef SHAREDLIB 24 | void FDECL( Abort, (long )); 25 | #endif 26 | void FDECL( flush_glyph_buffer, (struct Window *)); 27 | void FDECL( amiga_print_glyph, (winid , int , int )); 28 | void FDECL( start_glyphout, (winid )); 29 | void FDECL( amii_end_glyphout, (winid )); 30 | #ifdef INTUI_NEW_LOOK 31 | struct ExtNewWindow *FDECL( DupNewWindow, (struct ExtNewWindow *)); 32 | void FDECL( FreeNewWindow, (struct ExtNewWindow *)); 33 | #else 34 | struct NewWindow *FDECL( DupNewWindow, (struct NewWindow *)); 35 | void FDECL( FreeNewWindow, (struct NewWindow *)); 36 | #endif 37 | void NDECL( bell ); 38 | void NDECL( amii_delay_output ); 39 | void FDECL( amii_number_pad, (int )); 40 | void amii_cleanup( void ); 41 | -------------------------------------------------------------------------------- /sys/amiga/cvtsnd.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)cvtsnd.c 3.2 95/09/10 */ 2 | /* Copyright (c) 1995, Andrew Church, Olney, Maryland */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | typedef struct { 10 | short namelen; 11 | char name[62]; 12 | char misc[64]; /* rest of MacBinary header */ 13 | long FORM; 14 | long flen; 15 | long AIFF; 16 | long SSND; 17 | long sndlen; 18 | } AIFF; 19 | 20 | typedef struct { 21 | char FORM[4]; 22 | long flen; 23 | char _8SVX[4]; 24 | char VHDR[4]; 25 | long vhlen; 26 | long oneshot, repeat; 27 | long samples; /* 'samplesPerHiCycle' in the docs - usually 32, so 28 | * we'll use that */ 29 | short freq; 30 | char octaves, compress; 31 | long volume; 32 | char NAME[4]; 33 | long nlen; /* should be 64; see name[] comment */ 34 | char name[64]; /* for simplicity, i.e. just fwrite() entiree header */ 35 | char BODY[4]; 36 | long blen; 37 | } IFF; 38 | 39 | 40 | main(int ac, char **av) 41 | { 42 | FILE *in, *out; 43 | AIFF aiff; 44 | IFF iff; 45 | static char buf[16384]; 46 | long n, len; 47 | 48 | if (ac != 3) { 49 | fprintf(stderr, "Usage: %s input-file output-file\n", av[0]); 50 | exit(20); 51 | } 52 | if (!(in = fopen(av[1], "r"))) { 53 | fprintf(stderr, "Can't open input file\n"); 54 | exit(20); 55 | } 56 | if (!(out = fopen(av[2], "w"))) { 57 | fprintf(stderr, "Can't open output file\n"); 58 | exit(20); 59 | } 60 | 61 | fread(&aiff, sizeof(aiff), 1, in); 62 | memcpy(iff.FORM, "FORM", 4); 63 | iff.flen = sizeof(iff) + aiff.sndlen - 8; 64 | memcpy(iff._8SVX, "8SVX", 4); 65 | memcpy(iff.VHDR, "VHDR", 4); 66 | iff.vhlen = 20; 67 | iff.oneshot = aiff.sndlen; 68 | iff.repeat = 0; 69 | iff.samples = 32; 70 | iff.freq = 22000; 71 | iff.octaves = 1; 72 | iff.compress= 0; 73 | iff.volume = 0x10000; 74 | memcpy(iff.NAME, "NAME", 4); 75 | iff.nlen = 64; 76 | strncpy(iff.name, aiff.name, 62); iff.name[aiff.namelen] = 0; 77 | memcpy(iff.BODY, "BODY", 4); 78 | iff.blen = aiff.sndlen; 79 | fwrite(&iff, sizeof(iff), 1, out); 80 | len = aiff.sndlen; 81 | do { 82 | if (len >= sizeof(buf)) 83 | n = fread(buf, 1, sizeof(buf), in); 84 | else 85 | n = fread(buf, 1, len, in); 86 | if (n) { 87 | fwrite(buf, 1, n, out); 88 | len -= n; 89 | } 90 | } while (len && n); 91 | 92 | if (len) 93 | fprintf(stderr, "Warning: %ld bytes of sample missing\n", len); 94 | fclose(in); fclose(out); 95 | exit(0); 96 | } 97 | -------------------------------------------------------------------------------- /sys/amiga/ifchange: -------------------------------------------------------------------------------- 1 | .KEY oper/a,tmp/a,real/a,f1,f2,f3,f4,f5 2 | 3 | . ; miscellaneous script functions for the Amiga 4 | . ; SCCS Id: @(#)ifchange 3.2 96/02/04 5 | . ; Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1992, 1993, 1996. 6 | . ; NetHack may be freely redistributed. See license for details. 7 | 8 | FAILAT 6 9 | IF EQ "MOVE" 10 | IF EXISTS 11 | diff >T:mic -c 12 | search from T:mic SEARCH "---" QUIET 13 | IF WARN 14 | echo "MOVE: no change" 15 | delete 16 | ELSE 17 | echo "MOVE: copy" 18 | copy clone 19 | delete 20 | ENDIF 21 | ELSE 22 | echo "MOVE: copy2" 23 | copy clone 24 | delete 25 | ENDIF 26 | QUIT 27 | ENDIF 28 | 29 | IF EQ "TOUCH" 30 | IF EXISTS 31 | diff >T:mic -c 32 | search from T:mic SEARCH "---" QUIET 33 | IF NOT WARN 34 | echo "TOUCH: touch" 35 | IF NOT EQ "@" 36 | setdate 37 | ENDIF 38 | IF NOT EQ "@" 39 | setdate 40 | ENDIF 41 | IF NOT EQ "@" 42 | setdate 43 | ENDIF 44 | IF NOT EQ "@" 45 | setdate 46 | ENDIF 47 | IF NOT EQ "@" 48 | setdate 49 | ENDIF 50 | ENDIF 51 | ENDIF 52 | QUIT 53 | ENDIF 54 | 55 | echo "ifchange: '' not recognized" 56 | quit 10 57 | -------------------------------------------------------------------------------- /sys/amiga/mkdmake: -------------------------------------------------------------------------------- 1 | GE/$@/%(left)/ 2 | GE/$wflags &= ~FLMAP_SKIP; 20 | if( scrollmsg ) 21 | cw->wflags |= FLMSG_FIRST; 22 | cw->disprows = 0; 23 | } 24 | 25 | if( WIN_MAP != WIN_ERR && (cw = amii_wins[ WIN_MAP ]) && ( w = cw->win ) ) 26 | { 27 | cursor_on( WIN_MAP ); 28 | } 29 | else 30 | panic( "no MAP window opened for nh_poskey\n" ); 31 | 32 | rp = w->RPort; 33 | 34 | while( 1 ) 35 | { 36 | type = WindowGetevent( ); 37 | if( type == WEMOUSE ) 38 | { 39 | *mod = CLICK_1; 40 | if( lastevent.un.mouse.qual ) 41 | *mod = 0; 42 | 43 | /* X coordinates are 1 based, Y are 1 based. */ 44 | *x = ( (lastevent.un.mouse.x - w->BorderLeft) / mxsize ) + 1; 45 | *y = ( ( lastevent.un.mouse.y - w->BorderTop - MAPFTBASELN ) / 46 | mysize ) + 1; 47 | #ifdef CLIPPING 48 | if( clipping ) 49 | { 50 | *x += clipx; 51 | *y += clipy; 52 | } 53 | #endif 54 | return( 0 ); 55 | } 56 | else if( type == WEKEY ) 57 | { 58 | lastevent.type = WEUNK; 59 | return( lastevent.un.key ); 60 | } 61 | } 62 | } 63 | 64 | int 65 | amii_nhgetch() 66 | { 67 | int ch; 68 | struct amii_WinDesc *cw=amii_wins[WIN_MESSAGE]; 69 | 70 | if( WIN_MAP != WIN_ERR && amii_wins[ WIN_MAP ] ) 71 | { 72 | cursor_on( WIN_MAP ); 73 | } 74 | if(cw) 75 | cw->wflags &= ~FLMAP_SKIP; 76 | 77 | ch = WindowGetchar(); 78 | return( ch ); 79 | } 80 | 81 | void 82 | amii_get_nh_event() 83 | { 84 | /* nothing now - later I have no idea. Is this just a Mac hook? */ 85 | } 86 | 87 | void 88 | amii_getret() 89 | { 90 | register int c; 91 | 92 | raw_print( "" ); 93 | raw_print( "Press Return..." ); 94 | 95 | c = 0; 96 | 97 | while( c != '\n' && c != '\r' ) 98 | { 99 | if( HackPort ) 100 | c = WindowGetchar(); 101 | else 102 | c = getchar(); 103 | } 104 | return; 105 | } 106 | 107 | -------------------------------------------------------------------------------- /sys/atari/nethack.mnu: -------------------------------------------------------------------------------- 1 | # Sample .mnu file for NetHack 2 | # This will work only with MINIWIN v1.1 3 | # or TOSWIN v2.0 (or better) 4 | 5 | #%title "NetHack" 6 | #%about "About NetHack" "v" 7 | 8 | File 9 | "Shell" "!" 10 | "Options" "O" 11 | --- 12 | "Save Game" "S" 13 | --- 14 | "Quit" ?"[1][Really quit?][ Yes | No ]":%A"#quit y":! 15 | Edit 16 | "Copy" %C 17 | "Paste" %P 18 | "Paste Options..." %O 19 | --- 20 | "Set Font..." %F 21 | Inventory 22 | "Show Inventory" "i" 23 | -- 24 | "Put on jewelry" "P" 25 | "Remove jewelry" "R" 26 | "Wear armor" "W" 27 | "Take off armor" "T" 28 | "Wield weapon" "w" 29 | "Exchange weapons" "x" 30 | "Ready ammo in quiver" "Q" 31 | --- 32 | "Eat" "e" 33 | "Quaff potion" "q" 34 | --- 35 | "Drop" "d" 36 | "Throw" "t" 37 | "Fire" "f" 38 | Move 39 | "North" "k" 4800 40 | "South" "j" 5000 41 | "East" "l" 4d00 42 | "West" "h" 4b00 43 | --- 44 | "Rest" "." 45 | --- 46 | "Open door" "o" 47 | "Close door" "c" 48 | Misc 49 | "Help" "?" 6200 50 | "List known spells" "+" 51 | "Cast spell" "Z" 52 | --- 53 | "Abort" 001b 6100 54 | -------------------------------------------------------------------------------- /sys/atari/setup.g: -------------------------------------------------------------------------------- 1 | # gulam shell script -- should work with tcsh and many 2 | # other Atari shells, too 3 | 4 | # UNIX shells use '/' in file names, but at least some Atari shells need '\' 5 | # so we process the UNIX makefiles to make that switch 6 | 7 | # sed script not included as a here document in this script because at 8 | # least some Atari shells don't do that 9 | 10 | sed -f unx2atar.sed < ..\unix\Makefile.top > ..\..\Makefile 11 | sed -f unx2atar.sed < ..\unix\Makefile.dat > ..\..\dat\Makefile 12 | sed -f unx2atar.sed < ..\unix\Makefile.doc > ..\..\doc\Makefile 13 | sed -f unx2atar.sed < ..\unix\Makefile.src > ..\..\src\Makefile 14 | sed -f unx2atar.sed < ..\unix\Makefile.utl > ..\..\util\Makefile 15 | 16 | # KLUDGE to fix a Makefile problem 17 | echo > ..\..\include\win32api.h 18 | -------------------------------------------------------------------------------- /sys/atari/unx2atar.sed: -------------------------------------------------------------------------------- 1 | : loop 2 | /\\$/N 3 | /\\$/b loop 4 | # for each line, append any continuation lines before trying to classify it 5 | /^ / { 6 | # if it starts with a tab, it's meant for the shell, and we should think 7 | # about reversing the slashes 8 | s;cd ../util;cd ..\\util; 9 | s;cd ../src;cd ..\\src; 10 | /librarian/ s;dat/options;dat\\options; 11 | /$(MAKE)/b 12 | /$(CC)/b 13 | s;/;\\;g 14 | } 15 | # unfortunately, we do not want to reverse *all* the slashes, as even the 16 | # Atari make and gcc like forward ones, and it's messy to avoid the ones in 17 | # sed addresses 18 | # so, flip the first one in e.g. 19 | # @( cd ../util ; $(MAKE) ../include/onames.h ) 20 | # flip the librarian-related ones in dat/options 21 | # ignore other lines related to make and gcc 22 | # and flip any slashes left over, which include a number of UNIX-only things 23 | # that we didn't need to do but don't hurt 24 | -------------------------------------------------------------------------------- /sys/autoconf/bootstrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # $Id: bootstrap.sh,v 1.2 2005/09/17 14:58:33 j_ali Exp $ 4 | # 5 | case "$0" in 6 | */*) confdir=`echo $0 | sed 's:/[^/]*$::'` ;; 7 | *) confdir='.' ;; 8 | esac 9 | set -e 10 | cd $confdir 11 | # Avoid autoheader creating backup file 12 | rm -f autoconf.hin 13 | aclocal 14 | # We can't avoid running autotools in multiple directories, 15 | # but at least we can have only one cache. 16 | if [ -d autom4te.cache ]; then # aclocal v1.7 doesn't create cache 17 | rm -rf ../../autom4te.cache 18 | mv autom4te.cache ../.. 19 | fi 20 | # autoheader must be run from topdir since configure.ac refers 21 | # to sys/autoconf/autoconf.hin 22 | (cd ../.. && autoheader -I sys/autoconf sys/autoconf/configure.ac) 23 | mv ../../autom4te.cache . 24 | autoconf configure.ac > ../../configure 25 | rm -rf autom4te.cache aclocal.m4 26 | -------------------------------------------------------------------------------- /sys/be/README: -------------------------------------------------------------------------------- 1 | This file is sys/be/README. It is for those intending to compile 2 | NetHack 3.3 on a BeOS 4.5 system. 3 | 4 | BeOS NetHack currently only supports the TTY windowing system. In 5 | order to compile it, it would benefit you greatly to think of your Be 6 | system as a UNIX variant. It is possible to compile using BeIDE. 7 | However, there are four executables and several steps involved in making 8 | NetHack. Unless you are extremely familiar with the build sequence and 9 | are willing to modify the code somewhat, I suggest you avoid it for now. 10 | Let the UNIX Makefiles take care of all that for you. 11 | 12 | 13 | Known problems: 14 | + No special characters for walls. None of the fonts available for use 15 | in a tty window has the graphics characters needed to improve the look. 16 | If such a font existed, then all you need to do is set the dungeon, 17 | object, and/or monter mappings in your defaults file. 18 | + The arrow keys don't work. 19 | 20 | 21 | 22 | Build instructions. From a freshly unpacked source tree: 23 | 24 | 1. Copy the Makfiles in sys/unix to their proper spots. You may 25 | use setup.sh or copy them by hand. Using setup.sh to create 26 | links instead of copying the Makefiles will work, but BeOS will 27 | not let you edit a link. It may be helpful to read 28 | sys/unix/Install.unx. 29 | 30 | 2. Edit src/Makefile: 31 | o Change System to SysBe. 32 | o Comment out the UNIX versions of SYSSRC and SYSOBJ variables. 33 | o Uncomment the BeOS versions of SYSRC and SYSOBJ. 34 | o Uncomment the BeOS versions of CC, CFLAGS, LD, and LFLAGS. The 35 | flags are different for Intel vs BeBox/Mac. 36 | o Uncomment one of the Intel or BeBox/Mac BeOS versions of CC, CFLAGS, 37 | LD, and LFLAGS. 38 | o Comment out the default CFLAGS and LFLAGS. 39 | o Change WINTTYLIB to be -ltermcap. 40 | 41 | 3. Edit util/Makefile: 42 | o If on a BeBox/Mac: 43 | - Uncomment the BeOS versions of CC and CFLAGS 44 | - Comment out the default CFLAGS and LFLAGS. 45 | o If on Intel: 46 | - the default values of CFLAGS and LFLAGS work fine 47 | o Change YACC and LEX to be bison -y and flex respectively. 48 | 49 | 4. Edit include/config.h to change HACKDIR to be the location of your 50 | install directory. 51 | 52 | 5. Edit top level Makefile and change GAMEDIR to match HACKDIR in 53 | include/config.h. Make sure the path to GAMEDIR exists. Change 54 | SHELLDIR to a "throw away" directory, like /tmp. We don't use the 55 | shell. Change CHOWN and CHGRP commands to "true", there really 56 | aren't groups on the BeOS. 57 | 58 | 6. Type "make install" at the top level. 59 | 60 | 61 | 62 | It is possible that some necessary steps needed to make the game have been 63 | omitted. Feel free to ad-lib as necessary. 64 | -------------------------------------------------------------------------------- /sys/mac/News: -------------------------------------------------------------------------------- 1 | Welcome to NetHack 3.4 for MacOS 7.0 - 9.x 2 | 3 | Unfortunately, the 68k version is no longer supported. 4 | 5 | This game is brought to you by Dean Luick, Kevin Hugo, and Mark Modrall. 6 | 7 | Bug reports, suggestions, comments, etc., should be e-mailed to the 8 | Internet address nethack-bugs@nethack.org, or fill out our comment 9 | form on the web at http://www.nethack.org. 10 | -------------------------------------------------------------------------------- /sys/mac/README: -------------------------------------------------------------------------------- 1 | Jan 2002 2 | 3 | The MPW compilers are now supported again. 4 | 5 | Support for 68k has been discontinued due to a lack of a debugging 6 | system for 68k binaries. 7 | 8 | Note that the tiled MacOS X port uses the Qt windowport and the UNIX 9 | build system, not this windowport code. 10 | 11 | 12 | 26 Nov, 1999 13 | 14 | NetHack 3.3.0 was built with Metrowerk's Pro 4 compiler on a PPC 15 | system. We are still compiling with 68K alignment because we know 16 | it works. No one has checked lately if the PPC alignment bug 17 | still exists. 18 | 19 | 20 | 23 May, 1996 21 | 22 | NetHack 3.2.1 was built with Metrowerk's DR8 compiler on a PPC system. 23 | The official 68K and PPC versions were compiled with 68K Alignment 24 | to share files. The 3.2.0 versions were compiled with PPC alignment, 25 | but it was discovered that the Metrowerks 68K compiler has a bug with 26 | PPC alignment and structures that can be aligned to a single byte. This 27 | bug _may_ be fixed in DR10, it is not fixed in DR9. Why bother with PPC 28 | alignment at all? Because the space saving from 68K alignment is small 29 | and the PowerPC version will run better. The 68K version was compiled 30 | with 4 byte ints using the far model. 31 | 32 | Only the Metrowerks compiler has been used to compile the code in a 33 | long time. It is _very_ likely that the other compilers, Think C and 34 | MPW C, will no longer be able to compile NetHack out of the box. They 35 | and their files have been moved to the "old" directory until such time 36 | that someone can compile with them. 37 | -------------------------------------------------------------------------------- /sys/mac/dprintf.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)dprintf.c 3.1 94/01/29 */ 2 | /* Copyright (c) Jon W{tte, 1993. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #include "hack.h" 6 | #include "macwin.h" 7 | 8 | static Boolean 9 | KeyDown (unsigned short code) { 10 | unsigned char keys [16]; 11 | 12 | GetKeys ((void *) keys); 13 | return ((keys [code >> 3] >> (code & 7)) & 1) != 0; 14 | } 15 | 16 | 17 | void 18 | dprintf (char *format, ...) 19 | { 20 | char buffer [500]; 21 | va_list list; 22 | int doit; 23 | #define DO_DEBUGSTR 1 24 | #define DO_PLINE 2 25 | 26 | if (flags.debug) { 27 | doit = 0; 28 | if (macFlags.hasDebugger && KeyDown (0x39)) { /* Caps Lock */ 29 | doit = DO_DEBUGSTR; 30 | } else if (KeyDown (0x3B) && iflags.window_inited && /* Control */ 31 | (WIN_MESSAGE != -1) && theWindows [WIN_MESSAGE].its_window) { 32 | doit = DO_PLINE; 33 | } 34 | 35 | if (doit) { 36 | va_start (list, format); 37 | vsprintf (&buffer [1], format, list); 38 | va_end (list) ; 39 | 40 | if (doit == DO_DEBUGSTR) { 41 | buffer [0] = strlen (&buffer [1]); 42 | DebugStr ((uchar *) buffer); 43 | } else if (doit == DO_PLINE) 44 | pline ("%s", &buffer [1]); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /sys/mac/mactopl.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)mactopl.c 3.1 91/07/23 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #include "hack.h" 6 | #include "mactty.h" 7 | #include "macwin.h" 8 | #include "macpopup.h" 9 | 10 | char 11 | queued_resp(char *resp) { 12 | char buf[30]; 13 | if (try_key_queue(buf)) { 14 | if (!resp || strchr(resp, buf[0])) 15 | return buf[0]; 16 | if (digit(buf[0]) && strchr(resp, '#')) { 17 | yn_number = atoi(buf); 18 | return '#'; 19 | } 20 | } 21 | return '\0'; 22 | } 23 | 24 | 25 | char 26 | topl_yn_function(const char *query, const char *resp, char def) { 27 | char buf[30]; 28 | char c = queued_resp((char *) resp); 29 | if (!c) { 30 | enter_topl_mode((char *) query); 31 | topl_set_resp((char *) resp, def); 32 | 33 | do { 34 | c = readchar(); 35 | if (c && resp && !strchr(resp, c)) { 36 | nhbell(); 37 | c = '\0'; 38 | } 39 | } while (!c); 40 | 41 | topl_set_resp("", '\0'); 42 | leave_topl_mode(buf); 43 | if (c == '#') 44 | yn_number = atoi(buf); 45 | } 46 | return c; 47 | } 48 | 49 | 50 | char 51 | mac_yn_function(query, resp, def) 52 | const char *query,*resp; 53 | char def; 54 | /* 55 | * Generic yes/no function. 'def' is the default (returned by space or 56 | * return; 'esc' returns 'q', or 'n', or the default, depending on 57 | * what's in the string. The 'query' string is printed before the user 58 | * is asked about the string. 59 | * If resp is NULL, any single character is accepted and returned. 60 | */ 61 | { 62 | return topl_yn_function(query, resp, def); 63 | } 64 | 65 | /* mactopl.c */ 66 | -------------------------------------------------------------------------------- /sys/mac/macunix.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)macunix.c 3.1 94/11/07 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* This file collects some Unix dependencies */ 6 | 7 | #include "hack.h" 8 | 9 | void 10 | regularize(char *s) 11 | { 12 | register char *lp; 13 | 14 | for (lp = s; *lp; lp++) { 15 | if (*lp == '.' || *lp == ':') 16 | *lp = '_'; 17 | } 18 | } 19 | 20 | void 21 | getlock(void) 22 | { 23 | int fd; 24 | int pid = getpid(); /* Process ID */ 25 | 26 | set_levelfile_name (lock, 0); 27 | 28 | if ((fd = open (lock, O_RDWR | O_EXCL | O_CREAT, LEVL_TYPE)) == -1) { 29 | raw_printf ("Could not lock the game %s.", lock); 30 | panic ("Another game in progress?"); 31 | } 32 | 33 | if (write (fd, (char *)&pid, sizeof (pid)) != sizeof (pid)) { 34 | raw_printf ("Could not lock the game %s.", lock); 35 | panic("Disk locked?"); 36 | } 37 | close (fd); 38 | } 39 | -------------------------------------------------------------------------------- /sys/mac/mgetline.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)getline.c 3.1 90/22/02 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #include "hack.h" 6 | #include "mactty.h" 7 | #include "macwin.h" 8 | #include "macpopup.h" 9 | #include "func_tab.h" 10 | 11 | extern int NDECL(extcmd_via_menu); /* cmd.c */ 12 | 13 | typedef Boolean FDECL ((* key_func), (unsigned char)); 14 | 15 | int 16 | get_line_from_key_queue (char * bufp) { 17 | * bufp = 0; 18 | if (try_key_queue (bufp)) { 19 | while (* bufp) { 20 | if (* bufp == 10 || * bufp == 13) { 21 | * bufp = 0; 22 | } 23 | bufp ++; 24 | } 25 | return true; 26 | } 27 | return false; 28 | } 29 | 30 | 31 | static void 32 | topl_getlin(const char *query, char *bufp, Boolean ext) { 33 | if (get_line_from_key_queue (bufp)) 34 | return; 35 | 36 | enter_topl_mode((char *) query); 37 | while (topl_key(nhgetch(), ext)) 38 | ; 39 | leave_topl_mode(bufp); 40 | } 41 | 42 | 43 | /* 44 | * Read a line closed with '\n' into the array char bufp[BUFSZ]. 45 | * (The '\n' is not stored. The string is closed with a '\0'.) 46 | * Reading can be interrupted by an escape ('\033') - now the 47 | * resulting string is "\033". 48 | */ 49 | void 50 | mac_getlin(const char *query, char *bufp) { 51 | topl_getlin (query, bufp, false); 52 | } 53 | 54 | 55 | /* Read in an extended command - doing command line completion for 56 | * when enough characters have been entered to make a unique command. 57 | * This is just a modified getlin() followed by a lookup. -jsb 58 | */ 59 | int 60 | mac_get_ext_cmd() { 61 | char bufp[BUFSZ]; 62 | int i; 63 | 64 | if (iflags.extmenu) return extcmd_via_menu(); 65 | topl_getlin("# ", bufp, true); 66 | for (i = 0; extcmdlist[i].ef_txt != (char *)0; i++) 67 | if (!strcmp(bufp, extcmdlist[i].ef_txt)) break; 68 | if (extcmdlist[i].ef_txt == (char *)0) i = -1; /* not found */ 69 | 70 | return i; 71 | } 72 | 73 | 74 | /* macgetline.c */ 75 | -------------------------------------------------------------------------------- /sys/mac/mmodal.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)mmodal.c 3.1 93/01/24 */ 2 | /* Copyright (c) Jon W{tte, Hao-Yang Wang, Jonathan Handler 1992. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #if !TARGET_API_MAC_CARBON 6 | # include 7 | # include 8 | #else 9 | # include 10 | #endif 11 | 12 | #include "macpopup.h" 13 | 14 | /* Flash a dialog button when its accelerator key is pressed */ 15 | void 16 | FlashButton(DialogRef wind, short item) { 17 | short type; 18 | Handle handle; 19 | Rect rect; 20 | unsigned long ticks; 21 | 22 | /* Apple recommends 8 ticks */ 23 | GetDialogItem(wind, item, &type, &handle, &rect); 24 | HiliteControl((ControlHandle)handle, kControlButtonPart); 25 | Delay(8, &ticks); 26 | HiliteControl((ControlHandle)handle, 0); 27 | return; 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /sys/msdos/moveinit.pat: -------------------------------------------------------------------------------- 1 | These are patches for MOVEINIT.C, supplied 2 | with the MSVC compiler in the compiler's SOURCE\MOVE 3 | subdirectory. (Copy that and the MOVEAPI.H 4 | file into your NetHack src directory and apply this patch) 5 | 6 | 7 | *** ../linc/src/moveinit.c Tue Nov 23 08:01:00 1993 8 | --- src/moveinit.c Sun Mar 13 10:13:10 1994 9 | *************** 10 | *** 13,18 **** 11 | --- 13,19 ---- 12 | *******************************************************************************/ 13 | 14 | #include "moveapi.h" 15 | + extern unsigned memavail(unsigned); 16 | 17 | #ifndef MOVE_ENV 18 | 19 | *************** 20 | *** 125,132 **** 21 | /* attempt to allocate the overlay heap. ignore return value (heap size). 22 | * note that MOVE will abort if not enough memory to alloc minimum size. 23 | */ 24 | ! 25 | ! _movesetheap ($$COVL, cparaLarge, cparaMax); 26 | 27 | /* get available cache ressource amount */ 28 | 29 | --- 126,133 ---- 30 | /* attempt to allocate the overlay heap. ignore return value (heap size). 31 | * note that MOVE will abort if not enough memory to alloc minimum size. 32 | */ 33 | ! cparaMax = memavail(cparaMin); 34 | ! _movesetheap ($$COVL, cparaMin, cparaMax); 35 | 36 | /* get available cache ressource amount */ 37 | 38 | -------------------------------------------------------------------------------- /sys/msdos/nhico.uu: -------------------------------------------------------------------------------- 1 | section 1 of uuencode 4.13 of file NETHACK.ICO by R.E.M. 2 | 3 | begin 644 NETHACK.ICO 4 | M```!``$`("`0``````#H`@``%@```"@````@````0`````$`!```````@`(`. 5 | M``````````````````````````````"```"`````@(``@````(``@`"`@```6 6 | M@("``,#`P````/\``/\```#__P#_````_P#_`/__``#___\`]F9F9F9F9F9F* 7 | M9F9F9F9F9O]F9F9F9F9F9F9F9F9F9F;_B(B(B(B(B(B(B(B(B&9F_XB(B(B(D 8 | MB(B(B(B(B(AF9O^(B(B(A555B(B(B(B(9F;_B(B(B`!5!8B(B(B(B&9F_XB(' 9 | MB(@```6(B(B(B(AF9O^(B%554`!56(B(B(B(9F;_B(N[N[`.XU6(B(B(B&9F[ 10 | M_XB[N[L`ONXU6(B(B(AF9O^+N[N[N[ONXUB(B(B(9F;_B[N[N[N[ONY3B(B(N 11 | MB&9F_XN[NYF9F[ONXSB(B(AF9O^+N[F9F9F[ONXSB(B(9F;_B[N9F9F9F[ON? 12 | MXSB(B&9F_XNYF9F9F9F[7NXSB(AF9O^+N9F9F9F9NUCNXSB(9F;_B[F9F9F9J 13 | MF;M8CNXSB&9F_XNYF9F9F9F[6(CNXXAF9O^+N9F9F9F9NUB(CNZ(9F;_B[N9] 14 | MF9F9F[M8B(CNB&9F_XN[N9F9F;N[6(B(B(AF9O^+N[N9F9N[NUB(B(B(9F;_R 15 | MB[N[N[N[N[M8B(B(B&9F_XN[N[N[N[N[B(B(B(AF9O^+NXB(B(B+NXB(B(B(F 16 | M9F;_B[B(B(B(B+N(B(B(B&9F_XB(B(B(B(B(B(B(B(AF9O^(B(B(B(B(B(B(J 17 | MB(B(9F;_B(B(B(B(B(B(B(B(B&9F___________________V9O__________% 18 | M__________\`````````````````````````````````````````````````R 19 | M````````````````````````````````````````````````````````````` 20 | M````````````````````````````````````````````````````````````` 21 | !````` 22 | `` 23 | end 24 | sum -r/size 23881/1107 section (from "begin" to "end") 25 | sum -r/size 55184/766 entire input file 26 | -------------------------------------------------------------------------------- /sys/msdos/nhpif.uu: -------------------------------------------------------------------------------- 1 | begin 666 nethack.pif 2 | M`%M00R!.971H86-K(#,N,2`@("`@("`@("`@("`@(""``(``0SI<3D542$%# 3 | M2UQ.151(04-++D5810`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@ 4 | M("`@("`@("`@$`!#.EQ.151(04-+`"`@("`@("`@("`@("`@("`@("`@("`@ 5 | M("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@```````````````````` 6 | M```````````````````````````````````````````````````````````` 7 | M```````!`/\94```!P`````````````````````````````````````````` 8 | M```````````````````````````````````````````````````````````` 9 | M```````````````````````````````````````````````````````````` 10 | M`````````.`@34E#4D]33T94(%!)1D58`(= NUM_CURSOR_TYPES) cursor_type = 0; 44 | DrawCursor(); 45 | break; 46 | # endif 47 | case 0x74: /* Control-right_arrow = scroll horizontal to right */ 48 | if ((shift & CTRL) && iflags.tile_view && !opening_dialog) 49 | vga_userpan(1); 50 | break; 51 | 52 | case 0x73: /* Control-left_arrow = scroll horizontal to left */ 53 | if ((shift & CTRL) && iflags.tile_view && !opening_dialog) 54 | vga_userpan(0); 55 | break; 56 | case 0x3E: /* F4 = toggle overview mode */ 57 | if (iflags.tile_view && 58 | !opening_dialog 59 | #ifdef REINCARNATION 60 | && !Is_rogue_level(&u.uz) 61 | #endif 62 | ) { 63 | iflags.traditional_view = FALSE; 64 | vga_overview(iflags.over_view ? FALSE : TRUE); 65 | vga_refresh(); 66 | } 67 | break; 68 | case 0x3F: /* F5 = toggle traditional mode */ 69 | if (iflags.tile_view && 70 | !opening_dialog 71 | #ifdef REINCARNATION 72 | && !Is_rogue_level(&u.uz) 73 | #endif 74 | ) { 75 | iflags.over_view = FALSE; 76 | vga_traditional(iflags.traditional_view ? FALSE : TRUE); 77 | vga_refresh(); 78 | } 79 | break; 80 | default: 81 | return FALSE; 82 | } 83 | return TRUE; 84 | } 85 | # endif /* USE_TILES */ 86 | #endif /* MSDOS */ 87 | 88 | /*pckeys.c*/ 89 | -------------------------------------------------------------------------------- /sys/msdos/pctiles.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)pctiles.h 3.4 1994/04/04 */ 2 | /* Copyright (c) NetHack PC Development Team 1993, 1994 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | /* */ 5 | /* 6 | * pctiles.h - Definitions for PC graphical tile support 7 | * 8 | *Edit History: 9 | * Initial Creation M. Allison 93/10/30 10 | * 11 | */ 12 | 13 | #ifdef USE_TILES 14 | #define NETHACK_PLANAR_TILEFILE "NetHack1.tib" /* Planar style tiles */ 15 | #define NETHACK_PACKED_TILEFILE "NetHack2.tib" /* Packed style tiles */ 16 | #define NETHACK_OVERVIEW_TILEFILE "NetHacko.tib" /* thin overview tiles */ 17 | 18 | #define ROWS_PER_TILE TILE_Y 19 | #define COLS_PER_TILE TILE_X 20 | #define EMPTY_TILE -1 21 | #define TIBHEADER_SIZE 1024 /* Use this for size, allows expansion */ 22 | #define PLANAR_STYLE 0 23 | #define PACKED_STYLE 1 24 | #define DJGPP_COMP 0 25 | #define MSC_COMP 1 26 | #define BC_COMP 2 27 | #define OTHER_COMP 10 28 | 29 | struct tibhdr_struct { 30 | char ident[80]; /* Identifying string */ 31 | char timestamp[26]; /* Ascii timestamp */ 32 | char tilestyle; /* 0 = planar, 1 = pixel */ 33 | char compiler; /* 0 = DJGPP, 1 = MSC, 2= BC etc. see above */ 34 | short tilecount; /* number of tiles in file */ 35 | short numcolors; /* number of colors in palette */ 36 | char palette[256 * 3]; /* palette */ 37 | }; 38 | 39 | 40 | /* Note on packed style tile file: 41 | * Each record consists of one of the following arrays: 42 | * char packtile[TILE_Y][TILE_X]; 43 | */ 44 | 45 | extern void FDECL(CloseTileFile, (BOOLEAN_P)); 46 | extern int FDECL(OpenTileFile, (char *, BOOLEAN_P)); 47 | extern int FDECL(ReadTileFileHeader, (struct tibhdr_struct *, BOOLEAN_P)); 48 | 49 | # ifdef PLANAR_FILE 50 | # ifdef SCREEN_VGA 51 | extern int FDECL(ReadPlanarTileFile,(int, struct planar_cell_struct **)); 52 | extern int FDECL(ReadPlanarTileFile_O, 53 | (int, struct overview_planar_cell_struct **)); 54 | # endif 55 | # endif 56 | 57 | # ifdef PACKED_FILE 58 | extern int FDECL(ReadPackedTileFile, (int, char (*)[TILE_X])); 59 | # endif 60 | 61 | extern short glyph2tile[MAX_GLYPH]; /* in tile.c (made from tilemap.c) */ 62 | 63 | #endif /* USE_TILES */ 64 | 65 | /* pctiles.h */ 66 | -------------------------------------------------------------------------------- /sys/msdos/portio.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)portio.h 3.4 1995/08/05 */ 2 | /* Copyright (c) NetHack PC Development Team 1995 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | /* */ 5 | /* 6 | * portio.h - PC port I/O Hardware support definitions and other 7 | * low-level definitions. 8 | * 9 | */ 10 | 11 | #ifndef PORTIO_H 12 | #define PORTIO_H 13 | 14 | # if defined(__GO32__) || defined(__DJGPP__) 15 | #define __far 16 | #include 17 | #include 18 | #include 19 | #endif 20 | 21 | # if defined(_MSC_VER) 22 | #define outportb _outp 23 | #define outportw _outpw 24 | #define inportb _inp 25 | # endif 26 | # if defined(__BORLANDC__) 27 | #define outportw outport 28 | /* #define inportb inport */ 29 | # endif 30 | 31 | # ifndef MK_PTR 32 | /* 33 | * Depending on environment, this is a macro to construct either: 34 | * 35 | * - a djgpp long 32 bit pointer from segment & offset values 36 | * - a far pointer from segment and offset values 37 | * 38 | */ 39 | # if defined(_MSC_VER) || defined(__BORLANDC__) 40 | #define MK_PTR(seg, offset) (void __far *)(((unsigned long)seg << 16) \ 41 | + (unsigned long)(unsigned)offset) 42 | #define READ_ABSOLUTE(x) *(x) 43 | #define READ_ABSOLUTE_WORD(x) *(x) 44 | #define WRITE_ABSOLUTE(x,y) *(x) = (y) 45 | #define WRITE_ABSOLUTE_WORD(x,y) *(x) = (y) 46 | # endif 47 | 48 | # if defined(__GO32__) || defined(__DJGPP__) 49 | #define MK_PTR(seg, offset) (void *)(((unsigned)seg << 4) + (unsigned)offset) 50 | #define READ_ABSOLUTE(x) \ 51 | (_farpeekb(_go32_conventional_mem_selector(), (unsigned)x)) 52 | #define READ_ABSOLUTE_WORD(x) \ 53 | (_farpeekw(_go32_conventional_mem_selector(), (unsigned)x)) 54 | #define WRITE_ABSOLUTE(x,y) \ 55 | _farpokeb(_go32_conventional_mem_selector(), (unsigned)x, (y)) 56 | #define WRITE_ABSOLUTE_WORD(x,y) \ 57 | _farpokew(_go32_conventional_mem_selector(), (unsigned)x, (y)) 58 | # endif 59 | 60 | # ifdef OBSOLETE /* old djgpp V1.x way of mapping 1st MB */ 61 | #define MK_PTR(seg, offset) (void *)(0xE0000000+((((unsigned)seg << 4) \ 62 | + (unsigned)offset))) 63 | #define READ_ABSOLUTE(x) *(x) 64 | #define READ_ABSOLUTE_WORD(x) *(x) 65 | #define WRITE_ABSOLUTE(x,y) *(x) = (y) 66 | #define WRITE_ABSOLUTE_WORD(x,y) *(x) = (y) 67 | # endif 68 | # endif /* MK_PTR */ 69 | 70 | #endif /* PORTIO_H */ 71 | /* portio.h */ 72 | -------------------------------------------------------------------------------- /sys/os2/nhpmico.uu: -------------------------------------------------------------------------------- 1 | begin 644 nethack.ico 2 | M0D$H``````````````!#21H`````````>`````P````@`$```0`!`````/___ 3 | M_T-)&@````````!X`0``#````"``(``!``0```````"``(```("`@```@`"`L 4 | M@(``@("`P,#```#_`/\``/___P``_P#___\`____````````````````````! 5 | M````````````````````````````````````````````````````````````` 6 | M````````````````````````````````````````````````````````````` 7 | M````````````````````````````````````````````````````````````` 8 | M````````````````````````````````````````````````````````````` 9 | M````````````````````````````````````````````````````````````` 10 | M`````````````````````/9F9F9F9F9F9F9F9F9F9F;_9F9F9F9F9F9F9F9F7 11 | M9F9F_XB(B(B(B(B(B(B(B(AF9O^(B(B(B(B(B(B(B(B(9F;_B(B(B(5558B(" 12 | MB(B(B&9F_XB(B(@`506(B(B(B(AF9O^(B(B(```%B(B(B(B(9F;_B(A555``@ 13 | M55B(B(B(B&9F_XB+N[NP#N-5B(B(B(AF9O^(N[N[`+[N-5B(B(B(9F;_B[N[E 14 | MN[N[[N-8B(B(B&9F_XN[N[N[N[[N4XB(B(AF9O^+N[N9F9N[[N,XB(B(9F;_) 15 | MB[NYF9F9N[[N,XB(B&9F_XN[F9F9F9N[[N,XB(AF9O^+N9F9F9F9NU[N,XB(< 16 | M9F;_B[F9F9F9F;M8[N,XB&9F_XNYF9F9F9F[6([N,XAF9O^+N9F9F9F9NUB(] 17 | M[N.(9F;_B[F9F9F9F;M8B([NB&9F_XN[F9F9F9N[6(B([HAF9O^+N[F9F9F[# 18 | MNUB(B(B(9F;_B[N[F9F;N[M8B(B(B&9F_XN[N[N[N[N[6(B(B(AF9O^+N[N[) 19 | MN[N[NXB(B(B(9F;_B[N(B(B(B[N(B(B(B&9F_XNXB(B(B(B[B(B(B(AF9O^(/ 20 | MB(B(B(B(B(B(B(B(9F;_B(B(B(B(B(B(B(B(B&9F_XB(B(B(B(B(B(B(B(AFN 21 | A9O__________________]F;_____________________? 22 | `` 23 | end 24 | -------------------------------------------------------------------------------- /sys/share/Makefile.lib: -------------------------------------------------------------------------------- 1 | # SCCS Id: @(#)Makefile.lib 3.4 1990/22/02 2 | # Nethack makefile for Fred fish termlib -- Norman Meluch 3 | # 4 | CC = cl /c 5 | MODEL = L 6 | CFLAGS = /A$(MODEL) /Os /Oa /Gs /Zp1 /W0 7 | # 8 | # Termcap routines. 9 | TERMLIB = termlib.lib 10 | # 11 | TL_LOBJECTS = tgetent.o tgetflag.o tgetnum.o \ 12 | tgetstr.o tgoto.o tputs.o \ 13 | isdigit.o fgetlr.o 14 | # 15 | .SUFFIXES: .exe .o .c .obj .asm 16 | # 17 | .c.o: 18 | $(CC) $(CFLAGS) /Fo$*.o $*.c 19 | # 20 | $(TERMLIB): $(TL_LOBJECTS) 21 | lib $(TERMLIB) -+ $(TL_LOBJECTS); 22 | -------------------------------------------------------------------------------- /sys/share/dgn_comp.h: -------------------------------------------------------------------------------- 1 | #define INTEGER 257 2 | #define A_DUNGEON 258 3 | #define BRANCH 259 4 | #define CHBRANCH 260 5 | #define LEVEL 261 6 | #define RNDLEVEL 262 7 | #define CHLEVEL 263 8 | #define RNDCHLEVEL 264 9 | #define UP_OR_DOWN 265 10 | #define PROTOFILE 266 11 | #define DESCRIPTION 267 12 | #define DESCRIPTOR 268 13 | #define LEVELDESC 269 14 | #define ALIGNMENT 270 15 | #define LEVALIGN 271 16 | #define ENTRY 272 17 | #define STAIR 273 18 | #define NO_UP 274 19 | #define NO_DOWN 275 20 | #define PORTAL 276 21 | #define STRING 277 22 | typedef union 23 | { 24 | int i; 25 | char* str; 26 | } YYSTYPE; 27 | extern YYSTYPE yylval; 28 | -------------------------------------------------------------------------------- /sys/share/lev_comp.h: -------------------------------------------------------------------------------- 1 | #define CHAR 257 2 | #define INTEGER 258 3 | #define BOOLEAN 259 4 | #define PERCENT 260 5 | #define MESSAGE_ID 261 6 | #define MAZE_ID 262 7 | #define LEVEL_ID 263 8 | #define LEV_INIT_ID 264 9 | #define GEOMETRY_ID 265 10 | #define NOMAP_ID 266 11 | #define OBJECT_ID 267 12 | #define COBJECT_ID 268 13 | #define MONSTER_ID 269 14 | #define TRAP_ID 270 15 | #define DOOR_ID 271 16 | #define DRAWBRIDGE_ID 272 17 | #define MAZEWALK_ID 273 18 | #define WALLIFY_ID 274 19 | #define REGION_ID 275 20 | #define FILLING 276 21 | #define RANDOM_OBJECTS_ID 277 22 | #define RANDOM_MONSTERS_ID 278 23 | #define RANDOM_PLACES_ID 279 24 | #define ALTAR_ID 280 25 | #define LADDER_ID 281 26 | #define STAIR_ID 282 27 | #define NON_DIGGABLE_ID 283 28 | #define NON_PASSWALL_ID 284 29 | #define ROOM_ID 285 30 | #define PORTAL_ID 286 31 | #define TELEPRT_ID 287 32 | #define BRANCH_ID 288 33 | #define LEV 289 34 | #define CHANCE_ID 290 35 | #define CORRIDOR_ID 291 36 | #define GOLD_ID 292 37 | #define ENGRAVING_ID 293 38 | #define FOUNTAIN_ID 294 39 | #define POOL_ID 295 40 | #define SINK_ID 296 41 | #define NONE 297 42 | #define RAND_CORRIDOR_ID 298 43 | #define DOOR_STATE 299 44 | #define LIGHT_STATE 300 45 | #define CURSE_TYPE 301 46 | #define ENGRAVING_TYPE 302 47 | #define DIRECTION 303 48 | #define RANDOM_TYPE 304 49 | #define O_REGISTER 305 50 | #define M_REGISTER 306 51 | #define P_REGISTER 307 52 | #define A_REGISTER 308 53 | #define ALIGNMENT 309 54 | #define LEFT_OR_RIGHT 310 55 | #define CENTER 311 56 | #define TOP_OR_BOT 312 57 | #define ALTAR_TYPE 313 58 | #define UP_OR_DOWN 314 59 | #define SUBROOM_ID 315 60 | #define NAME_ID 316 61 | #define FLAGS_ID 317 62 | #define FLAG_TYPE 318 63 | #define MON_ATTITUDE 319 64 | #define MON_ALERTNESS 320 65 | #define MON_APPEARANCE 321 66 | #define CONTAINED 322 67 | #define STRING 323 68 | #define MAP_ID 324 69 | typedef union 70 | { 71 | int i; 72 | char* map; 73 | struct { 74 | xchar room; 75 | xchar wall; 76 | xchar door; 77 | } corpos; 78 | } YYSTYPE; 79 | extern YYSTYPE yylval; 80 | -------------------------------------------------------------------------------- /sys/share/pctty.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)pctty.c 3.4 1990/22/02 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* tty.c - (PC) version */ 6 | 7 | #define NEED_VARARGS /* Uses ... */ /* comment line for pre-compiled headers */ 8 | #include "hack.h" 9 | #include "wintty.h" 10 | 11 | char erase_char, kill_char; 12 | 13 | /* 14 | * Get initial state of terminal, set ospeed (for termcap routines) 15 | * and switch off tab expansion if necessary. 16 | * Called by startup() in termcap.c and after returning from ! or ^Z 17 | */ 18 | void 19 | gettty(){ 20 | erase_char = '\b'; 21 | kill_char = 21; /* cntl-U */ 22 | iflags.cbreak = TRUE; 23 | #if !defined(TOS) 24 | disable_ctrlP(); /* turn off ^P processing */ 25 | #endif 26 | #if defined(MSDOS) && defined(NO_TERMS) 27 | gr_init(); 28 | #endif 29 | } 30 | 31 | /* reset terminal to original state */ 32 | void 33 | settty(s) 34 | const char *s; 35 | { 36 | #if defined(MSDOS) && defined(NO_TERMS) 37 | gr_finish(); 38 | #endif 39 | end_screen(); 40 | if(s) raw_print(s); 41 | #if !defined(TOS) 42 | enable_ctrlP(); /* turn on ^P processing */ 43 | #endif 44 | 45 | } 46 | 47 | /* called by init_nhwindows() and resume_nhwindows() */ 48 | void 49 | setftty() 50 | { 51 | start_screen(); 52 | } 53 | 54 | #if defined(TIMED_DELAY) && defined(_MSC_VER) 55 | void 56 | msleep(mseconds) 57 | unsigned mseconds; 58 | { 59 | /* now uses clock() which is ANSI C */ 60 | clock_t goal; 61 | 62 | goal = mseconds + clock(); 63 | while ( goal > clock()) { 64 | /* do nothing */ 65 | } 66 | } 67 | #endif 68 | 69 | /* fatal error */ 70 | /*VARARGS1*/ 71 | 72 | void 73 | error VA_DECL(const char *,s) 74 | VA_START(s); 75 | VA_INIT(s, const char *); 76 | /* error() may get called before tty is initialized */ 77 | if (iflags.window_inited) end_screen(); 78 | putchar('\n'); 79 | Vprintf(s,VA_ARGS); 80 | putchar('\n'); 81 | VA_END(); 82 | exit(EXIT_FAILURE); 83 | } 84 | 85 | /*pctty.c*/ 86 | -------------------------------------------------------------------------------- /sys/share/sounds/README: -------------------------------------------------------------------------------- 1 | README for the AIFF files: 2 | 3 | These files are sound files for the instruments in NetHack. 4 | There are 11 sounds, one for each distinct instrument. 5 | The sounds are in 8-bit 22kHz AIFF format, which should be 6 | readable by a broad range of platforms. Since the sounds 7 | came from Rolands S-750 sample library (most of them) there 8 | should be no copyright on them when we treat them like we 9 | do here (as instruments) - indeed, the sample library I 10 | got from Roland didn't even bear a (c) symbol. 11 | 12 | Some of the sounds are very adequate (Drum of Earthquake, 13 | Wooden Flute, Magic Harp) while some are less true to the 14 | original name (how does a Frost Horn sound?) Actually, I 15 | don't know what a Bugle is (Bugle horn?) so I took a trumpet 16 | sound for that. Correct me if I'm wrong. 17 | 18 | What does this have to do with the main code? Well, nothing 19 | so far. There are some places that are #ifdef MAC and calls 20 | mac_speaker; that function takes an object and a tune (in 21 | capital letters A-G) and plays the tune with the given 22 | instrument. When playing a specific tune, that tune is of 23 | course used. For "improvise," I use middle "C." 24 | 25 | Ideally, we should do something equal with sound that we 26 | have with displays, so we can use one common set of calls 27 | in the main code, and have ports do whatever seems appropriate 28 | for the available hardware. 29 | 30 | Any comment on the sounds or their use is welcome: 31 | 32 | Jon W{tte 33 | Mac Team 34 | nethack-bugs@nethack.org 35 | -------------------------------------------------------------------------------- /sys/unix/acehack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # SCCS Id: @(#)nethack.sh 3.4 1990/02/26 3 | # Modified by Alex Smith, 19 Aug 2010 4 | 5 | HACKDIR=/usr/games/lib/acehackdir 6 | export HACKDIR 7 | HACK=$HACKDIR/acehack 8 | # by default there's no max on the number of players that can play at once 9 | # this provides only minimal security, as if more people want to play at 10 | # once, they can just run NetHack directly, ignoring this script altogether 11 | MAXNROFPLAYERS= 12 | 13 | # Since Nethack.ad is installed in HACKDIR, add it to XUSERFILESEARCHPATH 14 | case "x$XUSERFILESEARCHPATH" in 15 | x) XUSERFILESEARCHPATH="$HACKDIR/%N.ad" 16 | ;; 17 | *) XUSERFILESEARCHPATH="$XUSERFILESEARCHPATH:$HACKDIR/%N.ad" 18 | ;; 19 | esac 20 | export XUSERFILESEARCHPATH 21 | 22 | # see if we can find the full path name of PAGER, so help files work properly 23 | # assume that if someone sets up a special variable (HACKPAGER) for NetHack, 24 | # it will already be in a form acceptable to NetHack 25 | # ideas from brian@radio.astro.utoronto.ca 26 | if test \( "xxx$PAGER" != xxx \) -a \( "xxx$HACKPAGER" = xxx \) 27 | then 28 | 29 | HACKPAGER=$PAGER 30 | 31 | # use only the first word of the pager variable 32 | # this prevents problems when looking for file names with trailing 33 | # options, but also makes the options unavailable for later use from 34 | # NetHack 35 | for i in $HACKPAGER 36 | do 37 | HACKPAGER=$i 38 | break 39 | done 40 | 41 | if test ! -f $HACKPAGER 42 | then 43 | IFS=: 44 | for i in $PATH 45 | do 46 | if test -f $i/$HACKPAGER 47 | then 48 | HACKPAGER=$i/$HACKPAGER 49 | export HACKPAGER 50 | break 51 | fi 52 | done 53 | IFS=' ' 54 | fi 55 | if test ! -f $HACKPAGER 56 | then 57 | echo Cannot find $PAGER -- unsetting PAGER. 58 | unset HACKPAGER 59 | unset PAGER 60 | fi 61 | fi 62 | 63 | 64 | cd $HACKDIR 65 | case $1 in 66 | -s*) 67 | exec $HACK "$@" 68 | ;; 69 | *) 70 | exec $HACK "$@" $MAXNROFPLAYERS 71 | ;; 72 | esac 73 | -------------------------------------------------------------------------------- /sys/unix/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copy files to their correct locations. 3 | # 4 | # If arguments are given, try symbolic link first. This is not the default 5 | # so that most people will have the distribution versions stay around so 6 | # subsequent patches can be applied. People who pay enough attention to 7 | # know there's a non-default behavior are assumed to pay enough attention 8 | # to keep distribution versions if they modify things. 9 | 10 | # Were we started from the top level? Cope. 11 | if [ -f sys/unix/Makefile.top ]; then cd sys/unix; fi 12 | 13 | if [ $# -gt 0 ] ; then 14 | # First, try to make a symbolic link. 15 | # 16 | ln -s Makefile.top Makefile >/dev/null 2>&1 17 | if [ $? -eq 0 ] ; then 18 | 19 | echo "Lucky you! Symbolic links." 20 | rm -f Makefile 21 | 22 | umask 0 23 | ln -s sys/unix/Makefile.top ../../Makefile 24 | ln -s ../sys/unix/Makefile.dat ../../dat/Makefile 25 | ln -s ../sys/unix/Makefile.doc ../../doc/Makefile 26 | ln -s ../sys/unix/Makefile.src ../../src/Makefile 27 | ln -s ../sys/unix/Makefile.utl ../../util/Makefile 28 | exit 0 29 | fi 30 | fi 31 | 32 | # 33 | # Otherwise... 34 | 35 | echo "Copying Makefiles." 36 | 37 | cp Makefile.top ../../Makefile 38 | cp Makefile.dat ../../dat/Makefile 39 | cp Makefile.doc ../../doc/Makefile 40 | cp Makefile.src ../../src/Makefile 41 | cp Makefile.utl ../../util/Makefile 42 | -------------------------------------------------------------------------------- /sys/vms/Makefile.doc: -------------------------------------------------------------------------------- 1 | # NetHack Makefile (VMS) - for the [Unix] documentation. 2 | # SCCS Id: @(#)Makefile.doc 3.4 1993/01/06 3 | 4 | # Copy this file to [.doc]Makefile. and edit it if needed. 5 | 6 | GUIDEBOOK = Guidebook. # regular ASCII file 7 | #GUIDEBOOK = Guidebook.ps # PostScript file 8 | #GUIDEBOOK = Guidebook.dvi # TeX device-independent file 9 | 10 | ALLDOCS = $(GUIDEBOOK) 11 | #ALLDOCS = $(GUIDEBOOK) manpages 12 | 13 | NOOP = ! 14 | 15 | Guidebook : $(GUIDEBOOK) 16 | $(NOOP) 17 | 18 | # the basic guidebook 19 | #Guidebook. : Guidebook.mn 20 | # #tbl tmac.n Guidebook.mn | nroff | col > Guidebook 21 | # write sys$output "Guidebook.mn cannot be processed under VMS." 22 | Guidebook. : Guidebook.txt # distributed version of plain text 23 | copy Guidebook.txt Guidebook. 24 | 25 | # Fancier output for those with ditroff, psdit and a PostScript printer. 26 | #Guidebook.ps : Guidebook.mn 27 | # #tbl tmac.n Guidebook.mn | ditroff | psdit > Guidebook.ps 28 | # write sys$output "Guidebook.mn cannot be processed under VMS." 29 | Guidebook.ps : Guidebook.dvi # generated with LaTeX 30 | dvi2ps Guidebook 31 | 32 | # Guidebook.tex is the same as Guidebook.mn but formatted with LaTeX. 33 | # - The invocation command for LaTeX may vary in different installations. 34 | # - To print Guidebook.dvi you need to use a suitable dvi-driver. 35 | Guidebook.dvi : Guidebook.tex 36 | latex Guidebook.tex 37 | 38 | all : $(ALLDOCS) 39 | $(NOOP) 40 | 41 | GAME = nethack 42 | MANDIR = HACKDIR: 43 | MANEXT = man 44 | #MANDIR = /usr/man/man6 45 | #MANEXT = 6 46 | 47 | # manual non-installation; raw man pages may be better than nothing 48 | GAMEMANCREATE = copy nethack.6 49 | LEVMANCREATE = copy lev_comp.6 50 | DGNMANCREATE = copy dgn_comp.6 51 | RCVRMANCREATE = copy recover.6 52 | # GAMEMANCREATE = nroff -man nethack.6 > 53 | # LEVMANCREATE = nroff -man lev_comp.6 > 54 | # DGNMANCREATE = nroff -man dgn_comp.6 > 55 | # RCVRMANCREATE = nroff -man recover.6 > 56 | 57 | manpages : 58 | - $(GAMEMANCREATE) $(MANDIR)$(GAME).$(MANEXT) 59 | - $(LEVMANCREATE) $(MANDIR)lev_comp.$(MANEXT) 60 | - $(DGNMANCREATE) $(MANDIR)dgn_comp.$(MANEXT) 61 | - $(RCVRMANCREATE) $(MANDIR)recover.$(MANEXT) 62 | 63 | spotless : 64 | - if f$search("Guidebook.") .nes."" then delete Guidebook.;* 65 | - if f$search("Guidebook.ps") .nes."" then delete Guidebook.ps;* 66 | - if f$search("Guidebook.dvi").nes."" then delete Guidebook.dvi;* 67 | - if f$search("Guidebook.aux").nes."" then delete Guidebook.aux;* 68 | - if f$search("Guidebook.log").nes."" then delete Guidebook.log;* 69 | -------------------------------------------------------------------------------- /sys/vms/lev_lex.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)lev_lex.h 3.4 1999/08/08 */ 2 | /* "vms/lev_lex.h" copied into "util/stdio.h" for use in *_lex.c only! 3 | * This is an awful kludge to allow util/*_lex.c made by SunOS's `lex' 4 | * to be compiled as is. (It isn't needed with `flex' or VMS POSIX 5 | * `lex' and is benign when either of those configurations are used.) 6 | * It works because the actual setup of yyin & yyout is performed in 7 | * src/lev_main.c, where stdin & stdout are still correctly defined. 8 | * 9 | * The troublesome code is 10 | * #include "stdio.h" 11 | * ... 12 | * FILE *yyin = stdin, *yyout = stdout; 13 | * The file scope initializers with non-constant values require this 14 | * hack, and the quotes instead of brackets makes it easy to do. 15 | */ 16 | 17 | #include 18 | #ifdef stdin 19 | # undef stdin 20 | #endif 21 | #define stdin 0 22 | #ifdef stdout 23 | # undef stdout 24 | #endif 25 | #define stdout 0 26 | -------------------------------------------------------------------------------- /sys/vms/nethack.com: -------------------------------------------------------------------------------- 1 | $! NetHack.Com -- sample command procedure for invoking NetHack 9-JAN-1993 2 | $ v = 'f$verify(0)' 3 | $! 4 | $! Possible command line arguments include 5 | $! "-uConan-B" !play a barbarian named Conan 6 | $! "-u" "Merlin-W" !play a wizard named Merlin (slight variant of above) 7 | $! "-e" or "-E" !play an elf with default name (from environment 8 | $! ! [ie, NETHACKOPTIONS logical name] or VMS username) 9 | $! "-a" or "-A", "-b" or "-B", "-c" or "-C", ... !specify character type 10 | $! !note: "-s" is ambiguous between "play as a samurai" 11 | $! ! vs "show scoreboard", so use "-S" for the former 12 | $! "-x" or "-X" !play in 'explore' mode (practice for beginners) 13 | $! "-D" !play in 'wizard' mode (for debugging, available only 14 | $! ! to the username compiled into nethack.exe as WIZARD) 15 | $! "-dec" !turn on DECgraphics mode (VT100 line drawing, done 16 | $! ! automatically below if appropriate term attribs set) 17 | $! "-d" dir-path !specify an alternate playground directory (not 18 | $! ! recommended; define HACKDIR instead) 19 | $! 20 | $ 21 | $! 22 | $! assume this command procedure has been placed in the playground directory; 23 | $! get its device:[directory] 24 | $ hackdir = f$parse("_._;0",f$environ("PROCEDURE")) - "_._;0" 25 | $! 26 | $! hackdir should point to the 'playground' directory 27 | $ if f$trnlnm("HACKDIR").eqs."" then define hackdir 'hackdir' 28 | $! 29 | $! termcap is a text file defining terminal capabilities and escape sequences 30 | $ if f$trnlnm("TERMCAP").eqs."" then define termcap hackdir:termcap 31 | $! 32 | ! [ obsolete: now handled within nethack itself ] 33 | ! $! prior to VMS v6, the C Run-Time Library doesn't understand vt420 :-( 34 | ! $ TT$_VT400_Series = 113 35 | ! $ if f$getdvi("TT:","DEVTYPE").eq.TT$_VT400_Series - 36 | ! .and. f$trnlnm("NETHACK_TERM").eqs."" then define nethack_term "vt400" 37 | $! 38 | $! use the VT100 line drawing character set if possible 39 | $ graphics = "" 40 | $ usropt = f$trnlnm("NETHACKOPTIONS") 41 | $ if usropt.eqs."" then usropt = f$trnlnm("HACKOPTIONS") 42 | $ if f$locate("DECG",f$edit(usropt,"UPCASE")) .ge. f$length(usropt) then - 43 | if f$getdvi("TT:","TT_DECCRT") .and. f$getdvi("TT:","TT_ANSICRT") then - 44 | $ graphics = " -dec" !select DECgraphics mode by default 45 | $! 46 | $! get input from the terminal, not from this .com file 47 | $ deassign sys$input 48 | $! 49 | $ nethack := $hackdir:nethack 50 | $ if p1.nes."-s" .and. p1.nes."-s all" then - 51 | nethack = nethack + graphics 52 | $ nethack "''p1'" "''p2'" "''p3'" "''p4'" "''p5'" "''p6'" "''p7'" "''p8'" 53 | $! 54 | -------------------------------------------------------------------------------- /sys/vms/vmsmisc.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)vmsmisc.c 3.4 1996/03/02 */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #include 5 | #include 6 | 7 | void vms_exit( /*_ int _*/ ); 8 | void vms_abort( /*_ void _*/ ); 9 | 10 | extern void exit( /*_ int _*/ ); 11 | extern void lib$signal( /*_ unsigned long,... _*/ ); 12 | 13 | void 14 | vms_exit(status) 15 | int status; 16 | { 17 | exit(status ? (SS$_ABORT | STS$M_INHIB_MSG) : SS$_NORMAL); 18 | } 19 | 20 | void 21 | vms_abort() 22 | { 23 | lib$signal(SS$_DEBUG); 24 | } 25 | 26 | #ifdef VERYOLD_VMS 27 | #include "oldcrtl.c" 28 | #endif 29 | 30 | /*vmsmisc.c*/ 31 | -------------------------------------------------------------------------------- /sys/wince/ceinc/assert.h: -------------------------------------------------------------------------------- 1 | /*** 2 | *assert.h - define the assert macro 3 | * 4 | ****/ 5 | 6 | #undef assert 7 | 8 | #ifdef NDEBUG 9 | 10 | #define assert(exp) ((void)0) 11 | 12 | #else 13 | 14 | #define assert(exp) (void)( (exp) || (panic("%s at %s line %ld", #exp, __FILE__,__LINE__), 1) ) 15 | 16 | #endif /* NDEBUG */ 17 | -------------------------------------------------------------------------------- /sys/wince/ceinc/errno.h: -------------------------------------------------------------------------------- 1 | /* empty file */ 2 | 3 | extern int errno; 4 | 5 | -------------------------------------------------------------------------------- /sys/wince/ceinc/fcntl.h: -------------------------------------------------------------------------------- 1 | /*** 2 | *fcntl.h - file control options used by open() 3 | * 4 | *Purpose: 5 | * This file defines constants for the file control options used 6 | * by the _open() function. 7 | * [System V] 8 | * 9 | * [Public] 10 | * 11 | ****/ 12 | 13 | #ifndef _INC_FCNTL 14 | #define _INC_FCNTL 15 | 16 | #define _O_RDONLY 0x0000 /* open for reading only */ 17 | #define _O_WRONLY 0x0001 /* open for writing only */ 18 | #define _O_RDWR 0x0002 /* open for reading and writing */ 19 | #define _O_APPEND 0x0008 /* writes done at eof */ 20 | 21 | #define _O_CREAT 0x0100 /* create and open file */ 22 | #define _O_TRUNC 0x0200 /* open and truncate */ 23 | #define _O_EXCL 0x0400 /* open only if file doesn't already exist */ 24 | 25 | /* O_TEXT files have sequences translated to on read()'s, 26 | ** and sequences translated to on write()'s 27 | */ 28 | 29 | #define _O_TEXT 0x4000 /* file mode is text (translated) */ 30 | #define _O_BINARY 0x8000 /* file mode is binary (untranslated) */ 31 | 32 | /* macro to translate the C 2.0 name used to force binary mode for files */ 33 | 34 | #define _O_RAW _O_BINARY 35 | 36 | /* Open handle inherit bit */ 37 | 38 | #define _O_NOINHERIT 0x0080 /* child process doesn't inherit file */ 39 | 40 | /* Temporary file bit - file is deleted when last handle is closed */ 41 | 42 | #define _O_TEMPORARY 0x0040 /* temporary file bit */ 43 | 44 | /* sequential/random access hints */ 45 | 46 | #define _O_SEQUENTIAL 0x0020 /* file access is primarily sequential */ 47 | #define _O_RANDOM 0x0010 /* file access is primarily random */ 48 | 49 | #if !__STDC__ || defined(_POSIX_) 50 | /* Non-ANSI names for compatibility */ 51 | #define O_RDONLY _O_RDONLY 52 | #define O_WRONLY _O_WRONLY 53 | #define O_RDWR _O_RDWR 54 | #define O_APPEND _O_APPEND 55 | #define O_CREAT _O_CREAT 56 | #define O_TRUNC _O_TRUNC 57 | #define O_EXCL _O_EXCL 58 | #define O_TEXT _O_TEXT 59 | #define O_BINARY _O_BINARY 60 | #define O_RAW _O_BINARY 61 | #define O_TEMPORARY _O_TEMPORARY 62 | #define O_NOINHERIT _O_NOINHERIT 63 | #define O_SEQUENTIAL _O_SEQUENTIAL 64 | #define O_RANDOM _O_RANDOM 65 | #endif /* __STDC__ */ 66 | 67 | #endif /* _INC_FCNTL */ 68 | -------------------------------------------------------------------------------- /sys/wince/ceinc/sys/stat.h: -------------------------------------------------------------------------------- 1 | /* empty file */ 2 | 3 | -------------------------------------------------------------------------------- /sys/wince/cesetup.bat: -------------------------------------------------------------------------------- 1 | @REM SCCS Id: @(#)nhsetup.bat $Date: 2003/08/22 13:23:33 $ 2 | @REM Copyright (c) Alex Kompel, 2002 3 | @REM NetHack may be freely redistributed. See license for details. 4 | @REM Win32 nhsetup batch file, see Install.ce for details 5 | @REM 6 | @echo off 7 | REM 8 | REM Make sure directories necessary for build exist 9 | REM 10 | if NOT exist ..\..\wince\*.* mkdir ..\..\wince 11 | REM 12 | REM Get these files from the win\win32 port 13 | REM 14 | copy ..\..\win\win32\mnsel.uu ..\..\wince\mnsel.uu 15 | copy ..\..\win\win32\mnselcnt.uu ..\..\wince\mnselcnt.uu 16 | copy ..\..\win\win32\mnunsel.uu ..\..\wince\mnunsel.uu 17 | copy ..\..\win\win32\petmark.uu ..\..\wince\petmark.uu 18 | copy ..\..\sys\winnt\nhico.uu ..\..\wince\nhico.uu 19 | copy ..\..\sys\wince\menubar.uu ..\..\wince\menubar.uu 20 | copy ..\..\sys\wince\keypad.uu ..\..\wince\keypad.uu 21 | REM 22 | REM Get these files from sys\wince 23 | REM 24 | copy bootstrp.mak ..\..\wince\bootstrp.mak 25 | copy wince.vcw ..\..\wince.vcw 26 | copy hpc.vcp ..\..\wince\wince_hpc.vcp 27 | copy palmpc.vcp ..\..\wince\wince_palm_pc.vcp 28 | copy pocketpc.vcp ..\..\wince\wince_pocket_pc.vcp 29 | copy smartphn.vcp ..\..\wince\wince_smartphone.vcp 30 | echo. 31 | echo Proceed with the following steps: 32 | echo. 33 | echo cd ..\..\wince 34 | echo nmake /f bootstrp.mak 35 | echo. 36 | echo Then start Embedded Visual C and open 37 | echo the workspace wince.vcw (at the top of the NetHack tree) 38 | echo to build. See Install.ce for details. 39 | echo. 40 | 41 | -------------------------------------------------------------------------------- /sys/wince/cesound.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)cesound.c 3.4 $Date: 2003/02/13 12:35:27 $ */ 2 | /* Copyright (c) NetHack PC Development Team 1993 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | /* */ 5 | /* 6 | * cesound.c - Windows CE NetHack sound support 7 | * 8 | * 9 | */ 10 | 11 | #include "hack.h" 12 | #include 13 | 14 | #ifdef USER_SOUNDS 15 | 16 | void play_usersound(filename, volume) 17 | const char* filename; 18 | int volume; 19 | { 20 | TCHAR wbuf[MAX_PATH+1]; 21 | /* pline("play_usersound: %s (%d).", filename, volume); */ 22 | ZeroMemory(wbuf, sizeof(wbuf)); 23 | (void)sndPlaySound(NH_A2W(filename, wbuf, MAX_PATH), SND_ASYNC | SND_NODEFAULT); 24 | } 25 | 26 | #endif /*USER_SOUNDS*/ 27 | /* cesound.c */ 28 | -------------------------------------------------------------------------------- /sys/wince/keypad.uu: -------------------------------------------------------------------------------- 1 | begin 600 keypad.bmp 2 | M0DV^`````````#X````H````<`````@````!``$``````(`````````````` 3 | M`````````````````/___P#__________________P``[__[____________ 4 | M_R0``.?_\_?C]__W__?_]^MU``#CP>/GU?/AX\/OY_O5=0``X>/#Q\'QX\'C 5 | MS^?YZR4``/_W_^?5\^?_\^__^]5M``#____WX_?O__OW__?_)```________ 6 | *__________\``.?5 7 | ` 8 | end 9 | -------------------------------------------------------------------------------- /sys/wince/menubar.uu: -------------------------------------------------------------------------------- 1 | begin 600 menubar.bmp 2 | M0DUV`0```````'8````H````(````!`````!``0````````!```````````` 3 | M````````````````````@```@````("``(````"``(``@(```,#`P`"`@(`` 4 | M``#_``#_````__\`_P```/\`_P#__P``____`'=W=W=W=W=W=W=W=W=W=W=W 5 | M=W=W=W=W=W=W=W=W=W=W=$1$1$1$1'=W=W=W=W=W=W1$_T1/]$1W=W=W=W=W 6 | M=W=T1/_T__1$=W=W=W=W=W=W=/______]'=W=P<'!P=W=W3_______1W=W#P 7 | M\/#P=W=T3__T__]$=W */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #include 5 | #include "winMS.h" 6 | #include "mhaskyn.h" 7 | 8 | int mswin_yes_no_dialog( const char *question, const char *choices, int def) 9 | { 10 | return '\032'; 11 | } 12 | 13 | -------------------------------------------------------------------------------- /sys/wince/mhaskyn.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINAskYesNO_h 5 | #define MSWINAskYesNO_h 6 | 7 | #include "winMS.h" 8 | 9 | int mswin_yes_no_dialog( const char *question, const char *choices, int def); 10 | 11 | #endif /* MSWINAskYesNO_h */ 12 | -------------------------------------------------------------------------------- /sys/wince/mhcmd.h: -------------------------------------------------------------------------------- 1 | /* NetHack may be freely redistributed. See license for details. */ 2 | 3 | #ifndef MSWINCMDWindow_h 4 | #define MSWINCMDWindow_h 5 | 6 | #include "winMS.h" 7 | #include "config.h" 8 | #include "global.h" 9 | 10 | HWND mswin_init_command_window (); 11 | 12 | /* if either sz->cx or sz->cy are already set this function will 13 | no modify it. It will adjust them to the minimum size 14 | required by the command window */ 15 | void mswin_command_window_size (HWND hwnd, LPSIZE sz); 16 | 17 | #if defined(WIN_CE_SMARTPHONE) 18 | /* special keypad input handling for SmartPhone */ 19 | BOOL NHSPhoneTranslateKbdMessage(WPARAM wParam, LPARAM lParam, BOOL keyDown); 20 | void NHSPhoneSetKeypadFromString(const char* str); 21 | void NHSPhoneSetKeypadDirection(); 22 | void NHSPhoneSetKeypadDefault(); 23 | #endif 24 | 25 | #endif /* MSWINCMDWindow_h */ 26 | -------------------------------------------------------------------------------- /sys/wince/mhcolor.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | /* color management functions */ 5 | 6 | #ifndef MSWINColor_h 7 | #define MSWINColor_h 8 | 9 | #define MSWIN_COLOR_BG 0 10 | #define MSWIN_COLOR_FG 1 11 | #define SYSCLR_TO_BRUSH(x) ((HBRUSH)((x) + 1)) 12 | 13 | extern void mswin_init_color_table(); 14 | extern HBRUSH mswin_get_brush(int win_type, int color_index); 15 | extern COLORREF mswin_get_color(int win_type, int color_index); 16 | 17 | #endif /* MSWINColor_h */ 18 | -------------------------------------------------------------------------------- /sys/wince/mhdlg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINDlgWindow_h 5 | #define MSWINDlgWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | int mswin_getlin_window (const char *question, char *result, size_t result_size); 12 | int mswin_ext_cmd_window (int* selection); 13 | int mswin_player_selection_window(int* selection); 14 | 15 | #endif /* MSWINDlgWindow_h */ 16 | -------------------------------------------------------------------------------- /sys/wince/mhfont.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | /* font management functions */ 5 | 6 | #ifndef MSWINFont_h 7 | #define MSWINFont_h 8 | 9 | #include "winMS.h" 10 | 11 | HGDIOBJ mswin_get_font(int win_type, int attr, HDC hdc, BOOL replace); 12 | UINT mswin_charset(); 13 | 14 | #endif /* MSWINFont_h */ 15 | -------------------------------------------------------------------------------- /sys/wince/mhinput.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #include 5 | #include "winMS.h" 6 | #include "mhinput.h" 7 | 8 | /* nethack input queue functions */ 9 | 10 | #define NH_INPUT_BUFFER_SIZE 64 11 | 12 | /* as it stands right now we need only one slot 13 | since events are processed almost the same time as 14 | they occur but I like large round numbers */ 15 | 16 | static MSNHEvent nhi_input_buffer[NH_INPUT_BUFFER_SIZE]; 17 | static int nhi_init_input = 0; 18 | static int nhi_read_pos = 0; 19 | static int nhi_write_pos = 0; 20 | 21 | /* initialize input queue */ 22 | void mswin_nh_input_init() 23 | { 24 | if( !nhi_init_input ) { 25 | nhi_init_input = 1; 26 | 27 | ZeroMemory( nhi_input_buffer, sizeof(nhi_input_buffer) ); 28 | nhi_read_pos = 0; 29 | nhi_write_pos = 0; 30 | } 31 | } 32 | 33 | /* check for input */ 34 | int mswin_have_input() 35 | { 36 | return (nhi_read_pos!=nhi_write_pos); 37 | } 38 | 39 | /* add event to the queue */ 40 | void mswin_input_push(PMSNHEvent event) 41 | { 42 | int new_write_pos; 43 | 44 | if( !nhi_init_input ) mswin_nh_input_init(); 45 | 46 | new_write_pos = (nhi_write_pos+1) % NH_INPUT_BUFFER_SIZE; 47 | 48 | if(new_write_pos!=nhi_read_pos) { 49 | memcpy(nhi_input_buffer+nhi_write_pos, event, sizeof(*event)); 50 | nhi_write_pos = new_write_pos; 51 | } 52 | 53 | } 54 | 55 | /* get event from the queue and delete it */ 56 | PMSNHEvent mswin_input_pop() 57 | { 58 | PMSNHEvent retval; 59 | 60 | if( !nhi_init_input ) mswin_nh_input_init(); 61 | 62 | if( nhi_read_pos!=nhi_write_pos ) { 63 | retval = &nhi_input_buffer[nhi_read_pos]; 64 | nhi_read_pos = (nhi_read_pos+1) % NH_INPUT_BUFFER_SIZE; 65 | } else { 66 | retval = NULL; 67 | } 68 | 69 | return retval; 70 | } 71 | 72 | /* get event from the queue but leave it there */ 73 | PMSNHEvent mswin_input_peek() 74 | { 75 | PMSNHEvent retval; 76 | 77 | if( !nhi_init_input ) mswin_nh_input_init(); 78 | 79 | if( nhi_read_pos!=nhi_write_pos ) { 80 | retval = &nhi_input_buffer[nhi_read_pos]; 81 | } else { 82 | retval = NULL; 83 | } 84 | return retval; 85 | } 86 | 87 | -------------------------------------------------------------------------------- /sys/wince/mhinput.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINInput_h 5 | #define MSWINInput_h 6 | 7 | /* nethack input queue - store/extract input events */ 8 | #include "winMS.h" 9 | 10 | #define NHEVENT_CHAR 1 11 | #define NHEVENT_MOUSE 2 12 | typedef struct mswin_event { 13 | int type; 14 | union { 15 | struct { 16 | int ch; 17 | } kbd; 18 | 19 | struct { 20 | int mod; 21 | int x, y; 22 | } ms; 23 | }; 24 | } MSNHEvent, *PMSNHEvent; 25 | 26 | #define NHEVENT_KBD(c) { MSNHEvent e; e.type=NHEVENT_CHAR; e.kbd.ch=(c); mswin_input_push(&e); } 27 | #define NHEVENT_MS(_mod, _x, _y) { MSNHEvent e; e.type=NHEVENT_MOUSE; e.ms.mod = (_mod); e.ms.x=(_x); e.ms.y=(_y); mswin_input_push(&e); } 28 | 29 | void mswin_nh_input_init(); 30 | int mswin_have_input(); 31 | void mswin_input_push(PMSNHEvent event); 32 | PMSNHEvent mswin_input_pop(); 33 | PMSNHEvent mswin_input_peek(); 34 | 35 | #endif /* MSWINInput_h */ 36 | 37 | -------------------------------------------------------------------------------- /sys/wince/mhmain.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINMainWindow_h 5 | #define MSWINMainWindow_h 6 | 7 | /* this is a main appliation window */ 8 | 9 | #include "winMS.h" 10 | 11 | extern TCHAR szMainWindowClass[]; 12 | HWND mswin_init_main_window (); 13 | void mswin_layout_main_window(HWND changed_child); 14 | void mswin_select_map_mode(int map_mode); 15 | 16 | #endif /* MSWINMainWindow_h */ 17 | 18 | -------------------------------------------------------------------------------- /sys/wince/mhmap.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINMapWindow_h 5 | #define MSWINMapWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | 12 | HWND mswin_init_map_window (void); 13 | void mswin_map_stretch(HWND hWnd, LPSIZE lpsz, BOOL redraw); 14 | int mswin_map_mode(HWND hWnd, int mode); 15 | 16 | #define ROGUE_LEVEL_MAP_MODE MAP_MODE_ASCII12x16 17 | 18 | #define DEF_CLIPAROUND_MARGIN 5 19 | #define DEF_CLIPAROUND_AMOUNT 1 20 | 21 | #endif /* MSWINMapWindow_h */ 22 | -------------------------------------------------------------------------------- /sys/wince/mhmenu.h: -------------------------------------------------------------------------------- 1 | /* NetHack may be freely redistributed. See license for details. */ 2 | 3 | #ifndef MSWINMenuWindow_h 4 | #define MSWINMenuWindow_h 5 | 6 | #include "winMS.h" 7 | #include "config.h" 8 | #include "global.h" 9 | 10 | #define MENU_TYPE_TEXT 1 11 | #define MENU_TYPE_MENU 2 12 | 13 | HWND mswin_init_menu_window ( int type ); 14 | int mswin_menu_window_select_menu (HWND hwnd, int how, MENU_ITEM_P **); 15 | void mswin_menu_window_size (HWND hwnd, LPSIZE sz); 16 | 17 | #endif /* MSWINTextWindow_h */ 18 | -------------------------------------------------------------------------------- /sys/wince/mhmsg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MHNethackMessages_H 5 | #define MHNethackMessages_H 6 | 7 | /* nethack messages */ 8 | #define WM_MSNH_COMMAND (WM_APP+1) 9 | 10 | #define MSNH_MSG_ADDWND 100 11 | #define MSNH_MSG_PUTSTR 101 12 | #define MSNH_MSG_PRINT_GLYPH 102 13 | #define MSNH_MSG_CLEAR_WINDOW 103 14 | #define MSNH_MSG_CLIPAROUND 104 15 | #define MSNH_MSG_STARTMENU 105 16 | #define MSNH_MSG_ADDMENU 106 17 | #define MSNH_MSG_CURSOR 107 18 | #define MSNH_MSG_ENDMENU 108 19 | 20 | typedef struct mswin_nhmsg_add_wnd { 21 | winid wid; 22 | } MSNHMsgAddWnd, *PMSNHMsgAddWnd; 23 | 24 | typedef struct mswin_nhmsg_putstr { 25 | int attr; 26 | const char* text; 27 | boolean append; 28 | } MSNHMsgPutstr, *PMSNHMsgPutstr; 29 | 30 | typedef struct mswin_nhmsg_print_glyph { 31 | XCHAR_P x; 32 | XCHAR_P y; 33 | int glyph; 34 | } MSNHMsgPrintGlyph, *PMSNHMsgPrintGlyph; 35 | 36 | typedef struct mswin_nhmsg_cliparound { 37 | int x; 38 | int y; 39 | } MSNHMsgClipAround, *PMSNHMsgClipAround; 40 | 41 | typedef struct mswin_nhmsg_add_menu { 42 | int glyph; 43 | const ANY_P* identifier; 44 | CHAR_P accelerator; 45 | CHAR_P group_accel; 46 | int attr; 47 | const char * str; 48 | BOOLEAN_P presel; 49 | } MSNHMsgAddMenu, *PMSNHMsgAddMenu; 50 | 51 | typedef struct mswin_nhmsg_cursor { 52 | int x; 53 | int y; 54 | } MSNHMsgCursor, *PMSNHMsgCursor; 55 | 56 | typedef struct mswin_nhmsg_end_menu { 57 | const char* text; 58 | } MSNHMsgEndMenu, *PMSNHMsgEndMenu; 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /sys/wince/mhmsgwnd.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINMessageWindow_h 5 | #define MSWINMessageWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | HWND mswin_init_message_window (); 12 | void mswin_message_window_size (HWND hWnd, LPSIZE sz); 13 | 14 | 15 | #endif /* MSWINMessageWindow_h */ 16 | -------------------------------------------------------------------------------- /sys/wince/mhrip.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #include "winMS.h" 5 | #include "mhrip.h" 6 | #include "mhtext.h" 7 | 8 | HWND mswin_init_RIP_window () 9 | { 10 | return mswin_init_text_window(); 11 | } 12 | 13 | void mswin_display_RIP_window (HWND hWnd) 14 | { 15 | mswin_display_text_window(hWnd); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /sys/wince/mhrip.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINRIPWindow_h 5 | #define MSWINRIPWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | HWND mswin_init_RIP_window (); 12 | void mswin_display_RIP_window (HWND hwnd); 13 | 14 | #endif /* MSWINRIPWindow_h */ 15 | 16 | -------------------------------------------------------------------------------- /sys/wince/mhstatus.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINStatusWindow_h 5 | #define MSWINStatusWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | HWND mswin_init_status_window (); 12 | void mswin_status_window_size (HWND hWnd, LPSIZE sz); 13 | 14 | #endif /* MSWINStatusWindow_h */ 15 | -------------------------------------------------------------------------------- /sys/wince/mhtext.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINTextWindow_h 5 | #define MSWINTextWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | HWND mswin_init_text_window (); 12 | void mswin_display_text_window (HWND hwnd); 13 | 14 | #endif /* MSWINTextWindow_h */ 15 | -------------------------------------------------------------------------------- /sys/wince/mhtxtbuf.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINTextBuffer_h 5 | #define MSWINTextBuffer_h 6 | 7 | #include "winMS.h" 8 | 9 | typedef struct mswin_nethack_text_buffer* PNHTextBuffer; 10 | PNHTextBuffer mswin_init_text_buffer(BOOL wrap_text); 11 | void mswin_free_text_buffer(PNHTextBuffer pb); 12 | void mswin_add_text(PNHTextBuffer pb, int attr, const char* text); 13 | void mswin_render_text(PNHTextBuffer pb, HWND edit_control); 14 | 15 | #endif /* MSWINTextBuffer_h */ 16 | -------------------------------------------------------------------------------- /sys/wince/newres.h: -------------------------------------------------------------------------------- 1 | #ifndef __NEWRES_H__ 2 | #define __NEWRES_H__ 3 | 4 | #if !defined(UNDER_CE) 5 | #define UNDER_CE _WIN32_WCE 6 | #endif 7 | 8 | #if defined(_WIN32_WCE) 9 | #if !defined(WCEOLE_ENABLE_DIALOGEX) 10 | #define DIALOGEX DIALOG DISCARDABLE 11 | #endif 12 | #include 13 | #define SHMENUBAR RCDATA 14 | #if (defined(WIN32_PLATFORM_PSPC) || defined(WIN32_PLATFORM_WFSP)) && (_WIN32_WCE >= 300) 15 | #include 16 | #else 17 | #define I_IMAGENONE (-2) 18 | #define NOMENU 0xFFFF 19 | #define IDS_SHNEW 1 20 | 21 | #define IDM_SHAREDNEW 10 22 | #define IDM_SHAREDNEWDEFAULT 11 23 | #endif 24 | #endif // _WIN32_WCE 25 | 26 | 27 | #ifdef RC_INVOKED 28 | #ifndef _INC_WINDOWS 29 | #define _INC_WINDOWS 30 | #include "winuser.h" // extract from windows header 31 | #endif 32 | #endif 33 | 34 | #ifdef IDC_STATIC 35 | #undef IDC_STATIC 36 | #endif 37 | #define IDC_STATIC (-1) 38 | 39 | #endif //__NEWRES_H__ 40 | 41 | -------------------------------------------------------------------------------- /sys/wince/winhack.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deepy/acehack/9a4c7671a8d8de6c0a7ab4718382b49cf5ec61f5/sys/wince/winhack.rc -------------------------------------------------------------------------------- /sys/wince/winhcksp.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/deepy/acehack/9a4c7671a8d8de6c0a7ab4718382b49cf5ec61f5/sys/wince/winhcksp.rc -------------------------------------------------------------------------------- /sys/winnt/console.rc: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)console.rc 3.4 $Date: 2003/10/14 01:31:28 $ */ 2 | /* Copyright (c) Yitzhak Sapir, 2002. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #include "windows.h" 6 | 7 | 1 ICON DISCARDABLE "NetHack.ICO" 8 | 9 | ///////////////////////////////////////////////////////////////////////////// 10 | // 11 | // Version 12 | // 13 | 14 | VS_VERSION_INFO VERSIONINFO 15 | FILEVERSION 3,4,3,0 16 | PRODUCTVERSION 3,4,3,0 17 | FILEFLAGSMASK 0x1fL 18 | #ifdef _DEBUG 19 | FILEFLAGS 0x9L 20 | #else 21 | FILEFLAGS 0x8L 22 | #endif 23 | FILEOS 0x4L 24 | FILETYPE 0x0L 25 | FILESUBTYPE 0x0L 26 | BEGIN 27 | BLOCK "StringFileInfo" 28 | BEGIN 29 | BLOCK "040904b0" 30 | BEGIN 31 | VALUE "FileDescription", "NetHack for Windows - TTY Interface\0" 32 | VALUE "FileVersion", "3.4.3\0" 33 | VALUE "InternalName", "NetHack\0" 34 | VALUE "LegalCopyright", "Copyright (C) 1985 - 2003. By Stichting Mathematisch Centrum and M. Stephenson. See license for details.\0" 35 | VALUE "OriginalFilename", "NetHack.exe\0" 36 | VALUE "PrivateBuild", "031014\0" 37 | VALUE "ProductName", "NetHack\0" 38 | VALUE "ProductVersion", "3.4.3\0" 39 | END 40 | END 41 | BLOCK "VarFileInfo" 42 | BEGIN 43 | VALUE "Translation", 0x409, 1200 44 | END 45 | END 46 | 47 | 48 | /*console.rc*/ 49 | 50 | -------------------------------------------------------------------------------- /sys/winnt/nethack.def: -------------------------------------------------------------------------------- 1 | NAME NETHACK 2 | DESCRIPTION 'NetHack 3.4.1 for Windows NT' 3 | EXETYPE WINDOWS 4 | STUB 'WINSTUB.EXE' 5 | CODE PRELOAD MOVEABLE DISCARDABLE 6 | DATA PRELOAD MOVEABLE MULTIPLE 7 | HEAPSIZE 4096 8 | STACKSIZE 9216 9 | EXPORTS WndProc 10 | -------------------------------------------------------------------------------- /sys/winnt/nhico.uu: -------------------------------------------------------------------------------- 1 | begin 600 nethack.ico 2 | M```!``(`("`0``````#H`@``)@```!`0$```````*`$```X#```H````(``` 3 | M`$`````!``0``````(`"````````````````````````````````@```@``` 4 | M`("``(````"``(``@(```,#`P`"`@(````#_``#_````__\`_P```/\`_P#_ 5 | M_P``____````````````````````````__=P```````````'=W<`#___=P`` 6 | M````````?_?W<`]W:/=P``#_<```!WB'!G`/8'B'<``/_W<```?VAGAP#P=E 7 | M;W``__]W<``'>`=H\`__=G_P#_!V9_<`!W=H=W``__(:/<`=P=W<` 8 | M``__\`_W=G9GB'<`!W=P````__#_=G=X2&"/<`=W``````_P_\=T=F>(:/<' 9 | M<```````#_9V=V5H8(AO<`````````_W=W1WAXAHA_````````#_9\<&>&!H 10 | M!H9W````````_W=V=6=GAH@(]P``````#_?'9W9T:(!H:&=P``````_V=WQV 11 | M=X=HA@B/<``````/]GQP=G>':(A@AW``````#_<'9\=VAH!HB&=P``````_V 12 | M=G=X9V>&"&"'<``````/]W?'9W1@B(:(9W````^&C_?'9W1WAX:`8(=P`'`/ 13 | M_X_P9W9W:&A@AH:''AH@(AW!W\`=H;_9V=G!H:&"&A@=P 14 | M`(`'B(_P<'!V<&>(:(B'<`"`#_\/______=W=W=W=W!W<`__#_____?_?W=W 15 | M=W=P=W`/``__#___]W=W=W!W<`!P```/\`#_]_]_=W<`!W``````#P```/_W 16 | M=W<```!P```````````````````````````````````````````````````` 17 | M```````````````````````````````````````````````````````````` 18 | M```````````````````````````````````````````````````````````` 19 | M```````````````````````H````$````"`````!``0``````,`````````` 20 | M````````````````````````@```@````("``(````"``(``@(```,#`P`"` 21 | M@(````#_``#_````__\`_P```/\`_P#__P``____`````````````/<````` 22 | M=P`/_W`/<`=W<`#_\/8'!W<```\/9F!P<````/9F!@<`````]F9@9P````]F 23 | M9@8&<```#V9F8&!P```/9F8&!G````]F9F!@<``/?V9F!@9P<`]_9F9@8'!P 24 | M#P___W=W<'``#P__=W!P```````````````````````````````````````` 25 | K```````````````````````````````````````````````````````````` 26 | ` 27 | end 28 | -------------------------------------------------------------------------------- /sys/winnt/ntsound.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)ntsound.c 3.4 $Date: 2002/09/02 23:28:45 $ */ 2 | /* Copyright (c) NetHack PC Development Team 1993 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | /* */ 5 | /* 6 | * ntsound.c - Windows NT NetHack sound support 7 | * 8 | *Edit History: 9 | * Initial Creation 93/12/11 10 | * 11 | */ 12 | 13 | #include "hack.h" 14 | #include "win32api.h" 15 | #include 16 | 17 | #ifdef USER_SOUNDS 18 | 19 | void play_usersound(filename, volume) 20 | const char* filename; 21 | int volume; 22 | { 23 | /* pline("play_usersound: %s (%d).", filename, volume); */ 24 | (void)sndPlaySound(filename, SND_ASYNC | SND_NODEFAULT); 25 | } 26 | 27 | #endif /*USER_SOUNDS*/ 28 | /* ntsound.c */ 29 | -------------------------------------------------------------------------------- /sys/winnt/win32api.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)win32api.h 3.4 $Date: 2002/07/24 08:25:21 $ */ 2 | /* Copyright (c) NetHack PC Development Team 1996 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* 6 | * This header file is used to clear up some discrepencies with Visual C 7 | * header files & NetHack before including windows.h, so all NetHack 8 | * files should include "win32api.h" rather than . 9 | */ 10 | # if defined(_MSC_VER) 11 | # undef strcmpi 12 | # undef min 13 | # undef max 14 | # pragma warning(disable:4142) /* Warning, Benign redefinition of type */ 15 | # pragma pack(8) 16 | # endif 17 | 18 | #define WIN32_LEAN_AND_MEAN 19 | 20 | #include 21 | #include 22 | 23 | # if defined(_MSC_VER) 24 | # pragma pack() 25 | # endif 26 | 27 | /*win32api.h*/ 28 | -------------------------------------------------------------------------------- /util/panic.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)panic.c 3.4 1994/03/02 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* 6 | * This code was adapted from the code in end.c to run in a standalone 7 | * mode for the makedefs / drg code. 8 | */ 9 | 10 | #define NEED_VARARGS 11 | #include "config.h" 12 | 13 | #ifdef AZTEC 14 | #define abort() exit() 15 | #endif 16 | #ifdef VMS 17 | extern void NDECL(vms_abort); 18 | #endif 19 | 20 | /*VARARGS1*/ 21 | boolean panicking; 22 | void VDECL(panic, (char *,...)); 23 | 24 | void 25 | panic VA_DECL(char *,str) 26 | VA_START(str); 27 | VA_INIT(str, char *); 28 | if(panicking++) 29 | #ifdef SYSV 30 | (void) 31 | #endif 32 | abort(); /* avoid loops - this should never happen*/ 33 | 34 | (void) fputs(" ERROR: ", stderr); 35 | Vfprintf(stderr, str, VA_ARGS); 36 | (void) fflush(stderr); 37 | #if defined(UNIX) || defined(VMS) 38 | # ifdef SYSV 39 | (void) 40 | # endif 41 | abort(); /* generate core dump */ 42 | #endif 43 | VA_END(); 44 | exit(EXIT_FAILURE); /* redundant */ 45 | return; 46 | } 47 | 48 | #ifdef ALLOCA_HACK 49 | /* 50 | * In case bison-generated foo_yacc.c tries to use alloca(); if we don't 51 | * have it then just use malloc() instead. This may not work on some 52 | * systems, but they should either use yacc or get a real alloca routine. 53 | */ 54 | long *alloca(cnt) 55 | unsigned cnt; 56 | { 57 | return cnt ? alloc(cnt) : (long *)0; 58 | } 59 | #endif 60 | 61 | /*panic.c*/ 62 | -------------------------------------------------------------------------------- /win/Qt/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleGetInfoHTML 6 | http://www.nethack.org 7 | CFBundleGetInfoString 8 | Copyright (C) 1985-2003 Stichting Mathematisch Centrum 9 | CFBundleIconFile 10 | nethack.icns 11 | CFBundleIdentifier 12 | org.nethack.qt 13 | CFBundlePackageType 14 | APPL 15 | CFBundleShortVersionString 16 | 3.4.3 17 | CFBundleSignature 18 | NHak 19 | 20 | 21 | -------------------------------------------------------------------------------- /win/Qt/knethack.lnk: -------------------------------------------------------------------------------- 1 | # KDE Config File 2 | # Call this file knethack.kdelnk or knethack.desktop 3 | [KDE Desktop Entry] 4 | Name=Nethack 5 | Name[fr]=Nethack 6 | Name[hu]=Nethack 7 | Name[no]=Nethack 8 | Name[sk]=Nethack 9 | Name[cs]=Nethack 10 | Name[hr]=Nethack 11 | Name[pt]=Nethack 12 | Name[pt_BR]=Nethack 13 | Icon=knh.xpm 14 | Exec=knethack -caption "%c" %i %m 15 | Type=Application 16 | DocPath=knethack/index.html 17 | Comment=The classic Unix role-playing game - fight monsters and seek the Amulet of Yendor for your god! 18 | 19 | -------------------------------------------------------------------------------- /win/Qt/knh-mini.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *noname[] = { 3 | /* width height ncolors chars_per_pixel */ 4 | "16 16 7 1", 5 | /* colors */ 6 | " c #000000", 7 | ". c #DCDCDC", 8 | "X c #008080", 9 | "o c #A0A0A0", 10 | "O c None", 11 | "+ c #FFFFFF", 12 | "@ c #C3C3C3", 13 | /* pixels */ 14 | "OOOOOOOOOOOOOOOO", 15 | "OOO+O+++@@@O@OOO", 16 | "O+O+++++@@@@@O.O", 17 | "O+o+XXXXX X @ . ", 18 | "O+o+XXXX X X@ . ", 19 | "OO +XXXXX X @ O ", 20 | "OOO+XXXX X X@ OO", 21 | "OOO+XXXXX X @ OO", 22 | "OOO+XXXX X X@ OO", 23 | "OOOO+XXXX X@ OO", 24 | "OOOO+XXX X . OO", 25 | "OOO+O+XXX . . OO", 26 | "OO+++ +X . ... O", 27 | "O+++. O+. .... ", 28 | "OO+. OOOOOO.. O", 29 | "OOOOOOOOOOOOOOOO" 30 | }; 31 | -------------------------------------------------------------------------------- /win/Qt/knh.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char *noname[] = { 3 | /* width height ncolors chars_per_pixel */ 4 | "40 40 20 1", 5 | /* colors */ 6 | " c #000000", 7 | ". c #0000C0", 8 | "X c #FFC0FF", 9 | "o c #FFC0C0", 10 | "O c #DCDCDC", 11 | "+ c #C0C0FF", 12 | "@ c #008080", 13 | "# c #A0A0A0", 14 | "$ c None", 15 | "% c #000080", 16 | "& c #585858", 17 | "* c #800080", 18 | "= c #FFFFFF", 19 | "- c #FFFFC0", 20 | "; c #00C0C0", 21 | ": c #C0FFFF", 22 | "> c #C0FFC0", 23 | ", c #C3C3C3", 24 | "< c #FFDCA8", 25 | "1 c #0000FF", 26 | /* pixels */ 27 | "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", 28 | "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", 29 | "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", 30 | "$$$$$$$$=$$$$$$=,==<,=<,$$$$$$,$$$$$$$$$", 31 | "$$$$$$$$==$$$=====,=<>,<><$$$<>$$$$$$$$$", 32 | "$$$$$$$$===$====,==>,=<,<,,$,,<$$$$$$$$$", 33 | "$$$==$$$==========<=<,><,><<><,$$$,<$$$$", 34 | "$$$====$========,==,,=<>,<,>,<,$<><,$$$$", 35 | "$$$====$==========<=<,,<<><,<><$,,<>$$$$", 36 | "$$$$#&&&==$#$#$#@#$&@#&&@&&&&,, && $$", 37 | "$$$;#@&@==;#;#;#$;&#@&@$&@&@$>< &@ $$", 38 | "$$$====&==###1##.##@&#&@&&$&&<, <>O< $$", 39 | "$$$====&==$;##;##;&#@&@$&@&@&>, O<,> $$", 40 | "$$$==&@&==#1#;##.##@&#&@&$@$&,< ,< $$", 41 | "$$$$ ==###1#;##.#@$&&&@&&@-, $ $$", 42 | "$$$$$ =X;#;###&;#&@#&@$&@$&,< $$ $$$", 43 | "$$$$$$ ==#$+@+1##@#&@&$@&&&@<> $$$$$$", 44 | "$$$$$$$$=X;#1#$#@##@&#@&&&@$&<, $$$$$$", 45 | "$$$$$$$$==##;#;##1$#@&$@$&&@&>< $$$$$$", 46 | "$$$$$$$$=X;###1#@##@&#@&&@$&&O, $$$$$$", 47 | "$$$$$$$$==#1#;##;#.#@&&$@&@&@<> $$$$$$", 48 | "$$$$$$$$$==###;#*;#&@#&@&&$&O< $$$$$$$", 49 | "$$$$$$$$$==;#1,$;#&#@$@&$@&@<, $$$$$$$", 50 | "$$$$$$$$$$=X####.##@&#&&@&& ><, $$$$$$", 54 | "$$$$$$====@&=O##@#;&@#&&,< <,>< $$$$$", 55 | "$$$$$===#$== ==$1#&#&@&O> ,<$#,,> $$$$", 56 | "$$$$===#;#== ==$#;&@#O, >,#;&<,< $$$$", 57 | "$$$==$#;*@O< ====Oo,> <,&$#@&O, $$$", 58 | "$$$==;$#&&<, $===<,< < $$", 59 | "$$$==##;&O>, $$==,> $$ ,<&&#$@o, $$", 60 | "$$$===X=O,< $$$$$$$$$$$$$>OO,Oo> $$$", 61 | "$$$$====,< $$$$$$$$$$$$$$,<,>,<, $$$$", 62 | "$$$$$===<> $$$$$$$$$$$$$$$$><,<> $$$$", 63 | "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", 64 | "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", 65 | "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", 66 | "$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" 67 | }; 68 | -------------------------------------------------------------------------------- /win/Qt/qpe-nethack.control: -------------------------------------------------------------------------------- 1 | Files: bin/nethack apps/Games/nethack.desktop games/lib/nethackdir/[a-r]* games/lib/nethackdir/[t-z]* games/lib/nethackdir/save games/lib/nethackdir/s*.* games/lib/nethackdir/[A-Z0-9]* 2 | Priority: optional 3 | Section: qpe/games 4 | Maintainer: Warwick Allison 5 | Architecture: arm 6 | Version: 3.4.0-1 7 | Depends: qpe-base ($QPE_VERSION) 8 | Description: NetHack - The Dungeon Game 9 | Graphical version of NetHack for Qtopia 10 | -------------------------------------------------------------------------------- /win/X11/nethack.rc: -------------------------------------------------------------------------------- 1 | # 2 | # Nethack configuration file. 3 | # 4 | # Naming this file $(HOME)/.nethackrc (for UNIX) or setting the environment 5 | # variable NETHACKOPTIONS to point to its full path name elsewhere tells 6 | # NetHack to use X11 windowing and fonts (provided the executable was 7 | # compiled with that ability). 8 | # 9 | # 10 | OPTIONS=windowtype:x11,toptenwin,hilite_pet 11 | OPTIONS=confirm,male,fixinv,noautopickup,safe_pet,sortpack,tombstone 12 | OPTIONS=verbose,news,fruit:pineapple 13 | OPTIONS=dogname:Dhairrhuwyth 14 | OPTIONS=catname:Ghisteslwchlohm 15 | # 16 | # There are 17 object symbols and various graphics symbols. 17 | # The descriptions of these symbols can be found in dat/opthelp. 18 | # 19 | # 20 | # Font: nh10 (10x20) 21 | # 22 | OBJECTS= 180 183 188 192 181 184 182 189 190 196 \ 23 | 191 194 193 187 185 186 195 24 | # 25 | DUNGEON= 032 025 018 013 012 014 011 015 023 024 \ 26 | 022 021 128 129 130 131 132 035 035 133 \ 27 | 134 135 136 137 145 146 144 124 143 142 \ 28 | 141 140 149 150 031 031 147 148 031 161 \ 29 | 140 30 | # 31 | TRAPS= 138 138 138 138 138 138 138 138 138 138 \ 32 | 138 138 138 138 138 139 138 138 138 138 \ 33 | 138 138 34 | # 35 | EFFECTS= 151 152 153 154 155 156 157 158 \ 36 | 159 160 161 162 \ 37 | 163 164 165 166 167 168 169 170 \ 38 | 171 172 173 174 175 176 177 178 179 39 | # 40 | # 41 | # Font: ibm (8x14) 42 | # 43 | #OBJECTS= 207 210 215 219 208 211 209 216 217 223 \ 44 | # 218 221 220 214 212 213 222 45 | # 46 | #DUNGEON= 032 128 129 130 131 132 133 134 135 136 \ 47 | # 137 138 139 045 124 142 143 035 035 144 \ 48 | # 145 146 147 148 155 156 227 124 154 153 \ 49 | # 152 151 159 160 200 200 157 158 250 170 \ 50 | # 151 51 | # 52 | #TRAPS= 149 149 149 149 149 149 149 149 149 149 \ 53 | # 149 149 149 149 149 150 149 149 149 149 \ 54 | # 149 149 55 | # 56 | #EFFECTS= 161 162 163 164 165 166 167 168 \ 57 | # 169 170 171 172 \ 58 | # 173 174 175 176 177 178 179 180 \ 59 | # 181 182 183 184 185 186 187 188 189 60 | # 61 | # 62 | # Font: a "standard" font like 6x13 63 | # Note that this version is unlikely to work on a tty on a Unix system because 64 | # many of these characters are also control characters. 65 | # 66 | #DUNGEON = 032 025 018 013 012 014 011 015 023 024 \ 67 | # 022 021 031 045 124 043 043 035 035 031 \ 68 | # 035 001 060 062 060 062 019 124 092 035 \ 69 | # 123 125 031 125 046 046 035 035 046 127 \ 70 | # 125 71 | # 72 | #TRAPS= 094 094 094 094 094 094 094 094 094 094 \ 73 | # 094 094 094 094 094 002 094 094 094 094 \ 74 | # 094 094 75 | # 76 | #EFFECTS= 124 045 092 047 042 033 041 040 \ 77 | # 048 035 064 042 \ 78 | # 047 045 092 124 124 092 045 047 \ 79 | # 047 064 092 064 064 064 092 064 047 80 | -------------------------------------------------------------------------------- /win/X11/nh32icon: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)nh32icon 3.4 2002/02/12 */ 2 | /* Copyright (C) 1993,1995 by Robert Patrick Rankin */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* 32x32 X11 icon for NetHack. */ 6 | 7 | #define nh32icon_width 32 8 | #define nh32icon_height 32 9 | static unsigned char nh32icon_bits[] = { 10 | 0xff, 0x7f, 0xfe, 0xff, 0x01, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x40, 0x82, 11 | 0x21, 0x25, 0xc0, 0x83, 0x61, 0x25, 0x80, 0x81, 0xe1, 0x3d, 0x80, 0x81, 12 | 0xa1, 0x25, 0x80, 0x81, 0x21, 0x25, 0x80, 0x81, 0x01, 0x00, 0xe0, 0x87, 13 | 0x71, 0x48, 0x90, 0x89, 0x81, 0x48, 0x80, 0x81, 0x61, 0x78, 0x80, 0x81, 14 | 0x81, 0x40, 0x80, 0x81, 0x71, 0x42, 0x84, 0x81, 0x03, 0x00, 0x8a, 0xc1, 15 | 0x02, 0x00, 0x84, 0x41, 0x32, 0x67, 0x80, 0x41, 0xf3, 0x7f, 0x80, 0xc1, 16 | 0xf1, 0x7f, 0x84, 0x81, 0x71, 0x77, 0x8a, 0x81, 0xb1, 0x68, 0x84, 0x81, 17 | 0x71, 0x77, 0x80, 0x81, 0x71, 0x77, 0x80, 0x81, 0xb1, 0x68, 0x84, 0x81, 18 | 0x71, 0x77, 0x8a, 0x81, 0xf1, 0x7f, 0x84, 0x81, 0xe1, 0x3f, 0x80, 0x81, 19 | 0xc1, 0x1f, 0x80, 0x81, 0x81, 0x0f, 0x80, 0x81, 0x01, 0x07, 0x00, 0x81, 20 | 0x01, 0xc0, 0x03, 0x80, 0xff, 0x7f, 0xfe, 0xff}; 21 | -------------------------------------------------------------------------------- /win/X11/nh_icon.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * nh_icon[] = { 3 | "40 40 6 1", 4 | " s None c none", 5 | ". c #ffffff", 6 | "X c #dadab6", 7 | "o c #6c91b6", 8 | "O c #476c6c", 9 | "+ c #000000", 10 | " ", 11 | " ", 12 | " ", 13 | " . .X..XX.XX X ", 14 | " .. .....X.XXXXXX XX ", 15 | " ... ....X..XX.XXXXX XXX ", 16 | " .. ..........X.XXXXXXXXXXX XX ", 17 | " .... ........X..XX.XXXXXXXXX XXXX ", 18 | " .... ..........X.XXXXXXXXXXX XXXX ", 19 | " ooOOO..ooooooOooOOoOOOOOOOXX+++OO++ ", 20 | " ooOOO..ooooooooOoOOOOOOOOOXX+++OO++ ", 21 | " ....O..ooooooOooOOoOOOOOOOXX+XXXX++ ", 22 | " ....O..ooooooooOoOOOOOOOOOXX+XXXX++ ", 23 | " ..OOO..ooooooOooOOoOOOOOOOXX+++XX++ ", 24 | " ++++..ooooooooOoOOOOOOOOOXX+++ +++ ", 25 | " +++..ooooooOooOOoOOOOOOOXX+++ + ", 26 | " ++..ooooooooOoOOOOOOOOOXX+++ ", 27 | " ..ooooooOooOOoOOOOOOOXX+++ ", 28 | " ..ooooooooOoOOOOOOOOOXX+++ ", 29 | " ..ooooooOooOOoOOOOOOOXX+++ ", 30 | " ..ooooooooOoOOOOOOOOOXX+++ ", 31 | " ..oooooOooOOoOOOOOOXX+++ ", 32 | " ..oooooooOoOOOOOOOOXX+++ ", 33 | " ..ooooOooOOoOOOOOXX+++ ", 34 | " ..ooooooOoOOOOOOOXX++++ ", 35 | " ..o..oooOooOOoOOOOXX+XX+++ ", 36 | " ...o..oooooOoOOOOOXX++XXX++ ", 37 | " ....OO..ooOooOOoOOXX+++XXXX++ ", 38 | " ...oo..+..oooOoOOOXX++XXooXXX++ ", 39 | " ...ooo..++..OooOOoXX+++XXooOXXX+ ", 40 | " ..oooOOXX+++....XXXX++++XXOOoOOXX+ ", 41 | " ..oooOOXX+++ ...XXX+++++XXOOooOXX++ ", 42 | " ..oooOXXX+++ ..XX+++ +XXOOooOXX++ ", 43 | " .....XXX++++ XXXXXXX++ ", 44 | " ....XX++++ XXXXXXX+ ", 45 | " ...XX+++ XXXXX++ ", 46 | " ", 47 | " ", 48 | " ", 49 | " "}; 50 | -------------------------------------------------------------------------------- /win/X11/pet_mark.xbm: -------------------------------------------------------------------------------- 1 | #define pet_mark_width 16 2 | #define pet_mark_height 16 3 | static unsigned char pet_mark_bits[] = { 4 | 0x00, 0x00, 0x6c, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x7c, 0x00, 0x38, 0x00, 5 | 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 6 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; 7 | -------------------------------------------------------------------------------- /win/gem/Install.gem: -------------------------------------------------------------------------------- 1 | Hi, 2 | 3 | This is nethack3.4.1 for Atari Gem and tty 4 | Windowing System. 5 | 6 | It is by far not complete or perfect. 7 | (My english too :-)) 8 | 9 | You need at least 2Meg free RAM, 16 colors and 10 | 3 Meg free Disk space. 11 | In fact it works also with monochrome, but you 12 | have to create a nh2.img (and title2.img) on your own. 13 | 14 | Atari windowport changes from 3.3.0: 15 | added a ASCII-Mode in GEM -> F2 16 | the cursor is switchable -> F3 17 | added inventory/menu search -> : 18 | removed the redraw problem 19 | removed almost all flicker (except with NOVA-Card :-() 20 | placed the GEM-dialogues more pleasent 21 | tty corner windows (i.e. inv) display now correct in a vt52-win 22 | greyed out old messages 23 | placed the GEM-windows more convient 24 | ... 25 | 26 | Feel free to contact me about Issues and Errors. 27 | e-mail: gaston@cs.tu-berlin.de 28 | 29 | You use this program at your own risk, I can't 30 | guarantee it will work or do you no harm. 31 | 32 | Look at the nethack licence too. 33 | 34 | As you may have noticed the look and feel is from 35 | Warwick Allisons nethack3.1.3d Gem Version 36 | and I have used E_Gem2.2.0 from Christian Grunenberg. 37 | 38 | Marvin 39 | -------------------------------------------------------------------------------- /win/gem/gem_rso.uu: -------------------------------------------------------------------------------- 1 | begin 777 GEM_RSC.RSO 2 | M4E-/2 1( @ " ! !#__P __\ 3 | M 4 | M '___^!____@ 5 | M #__P #__P 6 | M 7 | M /_ '___^!____@ :1F]1)Y2KX@ 8 | M (\TJP "!$U%3E4 P'1$]!0D]55 '@9$3U%5250 __\ 0 #"E-4 9 | M05154TQ)3D4 $*1U)!0E-405154P#__P " ,&34%05TE. !DU!4$)/ 10 | M6 0E-05!#55)33U( __\ P #!4%"3U54 "$9,64%"3U54 !!T]+ 11 | M04)/550 ,+3D542$%#2TE-1S __\ ! #!4Q)3D53 "$9,64Q)3D53 12 | M !!5%,24Y% ""4Q)3D533$E35 #__P % ,(64Y#2$])0T4 +1DQ9 13 | M64Y#2$])0T4 $(64Y04D]-4%0 ()4T]-14-(05)3 # UE.,0 -0-9 14 | M3DX #<'04Y90TA!4@ . A#2$]314Y#2 .@5#3U5.5 .P193D]+ /__ 15 | M 8 P=,24Y%1T54 "D9,64Q)3D5'150 $(3$=04D]-4%0 ('3$=2 16 | M15!,60 P-13$< 0$3$=/2P#__P ' ,)1$E214-424]. #$9,641) 17 | M4D5#5$E/3@ !01$25(Q 5!$1)4CD !<'1$E21$]73@ &05$25)54 #_ 18 | M_P ( ,&35-'5TE. !!55035-' ""D=204)-4T=724X ,%1$Y-4T< 19 | M 0(35-'3$E.15, __\ "0 #!TY!345'150 *1DQ93D%-14=%5 @90 20 | M3$Y!344 0.3D542$%#2U!)0U154D4 __\ "@ #!5!!1T52 "$9,65!! 21 | @1T52 !!E%004=%4@#__P + ,&3DA)0T]. /____\ 22 | end 23 | -------------------------------------------------------------------------------- /win/gem/gr_rect.h: -------------------------------------------------------------------------------- 1 | /* gr_rect.h */ 2 | #include 3 | /********** structs **********/ 4 | typedef struct { 5 | GRECT *rects; 6 | int max,used; 7 | } dirty_rect; 8 | /********* functions ************/ 9 | dirty_rect *new_dirty_rect(int size); 10 | void delete_dirty_rect(dirty_rect *this); 11 | int add_dirty_rect(dirty_rect *dr,GRECT *area); 12 | int get_dirty_rect(dirty_rect* dr,GRECT *area); 13 | int clear_dirty_rect(dirty_rect *dr); 14 | int resize_dirty_rect(dirty_rect *dr,int new_size); 15 | -------------------------------------------------------------------------------- /win/gnome/README: -------------------------------------------------------------------------------- 1 | This directory contains the windowing code written for GnomeHack. The NetHack 2 | devteam is in the process of making it part of the normal distribution. 3 | It should be noted that this is still work in progress and that there are 4 | still problems with this code. So use at your own risk. Of course any 5 | contributions, especially bug fixes, are more than welcome! 6 | 7 | These files are based on the files from GnomeHack 1.0.5 by Erik Andersen. 8 | Some files have been renamed to fit into 8.3 name constraints (yuk!). 9 | These are: 10 | 11 | GnomeHack.h gnomeprv.h 12 | GnomeHackAskStringDialog.c gnaskstr.c 13 | GnomeHackAskStringDialog.h gnaskstr.h 14 | GnomeHackBind.c gnbind.c 15 | GnomeHackBind.h gnbind.h 16 | GnomeHackGlyph.c gnglyph.c 17 | GnomeHackGlyph.h gnglyph.h 18 | GnomeHackMainWindow.c gnmain.c 19 | GnomeHackMainWindow.h gnmain.h 20 | GnomeHackMapWindow.c gnmap.c 21 | GnomeHackMapWindow.h gnmap.h 22 | GnomeHackMenuWindow.c gnmenu.c 23 | GnomeHackMenuWindow.h gnmenu.h 24 | GnomeHackMessageWindow.c gnmesg.c 25 | GnomeHackMessageWindow.h gnmesg.h 26 | GnomeHackPlayerSelDialog.c gnplayer.c 27 | GnomeHackPlayerSelDialog.h gnplayer.h 28 | GnomeHackSettings.c gnopts.c 29 | GnomeHackSettings.h gnopts.h 30 | GnomeHackSignals.c gnsignal.c 31 | GnomeHackSignals.h gnsignal.h 32 | GnomeHackStatusWindow.c gnstatus.c 33 | GnomeHackStatusWindow.h gnstatus.h 34 | GnomeHackTextWindow.c gntext.c 35 | GnomeHackTextWindow.h gntext.h 36 | GnomeHackYesNoDialog.c gnyesno.c 37 | GnomeHackYesNoDialog.h gnyesno.h 38 | 39 | Other files have been removed because we don't or can't use them (yet). 40 | 41 | Makefile.am 42 | Makefile.in 43 | gnomehack.desktop 44 | gnomehack.desktop.in 45 | 46 | NetHack currently doesn't use autoconf, so the setup for that has not 47 | made the translation. 48 | 49 | Note: All loss in style, elegance, and readability is entirely our fault 50 | and not Erik's. 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /win/gnome/gnaskstr.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnaskstr.c 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #include "gnaskstr.h" 6 | #include "gnmain.h" 7 | #include 8 | 9 | 10 | static 11 | void ghack_ask_string_callback(gchar * string, gpointer data) 12 | { 13 | char **user_text = (char **) data; 14 | 15 | g_assert(user_text != NULL); 16 | 17 | *user_text = string; /* note - value must be g_free'd */ 18 | } 19 | 20 | 21 | int ghack_ask_string_dialog(const char *szMessageStr, 22 | const char *szDefaultStr, const char *szTitleStr, 23 | char *buffer) 24 | { 25 | int i; 26 | GtkWidget* dialog; 27 | gchar *user_text = NULL; 28 | 29 | dialog = gnome_request_dialog(FALSE, szMessageStr, 30 | szDefaultStr, 0, 31 | ghack_ask_string_callback, 32 | &user_text, NULL); 33 | g_assert(dialog != NULL); 34 | 35 | gtk_window_set_title(GTK_WINDOW(dialog), szTitleStr); 36 | 37 | gnome_dialog_set_default( GNOME_DIALOG(dialog), 0); 38 | gtk_window_set_modal( GTK_WINDOW(dialog), TRUE); 39 | gnome_dialog_set_parent (GNOME_DIALOG (dialog), 40 | GTK_WINDOW (ghack_get_main_window ()) ); 41 | 42 | i = gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); 43 | 44 | /* Quit */ 45 | if ( i != 0 || user_text == NULL ) { 46 | if (user_text) 47 | g_free(user_text); 48 | return -1; 49 | } 50 | 51 | if ( *user_text == 0 ) { 52 | g_free(user_text); 53 | return -1; 54 | } 55 | 56 | g_assert(strlen(user_text) > 0); 57 | strcpy (buffer, user_text); 58 | g_free(user_text); 59 | return 0; 60 | } 61 | 62 | -------------------------------------------------------------------------------- /win/gnome/gnaskstr.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnaskstr.h 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHackAskStringDialog_h 6 | #define GnomeHackAskStringDialog_h 7 | 8 | 9 | int ghack_ask_string_dialog(const char *szMessageStr, 10 | const char *szDefaultStr, const char *szTitleStr, 11 | char *buffer); 12 | 13 | #endif /* GnomeHackAskStringDialog_h */ 14 | 15 | -------------------------------------------------------------------------------- /win/gnome/gnglyph.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnglyph.h 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHackGlyph_h 6 | #define GnomeHackGlyph_h 7 | 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | /* the prototypes in system headers contain useless argument names 12 | that trigger spurious warnings if gcc's `-Wshadow' option is used */ 13 | #undef index 14 | #define index _hide_index_ 15 | #define time _hide_time_ 16 | 17 | #include 18 | #include 19 | 20 | #undef index 21 | #define index strchr 22 | #undef time 23 | 24 | 25 | extern short glyph2tile[]; /* From tile.c */ 26 | 27 | typedef struct { 28 | GdkImlibImage* im; 29 | int count; 30 | int width; 31 | int height; 32 | } GHackGlyphs; 33 | 34 | extern int ghack_init_glyphs( const char *); 35 | extern void ghack_free_glyphs( void); 36 | extern void ghack_dispose_glyphs( void); 37 | extern int ghack_glyph_count( void); 38 | extern GdkImlibImage* ghack_image_from_glyph( int, gboolean); 39 | extern int ghack_glyph_height( void); 40 | extern int ghack_glyph_width( void); 41 | 42 | #endif /* GnomeHackGlyph_h */ 43 | -------------------------------------------------------------------------------- /win/gnome/gnmain.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnmain.h 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHackMainWindow_h 6 | #define GnomeHackMainWindow_h 7 | 8 | #include 9 | #include 10 | 11 | 12 | void ghack_init_main_window( int argc, char** argv); 13 | void ghack_main_window_add_map_window(GtkWidget* win); 14 | void ghack_main_window_add_message_window(GtkWidget* win); 15 | void ghack_main_window_add_status_window(GtkWidget* win); 16 | void ghack_main_window_add_text_window(GtkWidget *); 17 | void ghack_main_window_add_worn_window(GtkWidget* win); 18 | void ghack_main_window_remove_window(GtkWidget *); 19 | void ghack_main_window_update_inventory(); 20 | void ghack_save_game_cb(GtkWidget *widget, gpointer data); 21 | GtkWidget* ghack_get_main_window(); 22 | 23 | 24 | 25 | #endif /* GnomeHackMainWindow_h */ 26 | 27 | -------------------------------------------------------------------------------- /win/gnome/gnmap.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnmap.h 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHackMapWindow_h 6 | #define GnomeHackMapWindow_h 7 | 8 | #include 9 | #include 10 | #include "config.h" 11 | #include "global.h" 12 | 13 | GtkWidget *ghack_init_map_window(void); 14 | void ghack_reinit_map_window(void); 15 | 16 | #endif /* GnomeHackMapWindow_h */ 17 | -------------------------------------------------------------------------------- /win/gnome/gnmenu.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnmenu.h 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHackMenuWindow_h 6 | #define GnomeHackMenuWindow_h 7 | 8 | #include 9 | #include "config.h" 10 | #include "global.h" 11 | #include "gnomeprv.h" 12 | 13 | GtkWidget* ghack_init_menu_window( void ); 14 | 15 | struct _GHackMenuItem 16 | { 17 | int glyph; 18 | const ANY_P *identifier; 19 | CHAR_P accelerator; 20 | CHAR_P group_accel; 21 | int attr; 22 | const char* str; 23 | BOOLEAN_P presel; 24 | }; 25 | 26 | typedef struct _GHackMenuItem GHackMenuItem; 27 | 28 | int ghack_menu_window_select_menu (GtkWidget *menuWin, 29 | MENU_ITEM_P **_selected, gint how); 30 | int ghack_menu_ext_cmd(void); 31 | 32 | #endif /* GnomeHackMenuWindow_h */ 33 | -------------------------------------------------------------------------------- /win/gnome/gnmesg.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnmesg.h 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHackMessageWindow_h 6 | #define GnomeHackMessageWindow_h 7 | 8 | #include 9 | #include "config.h" 10 | 11 | GtkWidget* ghack_init_message_window ( /* GnomeHackKeyBuffer g_keybuffer, 12 | GnomeHackClickBuffer g_clickbuffer */ ); 13 | void ghack_message_window_clear(GtkWidget *widget, gpointer data); 14 | void ghack_message_window_destroy(); 15 | void ghack_message_window_display(GtkWidget *widget, boolean block, 16 | gpointer data); 17 | void ghack_message_window_put_string(GtkWidget *widget, int attr, 18 | const char* text, gpointer data); 19 | void ghack_message_window_use_RIP(int how); 20 | void ghack_message_window_scroll(int dx, int dy); 21 | 22 | 23 | #endif /* GnomeHackMessageWindow_h */ 24 | -------------------------------------------------------------------------------- /win/gnome/gnomeprv.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnomeprv.h 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHack_h 6 | #define GnomeHack_h 7 | 8 | /* These are the base nethack include files */ 9 | #include "hack.h" 10 | #include "dlb.h" 11 | #include "patchlevel.h" 12 | 13 | #include "winGnome.h" 14 | 15 | #endif /* GnomeHack_h */ 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /win/gnome/gnopts.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnopts.h 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHackSettings_h 6 | #define GnomeHackSettings_h 7 | 8 | 9 | void ghack_settings_dialog( void); 10 | 11 | 12 | #endif /* GnomeHackSettings.h */ 13 | 14 | -------------------------------------------------------------------------------- /win/gnome/gnplayer.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnplayer.h 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHackPlayerSelDialog_h 6 | #define GnomeHackPlayerSelDialog_h 7 | 8 | int ghack_player_sel_dialog(const char **, const gchar*, const gchar*); 9 | 10 | #endif /* GnomeHackPlayerSelDialog_h */ 11 | -------------------------------------------------------------------------------- /win/gnome/gnsignal.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnsignal.h 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Anthony Taylor */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHackSignals_h 6 | #define GnomeHackSignals_h 7 | 8 | #include 9 | #include 10 | #include "gnomeprv.h" 11 | #include "gnglyph.h" 12 | 13 | /* The list of custom signals */ 14 | 15 | enum { 16 | GHSIG_CURS, 17 | GHSIG_PUTSTR, 18 | GHSIG_PRINT_GLYPH, 19 | GHSIG_CLEAR, 20 | GHSIG_DISPLAY, 21 | GHSIG_START_MENU, 22 | GHSIG_ADD_MENU, 23 | GHSIG_END_MENU, 24 | GHSIG_SELECT_MENU, 25 | GHSIG_CLIPAROUND, 26 | GHSIG_FADE_HIGHLIGHT, 27 | GHSIG_DELAY, 28 | GHSIG_LAST_SIG 29 | }; 30 | 31 | guint ghack_signals[GHSIG_LAST_SIG]; 32 | 33 | extern void ghack_init_signals( void); 34 | 35 | 36 | void ghack_handle_key_press(GtkWidget *widget, GdkEventKey *event, 37 | gpointer data); 38 | void ghack_handle_button_press(GtkWidget *widget, GdkEventButton *event, 39 | gpointer data); 40 | 41 | typedef struct { 42 | int x, y, mod; 43 | } GHClick; 44 | 45 | extern GList *g_keyBuffer; 46 | extern GList *g_clickBuffer; 47 | extern int g_numKeys; 48 | extern int g_numClicks; 49 | 50 | extern int g_askingQuestion; 51 | 52 | void ghack_delay( GtkWidget *win, int numMillisecs, gpointer data); 53 | 54 | 55 | #endif /* GnomeHackSignals_h */ 56 | 57 | -------------------------------------------------------------------------------- /win/gnome/gnstatus.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnstatus.h 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHackStatusWindow_h 6 | #define GnomeHackStatusWindow_h 7 | 8 | #include 9 | #include "config.h" 10 | #include "global.h" 11 | 12 | GtkWidget* ghack_init_status_window (); 13 | 14 | #endif /* GnomeHackStatusWindow_h */ 15 | -------------------------------------------------------------------------------- /win/gnome/gntext.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gntext.h 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHackTextWindow_h 6 | #define GnomeHackTextWindow_h 7 | 8 | #include 9 | #include "config.h" 10 | #include "global.h" 11 | 12 | GtkWidget* ghack_init_text_window ( ); 13 | void ghack_text_window_clear(GtkWidget *widget, gpointer data); 14 | void ghack_text_window_destroy(); 15 | void ghack_text_window_display(GtkWidget *widget, boolean block, 16 | gpointer data); 17 | void ghack_text_window_put_string(GtkWidget *widget, int attr, 18 | const char* text, gpointer data); 19 | void ghack_text_window_rip_string( const char* ripString); 20 | 21 | 22 | #endif /* GnomeHackTextWindow_h */ 23 | -------------------------------------------------------------------------------- /win/gnome/gnworn.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnbind.c 3.4 2002/04/15 */ 2 | /* Copyright (C) 2002 by Dylan Alex Simon */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHackWornWindow_h 6 | #define GnomeHackWornWindow_h 7 | 8 | #include 9 | #include "config.h" 10 | #include "global.h" 11 | 12 | GtkWidget* ghack_init_worn_window(); 13 | 14 | #endif /* GnomeHackWornWindow_h */ 15 | -------------------------------------------------------------------------------- /win/gnome/gnyesno.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnyesno.c 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #include "gnbind.h" 6 | #include "gnyesno.h" 7 | 8 | 9 | 10 | int ghack_yes_no_dialog( const char *question, 11 | const char *choices, int def) 12 | { 13 | int i=0, ret; 14 | gchar button_name[BUFSZ]; 15 | GtkWidget *box; 16 | GtkWidget* mainWnd=NULL; 17 | 18 | box = gnome_message_box_new ( question, GNOME_MESSAGE_BOX_QUESTION, NULL); 19 | /* add buttons for each choice */ 20 | if (!strcmp(GNOME_STOCK_BUTTON_OK, choices)) { 21 | gnome_dialog_append_button ( GNOME_DIALOG(box), GNOME_STOCK_BUTTON_OK); 22 | gnome_dialog_set_default( GNOME_DIALOG(box), 0); 23 | gnome_dialog_set_accelerator( GNOME_DIALOG(box), 0, 'o', 0); 24 | #if 0 25 | g_print("Setting accelerator '%c' for button %d\n", 'o', 0); 26 | #endif 27 | } 28 | else { 29 | for( ; choices[i]!='\0'; i++) { 30 | if (choices[i]=='y') { 31 | sprintf( button_name, GNOME_STOCK_BUTTON_YES); 32 | } 33 | else if (choices[i]=='n') { 34 | sprintf( button_name, GNOME_STOCK_BUTTON_NO); 35 | } 36 | else if (choices[i] == 'q') { 37 | sprintf( button_name, "Quit"); 38 | } else { 39 | sprintf( button_name, "%c", choices[i]); 40 | } 41 | if (def==choices[i]) 42 | gnome_dialog_set_default( GNOME_DIALOG(box), i); 43 | gnome_dialog_append_button ( GNOME_DIALOG(box), button_name); 44 | gnome_dialog_set_accelerator( GNOME_DIALOG(box), i, choices[i], 0); 45 | #if 0 46 | g_print("Setting accelerator '%c' for button %d\n", choices[i], i); 47 | #endif 48 | } 49 | } 50 | #if 0 51 | /* Perhaps add in a quit game button, like this... */ 52 | gnome_dialog_append_button ( GNOME_DIALOG(box), GNOME_STOCK_BUTTON_CLOSE); 53 | gnome_dialog_set_accelerator( GNOME_DIALOG(box), i, choices[i], 0); 54 | g_print("Setting accelerator '%c' for button %d\n", 'Q', i); 55 | #endif 56 | 57 | gnome_dialog_set_close(GNOME_DIALOG (box), TRUE); 58 | mainWnd = ghack_get_main_window (); 59 | gtk_window_set_modal( GTK_WINDOW(box), TRUE); 60 | gtk_window_set_title( GTK_WINDOW(box), "GnomeHack"); 61 | if ( mainWnd != NULL ) { 62 | gnome_dialog_set_parent (GNOME_DIALOG (box), 63 | GTK_WINDOW ( mainWnd) ); 64 | } 65 | 66 | ret=gnome_dialog_run_and_close ( GNOME_DIALOG (box)); 67 | 68 | #if 0 69 | g_print("You selected button %d\n", ret); 70 | #endif 71 | 72 | if (ret==-1) 73 | return( '\033'); 74 | else 75 | return( choices[ret]); 76 | } 77 | -------------------------------------------------------------------------------- /win/gnome/gnyesno.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)gnyesno.h 3.4 2000/07/16 */ 2 | /* Copyright (C) 1998 by Erik Andersen */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef GnomeHackYesNoDialog_h 6 | #define GnomeHackYesNoDialog_h 7 | 8 | int ghack_yes_no_dialog( const char* szQuestionStr, 9 | const char* szChoicesStr, int nDefault); 10 | 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /win/share/tile_t.h: -------------------------------------------------------------------------------- 1 | /* Definitions for creating compiling tiles. */ 2 | /* This is a mix of the vanilla NetHack and Slash'EM code. */ 3 | /* Modified 29 Oct 2010 by Alex Smith */ 4 | 5 | typedef unsigned char pixval; 6 | 7 | typedef struct { 8 | pixval r, g, b; 9 | } pixel; 10 | 11 | #define MAXCOLORMAPSIZE 256 12 | 13 | #define CM_RED 0 14 | #define CM_GREEN 1 15 | #define CM_BLUE 2 16 | 17 | #define DEFAULT_BACKGROUND { 71, 108, 108 } /* For transparency */ 18 | 19 | /* shared between reader and writer */ 20 | extern pixval ColorMap[3][MAXCOLORMAPSIZE]; 21 | extern int colorsinmap; 22 | /* writer's accumulated colormap */ 23 | extern pixval MainColorMap[3][MAXCOLORMAPSIZE]; 24 | extern int colorsinmainmap; 25 | 26 | #include "dlb.h" /* for MODEs */ 27 | 28 | /* maximum possible size of tiles */ 29 | #define MAX_TILE_X 128 30 | #define MAX_TILE_Y 128 31 | 32 | extern int tile_x, tile_y; 33 | 34 | #define Fprintf (void) fprintf 35 | 36 | #define pixel_equal(x,y) ((x.r == y.r) && (x.g == y.g) && (x.b == y.b)) 37 | 38 | extern boolean FDECL(fopen_text_file, (const char *, const char *)); 39 | extern boolean FDECL(read_text_tile, (pixel (*)[MAX_TILE_X])); 40 | extern boolean FDECL(write_text_tile, (pixel (*)[MAX_TILE_X])); 41 | extern boolean NDECL(fclose_text_file); 42 | 43 | extern void NDECL(init_colormap); 44 | extern void NDECL(merge_colormap); 45 | 46 | #if defined(MICRO) || defined(WIN32) 47 | #undef exit 48 | # if !defined(MSDOS) && !defined(WIN32) 49 | extern void FDECL(exit, (int)); 50 | # endif 51 | #endif 52 | -------------------------------------------------------------------------------- /win/win32/dgnstuff.mak: -------------------------------------------------------------------------------- 1 | #Set all of these or none of them 2 | #YACC = byacc.exe 3 | #LEX = flex.exe 4 | #YTABC = y_tab.c 5 | #YTABH = y_tab.h 6 | #LEXYYC = lexyy.c 7 | 8 | !IF "$(YACC)"!="" 9 | @echo Yacc-alike set to $(YACC) 10 | @echo YTABC set to $(YTABC) 11 | @echo YTABH set to $(YTABH) 12 | !ENDIF 13 | 14 | !IF "$(LEX)"!="" 15 | @echo Lex-alike set to $(LEX) 16 | @echo LEXYYC set to $(LEXYYC) 17 | !ENDIF 18 | 19 | default: all 20 | 21 | all: ..\util\dgn_yacc.c ..\util\dgn_lex.c 22 | 23 | rebuild: clean all 24 | 25 | clean: 26 | -del ..\util\dgn_lex.c 27 | -del ..\util\dgn_yacc.c 28 | -del ..\include\dgn_comp.h 29 | 30 | #========================================== 31 | # Dungeon Compiler Stuff 32 | #========================================== 33 | 34 | ..\util\dgn_yacc.c ..\include\dgn_comp.h : ..\util\dgn_comp.y 35 | !IF "$(YACC)"=="" 36 | @echo Using pre-built dgn_yacc.c and dgn_comp.h 37 | @copy ..\sys\share\dgn_yacc.c ..\util\dgn_yacc.c 38 | @copy ..\sys\share\dgn_comp.h ..\include\dgn_comp.h 39 | !ELSE 40 | chdir ..\util 41 | $(YACC) -d dgn_comp.y 42 | copy $(YTABC) $@ 43 | copy $(YTABH) ..\include\dgn_comp.h 44 | @del $(YTABC) 45 | @del $(YTABH) 46 | chdir ..\build 47 | !ENDIF 48 | 49 | ..\util\dgn_lex.c: ..\util\dgn_comp.l 50 | !IF "$(LEX)"=="" 51 | @echo Using pre-built dgn_lex.c 52 | @copy ..\sys\share\dgn_lex.c $@ 53 | !ELSE 54 | chdir ..\util 55 | $(LEX) dgn_comp.l 56 | copy $(LEXYYC) $@ 57 | @del $(LEXYYC) 58 | chdir ..\build 59 | !ENDIF 60 | -------------------------------------------------------------------------------- /win/win32/levstuff.mak: -------------------------------------------------------------------------------- 1 | #YACC = byacc.exe 2 | #LEX = flex.exe 3 | #YTABC = y_tab.c 4 | #YTABH = y_tab.h 5 | #LEXYYC = lexyy.c 6 | 7 | !IF "$(YACC)"!="" 8 | @echo Yacc-alike set to $(YACC) 9 | @echo YTABC set to $(YTABC) 10 | @echo YTABH set to $(YTABH) 11 | !ENDIF 12 | 13 | !IF "$(LEX)"!="" 14 | @echo Lex-alike set to $(LEX) 15 | @echo LEXYYC set to $(LEXYYC) 16 | !ENDIF 17 | 18 | 19 | default: all 20 | 21 | all: ..\util\lev_yacc.c ..\util\lev_lex.c 22 | 23 | rebuild: clean all 24 | 25 | clean: 26 | -del ..\util\lev_lex.c 27 | -del ..\util\lev_yacc.c 28 | -del ..\include\lev_comp.h 29 | 30 | #========================================== 31 | # Level Compiler Stuff 32 | #========================================== 33 | ..\util\lev_yacc.c ..\include\lev_comp.h: ..\util\lev_comp.y 34 | !IF "$(YACC)"=="" 35 | @echo Using pre-built lev_yacc.c and lev_comp.h 36 | @copy ..\sys\share\lev_yacc.c ..\util\lev_yacc.c 37 | @copy ..\sys\share\lev_comp.h ..\include\lev_comp.h 38 | !ELSE 39 | chdir ..\util 40 | $(YACC) -d lev_comp.y 41 | copy $(YTABC) $@ 42 | copy $(YTABH) ..\include\lev_comp.h 43 | @del $(YTABC) 44 | @del $(YTABH) 45 | chdir ..\build 46 | !ENDIF 47 | 48 | ..\util\lev_lex.c: ..\util\lev_comp.l 49 | !IF "$(LEX)"=="" 50 | @echo Using pre-built lev_lex.c 51 | @copy ..\sys\share\lev_lex.c $@ 52 | !ELSE 53 | chdir ..\util 54 | $(LEX) lev_comp.l 55 | copy $(LEXYYC) $@ 56 | @del $(LEXYYC) 57 | chdir ..\build 58 | !ENDIF 59 | 60 | -------------------------------------------------------------------------------- /win/win32/mhaskyn.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #include 5 | #include "winMS.h" 6 | #include "mhaskyn.h" 7 | 8 | int mswin_yes_no_dialog( const char *question, const char *choices, int def) 9 | { 10 | return '\032'; 11 | } 12 | -------------------------------------------------------------------------------- /win/win32/mhaskyn.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINAskYesNO_h 5 | #define MSWINAskYesNO_h 6 | 7 | #include "winMS.h" 8 | 9 | int mswin_yes_no_dialog( const char *question, const char *choices, int def); 10 | 11 | #endif /* MSWINAskYesNO_h */ 12 | -------------------------------------------------------------------------------- /win/win32/mhdlg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINDlgWindow_h 5 | #define MSWINDlgWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | int mswin_getlin_window (const char *question, char *result, size_t result_size); 12 | int mswin_ext_cmd_window (int* selection); 13 | int mswin_player_selection_window(int* selection); 14 | 15 | #endif /* MSWINDlgWindow_h */ 16 | -------------------------------------------------------------------------------- /win/win32/mhfont.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | /* font management functions */ 5 | 6 | #ifndef MSWINFont_h 7 | #define MSWINFont_h 8 | 9 | #include "winMS.h" 10 | 11 | HGDIOBJ mswin_get_font(int win_type, int attr, HDC hdc, BOOL replace); 12 | void mswin_init_splashfonts(HWND hWnd); 13 | void mswin_destroy_splashfonts(void); 14 | UINT mswin_charset(void); 15 | 16 | #endif /* MSWINFont_h */ 17 | -------------------------------------------------------------------------------- /win/win32/mhinput.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #include 5 | #include "winMS.h" 6 | #include "mhinput.h" 7 | 8 | /* nethack input queue functions */ 9 | 10 | #define NH_INPUT_BUFFER_SIZE 64 11 | 12 | /* as it stands right now we need only one slot 13 | since events are processed almost the same time as 14 | they occur but I like large round numbers */ 15 | 16 | static MSNHEvent nhi_input_buffer[NH_INPUT_BUFFER_SIZE]; 17 | static int nhi_init_input = 0; 18 | static int nhi_read_pos = 0; 19 | static int nhi_write_pos = 0; 20 | 21 | /* initialize input queue */ 22 | void mswin_nh_input_init(void) 23 | { 24 | if( !nhi_init_input ) { 25 | nhi_init_input = 1; 26 | 27 | ZeroMemory( nhi_input_buffer, sizeof(nhi_input_buffer) ); 28 | nhi_read_pos = 0; 29 | nhi_write_pos = 0; 30 | } 31 | } 32 | 33 | /* check for input */ 34 | int mswin_have_input() 35 | { 36 | return (nhi_read_pos!=nhi_write_pos); 37 | } 38 | 39 | /* add event to the queue */ 40 | void mswin_input_push(PMSNHEvent event) 41 | { 42 | int new_write_pos; 43 | 44 | if( !nhi_init_input ) mswin_nh_input_init(); 45 | 46 | new_write_pos = (nhi_write_pos+1) % NH_INPUT_BUFFER_SIZE; 47 | 48 | if(new_write_pos!=nhi_read_pos) { 49 | memcpy(nhi_input_buffer+nhi_write_pos, event, sizeof(*event)); 50 | nhi_write_pos = new_write_pos; 51 | } 52 | 53 | } 54 | 55 | /* get event from the queue and delete it */ 56 | PMSNHEvent mswin_input_pop() 57 | { 58 | PMSNHEvent retval; 59 | 60 | if( !nhi_init_input ) mswin_nh_input_init(); 61 | 62 | if( nhi_read_pos!=nhi_write_pos ) { 63 | retval = &nhi_input_buffer[nhi_read_pos]; 64 | nhi_read_pos = (nhi_read_pos+1) % NH_INPUT_BUFFER_SIZE; 65 | } else { 66 | retval = NULL; 67 | } 68 | 69 | return retval; 70 | } 71 | 72 | /* get event from the queue but leave it there */ 73 | PMSNHEvent mswin_input_peek() 74 | { 75 | PMSNHEvent retval; 76 | 77 | if( !nhi_init_input ) mswin_nh_input_init(); 78 | 79 | if( nhi_read_pos!=nhi_write_pos ) { 80 | retval = &nhi_input_buffer[nhi_read_pos]; 81 | } else { 82 | retval = NULL; 83 | } 84 | return retval; 85 | } 86 | -------------------------------------------------------------------------------- /win/win32/mhinput.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINInput_h 5 | #define MSWINInput_h 6 | 7 | /* nethack input queue - store/extract input events */ 8 | #include "winMS.h" 9 | 10 | #define NHEVENT_CHAR 1 11 | #define NHEVENT_MOUSE 2 12 | typedef struct mswin_event { 13 | int type; 14 | union { 15 | struct { 16 | int ch; 17 | } kbd; 18 | 19 | struct { 20 | int mod; 21 | int x, y; 22 | } ms; 23 | }; 24 | } MSNHEvent, *PMSNHEvent; 25 | 26 | #define NHEVENT_KBD(c) { MSNHEvent e; e.type=NHEVENT_CHAR; e.kbd.ch=(c); mswin_input_push(&e); } 27 | #define NHEVENT_MS(_mod, _x, _y) { MSNHEvent e; e.type=NHEVENT_MOUSE; e.ms.mod = (_mod); e.ms.x=(_x); e.ms.y=(_y); mswin_input_push(&e); } 28 | 29 | void mswin_nh_input_init(void); 30 | int mswin_have_input(void); 31 | void mswin_input_push(PMSNHEvent event); 32 | PMSNHEvent mswin_input_pop(void); 33 | PMSNHEvent mswin_input_peek(void); 34 | 35 | #endif /* MSWINInput_h */ 36 | -------------------------------------------------------------------------------- /win/win32/mhmain.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINMainWindow_h 5 | #define MSWINMainWindow_h 6 | 7 | /* this is a main appliation window */ 8 | 9 | #include "winMS.h" 10 | 11 | HWND mswin_init_main_window (void); 12 | void mswin_layout_main_window(HWND changed_child); 13 | void mswin_select_map_mode(int map_mode); 14 | void mswin_menu_check_intf_mode(void); 15 | 16 | #endif /* MSWINMainWindow_h */ 17 | -------------------------------------------------------------------------------- /win/win32/mhmap.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINMapWindow_h 5 | #define MSWINMapWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | 12 | HWND mswin_init_map_window (void); 13 | void mswin_map_stretch(HWND hWnd, LPSIZE lpsz, BOOL redraw); 14 | int mswin_map_mode(HWND hWnd, int mode); 15 | 16 | #define ROGUE_LEVEL_MAP_MODE MAP_MODE_ASCII12x16 17 | 18 | #define DEF_CLIPAROUND_MARGIN 5 19 | #define DEF_CLIPAROUND_AMOUNT 1 20 | 21 | #endif /* MSWINMapWindow_h */ 22 | -------------------------------------------------------------------------------- /win/win32/mhmenu.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINMenuWindow_h 5 | #define MSWINMenuWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | #define MENU_TYPE_TEXT 1 12 | #define MENU_TYPE_MENU 2 13 | 14 | HWND mswin_init_menu_window ( int type ); 15 | int mswin_menu_window_select_menu (HWND hwnd, int how, MENU_ITEM_P **); 16 | void mswin_menu_window_size (HWND hwnd, LPSIZE sz); 17 | 18 | #endif /* MSWINTextWindow_h */ 19 | -------------------------------------------------------------------------------- /win/win32/mhmsg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MHNethackMessages_H 5 | #define MHNethackMessages_H 6 | 7 | /* nethack messages */ 8 | #define WM_MSNH_COMMAND (WM_APP+1) 9 | 10 | #define MSNH_MSG_ADDWND 100 11 | #define MSNH_MSG_PUTSTR 101 12 | #define MSNH_MSG_PRINT_GLYPH 102 13 | #define MSNH_MSG_CLEAR_WINDOW 103 14 | #define MSNH_MSG_CLIPAROUND 104 15 | #define MSNH_MSG_STARTMENU 105 16 | #define MSNH_MSG_ADDMENU 106 17 | #define MSNH_MSG_CURSOR 107 18 | #define MSNH_MSG_ENDMENU 108 19 | #define MSNH_MSG_DIED 109 20 | #define MSNH_MSG_CARET 110 21 | 22 | typedef struct mswin_nhmsg_add_wnd { 23 | winid wid; 24 | } MSNHMsgAddWnd, *PMSNHMsgAddWnd; 25 | 26 | typedef struct mswin_nhmsg_putstr { 27 | int attr; 28 | const char* text; 29 | boolean append; 30 | } MSNHMsgPutstr, *PMSNHMsgPutstr; 31 | 32 | typedef struct mswin_nhmsg_print_glyph { 33 | XCHAR_P x; 34 | XCHAR_P y; 35 | int glyph; 36 | } MSNHMsgPrintGlyph, *PMSNHMsgPrintGlyph; 37 | 38 | typedef struct mswin_nhmsg_cliparound { 39 | int x; 40 | int y; 41 | } MSNHMsgClipAround, *PMSNHMsgClipAround; 42 | 43 | typedef struct mswin_nhmsg_add_menu { 44 | int glyph; 45 | const ANY_P* identifier; 46 | CHAR_P accelerator; 47 | CHAR_P group_accel; 48 | int attr; 49 | const char * str; 50 | BOOLEAN_P presel; 51 | } MSNHMsgAddMenu, *PMSNHMsgAddMenu; 52 | 53 | typedef struct mswin_nhmsg_cursor { 54 | int x; 55 | int y; 56 | } MSNHMsgCursor, *PMSNHMsgCursor; 57 | 58 | typedef struct mswin_nhmsg_end_menu { 59 | const char* text; 60 | } MSNHMsgEndMenu, *PMSNHMsgEndMenu; 61 | 62 | #endif 63 | -------------------------------------------------------------------------------- /win/win32/mhmsgwnd.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINMessageWindow_h 5 | #define MSWINMessageWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | HWND mswin_init_message_window (void); 12 | void mswin_message_window_size (HWND hWnd, LPSIZE sz); 13 | 14 | 15 | #endif /* MSWINMessageWindow_h */ 16 | -------------------------------------------------------------------------------- /win/win32/mhrip.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINRIPWindow_h 5 | #define MSWINRIPWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | void mswin_finish_rip_text(winid wid); 12 | HWND mswin_init_RIP_window (void); 13 | void mswin_display_RIP_window (HWND hwnd); 14 | 15 | #endif /* MSWINRIPWindow_h */ 16 | -------------------------------------------------------------------------------- /win/win32/mhsplash.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2002 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINSplashWindow_h 5 | #define MSWINSplashWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | void mswin_display_splash_window (BOOL); 12 | 13 | #endif /* MSWINSplashWindow_h */ 14 | -------------------------------------------------------------------------------- /win/win32/mhstatus.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINStatusWindow_h 5 | #define MSWINStatusWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | HWND mswin_init_status_window (void); 12 | void mswin_status_window_size (HWND hWnd, LPSIZE sz); 13 | 14 | #endif /* MSWINStatusWindow_h */ 15 | -------------------------------------------------------------------------------- /win/win32/mhtext.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2001 by Alex Kompel */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | #ifndef MSWINTextWindow_h 5 | #define MSWINTextWindow_h 6 | 7 | #include "winMS.h" 8 | #include "config.h" 9 | #include "global.h" 10 | 11 | HWND mswin_init_text_window (void); 12 | void mswin_display_text_window (HWND hwnd); 13 | 14 | #endif /* MSWINTextWindow_h */ 15 | -------------------------------------------------------------------------------- /win/win32/mnsel.uu: -------------------------------------------------------------------------------- 1 | begin 600 mnsel.bmp 2 | M0DU^`````````#X````H````$````!`````!``$``````$````!T$@``=!(` 3 | M`````````````````/___P```````````#_\```W_```,_P``"7\```F_``` 4 | D)WP``">\```_W```/^P``#_T```__```/_P````````````` 5 | ` 6 | end 7 | -------------------------------------------------------------------------------- /win/win32/mnselcnt.uu: -------------------------------------------------------------------------------- 1 | begin 600 mnselcnt.bmp 2 | M0DU^`````````#X````H````$````!`````!``$``````$````!T$@``=!(` 3 | M`````````````````/___P```````````#_\```__```.]P``#`,```[W``` 4 | D.]P``#O<```[W```,`P``#O<```__```/_P````````````` 5 | ` 6 | end 7 | -------------------------------------------------------------------------------- /win/win32/mnunsel.uu: -------------------------------------------------------------------------------- 1 | begin 600 mnunsel.bmp 2 | M0DU^`````````#X````H````$````!`````!``$``````$````!T$@``=!(` 3 | M`````````````````/___P```````````#_\```__```/_P``#_\```__``` 4 | D/_P``#_\```__```/_P``#_\```__```/_P````````````` 5 | ` 6 | end 7 | -------------------------------------------------------------------------------- /win/win32/petmark.uu: -------------------------------------------------------------------------------- 1 | begin 600 petmark.bmp 2 | M0DWV`````````'8````H````$````!`````!``0``````(`````````````` 3 | M````````````;&Q'````_P```````("``(````"``(``@(```,#`P`#`W,`` 4 | M\,JF``0$!``("`@`#`P,`!$1$0`6%A8`'!P<```````````````````````` 5 | M```````````````````````````````````````````````````````````` 6 | M``````````````````````````````````````````````````````$````` 7 | 5````$1````````$1$0```````!`0 8 | ` 9 | end 10 | -------------------------------------------------------------------------------- /win/win32/tiles.mak: -------------------------------------------------------------------------------- 1 | default: all 2 | 3 | all: ..\win\win32\tiles.bmp 4 | 5 | clean: 6 | -del ..\src\win\win32\tiles.bmp 7 | -del ..\win\win32\tiles.bmp 8 | 9 | #========================================== 10 | # Building the tiles file tile.bmp 11 | #========================================== 12 | 13 | ..\src\tiles.bmp : ..\win\share\monsters.txt ..\win\share\objects.txt \ 14 | ..\win\share\other.txt 15 | chdir ..\src 16 | ..\util\tile2bmp.exe tiles.bmp 17 | chdir ..\build 18 | 19 | ..\win\win32\tiles.bmp: ..\src\tiles.bmp 20 | @copy ..\src\tiles.bmp ..\win\win32\tiles.bmp 21 | 22 | --------------------------------------------------------------------------------