diff -Prub nethack-3.4.2/include/config.h noegnud-0.8.1_nethack-3.4.2/include/config.h --- nethack-3.4.2/include/config.h 2003-08-30 02:07:15.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/include/config.h 2003-09-01 12:05:40.000000000 +0200 @@ -42,17 +42,18 @@ * Define all of those you want supported in your binary. * Some combinations make no sense. See the installation document. */ -#define TTY_GRAPHICS /* good old tty based graphics */ +/* #define TTY_GRAPHICS */ /* good old tty based graphics */ /* #define X11_GRAPHICS */ /* X11 interface */ /* #define QT_GRAPHICS */ /* Qt interface */ /* #define GNOME_GRAPHICS */ /* Gnome interface */ /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */ +#define NOEGNUD_GRAPHICS /* noeGNUd interface */ /* * Define the default window system. This should be one that is compiled * into your system (see defines above). Known window systems are: * - * tty, X11, mac, amii, BeOS, Qt, Gem, Gnome + * tty, X11, mac, amii, BeOS, Qt, Gem, Gnome, noeGNUd */ /* MAC also means MAC windows */ @@ -111,6 +112,13 @@ # define HACKDIR "\\nethack" #endif +#ifdef NOEGNUD_GRAPHICS +# define DEFAULT_WINDOW_SYS "noegnud" +# define USER_SOUNDS +# define USER_SOUNDS_REGEX +# define POSITIONBAR +#endif + #ifndef DEFAULT_WINDOW_SYS # define DEFAULT_WINDOW_SYS "tty" #endif @@ -167,11 +175,11 @@ #ifdef UNIX /* path and file name extension for compression program */ -#define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */ -#define COMPRESS_EXTENSION ".Z" /* compress's extension */ +/* #define COMPRESS "/usr/bin/compress" */ /* Lempel-Ziv compression */ +/* #define COMPRESS_EXTENSION ".Z" */ /* compress's extension */ /* An example of one alternative you might want to use: */ -/* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */ -/* #define COMPRESS_EXTENSION ".gz" */ /* normal gzip extension */ +#define COMPRESS "/bin/gzip" /* FSF gzip compression */ +#define COMPRESS_EXTENSION ".gz" /* normal gzip extension */ #endif #ifndef COMPRESS @@ -183,7 +191,7 @@ * a tar-like file, thus making a neater installation. See *conf.h * for detailed configuration. */ -/* #define DLB */ /* not supported on all platforms */ +#define DLB /* not supported on all platforms */ /* * Defining INSURANCE slows down level changes, but allows games that @@ -302,7 +310,7 @@ * functions that have been macroized. */ -/* #define VISION_TABLES */ /* use vision tables generated at compile time */ +#define VISION_TABLES /* use vision tables generated at compile time */ #ifndef VISION_TABLES # ifndef NO_MACRO_CPATH # define MACRO_CPATH /* use clear_path macros instead of functions */ diff -Prub nethack-3.4.2/include/flag.h noegnud-0.8.1_nethack-3.4.2/include/flag.h --- nethack-3.4.2/include/flag.h 2003-08-30 02:07:17.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/include/flag.h 2003-09-01 12:05:40.000000000 +0200 @@ -177,7 +177,7 @@ boolean sanity_check; /* run sanity checks */ boolean mon_polycontrol; /* debug: control monster polymorphs */ #endif -#ifdef TTY_GRAPHICS +#if defined(TTY_GRAPHICS) || defined(NOEGNUD_GRAPHICS) char prevmsg_window; /* type of old message window to use */ boolean extmenu; /* extended commands use menu interface */ #endif diff -Prub nethack-3.4.2/include/global.h noegnud-0.8.1_nethack-3.4.2/include/global.h --- nethack-3.4.2/include/global.h 2003-08-30 02:07:18.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/include/global.h 2003-09-01 12:05:40.000000000 +0200 @@ -257,7 +257,7 @@ # define EXIT_FAILURE 1 #endif -#if defined(X11_GRAPHICS) || defined(QT_GRAPHICS) || defined(GNOME_GRAPHICS) || defined(MSWIN_GRAPHICS) +#if defined(X11_GRAPHICS) || defined(QT_GRAPHICS) || defined(GNOME_GRAPHICS) || defined(MSWIN_GRAPHICS) || defined(NOEGNUD_GRAPHICS) # ifndef USE_TILES # define USE_TILES /* glyph2tile[] will be available */ # endif diff -Prub nethack-3.4.2/include/unixconf.h noegnud-0.8.1_nethack-3.4.2/include/unixconf.h --- nethack-3.4.2/include/unixconf.h 2003-08-30 02:07:24.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/include/unixconf.h 2003-09-01 12:05:40.000000000 +0200 @@ -37,7 +37,7 @@ #define NETWORK /* if running on a networked system */ /* e.g. Suns sharing a playground through NFS */ /* #define SUNOS4 */ /* SunOS 4.x */ -/* #define LINUX */ /* Another Unix clone */ +#define LINUX /* Another Unix clone */ /* #define CYGWIN32 */ /* Unix on Win32 -- use with case sensitive defines */ /* #define GENIX */ /* Yet Another Unix Clone */ /* #define HISX */ /* Bull Unix for XPS Machines */ diff -Prub nethack-3.4.2/src/cmd.c noegnud-0.8.1_nethack-3.4.2/src/cmd.c --- nethack-3.4.2/src/cmd.c 2003-08-30 02:07:27.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/src/cmd.c 2003-09-01 12:05:40.000000000 +0200 @@ -320,6 +320,14 @@ } #ifdef TTY_GRAPHICS +# define TTYNOEGNUD_GRAPHICS +#endif + +#ifdef NOEGNUD_GRAPHICS +# define TTYNOEGNUD_GRAPHICS +#endif + +#ifdef TTYNOEGNUD_GRAPHICS #define MAX_EXT_CMD 40 /* Change if we ever have > 40 ext cmds */ /* * This is currently used only by the tty port and is diff -Prub nethack-3.4.2/src/mapglyph.c noegnud-0.8.1_nethack-3.4.2/src/mapglyph.c --- nethack-3.4.2/src/mapglyph.c 2003-08-30 02:07:33.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/src/mapglyph.c 2003-09-01 12:05:40.000000000 +0200 @@ -19,8 +19,12 @@ CLR_WHITE, /* frosty */ }; -#if !defined(TTY_GRAPHICS) -#define has_color(n) TRUE +#ifndef NOEGNUD_GRAPHICS +# if !defined(TTY_GRAPHICS) +# define has_color(n) TRUE +# endif +#else +# define has_color(n) TRUE #endif #ifdef TEXTCOLOR diff -Prub nethack-3.4.2/src/options.c noegnud-0.8.1_nethack-3.4.2/src/options.c --- nethack-3.4.2/src/options.c 2003-08-30 02:07:36.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/src/options.c 2003-09-01 12:05:40.000000000 +0200 @@ -72,7 +72,7 @@ # if defined(MICRO) || defined(WIN32) {"color", &iflags.wc_color,TRUE, SET_IN_GAME}, /*WC*/ # else /* systems that support multiple terminals, many monochrome */ - {"color", &iflags.wc_color, FALSE, SET_IN_GAME}, /*WC*/ + {"color", &iflags.wc_color, TRUE, SET_IN_GAME}, /*WC*/ # endif {"confirm",&flags.confirm, TRUE, SET_IN_GAME}, #if defined(TERMLIB) && !defined(MAC_GRAPHICS_ENV) @@ -81,8 +81,8 @@ {"DECgraphics", (boolean *)0, FALSE, SET_IN_FILE}, #endif {"eight_bit_tty", &iflags.wc_eight_bit_input, FALSE, SET_IN_GAME}, /*WC*/ -#ifdef TTY_GRAPHICS - {"extmenu", &iflags.extmenu, FALSE, SET_IN_GAME}, +#if defined(TTY_GRAPHICS) || defined(NOEGNUD_GRAPHICS) + {"extmenu", &iflags.extmenu, TRUE, SET_IN_GAME}, #else {"extmenu", (boolean *)0, FALSE, SET_IN_FILE}, #endif @@ -100,7 +100,7 @@ #endif {"fullscreen", &iflags.wc2_fullscreen, FALSE, SET_IN_FILE}, {"help", &flags.help, TRUE, SET_IN_GAME}, - {"hilite_pet", &iflags.wc_hilite_pet, FALSE, SET_IN_GAME}, /*WC*/ + {"hilite_pet", &iflags.wc_hilite_pet, TRUE, SET_IN_GAME}, /*WC*/ #ifdef ASCIIGRAPH {"IBMgraphics", &iflags.IBMgraphics, FALSE, SET_IN_GAME}, #else diff -Prub nethack-3.4.2/src/rip.c noegnud-0.8.1_nethack-3.4.2/src/rip.c --- nethack-3.4.2/src/rip.c 2003-08-30 02:07:39.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/src/rip.c 2003-09-01 12:05:40.000000000 +0200 @@ -8,7 +8,7 @@ extern const char * const killed_by_prefix[]; /* from topten.c */ -#if defined(TTY_GRAPHICS) || defined(X11_GRAPHICS) || defined(GEM_GRAPHICS) || defined(MSWIN_GRAPHICS) +#if defined(TTY_GRAPHICS) || defined(X11_GRAPHICS) || defined(GEM_GRAPHICS) || defined(MSWIN_GRAPHICS) || defined(NOEGNUD_GRAPHICS) # define TEXT_TOMBSTONE #endif #if defined(mac) || defined(__BEOS__) || defined(WIN32_GRAPHICS) diff -Prub nethack-3.4.2/src/windows.c noegnud-0.8.1_nethack-3.4.2/src/windows.c --- nethack-3.4.2/src/windows.c 2003-08-30 02:07:43.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/src/windows.c 2003-09-01 12:05:40.000000000 +0200 @@ -40,6 +40,9 @@ #ifdef MSWIN_GRAPHICS extern struct window_procs mswin_procs; #endif +#ifdef NOEGNUD_GRAPHICS +extern struct window_procs noegnud_procs; +#endif STATIC_DCL void FDECL(def_raw_print, (const char *s)); @@ -81,6 +84,9 @@ #ifdef MSWIN_GRAPHICS { &mswin_procs, 0 }, #endif +#ifdef NOEGNUD_GRAPHICS + { &noegnud_procs, 0 }, +#endif { 0, 0 } /* must be last */ }; diff -Prub nethack-3.4.2/sys/unix/Makefile.src noegnud-0.8.1_nethack-3.4.2/sys/unix/Makefile.src --- nethack-3.4.2/sys/unix/Makefile.src 2003-08-30 02:08:04.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/sys/unix/Makefile.src 2003-09-01 12:06:53.000000000 +0200 @@ -61,7 +61,7 @@ # if you get setcgtty() warnings during execution, you are feeding gcc # a non-ANSI -- either run fixincludes on it or use # -traditional in CFLAGS -# CC = gcc +CC = gcc # # For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following: # @@ -124,8 +124,16 @@ # flags for Linux # compile normally -# CFLAGS = -O2 -fomit-frame-pointer -I../include -# LFLAGS = -L/usr/X11R6/lib + +COMMON_CFLAGS = -DNETHACK_3_4_2 -fomit-frame-pointer -I../include `sdl-config --cflags` + +STD_CFLAGS = -O2 -ffast-math $(COMMON_CFLAGS) +DBG_CFLAGS = -g -Wall -DNOEGNUDDEBUG $(COMMON_CFLAGS) + +CFLAGS = $(STD_CFLAGS) + +LFLAGS = -L/usr/X11R6/lib + # OR compile backwards compatible a.out format # CFLAGS = -O2 -b i486-linuxaout -fomit-frame-pointer -I../include # LFLAGS = -b i486-linuxaout -L/usr/X11R6/lib @@ -151,8 +159,8 @@ # flags for debugging: # CFLAGS = -g -I../include -CFLAGS = -O -I../include -LFLAGS = +# CFLAGS = -O -I../include +# LFLAGS = # The Qt and Be window systems are written in C++, while the rest of # NetHack is standard C. If using Qt, uncomment the LINK line here to get @@ -212,10 +220,65 @@ # ../win/BeOS/NHMenuWindow.cpp ../win/BeOS/NHMapWindow.cpp tile.c #WINBEOBJ = winbe.o NHWindow.o NHMenuWindow.o NHMapWindow.o tile.o +# Files for Entro-P's OpenGL 3D interface :: noeGNUd + +WINNOEGNUDLIB = `sdl-config --libs` -lSDL_image -lSDL_mixer -lGL -lGLU + +NOEGNUD = ../win/noegnud/noegnud + +WINNOEGNUDSRC = $(NOEGNUD)_interface.c \ + $(NOEGNUD)_common.c \ + $(NOEGNUD)_glfuncs.c \ + $(NOEGNUD)_collection.c \ + $(NOEGNUD)_tilesets.c \ + $(NOEGNUD)_gui.c \ + $(NOEGNUD)_rip.c \ + $(NOEGNUD)_options.c \ + $(NOEGNUD)_typeloader.c \ + $(NOEGNUD)_fonts.c \ + $(NOEGNUD)_gff_tga.c \ + $(NOEGNUD)_render.c \ + $(NOEGNUD)_render_char.c \ + $(NOEGNUD)_render_tile.c \ + $(NOEGNUD)_render_3d.c \ + $(NOEGNUD)_lang.c \ + $(NOEGNUD)_debug.c \ + $(NOEGNUD)_mem.c \ + $(NOEGNUD)_reference.c \ + $(NOEGNUD)_textcolour.c \ + $(NOEGNUD)_textcolouring.c \ + $(NOEGNUD)_sound.c \ + $(NOEGNUD)_widgettheme.c \ + tile.c +WINNOEGNUDOBJ = $(NOEGNUD)_interface.o \ + $(NOEGNUD)_common.o \ + $(NOEGNUD)_glfuncs.o \ + $(NOEGNUD)_collection.o \ + $(NOEGNUD)_tilesets.o \ + $(NOEGNUD)_gui.o \ + $(NOEGNUD)_rip.o \ + $(NOEGNUD)_options.o \ + $(NOEGNUD)_typeloader.o \ + $(NOEGNUD)_fonts.o \ + $(NOEGNUD)_gff_tga.o \ + $(NOEGNUD)_render.o \ + $(NOEGNUD)_render_char.o \ + $(NOEGNUD)_render_tile.o \ + $(NOEGNUD)_render_3d.o \ + $(NOEGNUD)_lang.o \ + $(NOEGNUD)_debug.o \ + $(NOEGNUD)_mem.o \ + $(NOEGNUD)_reference.o \ + $(NOEGNUD)_textcolour.o \ + $(NOEGNUD)_textcolouring.o \ + $(NOEGNUD)_sound.o \ + $(NOEGNUD)_widgettheme.o \ + tile.o + # # -WINSRC = $(WINTTYSRC) -WINOBJ = $(WINTTYOBJ) +WINSRC = $(WINTTYSRC) $(WINNOEGNUDSRC) +WINOBJ = $(WINTTYOBJ) $(WINNOEGNUDOBJ) # on some systems the termcap library is in -ltermcap or -lcurses # on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead @@ -230,8 +293,8 @@ # WINTTYLIB = -ltermcap # WINTTYLIB = -lcurses # WINTTYLIB = -lcurses16 -# WINTTYLIB = -lncurses -WINTTYLIB = -ltermlib +WINTTYLIB = -lncurses +# WINTTYLIB = -ltermlib # # libraries for X11 # If USE_XPM is defined in config.h, you will also need -lXpm here. @@ -255,7 +318,7 @@ # libraries for BeOS WINBELIB = -lbe -WINLIB = $(WINTTYLIB) +WINLIB = $(WINTTYLIB) $(WINNOEGNUDLIB) # any other strange libraries your system needs (for Sysunix only -- the more # specialized targets should already be right) @@ -285,7 +348,7 @@ LIBS = # make NetHack -GAME = nethack +GAME = noegnud-0.8.0-nethack-3.4.2 # GAME = nethack.prg # if you defined RANDOM in unixconf.h/tosconf.h since your system did not come @@ -338,7 +401,7 @@ GENCSRC = monstr.c vis_tab.c #tile.c # all windowing-system-dependent .c (for dependencies and such) -WINCSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC) +WINCSRC = $(WINTTYSRC) $(WINX11SRC) $(WINGNOMESRC) $(WINGEMSRC) $(WINNOEGNUDSRC) # all windowing-system-dependent .cpp (for dependencies and such) WINCXXSRC = $(WINQTSRC) $(WINBESRC) diff -Prub nethack-3.4.2/sys/unix/Makefile.top noegnud-0.8.1_nethack-3.4.2/sys/unix/Makefile.top --- nethack-3.4.2/sys/unix/Makefile.top 2003-08-30 02:08:04.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/sys/unix/Makefile.top 2003-09-01 12:05:40.000000000 +0200 @@ -14,18 +14,21 @@ # MAKE = make # make NetHack -PREFIX = /usr -GAME = nethack +PREFIX = /usr/local +GAMEUI = noegnud-0.8.0 +GAMEVARIANT = nethack-3.4.2 +GAMESHORT = noegnud-$(GAMEVARIANT) +GAME = $(GAMEUI)-$(GAMEVARIANT) # GAME = nethack.prg GAMEUID = games GAMEGRP = bin # Permissions - some places use setgid instead of setuid, for instance # See also the option "SECURE" in include/config.h -GAMEPERM = 04755 -FILEPERM = 0644 -EXEPERM = 0755 -DIRPERM = 0755 +GAMEPERM = 02755 +FILEPERM = 0664 +EXEPERM = 0775 +DIRPERM = 0775 # GAMEDIR also appears in config.h as "HACKDIR". # VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else GAMEDIR @@ -35,9 +38,9 @@ # therefore there should not be anything in GAMEDIR that you want to keep # (if there is, you'll have to do the installation by hand or modify the # instructions) -GAMEDIR = $(PREFIX)/games/lib/$(GAME)dir +GAMEDIR = $(PREFIX)/lib/$(GAMEUI)/$(GAMEVARIANT) VARDIR = $(GAMEDIR) -SHELLDIR = $(PREFIX)/games +SHELLDIR = $(PREFIX)/bin # per discussion in Install.X11 and Install.Qt VARDATND = @@ -185,11 +188,13 @@ $(MAKE) dofiles-$${target-nodlb} cp src/$(GAME) $(GAMEDIR) cp util/recover $(GAMEDIR) - -rm -f $(SHELLDIR)/$(GAME) + -rm -f $(SHELLDIR)/$(GAME) $(SHELLDIR)/$(GAMESHORT) sed -e 's;/usr/games/lib/nethackdir;$(GAMEDIR);' \ -e 's;HACKDIR/nethack;HACKDIR/$(GAME);' \ < sys/unix/nethack.sh \ > $(SHELLDIR)/$(GAME) + ln -s $(SHELLDIR)/$(GAME) $(SHELLDIR)/$(GAMESHORT) + # set up their permissions -( cd $(GAMEDIR) ; $(CHOWN) $(GAMEUID) $(GAME) recover ; \ $(CHGRP) $(GAMEGRP) $(GAME) recover ) diff -Prub nethack-3.4.2/sys/unix/Makefile.utl noegnud-0.8.1_nethack-3.4.2/sys/unix/Makefile.utl --- nethack-3.4.2/sys/unix/Makefile.utl 2003-08-30 02:08:04.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/sys/unix/Makefile.utl 2003-09-01 12:05:40.000000000 +0200 @@ -15,7 +15,7 @@ # if you are using gcc as your compiler, # uncomment the CC definition below if it's not in your environment -# CC = gcc +CC = gcc # # For Bull DPX/2 systems at B.O.S. 2.0 or higher use the following: # @@ -101,11 +101,11 @@ # yacc/lex programs to use to generate *_comp.h, *_lex.c, and *_yacc.c. # if, instead of yacc/lex you have bison/flex, comment/uncomment the following. -YACC = yacc -LEX = lex -# YACC = bison -y +# YACC = yacc +# LEX = lex +YACC = bison -y # YACC = byacc -# LEX = flex +LEX = flex # these are the names of the output files from YACC/LEX. Under MS-DOS # and similar systems, they may differ diff -Prub nethack-3.4.2/sys/unix/nethack.sh noegnud-0.8.1_nethack-3.4.2/sys/unix/nethack.sh --- nethack-3.4.2/sys/unix/nethack.sh 2003-08-30 02:08:04.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/sys/unix/nethack.sh 2003-09-01 12:09:40.000000000 +0200 @@ -1,61 +1,11 @@ #!/bin/sh # SCCS Id: @(#)nethack.sh 3.4 1990/02/26 +# Edited for noeGNUd by Clive Crous 2003/09/01 HACKDIR=/usr/games/lib/nethackdir export HACKDIR HACK=$HACKDIR/nethack -MAXNROFPLAYERS=4 - -# Since Nethack.ad is installed in HACKDIR, add it to XUSERFILESEARCHPATH -case "x$XUSERFILESEARCHPATH" in -x) XUSERFILESEARCHPATH="$HACKDIR/%N.ad" - ;; -*) XUSERFILESEARCHPATH="$XUSERFILESEARCHPATH:$HACKDIR/%N.ad" - ;; -esac -export XUSERFILESEARCHPATH - -# see if we can find the full path name of PAGER, so help files work properly -# assume that if someone sets up a special variable (HACKPAGER) for NetHack, -# it will already be in a form acceptable to NetHack -# ideas from brian@radio.astro.utoronto.ca -if test \( "xxx$PAGER" != xxx \) -a \( "xxx$HACKPAGER" = xxx \) -then - - HACKPAGER=$PAGER - -# use only the first word of the pager variable -# this prevents problems when looking for file names with trailing -# options, but also makes the options unavailable for later use from -# NetHack - for i in $HACKPAGER - do - HACKPAGER=$i - break - done - - if test ! -f $HACKPAGER - then - IFS=: - for i in $PATH - do - if test -f $i/$HACKPAGER - then - HACKPAGER=$i/$HACKPAGER - export HACKPAGER - break - fi - done - IFS=' ' - fi - if test ! -f $HACKPAGER - then - echo Cannot find $PAGER -- unsetting PAGER. - unset HACKPAGER - unset PAGER - fi -fi - +MAXNROFPLAYERS=1 cd $HACKDIR case $1 in diff -Prub nethack-3.4.2/util/makedefs.c noegnud-0.8.1_nethack-3.4.2/util/makedefs.c --- nethack-3.4.2/util/makedefs.c 2003-08-30 02:08:16.000000000 +0200 +++ noegnud-0.8.1_nethack-3.4.2/util/makedefs.c 2003-09-01 12:05:40.000000000 +0200 @@ -780,6 +780,9 @@ #ifdef BEOS_GRAPHICS "BeOS InterfaceKit", #endif +#ifdef NOEGNUD_GRAPHICS + "noeGNUd", +#endif 0 };