├── .gitignore ├── Files ├── Porting ├── README.34 ├── README.gtk ├── dat ├── Arch.des ├── Barb.des ├── Caveman.des ├── Flame.des ├── Healer.des ├── Ice.des ├── Knight.des ├── Monk.des ├── Necro.des ├── Priest.des ├── Ranger.des ├── Rogue.des ├── Samurai.des ├── Slayer.des ├── Tourist.des ├── Valkyrie.des ├── Wizard.des ├── Yeoman.des ├── beholder.des ├── bigroom.des ├── blkmar.des ├── castle.des ├── cmdhelp ├── credit.xpm ├── data.base ├── dragons.des ├── dungeon.def ├── endgame.des ├── frnknstn.des ├── gehennom.des ├── giants.des ├── grund.des ├── guild.des ├── gypsy.txt ├── help ├── hh ├── history ├── knox.des ├── kobold-1.des ├── kobold-2.des ├── license ├── lich.des ├── mall-1.des ├── mall-2.des ├── medusa.des ├── mines.des ├── mtemple.des ├── newmall.des ├── nightmar.des ├── nymph.des ├── opthelp ├── oracle.des ├── oracles.txt ├── pet_mark.pbm ├── quest.txt ├── rats.des ├── rumors.fal ├── rumors.tru ├── sea.des ├── sokoban.des ├── spiders.des ├── stor-1.des ├── stor-2.des ├── stor-3.des ├── template.des ├── tomb.des ├── tower.des ├── wizhelp └── yendor.des ├── doc ├── Guidebook.mn ├── Guidebook.tex ├── Guidebook.txt ├── dgn_comp.6 ├── dgn_comp.txt ├── dlb.6 ├── dlb.txt ├── fr │ └── slashem.6 ├── lev_comp.6 ├── lev_comp.txt ├── nethack.6 ├── proxy.doc ├── recover.6 ├── recover.txt ├── slashem.6 ├── slashem.txt ├── sources.txt ├── strategy.txt ├── tmac.n └── window.doc ├── history.txt ├── include ├── align.h ├── amiconf.h ├── androidconf.h ├── artifact.h ├── artilist.h ├── attk.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 ├── egyp.h ├── emin.h ├── engrave.h ├── epri.h ├── eshk.h ├── extern.h ├── file.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 ├── md5.h ├── mfndpos.h ├── micro.h ├── mkroom.h ├── monattk.h ├── mondata.h ├── monflag.h ├── monst.h ├── monsym.h ├── mttypriv.h ├── nhlan.h ├── nhxdr.h ├── ntconf.h ├── obj.h ├── objclass.h ├── os2conf.h ├── patchlevel.h ├── pcconf.h ├── permonst.h ├── prop.h ├── proxycb.h ├── proxycom.h ├── prxyclnt.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 ├── tech.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 ├── winGTK.h ├── winGnome.h ├── winX.h ├── winami.h ├── wingem.h ├── winprocs.h ├── winproxy.h ├── wintty.h ├── wintype.h ├── xwindow.h ├── xwindowp.h ├── you.h └── youprop.h ├── make_anh.txt ├── readme.s6 ├── readme.txt ├── slamfaq.txt ├── src ├── allmain.c ├── alloc.c ├── apply.c ├── artifact.c ├── attrib.c ├── ball.c ├── bones.c ├── borg.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 ├── gypsy.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 ├── tech.c ├── teleport.c ├── timeout.c ├── topten.c ├── track.c ├── trap.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 ├── android │ ├── AndroidManifest.xml │ ├── Makefile.dat │ ├── Makefile.doc │ ├── Makefile.src │ ├── Makefile.top │ ├── Makefile.utl │ ├── README │ ├── androidmain.c │ ├── androidunix.c │ ├── assets │ │ ├── fonts │ │ │ └── monobold.ttf │ │ └── ver │ ├── defaults.nh │ ├── res │ │ ├── drawable-nodpi │ │ │ ├── abigaba_24.png │ │ │ ├── default_32.png │ │ │ ├── geoduck_20x40.png │ │ │ ├── itakura_32.png │ │ │ └── overlays.png │ │ ├── drawable │ │ │ └── icon.png │ │ ├── values │ │ │ ├── config.xml │ │ │ ├── credits.xml │ │ │ └── tiles.xml │ │ └── xml │ │ │ └── meta.xml │ ├── setup.sh │ ├── slashem.iml │ ├── winandroid.c │ └── winandroid.h ├── atari │ ├── Install.tos │ ├── atarifnt.uue │ ├── nethack.mnu │ ├── setup.g │ ├── tos.c │ └── unx2atar.sed ├── be │ ├── README │ └── bemain.c ├── mac │ ├── Files.r │ ├── Install.mpw │ ├── Install.mw │ ├── Levels.make │ ├── MFiles.r │ ├── MRecover.r │ ├── MacHelp │ ├── Macintosh.make │ ├── NHDeflts │ ├── NHrsrc.r │ ├── NHsound.r │ ├── News │ ├── README.txt │ ├── dprintf.c │ ├── maccurs.c │ ├── macerrs.c │ ├── macfile.c │ ├── machelp.bh │ ├── macmain.c │ ├── macmenu.c │ ├── macsnd.c │ ├── mactopl.c │ ├── mactty.c │ ├── macunix.c │ ├── macwin.c │ ├── mgetline.c │ ├── mmodal.c │ ├── mrecover.c │ └── mttymain.c ├── msdos │ ├── 2xsai.c │ ├── 2xsai.h │ ├── 2xtest.c │ ├── Install.dos │ ├── Makefile.BC │ ├── Makefile.GCC │ ├── Makefile.MSC │ ├── NHAccess.nh │ ├── alfuncs.h │ ├── alginit.h │ ├── alleg.cnf │ ├── alnames.h │ ├── anethack.fnt │ ├── anethack.txt │ ├── bmp2txt.c │ ├── idx2bmp.c │ ├── loadfont.h │ ├── maintovl.doc │ ├── makefile.doc │ ├── 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 │ ├── template.mak │ ├── tile2bin.c │ ├── tiles │ │ ├── 16off.bmp │ │ ├── 16on.bmp │ │ ├── 32off.bmp │ │ ├── 32on.bmp │ │ ├── credits │ │ ├── curs3d-2.bmp │ │ ├── cursor.bmp │ │ ├── cursor3d.bmp │ │ ├── error.bmp │ │ ├── index │ │ ├── map.bmp │ │ ├── pal.bmp │ │ ├── spfx │ │ │ ├── acidball.bmp │ │ │ ├── attack.bmp │ │ │ ├── balllit.bmp │ │ │ ├── cleric.bmp │ │ │ ├── divine.bmp │ │ │ ├── dthfield.bmp │ │ │ ├── enchant.bmp │ │ │ ├── escape.bmp │ │ │ ├── fail.bmp │ │ │ ├── fireball.bmp │ │ │ ├── gasspore.bmp │ │ │ ├── heal.bmp │ │ │ ├── magblast.bmp │ │ │ ├── matter.bmp │ │ │ ├── poisball.bmp │ │ │ ├── sleepexp.bmp │ │ │ └── snowball.bmp │ │ ├── subs │ │ │ ├── altarc.bmp │ │ │ ├── altarl.bmp │ │ │ ├── altarm.bmp │ │ │ ├── altarn.bmp │ │ │ ├── kni_fem.bmp │ │ │ ├── pri_femc.bmp │ │ │ ├── pri_feml.bmp │ │ │ ├── pri_femn.bmp │ │ │ ├── pri_malc.bmp │ │ │ ├── pri_mall.bmp │ │ │ ├── pri_maln.bmp │ │ │ ├── rog_fem.bmp │ │ │ ├── tou_fem.bmp │ │ │ └── wiz_fem.bmp │ │ ├── title.bmp │ │ └── titlebg.bmp │ ├── txt2bmp.c │ ├── vidal2.c │ ├── vidalleg.c │ ├── video.c │ ├── vidtxt.c │ └── vidvga.c ├── os2 │ ├── Install.os2 │ ├── Makefile.os2 │ ├── nhpmico.uu │ ├── os2.c │ └── setup.cmd ├── 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 │ ├── slashem.ico │ ├── 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 │ ├── cpp1.shr │ ├── cpp2.shr │ ├── cpp3.shr │ ├── depend.awk │ ├── nethack.sh │ ├── 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 │ ├── mksetup.bat │ ├── mswproc.c │ ├── newres.h │ ├── resource.h │ ├── slashem.inf │ ├── slashem.ini │ ├── winMS.h │ ├── winhack.c │ ├── winhack.rc │ ├── winhcksp.rc │ └── winmain.c └── winnt │ ├── Install.gcc │ ├── Install.nt │ ├── Makefile.bcc │ ├── Makefile.cygwin │ ├── Makefile.gcc │ ├── Makefile.msc │ ├── Makefile.nt │ ├── console.rc │ ├── defaults.nh │ ├── mapimail.c │ ├── nethack.def │ ├── nh340key.c │ ├── nhdefkey.c │ ├── nhico.uu │ ├── nhraykey.c │ ├── nhsetup.bat │ ├── ntsound.c │ ├── nttty.c │ ├── porthelp │ ├── seico.uu │ ├── setup.bat │ ├── slashem.rc │ ├── win32api.h │ ├── winnt.c │ └── winnt.cnf ├── 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 ├── kse-mini.xpm ├── kse.xpm ├── kslashem.lnk ├── nhicns.uu ├── nhsplash.xpm ├── qpe-nethack.control ├── qt_clust.cpp ├── qt_win.cpp ├── qttableview.cpp ├── tileedit.cpp └── tileedit.h ├── X11 ├── Install.X11 ├── SlashEM.ad ├── Window.c ├── dialogs.c ├── ibm.bdf ├── nh10.bdf ├── nh32icon ├── nh56icon ├── nh72icon ├── nh_icon.xpm ├── pet_mark.xbm ├── rip.xpm ├── slashem.rc ├── 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 ├── gtk ├── GTKRC ├── GTKRC.w32 ├── Install.GTK ├── Makefile.unx ├── Makefile.w32 ├── cc-gtk.c ├── gtk.c ├── gtkconcb.c ├── gtkconcb.h ├── gtkconnect.c ├── gtkconnect.glade ├── gtkconnect.gladep ├── gtkconnect.h ├── gtkext.c ├── gtkextcmd.c ├── gtkgetlin.c ├── gtkhack.c ├── gtkhackrc.c ├── gtkint.c ├── gtkmap.c ├── gtkmenu.c ├── gtkmessage.c ├── gtkmisc.c ├── gtkprefs.c ├── gtkprogress.c ├── gtkprogress.h ├── gtkstatus.c ├── gtksupport.c ├── gtksupport.h ├── gtktile.c ├── gtkyn.c ├── panic.c └── xshmmap.c ├── proxy ├── Install.pxy ├── Makefile.unx ├── Makefile.w32 ├── callback.c ├── compxdr.c ├── dlbh.c ├── ext_protocol.html ├── getopt.c ├── glyphmap.c ├── mapid.c ├── md5.c ├── nhext.c ├── nhextio.c ├── nhextnb.c ├── nhextxdr.c ├── nhxdr.c ├── proxycb.c ├── proxysvc.c ├── prxychar.c ├── prxyconn.c ├── prxymap.c ├── prxytile.c ├── riputil.c ├── test_com.c ├── test_com.h ├── test_ext.c ├── test_io.c ├── test_xdr.c └── winproxy.c ├── share ├── bigtile.c ├── extras.txt ├── gifread.c ├── magtile.c ├── mapmerge.c ├── mon32al2.txt ├── mon32alg.txt ├── mon32aw.txt ├── mon32mi.txt ├── mon32se.txt ├── mon3dmi.txt ├── monsters.map ├── monsters.txt ├── obj32al2.txt ├── obj32alg.txt ├── obj32mi.txt ├── obj32se.txt ├── objects.map ├── objects.txt ├── oth-2kmi.txt ├── oth32al2.txt ├── oth32alg.txt ├── oth32fl.txt ├── oth32mi.txt ├── oth32se.txt ├── oth3dmi.txt ├── oth3dse.txt ├── other.map ├── other.txt ├── palette.txt ├── ppmwrite.c ├── scripts │ ├── import-alg.sh │ ├── import-mi.sh │ ├── mon32mix.txt │ └── obj32mix.txt ├── thintile.c ├── tile.doc ├── tile2bmp.c ├── tile2png.c ├── tile_t.h ├── tilemap.c ├── tiletext.c ├── txtbg.c ├── txtfilt.c ├── txtmerge.c ├── xpmread.c └── zap.txt ├── 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 ├── magtile.dsp ├── 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 ├── nhprocs.c ├── nhwin32.h ├── nhwin32.rc ├── petmark.uu ├── recover.dsp ├── resource.h ├── rip.uu ├── splash.uu ├── tile2bmp.dsp ├── tilemap.dsp ├── tiles.dsp ├── tiles.mak ├── tiles128.dsp ├── tiles128.mak ├── txtbg.dsp ├── txtmerge.dsp ├── uudecode.dsp ├── win32msg.c ├── winMS.h ├── winhack.c ├── winhack.rc └── winmain.c /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *.swo 3 | compile 4 | .idea 5 | out 6 | 7 | # / 8 | /Makefile 9 | /config.log 10 | /config.status 11 | /tags 12 | /TAGS 13 | /.svn 14 | 15 | # /dat/ 16 | /dat/Makefile 17 | /dat/*.lev 18 | /dat/data 19 | /dat/dungeon.pdf 20 | /dat/dungeon 21 | /dat/nhdat 22 | /dat/options 23 | /dat/oracles 24 | /dat/quest.dat 25 | /dat/quest_levs 26 | /dat/rumors 27 | /dat/spec_levs 28 | /dat/vaults.dat 29 | 30 | # /doc/ 31 | /doc/Makefile 32 | /doc/Guidebook.txt 33 | 34 | # /include/ 35 | /include/autoconf.h 36 | /include/autoconf_paths.h 37 | /include/date.h 38 | /include/dgn_comp.h 39 | /include/lev_comp.h 40 | /include/onames.h 41 | /include/pm.h 42 | /include/vis_tab.h 43 | /include/win32api.h 44 | 45 | # /src/ 46 | /src/*.o 47 | /src/nhwin.a 48 | /src/unnethack 49 | /src/Makefile 50 | /src/Sysunix 51 | /src/config.h-t 52 | /src/hack.h-t 53 | /src/vis_tab.c 54 | /src/monstr.c 55 | /src/tile.c 56 | /src/Sysandroid 57 | 58 | # /util/ 59 | /util/*.o 60 | /util/Makefile 61 | /util/dgn_comp 62 | /util/dgn_lex.c 63 | /util/dgn_yacc.c 64 | /util/dlb 65 | /util/lev_comp 66 | /util/lev_lex.c 67 | /util/lev_yacc.c 68 | /util/makedefs 69 | /util/recover 70 | /util/tilemap 71 | 72 | # /win/ 73 | /win/*/*.o 74 | 75 | 76 | /sys/android/bin 77 | /sys/android/libs 78 | /sys/android/assets/unnethackdir 79 | /sys/android/gen 80 | -------------------------------------------------------------------------------- /README.gtk: -------------------------------------------------------------------------------- 1 | 2 | GTK-NetHack 3 | 4 | Copyright 1999 I.Numata 5 | 6 | COPYRIGHT NOTICE 7 | 8 | GTK NetHack is an interface for NetHack using the GTK+ library. You must read 9 | the original license (dat/license) and obey it to redistribute and modify 10 | this program. GTK NetHack obeys the original license completely. GTK 11 | part copyright belongs to the author. 12 | 13 | To play in GTK+, add the following line to your .slashemrc: 14 | 15 | OPTIONS=windowtype:gtk 16 | -------------------------------------------------------------------------------- /dat/data.base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/dat/data.base -------------------------------------------------------------------------------- /dat/nymph.des: -------------------------------------------------------------------------------- 1 | # 2 | # Nymph level 3 | # 4 | 5 | LEVEL: "nymph" 6 | RANDOM_MONSTERS: 'n' 7 | ROOM: "ordinary" , unlit, random, random, (12,7) 8 | NAME: "central" 9 | OBJECT:'(',"chest",random 10 | OBJECT:'(',"chest",random 11 | OBJECT:'(',"chest",random 12 | OBJECT:'(',"chest",random 13 | OBJECT: '=', random, random 14 | OBJECT: '=', random, random 15 | OBJECT: '=', random, random 16 | OBJECT: '=', random, random 17 | OBJECT: '*', random, random 18 | OBJECT: '*', random, random 19 | OBJECT: '*', random, random 20 | OBJECT: '*', random, random 21 | OBJECT: '*', random, random 22 | OBJECT: random, random, random 23 | OBJECT: random, random, random 24 | OBJECT: random, random, random 25 | OBJECT: random, random, random 26 | MONSTER: 'n', random, random, hostile 27 | MONSTER: 'n', random, random, hostile 28 | MONSTER: 'n', random, random, hostile 29 | MONSTER: 'n', random, random, hostile 30 | MONSTER: 'n', random, random, hostile 31 | MONSTER: 'n', "Aphrodite", random, hostile 32 | 33 | ROOM: "ordinary" , random, random, random, random 34 | STAIR: random, up 35 | OBJECT: random,random,random 36 | MONSTER: 'n', random, random, hostile 37 | 38 | ROOM: "ordinary" , random, random, random, random 39 | STAIR: random, down 40 | OBJECT: random, random, random 41 | TRAP: random, random 42 | MONSTER: 'n', random, random, hostile 43 | 44 | ROOM: "ordinary" , random, random, random, random 45 | OBJECT: random, random, random 46 | OBJECT: random, random, random 47 | MONSTER: 'n', random, random, hostile 48 | 49 | ROOM: "ordinary" , random, random, random, random 50 | OBJECT: random, random, random 51 | TRAP: random, random 52 | MONSTER: 'n', random, random, hostile 53 | 54 | ROOM: "ordinary" , random, random, random, random 55 | OBJECT: random, random, random 56 | TRAP: random, random 57 | MONSTER: 'n', random, random, hostile 58 | 59 | RANDOM_CORRIDORS 60 | -------------------------------------------------------------------------------- /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/pet_mark.pbm: -------------------------------------------------------------------------------- 1 | P48 76> -------------------------------------------------------------------------------- /dat/stor-1.des: -------------------------------------------------------------------------------- 1 | # 2 | # Storage level (#1) 3 | # 4 | 5 | LEVEL: "stor-1" 6 | 7 | ROOM: "ordinary", unlit, random, random, (4,4) 8 | NAME: "central" 9 | OBJECT:'(',"chest",(2,2) 10 | OBJECT:'/',random,(2,2) 11 | OBJECT:'(',random,(2,2) 12 | OBJECT:'(',random,(2,2) 13 | OBJECT:'"',random,(2,2) 14 | OBJECT:'=',random,(2,2) 15 | ENGRAVING:(2,2),burn,"Begone! Keep Off! Shoo!" 16 | TRAP: random, random 17 | TRAP: random, random 18 | TRAP: random, random 19 | 20 | ROOM: "ordinary" , random, random, random, random 21 | STAIR: random, up 22 | OBJECT: random,random,random 23 | MONSTER: random, random, random, hostile 24 | 25 | ROOM: "ordinary" , random, random, random, random 26 | STAIR: random, down 27 | OBJECT: random, random, random 28 | TRAP: random, random 29 | MONSTER: random, random, random, hostile 30 | 31 | ROOM: "ordinary" , random, random, random, random 32 | OBJECT: random, random, random 33 | OBJECT: random, random, random 34 | MONSTER: random, random, random, hostile 35 | 36 | ROOM: "ordinary" , random, random, random, random 37 | OBJECT: random, random, random 38 | TRAP: random, random 39 | MONSTER: random, random, random, hostile 40 | 41 | ROOM: "ordinary" , random, random, random, random 42 | OBJECT: random, random, random 43 | TRAP: random, random 44 | MONSTER: random, random, random, hostile 45 | 46 | RANDOM_CORRIDORS 47 | -------------------------------------------------------------------------------- /dat/stor-2.des: -------------------------------------------------------------------------------- 1 | # 2 | # Storage level (#1) 3 | # 4 | 5 | LEVEL: "stor-2" 6 | 7 | ROOM: "ordinary", unlit, random, random, (4,4) 8 | NAME: "central" 9 | OBJECT:'(',"chest",(2,2) 10 | OBJECT:'/',random,(2,2) 11 | OBJECT:'(',random,(2,2) 12 | OBJECT:'(',random,(2,2) 13 | OBJECT:'=',random,(2,2) 14 | OBJECT:'=',"regeneration",(2,2) 15 | OBJECT:'*',random,(2,2) 16 | ENGRAVING:(2,2),burn,"Danger! Cursed Items! Do Not Touch!" 17 | TRAP: random, random 18 | TRAP: random, random 19 | TRAP: random, random 20 | 21 | ROOM: "ordinary" , random, random, random, random 22 | STAIR: random, up 23 | OBJECT: random,random,random 24 | MONSTER: random, random, random, hostile 25 | 26 | ROOM: "ordinary" , random, random, random, random 27 | STAIR: random, down 28 | OBJECT: random, random, random 29 | TRAP: random, random 30 | MONSTER: random, random, random, hostile 31 | 32 | ROOM: "ordinary" , random, random, random, random 33 | OBJECT: random, random, random 34 | OBJECT: random, random, random 35 | MONSTER: random, random, random, hostile 36 | 37 | ROOM: "ordinary" , random, random, random, random 38 | OBJECT: random, random, random 39 | TRAP: random, random 40 | MONSTER: random, random, random, hostile 41 | 42 | ROOM: "ordinary" , random, random, random, random 43 | OBJECT: random, random, random 44 | TRAP: random, random 45 | MONSTER: random, random, random, hostile 46 | 47 | RANDOM_CORRIDORS 48 | -------------------------------------------------------------------------------- /dat/stor-3.des: -------------------------------------------------------------------------------- 1 | # 2 | # Storage level (#1) 3 | # 4 | 5 | LEVEL: "stor-3" 6 | 7 | ROOM: "ordinary", unlit, random, random, (4,4) 8 | NAME: "central" 9 | OBJECT:'(',"chest",(2,2) 10 | OBJECT:'/',random,(2,2) 11 | OBJECT:'/',random,(2,2) 12 | OBJECT:'(',random,(2,2) 13 | OBJECT:'(',random,(2,2) 14 | OBJECT:'(',random,(2,2) 15 | OBJECT:'=',random,(2,2) 16 | ENGRAVING:(2,2),burn,"Property of the Wizard! Do Not Touch!" 17 | TRAP: random, random 18 | TRAP: random, random 19 | TRAP: random, random 20 | 21 | ROOM: "ordinary" , random, random, random, random 22 | STAIR: random, up 23 | OBJECT: random,random,random 24 | MONSTER: random, random, random, hostile 25 | 26 | ROOM: "ordinary" , random, random, random, random 27 | STAIR: random, down 28 | OBJECT: random, random, random 29 | TRAP: random, random 30 | MONSTER: random, random, random, hostile 31 | 32 | ROOM: "ordinary" , random, random, random, random 33 | OBJECT: random, random, random 34 | OBJECT: random, random, random 35 | MONSTER: random, random, random, hostile 36 | 37 | ROOM: "ordinary" , random, random, random, random 38 | OBJECT: random, random, random 39 | TRAP: random, random 40 | MONSTER: random, random, random, hostile 41 | 42 | ROOM: "ordinary" , random, random, random, random 43 | OBJECT: random, random, random 44 | TRAP: random, random 45 | MONSTER: random, random, random, hostile 46 | 47 | RANDOM_CORRIDORS 48 | -------------------------------------------------------------------------------- /dat/wizhelp: -------------------------------------------------------------------------------- 1 | Debug-Mode Quick Reference: 2 | 3 | ^C == increase AC 4 | ^E == detect secret doors and traps. 5 | ^F == do magic mapping. 6 | ^G == create monster. 7 | ^I == identify items in pack. 8 | ^J == go up an experience level 9 | ^N == toggle invulnerability 10 | ^O == tell locations of special levels. 11 | ^T == do intra-level teleport. 12 | ^V == do trans-level teleport. 13 | ^W == make wish. 14 | ^X == show attributes including intrinsic attributes. 15 | 16 | #levelchange == change experience level 17 | #lightsources == show mobile light sources 18 | #monpolycontrol == control monster polymorphs 19 | #panic == panic test 20 | #polyself == polymorph self 21 | #seenv == show seen vectors 22 | #stats == show memory statistics 23 | #timeout == look at timeout queue 24 | #vision == show vision array 25 | #wmode == show wall modes 26 | 27 | -------------------------------------------------------------------------------- /history.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/history.txt -------------------------------------------------------------------------------- /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/androidconf.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)androidconf.h 3.4 2011/03/31 */ 2 | /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1990, 1991, 1992, 1993. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifdef ANDROID 6 | #ifndef ANDROIDCONF_H 7 | #define ANDROIDCONF_H 8 | 9 | #define error debuglog 10 | 11 | #define NO_FILE_LINKS /* if no hard links */ 12 | #define LOCKDIR "." /* where to put locks */ 13 | //#define HOLD_LOCKFILE_OPEN /* Keep an exclusive lock on the .0 file */ 14 | #define SELF_RECOVER /* Allow the game itself to recover from an aborted game */ 15 | 16 | #ifdef getchar 17 | # undef getchar 18 | #endif 19 | #define getchar nhgetch 20 | #undef tgetch 21 | #define tgetch nhgetch 22 | #define getuid() 1 23 | 24 | #undef SHELL /* we do not support the '!' command */ 25 | //#undef MAIL 26 | //#undef DEF_PAGER 27 | #undef DEF_MAILREADER 28 | 29 | #define ASCIIGRAPH 30 | 31 | #define NO_SIGNAL 32 | 33 | #define SELECTSAVED 34 | 35 | # endif /* ANDROIDCONF_H */ 36 | #endif /* ANDROID */ 37 | -------------------------------------------------------------------------------- /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 | 38 | struct attribs { 39 | schar a[A_MAX]; 40 | }; 41 | 42 | #define ATTRMAX(x) ((x == A_STR && Upolyd && strongmonst(youmonst.data)) ? STR18(100) : urace.attrmax[x]) 43 | #define ATTRMIN(x) (urace.attrmin[x]) 44 | 45 | #endif /* ATTRIB.H */ 46 | -------------------------------------------------------------------------------- /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/coord.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)coord.h 3.3 90/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 { 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 | char boneschar; 29 | }; 30 | 31 | struct tmplevel { 32 | char name[24]; 33 | struct couple lev; 34 | int chance, rndlevs, chain, flags; 35 | char boneschar; 36 | }; 37 | 38 | struct tmpbranch { 39 | char name[24]; /* destination dungeon name */ 40 | struct couple lev; 41 | int chain; /* index into tmplevel array (chained branch)*/ 42 | int type; /* branch type (see below) */ 43 | int up; /* branch is up or down */ 44 | int entry_lev; /* entry level in target dungeon */ 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 99 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/egyp.h: -------------------------------------------------------------------------------- 1 | /*** egyp.h ***/ 2 | 3 | #ifndef EGYP__H 4 | #define EGYP__H 5 | 6 | 7 | /*** Card definitions ***/ 8 | #define CARD_SUITS 4 /* Number of suits */ 9 | #define CARD_RANKS 13 /* Number of cards in each suit */ 10 | #define CARD_TRUMPS 20 /* Number of trump cards */ 11 | #define CARD_SUITED (CARD_SUITS * CARD_RANKS) 12 | #define CARD_FOOL CARD_SUITED 13 | #define CARD_TOTAL (CARD_SUITED + CARD_TRUMPS) 14 | 15 | #define card_istrump(c) ((c) >= CARD_SUITED) 16 | #define card_suit(c) ((c) / CARD_RANKS) 17 | #define card_rank(c) ((c) % CARD_RANKS) 18 | #define card_trump(c) ((c) - CARD_SUITED) 19 | 20 | 21 | /*** Monster definitions ***/ 22 | struct egyp { 23 | long credit; /* Amount credited to player */ 24 | int top; /* Index of top of the deck */ 25 | xchar cards[CARD_TOTAL]; /* Shuffled cards */ 26 | }; 27 | #define EGYP(mon) ((struct egyp *)&(mon)->mextra[0]) 28 | 29 | 30 | #endif /* EGYP__H */ 31 | 32 | 33 | -------------------------------------------------------------------------------- /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/file.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)file.h 3.2 96/11/19 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* WAC New file used by Makedefs*/ 6 | /* This file is read by makedefs and is turned into file.h*/ 7 | /* Various File Names */ 8 | /*Makedefs will hunt for the @ sign and then remove the next 6 chars*/ 9 | /*replacing with DEF_GAME_NAME in patchlev.h*/ 10 | /*Makedefs starts reading after a line with # START*/ 11 | /* @Lxxxxx makes DEF_GAME_NAME lowercase*/ 12 | 13 | # START 14 | 15 | /* Config Filename */ 16 | #if defined(UNIX) && !defined(ANDROID) 17 | # define NH_CONFIG_FILE ".@LOWER@rc" 18 | #else 19 | # if defined(MAC) || defined(__BEOS__) 20 | # define NH_CONFIG_FILE "Slash'EM Defaults" 21 | # else 22 | # ifdef VMS 23 | # define NH_CONFIG_FILE "@LOWER@ini" 24 | /*file2 should be the same as file except with sys$login: prepend*/ 25 | # define NH_CONFIG_FILE2 "sys$login:@LOWER@.ini" 26 | # define NH_CONFIG_FILE3 "@UPPER@.cnf" 27 | # else 28 | # if defined(MSDOS) || defined(WIN32) || defined(ANDROID) 29 | # define NH_CONFIG_FILE "defaults.nh"; 30 | # else 31 | # define NH_CONFIG_FILE "@UPPER@.cnf" 32 | # endif 33 | # endif 34 | # endif 35 | #endif 36 | 37 | /* Tile Files*/ 38 | #define NETHACK_PLANAR_TILEFILE "@UPPER@1.tib" /* Planar style tiles */ 39 | #define NETHACK_PACKED_TILEFILE "@UPPER@2.tib" /* Packed style tiles */ 40 | #define NETHACK_OVERVIEW_TILEFILE "@UPPER@o.tib" /* thin overview tiles */ 41 | 42 | /* Environment Options Name */ 43 | #define NETHACK_ENV_OPTIONS "@UPPER@OPTIONS" 44 | -------------------------------------------------------------------------------- /include/func_tab.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)func_tab.h 3.4 1992/04/03 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #ifndef FUNC_TAB_H 6 | #define FUNC_TAB_H 7 | 8 | struct func_tab { 9 | char f_char; 10 | boolean can_if_buried; 11 | int NDECL((*f_funct)); 12 | const char *f_text; 13 | }; 14 | 15 | struct ext_func_tab { 16 | const char *ef_txt, *ef_desc; 17 | int NDECL((*ef_funct)); 18 | boolean can_if_buried; 19 | }; 20 | 21 | extern struct ext_func_tab extcmdlist[]; 22 | 23 | /*WAC for the menus */ 24 | struct menu_tab { 25 | char m_char; 26 | boolean can_if_buried; 27 | int NDECL((*m_funct)); 28 | const char *m_item; 29 | const char *m_text; 30 | }; 31 | 32 | struct menu_list { 33 | const char *m_header; 34 | const char *m_parent; 35 | const struct menu_tab *m_menu; 36 | }; 37 | 38 | #endif /* FUNC_TAB_H */ 39 | -------------------------------------------------------------------------------- /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 | #define ENABLE_MAC_POPUP 0 16 | #if ENABLE_MAC_POPUP 17 | 18 | extern char popup_yn_function(const char *query, const char *resp, char def); 19 | extern void popup_getlin (const char *query, char *bufp); 20 | 21 | #endif /* ENABLE_MAC_POPUP */ 22 | #endif /* MACPOPUP_H */ 23 | -------------------------------------------------------------------------------- /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/patchlevel.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)patchlevel.h 3.4 2003/12/06 */ 2 | /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /*The name of the compiled game- should be same as stuff in makefile*/ 6 | /*for makedefs*/ 7 | /* KMH -- Made it mixed case, from which upper & lower case versions are made */ 8 | #define DEF_GAME_NAME "SlashEM" 9 | /*#define DEF_GAME_NAME "NetHack"*/ 10 | 11 | /* Version */ 12 | #define VERSION_MAJOR 0 13 | #define VERSION_MINOR 0 14 | /* 15 | * PATCHLEVEL is updated for each release. 16 | */ 17 | #define PATCHLEVEL 7 18 | #define EDITLEVEL 7 19 | #define FIXLEVEL 3 20 | 21 | #define COPYRIGHT_BANNER_A \ 22 | "This is SuperLotsoAddedStuffHack-Extended Magic 1997-2006" 23 | 24 | #define COPYRIGHT_BANNER_B \ 25 | "NetHack, Copyright 1985-2003 Stichting Mathematisch Centrum, M. Stephenson." 26 | 27 | #define COPYRIGHT_BANNER_C \ 28 | "See license for details. Bug reports to slashem-discuss@lists.sourceforge.net" 29 | 30 | #if 1 31 | /* 32 | * If two or more successive releases have compatible data files, define 33 | * this with the version number of the oldest such release so that the 34 | * new release will accept old save and bones files. The format is 35 | * 0xMMmmPPeeL 36 | * 0x = literal prefix "0x", MM = major version, mm = minor version, 37 | * PP = patch level, ee = edit level, L = literal suffix "L", 38 | * with all four numbers specified as two hexadecimal digits. 39 | */ 40 | #define VERSION_COMPATIBILITY 0x00000702L 41 | #endif 42 | 43 | /*patchlevel.h*/ 44 | -------------------------------------------------------------------------------- /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 | /* KMH, balance patch -- These were 7, 20, 14 for NetHack and 1, 20, 6 for Slash */ 36 | #define MAX_QUEST_TRIES 7 /* exceed this and you "fail" */ 37 | #define MIN_QUEST_ALIGN 20 /* at least this align.record to start */ 38 | /* note: align 20 matches "pious" as reported by enlightenment (cmd.c) */ 39 | #define MIN_QUEST_LEVEL 10 /* at least this u.ulevel to start */ 40 | /* note: exp.lev. 14 is threshold level for 5th rank (class title, role.c) */ 41 | 42 | #endif /* QUEST_H */ 43 | -------------------------------------------------------------------------------- /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 | /* Zap types, also used for explosions */ 23 | #define ZT_MAGIC_MISSILE (AD_MAGM-1) 24 | #define ZT_FIRE (AD_FIRE-1) 25 | #define ZT_COLD (AD_COLD-1) 26 | #define ZT_SLEEP (AD_SLEE-1) 27 | #define ZT_DEATH (AD_DISN-1) /* or disintegration */ 28 | #define ZT_LIGHTNING (AD_ELEC-1) 29 | #define ZT_POISON_GAS (AD_DRST-1) 30 | #define ZT_ACID (AD_ACID-1) 31 | 32 | #define ZT_LAST (ZT_ACID) /*For checking of spells of a type*/ 33 | #define ZT_FIRST (ZT_MAGIC_MISSILE) 34 | /* 8 and 9 are currently unassigned */ 35 | 36 | #define ZT_WAND(x) (x) 37 | #define ZT_SPELL(x) (10+(x)) 38 | #define ZT_BREATH(x) (20+(x)) 39 | #define ZT_MEGA(x) (30+(x)) 40 | #define ZT_MONWAND(x) (-(30+(x))) 41 | 42 | #endif /* SPELL_H */ 43 | -------------------------------------------------------------------------------- /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/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 | #endif /* TILE2X11_H */ 20 | -------------------------------------------------------------------------------- /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 MOLDY_CORPSE 2 28 | #define REVIVE_MON 3 29 | #define BURN_OBJECT 4 30 | #define HATCH_EGG 5 31 | #define FIG_TRANSFORM 6 32 | #define UNPOLY_MON 7 33 | # ifdef FIREARMS 34 | #define BOMB_BLOW 8 35 | # ifdef UNPOLYPILE 36 | #define UNPOLY_OBJ 9 37 | #define NUM_TIME_FUNCS 10 38 | # else 39 | #define NUM_TIME_FUNCS 9 40 | # endif 41 | # else /* FIREARMS */ 42 | # ifdef UNPOLYPILE 43 | #define UNPOLY_OBJ 8 44 | #define NUM_TIME_FUNCS 9 45 | # else 46 | #define NUM_TIME_FUNCS 8 47 | # endif 48 | # endif /* FIREARMS */ 49 | 50 | /* used in timeout.c */ 51 | typedef struct fe { 52 | struct fe *next; /* next item in chain */ 53 | long timeout; /* when we time out */ 54 | unsigned long tid; /* timer ID */ 55 | short kind; /* kind of use */ 56 | short func_index; /* what to call when we time out */ 57 | genericptr_t arg; /* pointer to timeout argument */ 58 | Bitfield (needs_fixup,1); /* does arg need to be patched? */ 59 | } timer_element; 60 | 61 | #endif /* TIMEOUT_H */ 62 | -------------------------------------------------------------------------------- /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/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 | -------------------------------------------------------------------------------- /make_anh.txt: -------------------------------------------------------------------------------- 1 | To compile Nethack for the allegro interface: 2 | 3 | First, follow the instructions in the sys\msdos directory 4 | to compile a non-allegro binary and all the game datafiles. 5 | 6 | Then, rename "makefile.alg" to "makefile" and run make. 7 | 8 | The Allegro makefile DOES NOT automatically create the 9 | neccesary tile files. To create them manually, run 10 | "tile2bmp.exe" in the src\ directory, tile2bmp is created 11 | automatically by make. Then create an index for these tiles 12 | with "tileidx > index", "move index ..\tiles". 13 | 14 | Alternately, if your version of nethack has all the same 15 | monsters/objects/traps/terrain types as 3.3.0, you can just 16 | download a tileset. (currently only available with the 17 | binaries.) 18 | -------------------------------------------------------------------------------- /slamfaq.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/slamfaq.txt -------------------------------------------------------------------------------- /src/borg.c: -------------------------------------------------------------------------------- 1 | /* the nethack cyborg! */ 2 | /* by proudft@ccnet.com */ 3 | 4 | #include "hack.h" 5 | #include "func_tab.h" 6 | 7 | #ifdef BORG 8 | #define HP_TRACK 25 9 | #define HP_TREND 3 10 | 11 | char borg_on=0; 12 | char borg_line[80] = {0}; 13 | int predicted_hp; 14 | 15 | void adjust_hp_list(void) 16 | { 17 | static int hp_list[HP_TRACK] = {0}; 18 | int l; 19 | int hp_diff; 20 | for (l=0;lx,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/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/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/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/amiga/amimenu.c -------------------------------------------------------------------------------- /sys/amiga/amistack.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/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/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/$ 2 | 8 | 10 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 30 | 32 | 33 | 34 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /sys/android/README: -------------------------------------------------------------------------------- 1 | 2 | Build instructions 3 | 4 | 5 | These instructions are written for a 64-bit Ubuntu installation. 6 | Modifying them for other linux distributionos should be little to no 7 | work. If you're running Windows you're on your own. 8 | 9 | 10 | 11 | === Preparations === 12 | 13 | - Install the Android SDK 14 | http://developer.android.com/sdk 15 | 16 | - Download and extract the Android NDK 17 | http://developer.android.com/sdk/ndk 18 | 19 | - Install 'bison' and 'flex' 20 | 21 | - Check out the source 22 | git clone https://github.com/gurrhack/ForkFront-Android.git 23 | git clone https://github.com/gurrhack/SlashEM-Android.git 24 | 25 | 26 | 27 | === Building Slash'EM === 28 | 29 | 1. cd /sys/android 30 | 2. Open Makefile.src and change NDK to the appropriate path 31 | 3. sh ./setup.sh 32 | 4. cd ../.. 33 | 5. make install 34 | 35 | 36 | 37 | 38 | === Building the app === 39 | 40 | 1. Start IntelliJ 41 | 2. Create an empty project in the parent directory 42 | 3. Add a new empty Java module to the project root 43 | 4. Import the ForkFront module located at /forkfront.iml 44 | 5. Import the Slash'EM module located at /sys/android/slashem.iml 45 | 6. Build and Run! 46 | 47 | 48 | Happy hacking! 49 | -------------------------------------------------------------------------------- /sys/android/assets/fonts/monobold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/android/assets/fonts/monobold.ttf -------------------------------------------------------------------------------- /sys/android/assets/ver: -------------------------------------------------------------------------------- 1 | 100 -------------------------------------------------------------------------------- /sys/android/res/drawable-nodpi/abigaba_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/android/res/drawable-nodpi/abigaba_24.png -------------------------------------------------------------------------------- /sys/android/res/drawable-nodpi/default_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/android/res/drawable-nodpi/default_32.png -------------------------------------------------------------------------------- /sys/android/res/drawable-nodpi/geoduck_20x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/android/res/drawable-nodpi/geoduck_20x40.png -------------------------------------------------------------------------------- /sys/android/res/drawable-nodpi/itakura_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/android/res/drawable-nodpi/itakura_32.png -------------------------------------------------------------------------------- /sys/android/res/drawable-nodpi/overlays.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/android/res/drawable-nodpi/overlays.png -------------------------------------------------------------------------------- /sys/android/res/drawable/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/android/res/drawable/icon.png -------------------------------------------------------------------------------- /sys/android/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | com.tbd.SlashEM 4 | slashemdir 5 | slashem 6 | defaults.nh 7 | menu ... # 20s . : ; , e d r z Z q t f w x i E Q P R W T o ^d ^p a A ^t D F p ^x ^o ? 8 | true 9 | false 10 | true 11 | 12 | -------------------------------------------------------------------------------- /sys/android/res/values/credits.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | Slash\'EM Android Port 8 | Project Home
9 |

Based on Slash\'EM 0.0.7E7F3
10 | http://www.slashem.org

11 | 12 |



Abigaba Tiles

13 | by James Hogwood
14 | http://www.multifoliate.com/nh

15 | 16 |



Geoduck\'s tileset

17 | by Robert M. Cook
18 | http://www.geoduckthings.net/nhack/nhack.html

19 | 20 |


21 | ]]> 22 |
23 |
24 | -------------------------------------------------------------------------------- /sys/android/res/values/tiles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Abigaba 5 | Ascii (no tiles) 6 | Default 7 | Geoduck 8 | Itakura 9 | 10 | 11 | abigaba_24 12 | TTY 13 | default_32 14 | geoduck_20x40 15 | itakura_32 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /sys/android/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/android/Makefile.top ]; then cd sys/android; 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/android/Makefile.top ../../Makefile 24 | ln -s ../sys/android/Makefile.dat ../../dat/Makefile 25 | ln -s ../sys/android/Makefile.doc ../../doc/Makefile 26 | ln -s ../sys/android/Makefile.src ../../src/Makefile 27 | ln -s ../sys/android/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/android/slashem.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /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/mac/Files.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/mac/Files.r -------------------------------------------------------------------------------- /sys/mac/Levels.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/mac/Levels.make -------------------------------------------------------------------------------- /sys/mac/MFiles.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/mac/MFiles.r -------------------------------------------------------------------------------- /sys/mac/MRecover.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/mac/MRecover.r -------------------------------------------------------------------------------- /sys/mac/Macintosh.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/mac/Macintosh.make -------------------------------------------------------------------------------- /sys/mac/NHrsrc.r: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/mac/NHrsrc.r -------------------------------------------------------------------------------- /sys/mac/News: -------------------------------------------------------------------------------- 1 | Welcome to Macintosh Slash'EM 2 | 3 | This game is a modified version of NetHack (brought to you by Dean Luick, 4 | Kevin Hugo, and Mark Modrall), with enhancements by Warren Cheung, 5 | J Ali Harlow, et aliud. 6 | 7 | The Macintosh version was made by Paul Hurtley. 8 | 9 | Bug reports, suggestions and comments can be submitted via our web page, 10 | www.slashem.org. 11 | -------------------------------------------------------------------------------- /sys/mac/README.txt: -------------------------------------------------------------------------------- 1 | This is the binary distribution of Slash'EM 0.0.7E7F2 for Mac OS Classic. This is a Power PC binary, so it will run only on a Macintosh with a Power PC processor. 2 | 3 | This package is freely distributable; see the file 'License' for details. 4 | 5 | Read the Guidebook for a general description of what Slash'EM is and how to play. Unfortunately, the Guidebook is > 32K, so you will need something other than SimpleText to view it. Edit the file Slash'EM Defaults in this directory to modify startup options. Feel free to turn off News when you get tired of seeing its message when you start up. -------------------------------------------------------------------------------- /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/machelp.bh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/mac/machelp.bh -------------------------------------------------------------------------------- /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/2xsai.h: -------------------------------------------------------------------------------- 1 | /* 2 | * A basic header for the 2xSaI routines 3 | */ 4 | 5 | /* 6 | * Some basic declarations 7 | */ 8 | 9 | #define false 0 10 | #define true 1 11 | #define bool int 12 | #define STATIC static 13 | #define uint32 unsigned long 14 | #define uint16 unsigned short 15 | #define uint8 unsigned char 16 | 17 | extern void Super2xSaI(uint8 *srcPtr, uint32 srcPitch, 18 | uint8 *deltaPtr, 19 | uint8 *dstPtr, uint32 dstPitch, int width, int height); 20 | 21 | extern void _2xSaI(uint8 *srcPtr, uint32 srcPitch, 22 | uint8 *deltaPtr, 23 | uint8 *dstPtr, uint32 dstPitch, int width, int height); 24 | 25 | extern void SuperEagle(uint8 *srcPtr, uint32 srcPitch, 26 | uint8 *deltaPtr, 27 | uint8 *dstPtr, uint32 dstPitch, int width, int height); 28 | #if 0 29 | extern void Scale_2xSaI(uint8 *srcPtr, uint32 srcPitch, 30 | uint8 *deltaPtr, 31 | BITMAP *dstBitmap, int width, int height); 32 | #endif 33 | 34 | /* 35 | * A couple handy macros 36 | * Note that these will be broken in a future version if the deltaPtr ends up 37 | * ever being changed 38 | * 39 | * Note that the dest bitmap should be twice the width and height of the source 40 | */ 41 | #define Super2xSaiBlit(src, dest) Super2xSaI((uint8 *) src->dat, src->w*2, \ 42 | (uint8 *)src->dat, \ 43 | (uint8 *)dest->dat, dest->w*2, src->w, src->h) 44 | 45 | #define SuperEagleBlit(src, dest) SuperEagle((uint8 *) src->dat, src->w*2, \ 46 | (uint8 *)src->dat, \ 47 | (uint8 *)dest->dat, dest->w*2, src->w, src->h) 48 | 49 | #define _2xSaiBlit(src, dest) _2xSaI((uint8 *) src->dat, src->w*2, \ 50 | (uint8 *)src->dat, \ 51 | (uint8 *)dest->dat, dest->w*2, src->w, src->h) 52 | 53 | -------------------------------------------------------------------------------- /sys/msdos/2xtest.c: -------------------------------------------------------------------------------- 1 | /* Some code I used to test the 2xSaI routines */ 2 | 3 | #include "2xsai2.c" 4 | 5 | int 6 | main() 7 | { 8 | BITMAP *tile_in, *tile_out; 9 | PALETTE tilepal; 10 | 11 | set_color_depth(16); 12 | 13 | tile_in = load_bitmap("tmp.bmp", tilepal); 14 | 15 | tile_out = create_bitmap((tile_in->w)*2, (tile_in->h)*2); 16 | Super2xSaiBlit(tile_in, tile_out); 17 | save_bitmap("tmp2.bmp", tile_out, tilepal); 18 | SuperEagleBlit(tile_in, tile_out); 19 | save_bitmap("tmp3.bmp", tile_out, tilepal); 20 | _2xSaiBlit(tile_in, tile_out); 21 | save_bitmap("tmp4.bmp", tile_out, tilepal); 22 | 23 | printf("Color15: %0x\n", makecol15(255, 0, 255)); 24 | printf("Color16: %0x\n", makecol16(255, 0, 255)); 25 | } 26 | 27 | 28 | -------------------------------------------------------------------------------- /sys/msdos/alnames.h: -------------------------------------------------------------------------------- 1 | #define NUM_SUBSTITUTES 21 2 | BITMAP *substitutes[NUM_SUBSTITUTES]; 3 | 4 | static const char *substnames[] = { 5 | "dummy", 6 | "arc_fem", 7 | "bar_fem", 8 | "hea_fem", 9 | "kni_fem", 10 | "mon_fem", 11 | "ran_fem", 12 | "rog_fem", 13 | "sam_fem", 14 | "tou_fem", 15 | "wiz_fem", 16 | "pri_mall", 17 | "pri_feml", 18 | "pri_maln", 19 | "pri_femn", 20 | "pri_malc", 21 | "pri_femc", 22 | "altarl", /* lawful altar */ 23 | "altarn", /* neutral altar */ 24 | "altarc", /* chaotic altar */ 25 | "altarm", /* Moloch's altar */ 26 | }; 27 | 28 | #define SUB_ARCF 1 29 | #define SUB_BARF 2 30 | #define SUB_HEAF 3 31 | #define SUB_KNIF 4 32 | #define SUB_MONF 5 33 | #define SUB_RANF 6 34 | #define SUB_ROGF 7 35 | #define SUB_SAMF 8 36 | #define SUB_TOUF 9 37 | #define SUB_WIZF 10 38 | #define SUB_PLM 11 39 | #define SUB_PLF 12 40 | #define SUB_PNM 13 41 | #define SUB_PNF 14 42 | #define SUB_PCM 15 43 | #define SUB_PCF 16 44 | #define SUB_ALTARL 17 45 | #define SUB_ALTARN 18 46 | #define SUB_ALTARC 19 47 | #define SUB_ALTARM 20 48 | 49 | static const char *enames[] = { 50 | "gasspore", 51 | "magblast", 52 | "fireball", 53 | "snowball", 54 | "sleepexp", 55 | "dthfield", 56 | "balllit", 57 | "poisball", 58 | "acidball" 59 | }; 60 | 61 | static const char *anames[] = { 62 | "fail", 63 | "attack", 64 | "heal", 65 | "divine", 66 | "enchant", 67 | "cleric", 68 | "escape", 69 | "matter" 70 | }; 71 | 72 | -------------------------------------------------------------------------------- /sys/msdos/anethack.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/msdos/anethack.fnt -------------------------------------------------------------------------------- /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`(`````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/os2/setup.cmd: -------------------------------------------------------------------------------- 1 | /* REXX script which prepares OS/2 NetHack build environment. * 2 | * Created by Pekka Rousu */ 3 | 4 | '@echo off' 5 | 6 | SAY 'Configuring OS/2 NetHack...' 7 | 8 | /* extract the source tree top-level directory */ 9 | 10 | PARSE SOURCE nhpath 11 | PARSE VAR nhpath forget forget nhpath 12 | nhdrive = SUBSTR(nhpath,1,2) 13 | nhpath = SUBSTR(nhpath,3,LASTPOS('\sys\os2', nhpath)-3) 14 | 15 | /* Copy the makefile to src and define temporary directories */ 16 | 17 | nhdrive 18 | 'cd 'nhpath'\src' 19 | 'del Makefile >nul' 20 | 21 | infile = '..\sys\os2\Makefile.os2' 22 | outfile = 'Makefile' 23 | curline = LINEIN(infile) 24 | 25 | DO WHILE LINES(infile) 26 | IF (SUBSTR(curline, 1, 5) == 'NHSRC') then 27 | rc = LINEOUT(outfile, 'NHSRC = 'nhpath) 28 | ELSE if (SUBSTR(curline, 1, 3) == 'OBJ') then 29 | rc = LINEOUT(outfile, 'OBJ = 'nhpath'\tmp') 30 | ELSE if (SUBSTR(curline, 1, 4) == 'TEMP') then 31 | rc = LINEOUT(outfile, 'TEMP = 'nhpath'\tmp') 32 | ELSE rc = LINEOUT(outfile, curline) 33 | 34 | if rc then do 35 | SAY 'Could not write 'outfile'. Setup failed!' 36 | exit 1 37 | end 38 | 39 | curline = LINEIN(infile) 40 | END 41 | 42 | 'md 'nhpath'\tmp >nul 2>nul' 43 | 'md \games >nul 2>nul' 44 | 'md \games\slashem >nul 2>nul' 45 | 'md \games\slashem-x11 >nul 2>nul' 46 | 47 | SAY 'Source tree is now prepared! Enter "dmake" to start the build process...' 48 | -------------------------------------------------------------------------------- /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 | #ifndef YYERRCODE 2 | #define YYERRCODE 256 3 | #endif 4 | 5 | #define INTEGER 257 6 | #define A_DUNGEON 258 7 | #define BRANCH 259 8 | #define CHBRANCH 260 9 | #define LEVEL 261 10 | #define RNDLEVEL 262 11 | #define CHLEVEL 263 12 | #define RNDCHLEVEL 264 13 | #define UP_OR_DOWN 265 14 | #define PROTOFILE 266 15 | #define DESCRIPTION 267 16 | #define DESCRIPTOR 268 17 | #define LEVELDESC 269 18 | #define ALIGNMENT 270 19 | #define LEVALIGN 271 20 | #define ENTRY 272 21 | #define STAIR 273 22 | #define NO_UP 274 23 | #define NO_DOWN 275 24 | #define PORTAL 276 25 | #define STRING 277 26 | typedef union 27 | { 28 | int i; 29 | char* str; 30 | } YYSTYPE; 31 | extern YYSTYPE yylval; 32 | -------------------------------------------------------------------------------- /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 | #if defined(MSDOS) && defined(PC_MOUSE) 30 | mouse_init(); 31 | #endif 32 | } 33 | 34 | /* reset terminal to original state */ 35 | void 36 | settty(s) 37 | const char *s; 38 | { 39 | #if defined(MSDOS) && defined(NO_TERMS) 40 | gr_finish(); 41 | #endif 42 | #if defined(MSDOS) && defined(PC_MOUSE) 43 | mouse_finish(); 44 | #endif 45 | end_screen(); 46 | if(s) raw_print(s); 47 | #if !defined(TOS) 48 | enable_ctrlP(); /* turn on ^P processing */ 49 | #endif 50 | 51 | } 52 | 53 | /* called by init_nhwindows() and resume_nhwindows() */ 54 | void 55 | setftty() 56 | { 57 | start_screen(); 58 | } 59 | 60 | #if defined(TIMED_DELAY) && defined(_MSC_VER) 61 | void 62 | msleep(mseconds) 63 | unsigned mseconds; 64 | { 65 | /* now uses clock() which is ANSI C */ 66 | clock_t goal; 67 | 68 | goal = mseconds + clock(); 69 | while ( goal > clock()) { 70 | /* do nothing */ 71 | } 72 | } 73 | #endif 74 | 75 | /* fatal error */ 76 | /*VARARGS1*/ 77 | 78 | void 79 | error VA_DECL(const char *,s) 80 | VA_START(s); 81 | VA_INIT(s, const char *); 82 | /* error() may get called before tty is initialized */ 83 | if (iflags.window_inited) end_screen(); 84 | putchar('\n'); 85 | Vprintf(s,VA_ARGS); 86 | putchar('\n'); 87 | VA_END(); 88 | exit(EXIT_FAILURE); 89 | } 90 | 91 | /*pctty.c*/ 92 | -------------------------------------------------------------------------------- /sys/share/slashem.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/share/slashem.ico -------------------------------------------------------------------------------- /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/nethack.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # SCCS Id: @(#)nethack.sh 3.4 1990/02/26 3 | 4 | HACKDIR=/usr/games/lib/nethackdir 5 | export HACKDIR 6 | HACK=$HACKDIR/nethack 7 | MAXNROFPLAYERS=4 8 | 9 | # Since Nethack.ad is installed in HACKDIR, add it to XUSERFILESEARCHPATH 10 | case "x$XUSERFILESEARCHPATH" in 11 | x) XUSERFILESEARCHPATH="$HACKDIR/%N.ad" 12 | ;; 13 | *) XUSERFILESEARCHPATH="$XUSERFILESEARCHPATH:$HACKDIR/%N.ad" 14 | ;; 15 | esac 16 | export XUSERFILESEARCHPATH 17 | 18 | # see if we can find the full path name of PAGER, so help files work properly 19 | # assume that if someone sets up a special variable (HACKPAGER) for NetHack, 20 | # it will already be in a form acceptable to NetHack 21 | # ideas from brian@radio.astro.utoronto.ca 22 | if test \( "xxx$PAGER" != xxx \) -a \( "xxx$HACKPAGER" = xxx \) 23 | then 24 | 25 | HACKPAGER=$PAGER 26 | 27 | # use only the first word of the pager variable 28 | # this prevents problems when looking for file names with trailing 29 | # options, but also makes the options unavailable for later use from 30 | # NetHack 31 | for i in $HACKPAGER 32 | do 33 | HACKPAGER=$i 34 | break 35 | done 36 | 37 | if test ! -f $HACKPAGER 38 | then 39 | IFS=: 40 | for i in $PATH 41 | do 42 | if test -f $i/$HACKPAGER 43 | then 44 | HACKPAGER=$i/$HACKPAGER 45 | export HACKPAGER 46 | break 47 | fi 48 | done 49 | IFS=' ' 50 | fi 51 | if test ! -f $HACKPAGER 52 | then 53 | echo Cannot find $PAGER -- unsetting PAGER. 54 | unset HACKPAGER 55 | unset PAGER 56 | fi 57 | fi 58 | 59 | 60 | cd $HACKDIR 61 | case $1 in 62 | -s*) 63 | exec $HACK "$@" 64 | ;; 65 | *) 66 | exec $HACK "$@" $MAXNROFPLAYERS 67 | ;; 68 | esac 69 | -------------------------------------------------------------------------------- /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/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/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/sys/stat.h: -------------------------------------------------------------------------------- 1 | /* empty file */ 2 | 3 | -------------------------------------------------------------------------------- /sys/wince/cesetup.bat: -------------------------------------------------------------------------------- 1 | @REM SCCS Id: @(#)nhsetup.bat $Date: 2003-11-06 00:04:12 $ 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 | copy mksetup.bat ..\..\wince\mksetup.bat 31 | copy slashem.inf ..\..\wince\slashem.inf 32 | copy slashem.ini ..\..\wince\slashem.ini 33 | echo. 34 | echo Attempting to copy existing data files 35 | echo This will only succeed if you have successfully 36 | echo built the sys/winnt SLASHEM 37 | copy ..\..\binary\nhshare ..\..\wince\nhshare 38 | copy ..\..\binary\nhushare ..\..\wince\nhushare 39 | copy ..\..\binary\defaults.nh ..\..\wince\defaults.nh 40 | echo. 41 | echo Proceed with the following steps: 42 | echo. 43 | echo cd ..\..\wince 44 | echo nmake /f bootstrp.mak 45 | echo. 46 | echo Then start Embedded Visual C and open 47 | echo the workspace wince.vcw (at the top of the NetHack tree) 48 | echo to build. See Install.ce for details. 49 | echo. 50 | 51 | -------------------------------------------------------------------------------- /sys/wince/cesound.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)cesound.c 3.4 $Date: 2003-02-28 12:13:30 $ */ 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.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/mksetup.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM This file generates the .CAB files and packages them 3 | REM using ezsetup into an installer 4 | REM 5 | echo Generating CAB install files for ARM, MIPS, SH3 6 | "f:\Windows CE Tools\wce300\MS Pocket PC\support\ActiveSync\windows ce application installation\cabwiz\cabwiz" slashem.inf /err makecab.err /cpu arm mips sa sh3 7 | ezsetup -l english -i slashem.ini -r ..\slashem.nfo -e ..\Readme.txt -o slashemCE_install-%1.exe -------------------------------------------------------------------------------- /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/slashem.inf: -------------------------------------------------------------------------------- 1 | [Version] 2 | Signature = "$Windows NT$" 3 | Provider = "CE" 4 | CESignature = "$Windows CE$" 5 | 6 | [CEStrings] 7 | AppName="SLASHEM" 8 | InstallDir=%CE8%\%AppName% ; \Program Files\Games\slashem 9 | 10 | [Strings] 11 | sh3_cpu = 10003 12 | sh4_cpu = 10005 13 | mips_cpu = 4000 14 | strongarm_cpu = 2577 15 | armcpu = 1824 16 | reg_path = Software\%AppName% 17 | val_version = "Version" 18 | data_version = "0.0.7E1 Prerelease" 19 | 20 | [CEDevice] 21 | UnsupportedPlatforms = "Jupiter","HPC" ; Does not support pltfrm1 22 | VersionMin = 3.0 23 | VersionMax = 3.01 24 | 25 | [CEDevice.ARM] 26 | ProcessorType = %arm_cpu% 27 | 28 | [CEDevice.MIPS] 29 | ProcessorType = %mips_cpu% 30 | 31 | [CEDevice.SH3] 32 | ProcessorType = %sh3_cpu% 33 | 34 | [CEDevice.SA] 35 | ProcessorType = %strongarm_cpu% 36 | 37 | [DefaultInstall] 38 | CopyFiles = Files.Application, Files.Shared 39 | AddReg = RegSettings 40 | CEShortcuts = Shortcuts 41 | 42 | [SourceDisksNames] 43 | 1 = ,"Common files",,. 44 | 45 | [SourceDisksNames.ARM] 46 | 2 = ,"ARM files",,ARMPocketPCRelease 47 | 48 | [SourceDisksNames.MIPS] 49 | 2 = ,"MIPS files",,MIPSPocketPCRelease 50 | 51 | [SourceDisksNames.SA] 52 | 2 = ,"ARM files",,ARMPocketPCRelease 53 | 54 | [SourceDisksNames.SH3] 55 | 2 = ,"SH3 files",,SH3PocketPCRelease 56 | 57 | [SourceDisksFiles] 58 | slashem.exe = 2 59 | nhshare = 1 60 | nhushare = 1 61 | defaults.nh = 1 62 | 63 | [DestinationDirs] 64 | Files.Application = 0,%InstallDir% ;\Target\AppName 65 | Files.Shared = 0,%InstallDir% ;\Target\AppName 66 | Shortcuts = 0,%CE2%\Help ;\Windows\Help 67 | 68 | [Files.Application] 69 | "slashem.exe",,,0x00000001 ; rename, and warn if skipped 70 | 71 | [Files.Shared] 72 | "nhshare",,,0x00000001 ; rename, and warn if skipped 73 | "nhushare",,,0x00000001 ; rename, and warn if skipped 74 | "defaults.nh",,,0x00000001 ; rename, and warn if skipped 75 | 76 | [Shortcuts] 77 | %AppName%,0,slashem.exe,%CE14% ; Shortcut in \Windows\Start Menu\Games 78 | 79 | [RegSettings] 80 | ;HKLM,Software\WAC\%AppName%,,0,%data_version% 81 | -------------------------------------------------------------------------------- /sys/wince/slashem.ini: -------------------------------------------------------------------------------- 1 | [CEAppManager] 2 | Version = 1.0 3 | Component = SLASHEM 4 | 5 | [SLASHEM] 6 | Description = "SLASH'EM 0.0.7E1 Prerelease" 7 | Uninstall = SLASHEM 8 | CabFiles = slashem.arm.cab,slashem.mips.cab,slashem.sa.cab,slashem.sh3.cab -------------------------------------------------------------------------------- /sys/wince/winhack.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/wince/winhack.rc -------------------------------------------------------------------------------- /sys/wince/winhcksp.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/sys/wince/winhcksp.rc -------------------------------------------------------------------------------- /sys/winnt/console.rc: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)console.rc 3.4 $Date: 2003-12-11 09:49:08 $ */ 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: 2003-03-12 11:15:16 $ */ 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/setup.bat: -------------------------------------------------------------------------------- 1 | REM In case some of the long file names are MIA 2 | if exist ..\..\dat\data.bas copy ..\..\dat\data.bas ..\..\dat\data.base 3 | if exist ..\..\include\patchlev.h copy ..\..\include\patchlev.h ..\..\include\patchlevel.h 4 | if exist ..\..\doc\guideboo.txt copy ..\..\doc\guideboo.txt ..\..\doc\guidebook.txt 5 | copy makefile.gcc ..\..\src\Makefile 6 | copy win32api.h ..\..\include\win32api.h 7 | -------------------------------------------------------------------------------- /sys/winnt/slashem.rc: -------------------------------------------------------------------------------- 1 | #define ICON_APPWND 100 2 | ICON_APPWND ICON "Slashem.ico" 3 | -------------------------------------------------------------------------------- /sys/winnt/win32api.h: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)win32api.h 3.4 $Date: 2003-03-12 11:15:16 $ */ 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 ? malloc(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/kse-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 #800080", 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/kslashem.lnk: -------------------------------------------------------------------------------- 1 | # KDE Config File 2 | # Call this file kslashem.kdelnk or kslashem.desktop 3 | [KDE Desktop Entry] 4 | Name=SlashEM 5 | Name[fr]=SlashEM 6 | Name[hu]=SlashEM 7 | Name[no]=SlashEM 8 | Name[sk]=SlashEM 9 | Name[cs]=SlashEM 10 | Name[hr]=SlashEM 11 | Name[pt]=SlashEM 12 | Name[pt_BR]=SlashEM 13 | Icon=kse.xpm 14 | Exec=kslashem -caption "%c" %i %m 15 | Type=Application 16 | DocPath=kslashem/index.html 17 | Comment=Variant of the role-playing game, NetHack - fight monsters and seek the Amulet of Yendor for your god! 18 | 19 | -------------------------------------------------------------------------------- /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/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 | #if defined(FILE_AREAS) 43 | #define TILESETDIR FILE_AREA_SHARE 44 | #elif defined(HACKDIR) 45 | #define TILESETDIR HACKDIR 46 | #else 47 | # error HACKDIR is not defined! 48 | #endif 49 | 50 | #endif /* GnomeHackGlyph_h */ 51 | -------------------------------------------------------------------------------- /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.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/gtk/GTKRC: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | style "text" 5 | { 6 | font_name = "fixed Medium 12" 7 | } 8 | style "map" 9 | { 10 | # Map font: 11 | # 12 | # FIXME: There is currently no way to use the IBMgraphics option. 13 | # 14 | 15 | # Map colours: 16 | # 17 | # - These are only used in character mode. 18 | # - fg is not used when color option is set. 19 | # - The five states have no real meaning and should normally take the 20 | # same values. 21 | # - In color mode, certain values of bg[NORMAL] are checked for: 22 | # * { 0.0, 0.0, 0.0 } causes normally black symbols to be drawn in white. 23 | # * { 1.0, 1.0, 1.0 } causes normally white symbols to be drawn in black. 24 | # Note: only these exact values are detected (barring rounding errors). 25 | # 26 | bg[NORMAL] = { 0.15, 0.15, 0.15 } 27 | bg[PRELIGHT] = { 0.15, 0.15, 0.15 } 28 | bg[ACTIVE] = { 0.15, 0.15, 0.15 } 29 | bg[SELECTED] = { 0.15, 0.15, 0.15 } 30 | bg[INSENSITIVE] = { 0.15, 0.15, 0.15 } 31 | fg[NORMAL] = { 1.0, 1.0, 1.0 } 32 | fg[PRELIGHT] = { 1.0, 1.0, 1.0 } 33 | fg[ACTIVE] = { 1.0, 1.0, 1.0 } 34 | fg[SELECTED] = { 1.0, 1.0, 1.0 } 35 | fg[INSENSITIVE] = { 1.0, 1.0, 1.0 } 36 | } 37 | 38 | widget "fixed font*GtkText" style "text" 39 | widget "fixed font*GtkCList" style "text" 40 | widget "SlashEM.*.map" style "map" 41 | -------------------------------------------------------------------------------- /win/gtk/GTKRC.w32: -------------------------------------------------------------------------------- 1 | # 2 | # Win32 Gtkrc 3 | # 4 | # Fonts are specified as Pango Font Descriptions. 5 | # 6 | style "text" 7 | { 8 | font_name = "Sans Medium 10" 9 | } 10 | widget_class "*" style "text" 11 | widget "fixed font*GtkText" style "text" 12 | widget "fixed font*GtkCList" style "text" 13 | 14 | style "map" 15 | { 16 | font_name = "Sans Medium 12" 17 | # Map colours: 18 | # 19 | # - These are only used in character mode. 20 | # - fg is not used when color option is set. 21 | # - The five states have no real meaning and should normally take the 22 | # same values. 23 | # - In color mode, certain values of bg[NORMAL] are checked for: 24 | # * { 0.0, 0.0, 0.0 } causes normally black symbols to be drawn in white. 25 | # * { 1.0, 1.0, 1.0 } causes normally white symbols to be drawn in black. 26 | # Note: only these exact values are detected (barring rounding errors). 27 | # 28 | bg[NORMAL] = { 0.15, 0.15, 0.15 } 29 | bg[PRELIGHT] = { 0.15, 0.15, 0.15 } 30 | bg[ACTIVE] = { 0.15, 0.15, 0.15 } 31 | bg[SELECTED] = { 0.15, 0.15, 0.15 } 32 | bg[INSENSITIVE] = { 0.15, 0.15, 0.15 } 33 | fg[NORMAL] = { 1.0, 1.0, 1.0 } 34 | fg[PRELIGHT] = { 1.0, 1.0, 1.0 } 35 | fg[ACTIVE] = { 1.0, 1.0, 1.0 } 36 | fg[SELECTED] = { 1.0, 1.0, 1.0 } 37 | fg[INSENSITIVE] = { 1.0, 1.0, 1.0 } 38 | } 39 | widget "SlashEM.*.map" style "map" 40 | -------------------------------------------------------------------------------- /win/gtk/gtkconcb.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void 4 | GTK_add_connection(GtkButton *button, gpointer user_data); 5 | 6 | void 7 | GTK_edit_connection(GtkTreeView *treeview, gpointer user_data); 8 | 9 | void 10 | GTK_delete_connection(GtkTreeView *treeview, gpointer user_data); 11 | 12 | void 13 | GTK_set_default_connection(GtkTreeView *treeview, gpointer user_data); 14 | 15 | void 16 | GTK_revert_connections(GtkTreeView *treeview, gpointer user_data); 17 | 18 | void 19 | GTK_create_connection(GtkWidget *widget, gpointer user_data); 20 | 21 | void 22 | GTK_browse_server_executable(GtkWidget *button, gpointer user_data); 23 | 24 | void 25 | GTK_add_file_server(GtkWidget *widget, gpointer user_data); 26 | 27 | void 28 | GTK_add_tcp_server(GtkWidget *button, gpointer user_data); 29 | 30 | void 31 | on_DisableAsync_toggled(GtkToggleButton *togglebutton, gpointer user_data); 32 | 33 | void 34 | on_EnableLogging_toggled(GtkToggleButton *togglebutton, gpointer user_data); 35 | 36 | void 37 | on_ViewLog_clicked(GtkButton *button, gpointer user_data); 38 | 39 | void 40 | on_viewlog_clear(GtkMenuItem *menuitem, gpointer user_data); 41 | 42 | void 43 | on_viewlog_save_as(GtkMenuItem *menuitem, gpointer user_data); 44 | 45 | void 46 | on_viewlog_quit(GtkMenuItem *menuitem, gpointer user_data); 47 | 48 | void 49 | on_viewlog_copy(GtkMenuItem *menuitem, gpointer user_data); 50 | -------------------------------------------------------------------------------- /win/gtk/gtkconnect.gladep: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | GtkHack 6 | gtkconnect 7 | . 8 | . 9 | FALSE 10 | FALSE 11 | TRUE 12 | FALSE 13 | FALSE 14 | gtkconnect.c 15 | gtkconnect.h 16 | gtkconcb.c 17 | gtkconcb.h 18 | gtksupport.c 19 | gtksupport.h 20 | 21 | -------------------------------------------------------------------------------- /win/gtk/gtkconnect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT EDIT THIS FILE - it is generated by Glade. 3 | */ 4 | 5 | GtkWidget* create_Connections (void); 6 | GtkWidget* create_AddConnection (void); 7 | GtkWidget* create_RemoteMachine (void); 8 | GtkWidget* create_LocalExecutable (void); 9 | GtkWidget* create_ConnectTerminal (void); 10 | GtkWidget* create_Troubleshooting (void); 11 | GtkWidget* create_ViewLog (void); 12 | -------------------------------------------------------------------------------- /win/gtk/gtkprogress.h: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: gtkprogress.h,v 1.1 2003-08-31 12:54:24 j_ali Exp $ 3 | */ 4 | /* 5 | GTK+ NetHack Copyright (c) Slash'EM Development Team 2003 6 | GTK+ NetHack may be freely redistributed. See license for details. 7 | */ 8 | 9 | #define NH_GTK_TYPE_PROGRESS_WINDOW nh_gtk_progress_window_get_type() 10 | #define NH_GTK_PROGRESS_WINDOW(obj) G_TYPE_CHECK_INSTANCE_CAST(obj,\ 11 | NH_GTK_TYPE_PROGRESS_WINDOW,\ 12 | NhGtkProgressWindow) 13 | #define NH_GTK_PROGRESS_WINDOW_CLASS(klass) \ 14 | G_TYPE_CHECK_CLASS_CAST(klass,\ 15 | NH_GTK_TYPE_PROGRESS_WINDOW,\ 16 | NhGtkProgressWindowClass) 17 | #define NH_GTK_IS_PROGRESS_WINDOW(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj,\ 18 | NH_GTK_TYPE_PROGRESS_WINDOW) 19 | #define NH_GTK_IS_PROGRESS_WINDOW_CLASS(klass) \ 20 | G_TYPE_CHECK_CLASS_TYPE(klass,\ 21 | NH_GTK_TYPE_PROGRESS_WINDOW) 22 | #define NH_GTK_PROGRESS_WINDOW_GET_CLASS(obj) \ 23 | G_TYPE_INSTANCE_GET_CLASS(obj,\ 24 | NH_GTK_TYPE_PROGRESS_WINDOW,\ 25 | NhGtkProgressWindowClass) 26 | 27 | typedef struct _NhGtkProgressWindowClass NhGtkProgressWindowClass; 28 | 29 | GType nh_gtk_progress_window_get_type(void) G_GNUC_CONST; 30 | GtkWidget *nh_gtk_progress_window_new(const gchar *title, GtkWindow *parent); 31 | void nh_gtk_progress_window_add_stage(NhGtkProgressWindow *w, 32 | const gchar *name); 33 | void nh_gtk_progress_window_complete_stage(NhGtkProgressWindow *w); 34 | void nh_gtk_progress_window_stage_pulse(NhGtkProgressWindow *w); 35 | int nh_gtk_progress_window_stage_auto_pulse(NhGtkProgressWindow *w, 36 | gboolean enable); 37 | void nh_gtk_progress_window_stage_set_fraction(NhGtkProgressWindow *w, 38 | gdouble fraction); 39 | -------------------------------------------------------------------------------- /win/gtk/gtksupport.h: -------------------------------------------------------------------------------- 1 | /* 2 | * DO NOT EDIT THIS FILE - it is generated by Glade. 3 | */ 4 | 5 | #ifdef HAVE_CONFIG_H 6 | # include 7 | #endif 8 | 9 | #include 10 | 11 | /* 12 | * Public Functions. 13 | */ 14 | 15 | /* 16 | * This function returns a widget in a component created by Glade. 17 | * Call it with the toplevel widget in the component (i.e. a window/dialog), 18 | * or alternatively any widget in the component, and the name of the widget 19 | * you want returned. 20 | */ 21 | GtkWidget* lookup_widget (GtkWidget *widget, 22 | const gchar *widget_name); 23 | 24 | 25 | /* Use this function to set the directory containing installed pixmaps. */ 26 | void add_pixmap_directory (const gchar *directory); 27 | 28 | 29 | /* 30 | * Private Functions. 31 | */ 32 | 33 | /* This is used to create the pixmaps used in the interface. */ 34 | GtkWidget* create_pixmap (GtkWidget *widget, 35 | const gchar *filename); 36 | 37 | /* This is used to create the pixbufs used in the interface. */ 38 | GdkPixbuf* create_pixbuf (const gchar *filename); 39 | 40 | /* This is used to set ATK action descriptions. */ 41 | void glade_set_atk_action_description (AtkAction *action, 42 | const gchar *action_name, 43 | const gchar *description); 44 | 45 | -------------------------------------------------------------------------------- /win/proxy/prxychar.c: -------------------------------------------------------------------------------- 1 | /* $Id: prxychar.c,v 1.3 2003-01-01 12:13:33 j_ali Exp $ */ 2 | /* Copyright (c) Slash'EM Development Team 2002-2003 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include "nhxdr.h" 9 | #include "proxycom.h" 10 | #include "prxyclnt.h" 11 | 12 | long * 13 | proxy_map_glyph2char(glyph_map) 14 | struct proxycb_get_glyph_mapping_res *glyph_map; 15 | { 16 | int glyph = 0; 17 | struct proxy_glyph_map_info info; 18 | struct proxy_glyph_mapping *mapping; 19 | long *glyph2rgbsym; 20 | glyph2rgbsym = (long *)alloc(glyph_map->no_glyph * sizeof(long)); 21 | mapping = proxy_glyph_map_first(&info, glyph_map); 22 | while (mapping) { 23 | glyph2rgbsym[glyph++] = mapping->rgbsym; 24 | mapping = proxy_glyph_map_next(&info); 25 | } 26 | proxy_glyph_map_close(&info); 27 | return glyph2rgbsym; 28 | } 29 | -------------------------------------------------------------------------------- /win/proxy/riputil.c: -------------------------------------------------------------------------------- 1 | /* $Id: riputil.c,v 1.1 2001-12-11 20:43:49 j_ali Exp $ */ 2 | /* Copyright (c) Slash'EM Development Team 2001-2002 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #include "hack.h" 6 | 7 | extern const char *killed_by_prefix[]; 8 | 9 | char * 10 | get_killer_string(how) 11 | int how; 12 | { 13 | static char buf[BUFSZ]; 14 | /* Put together death description */ 15 | switch (killer_format) { 16 | default: impossible("bad killer format?"); 17 | case KILLED_BY_AN: 18 | if (Instant_Death) { 19 | Strcpy(buf, "instantly "); 20 | strcat(buf, killed_by_prefix[how]); 21 | } 22 | else if (Quick_Death) { 23 | Strcpy(buf, "quickly "); 24 | strcat(buf, killed_by_prefix[how]); 25 | } 26 | else 27 | Strcpy(buf, killed_by_prefix[how]); 28 | Strcat(buf, an(killer)); 29 | break; 30 | case KILLED_BY: 31 | if (Instant_Death) { 32 | Strcpy(buf, "instantly "); 33 | strcat(buf, killed_by_prefix[how]); 34 | } 35 | else if (Quick_Death) { 36 | Strcpy(buf, "quickly "); 37 | strcat(buf, killed_by_prefix[how]); 38 | } 39 | else 40 | Strcpy(buf, killed_by_prefix[how]); 41 | Strcat(buf, killer); 42 | break; 43 | case NO_KILLER_PREFIX: 44 | Strcpy(buf, killer); 45 | break; 46 | } 47 | return buf; 48 | } 49 | -------------------------------------------------------------------------------- /win/proxy/test_com.h: -------------------------------------------------------------------------------- 1 | /* $Id: test_com.h,v 1.1.2.1 2004-11-18 22:38:10 j_ali Exp $ */ 2 | /* Copyright (c) Slash'EM Development Team 2001-2004 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* 6 | * Header file for test_com.c 7 | */ 8 | 9 | #define FALSE 0 10 | #define TRUE 1 11 | 12 | extern int is_child; 13 | 14 | extern long *alloc(unsigned int nb); 15 | extern void impossible(const char *fmt,...); 16 | extern void nhext_error_handler(int class, const char *error); 17 | extern int child_start(const char *argv0); 18 | extern int child_read(void *handle, void *buf, unsigned int len); 19 | extern int child_write(void *handle, void *buf, unsigned int len); 20 | extern int child_wait0(); 21 | extern int child_wait(); 22 | extern int debug_read(void *handle, void *buf, unsigned int len); 23 | extern int debug_write(void *handle, void *buf, unsigned int len); 24 | extern int parent_read(void *handle, void *buf, unsigned int len); 25 | extern int parent_write(void *handle, void *buf, unsigned int len); 26 | extern void *get_child_readh(); 27 | extern void *get_child_writeh(); 28 | extern void *get_parent_readh(); 29 | extern void *get_parent_writeh(); 30 | -------------------------------------------------------------------------------- /win/share/mapmerge.c: -------------------------------------------------------------------------------- 1 | /* $Id: mapmerge.c,v 1.1 2002-09-01 21:58:19 j_ali Exp $ */ 2 | /* Copyright (c) Slash'EM Development Team 2002 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | #include "hack.h" 6 | 7 | int 8 | main(argc, argv) 9 | int argc; 10 | char **argv; 11 | { 12 | FILE *fpi, *fpo; 13 | int i, j, tile_number = 0; 14 | char buf[BUFSZ], buf2[BUFSZ]; 15 | if (argc < 2) { 16 | (void) fprintf(stderr, "usage: mapmerge outfile [infile] ...\n"); 17 | exit(EXIT_FAILURE); 18 | } 19 | fpo = fopen(argv[1], "w"); 20 | if (!fpo) { 21 | perror(argv[1]); 22 | exit(EXIT_FAILURE); 23 | } 24 | i = -1; 25 | for(j = 2; j < argc; j++) { 26 | fpi = fopen(argv[j], "r"); 27 | if (!fpi) { 28 | perror(argv[j]); 29 | fclose(fpo); 30 | remove(argv[1]); 31 | exit(EXIT_FAILURE); 32 | } 33 | while (fgets(buf, sizeof(buf), fpi)) { 34 | if (sscanf(buf, "tile %*d %[^\n]", buf2) == 1) 35 | fprintf(fpo, "tile %d %s\n", tile_number++, buf2); 36 | else 37 | fputs(buf, fpo); 38 | } 39 | fclose(fpi); 40 | } 41 | fclose(fpo); 42 | exit(EXIT_SUCCESS); 43 | } 44 | -------------------------------------------------------------------------------- /win/share/scripts/import-alg.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/win/share/scripts/import-alg.sh -------------------------------------------------------------------------------- /win/share/scripts/import-mi.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gurrhack/SlashEM-Android/4da26fb238b1f157f897e946333d45b89cba13ab/win/share/scripts/import-mi.sh -------------------------------------------------------------------------------- /win/share/thintile.c: -------------------------------------------------------------------------------- 1 | /* SCCS Id: @(#)thintile.c 3.4 1995/11/26 */ 2 | /* Copyright (c) NetHack Development Team 1995 */ 3 | /* NetHack may be freely redistributed. See license for details. */ 4 | 5 | /* Create a set of overview tiles by eliminating even pixels in original */ 6 | 7 | #include "config.h" 8 | #include "tile.h" 9 | 10 | #ifdef __GO32__ 11 | #include 12 | #endif 13 | 14 | static char *tilefiles[] = { "../win/share/monsters.txt", 15 | "../win/share/objects.txt", 16 | "../win/share/other.txt"}; 17 | 18 | static char *thinfiles[] = { "../win/share/monthin.txt", 19 | "../win/share/objthin.txt", 20 | "../win/share/oththin.txt"}; 21 | static int tilecount; 22 | static int tilecount_per_file; 23 | static int filenum; 24 | 25 | static int 26 | write_thintile(pixels, ttype, number, name) 27 | pixel (*pixels)[MAX_TILE_X]; 28 | const char *ttype; 29 | int number; 30 | const char *name; 31 | { 32 | int i, j; 33 | int retval; 34 | pixel thinpixels[MAX_TILE_Y][MAX_TILE_X]; 35 | 36 | for (j = 0; j < tile_y; j++) 37 | for (i = 0; i < tile_x; i+=2) { 38 | thinpixels[j][i/2] = pixels[j][i]; 39 | } 40 | 41 | tile_x /= 2; 42 | retval = write_text_tile_info(thinpixels, ttype, number, name); 43 | tile_x *= 2; 44 | return retval; 45 | } 46 | 47 | int 48 | main(argc, argv) 49 | int argc; 50 | char *argv[]; 51 | { 52 | int tile_no; 53 | char buf[BUFSZ], ttype[BUFSZ]; 54 | pixel pixels[MAX_TILE_Y][MAX_TILE_X]; 55 | 56 | while (filenum < 3) { 57 | tilecount_per_file = 0; 58 | if (!fopen_text_file(tilefiles[filenum], RDTMODE)) 59 | exit(EXIT_FAILURE); 60 | if (!fopen_text_file(thinfiles[filenum], WRTMODE)) 61 | exit(EXIT_FAILURE); 62 | while (read_text_tile_info(pixels, ttype, &tile_no, buf)) { 63 | write_thintile(pixels, ttype, tile_no, buf); 64 | tilecount_per_file++; 65 | tilecount++; 66 | } 67 | fclose_text_file(); 68 | printf("%d tiles processed from %s\n", 69 | tilecount_per_file, tilefiles[filenum]); 70 | ++filenum; 71 | } 72 | printf("Grand total of %d tiles processed.\n", tilecount); 73 | exit(EXIT_SUCCESS); 74 | /*NOTREACHED*/ 75 | return 0; 76 | } 77 | 78 | /*thintile.c*/ 79 | -------------------------------------------------------------------------------- /win/share/tile_t.h: -------------------------------------------------------------------------------- 1 | /* $Id: tile_t.h,v 1.3 2003-05-21 04:15:53 wacko Exp $ */ 2 | /* NetHack may be freely redistributed. See license for details. */ 3 | 4 | typedef unsigned char pixval; 5 | 6 | typedef struct { 7 | pixval r, g, b; 8 | } pixel; 9 | 10 | #define MAXCOLORMAPSIZE 256 11 | 12 | #define CM_RED 0 13 | #define CM_GREEN 1 14 | #define CM_BLUE 2 15 | 16 | #define DEFAULT_BACKGROUND { 71, 108, 108 } /* For transparancy */ 17 | 18 | /* shared between reader and writer */ 19 | extern pixval ColorMap[3][MAXCOLORMAPSIZE]; 20 | extern int colorsinmap; 21 | /* writer's accumulated colormap */ 22 | extern pixval MainColorMap[3][MAXCOLORMAPSIZE]; 23 | extern int colorsinmainmap; 24 | 25 | #include "dlb.h" /* for MODEs */ 26 | 27 | extern int tile_x, tile_y; 28 | 29 | /* 30 | #define MAX_TILE_X 32 31 | #define MAX_TILE_Y 32 32 | #define MAX_TILE_X 48 33 | #define MAX_TILE_Y 64 34 | */ 35 | #define MAX_TILE_X 128 36 | #define MAX_TILE_Y 128 37 | 38 | #define Fprintf (void) fprintf 39 | 40 | #define pixel_equal(x,y) ((x.r == y.r) && (x.g == y.g) && (x.b == y.b)) 41 | 42 | extern boolean FDECL(fopen_text_file, (const char *, const char *)); 43 | extern boolean FDECL(fopen_virtual_text_file, (const char *base_name, 44 | const char *overlay_name, const char *type)); 45 | extern boolean FDECL(peek_text_tile_info, (char ttype[BUFSZ], int *number, 46 | char name[BUFSZ])); 47 | extern boolean FDECL(read_text_tile_info, (pixel (*)[MAX_TILE_X], 48 | char *ttype, int *number, char *name)); 49 | extern boolean FDECL(read_text_tile, (pixel (*)[MAX_TILE_X])); 50 | extern boolean FDECL(write_text_tile_info, (pixel (*)[MAX_TILE_X], 51 | const char *ttype, int number, const char *name)); 52 | extern boolean FDECL(write_text_tile, (pixel (*)[MAX_TILE_X])); 53 | extern boolean NDECL(fclose_text_file); 54 | 55 | extern void NDECL(init_colormap); 56 | extern void NDECL(merge_colormap); 57 | 58 | #if defined(MICRO) || defined(WIN32) 59 | #undef exit 60 | # if !defined(MSDOS) && !defined(WIN32) 61 | extern void FDECL(exit, (int)); 62 | # endif 63 | #endif 64 | 65 | /*tile_t.h*/ 66 | -------------------------------------------------------------------------------- /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.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/tiles128.mak: -------------------------------------------------------------------------------- 1 | default: all 2 | 3 | all: ..\binary\tiles128.bmp 4 | 5 | clean: 6 | -del ..\win\share\mon128.txt 7 | -del ..\win\share\obj128.txt 8 | -del ..\win\share\oth128.txt 9 | 10 | #========================================================== 11 | # Building the tiles file tile.bmp, tile32.bmp, tile128.bmp 12 | #========================================================== 13 | 14 | ..\src\tiles128.bmp : ..\win\share\mon128.txt ..\win\share\obj128.txt \ 15 | ..\win\share\oth128.txt ..\util\tile2bmp.exe 16 | chdir ..\src 17 | ..\util\tile2bmp.exe tiles128.bmp ..\win\share\mon128.txt ..\win\share\obj128.txt \ 18 | ..\win\share\oth128.txt 19 | chdir ..\build 20 | 21 | ..\binary\tiles128.bmp: ..\src\tiles128.bmp 22 | @copy ..\src\tiles128.bmp ..\binary\tiles128.bmp 23 | 24 | ..\win\share\mon128.txt: ..\util\txtbg.exe ..\win\share\absurd\mon128ab.txt 25 | ..\util\txtbg ..\win\share\absurd\mon128ab.txt ..\win\share\mon128.txt 26 | 27 | ..\win\share\obj128.txt: ..\util\txtbg.exe ..\win\share\absurd\obj128ab.txt 28 | ..\util\txtbg ..\win\share\absurd\obj128ab.txt ..\win\share\obj128.txt 29 | 30 | ..\win\share\oth128.txt: ..\util\txtbg.exe ..\win\share\absurd\oth128ab.txt 31 | ..\util\txtbg ..\win\share\absurd\oth128ab.txt ..\win\share\oth128.txt 32 | 33 | 34 | --------------------------------------------------------------------------------