update to version 3.4.3.
This commit is contained in:
parent
0414c08fd6
commit
67ea36458d
@ -1,14 +1,16 @@
|
||||
# $OpenBSD: Makefile,v 1.11 2003/06/18 21:43:40 pvalchev Exp $
|
||||
# $OpenBSD: Makefile,v 1.12 2004/08/11 10:15:07 espie Exp $
|
||||
|
||||
COMMENT= "common data for the nethack/slash ports"
|
||||
DISTNAME= nethack-3.4.1
|
||||
PKGNAME= hackdata-3.4.1
|
||||
V=3.4.3
|
||||
DISTNAME= nethack-$V
|
||||
PKGNAME= hackdata-$V
|
||||
CATEGORIES= games
|
||||
|
||||
MASTER_SITES= ftp://ftp.nethack.org/pub/nethack/nh340/src/ \
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nethack/} \
|
||||
ftp://ftp.nethack.org/pub/nethack/nh${V:S/.//g}/src/ \
|
||||
ftp://ftp.uu.net/pub/games/nethack/sources/ \
|
||||
${MASTER_SITE_GNU:=nethack/}
|
||||
DISTFILES= nethack-341.tgz
|
||||
DISTFILES= nethack-${V:S/.//g}-src.tgz
|
||||
|
||||
MAINTAINER= Marc Espie <espie@openbsd.org>
|
||||
|
||||
@ -22,9 +24,9 @@ EXTRACT_ONLY=
|
||||
|
||||
post-extract:
|
||||
@cd ${WRKDIR} && ${TAR} zxqf ${FULLDISTDIR}/${DISTFILES} \
|
||||
nethack-3.4.1/win/X11/ibm.bdf \
|
||||
nethack-3.4.1/win/X11/nh10.bdf \
|
||||
nethack-3.4.1/doc/Guidebook.txt
|
||||
nethack-$V/win/X11/ibm.bdf \
|
||||
nethack-$V/win/X11/nh10.bdf \
|
||||
nethack-$V/doc/Guidebook.txt
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC}/win/X11 && \
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (nethack-341.tgz) = aefcbeb20210b2d64511c84bd03c3e4e
|
||||
RMD160 (nethack-341.tgz) = d28255e76248a8658b4c08e9d55a849dd6572b17
|
||||
SHA1 (nethack-341.tgz) = 91eec5d20fb0fe676f92e1149e3b0360470aef77
|
||||
MD5 (nethack-343-src.tgz) = 21479c95990eefe7650df582426457f9
|
||||
RMD160 (nethack-343-src.tgz) = 42f600d24715a0b7e631b357c135761410b3ca95
|
||||
SHA1 (nethack-343-src.tgz) = c26537093c38152bc0fbcec20468d975b35f59fd
|
||||
|
@ -1,16 +1,16 @@
|
||||
# $OpenBSD: Makefile,v 1.35 2004/08/10 11:23:24 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.36 2004/08/11 10:15:07 espie Exp $
|
||||
# $FreeBSD: Makefile,v 1.13 1997/12/25 22:29:17 asami Exp $
|
||||
|
||||
COMMENT= "dungeon explorin', hackin', game. Piece of cake"
|
||||
V=3.4.1
|
||||
V=3.4.3
|
||||
DISTNAME= nethack-$V
|
||||
CATEGORIES= games
|
||||
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=nethack/} \
|
||||
ftp://ftp.nethack.org/pub/nethack/nh341/src/ \
|
||||
ftp://ftp.nethack.org/pub/nethack/nh${V:S/.//g}/src/ \
|
||||
ftp://ftp.uu.net/pub/games/nethack/sources/ \
|
||||
${MASTER_SITE_GNU:=nethack/}
|
||||
DISTFILES= nethack-${V:S/.//g}.tgz
|
||||
DISTFILES= nethack-${V:S/.//g}-src.tgz
|
||||
|
||||
HOMEPAGE= http://nethack.org/
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (nethack-341.tgz) = aefcbeb20210b2d64511c84bd03c3e4e
|
||||
RMD160 (nethack-341.tgz) = d28255e76248a8658b4c08e9d55a849dd6572b17
|
||||
SHA1 (nethack-341.tgz) = 91eec5d20fb0fe676f92e1149e3b0360470aef77
|
||||
MD5 (nethack-343-src.tgz) = 21479c95990eefe7650df582426457f9
|
||||
RMD160 (nethack-343-src.tgz) = 42f600d24715a0b7e631b357c135761410b3ca95
|
||||
SHA1 (nethack-343-src.tgz) = c26537093c38152bc0fbcec20468d975b35f59fd
|
||||
|
@ -1,16 +1,16 @@
|
||||
$OpenBSD: patch-include_config_h,v 1.4 2003/02/25 00:05:07 espie Exp $
|
||||
--- include/config.h.orig Sun Feb 23 15:43:19 2003
|
||||
+++ include/config.h Tue Feb 25 00:48:38 2003
|
||||
$OpenBSD: patch-include_config_h,v 1.5 2004/08/11 10:15:07 espie Exp $
|
||||
--- include/config.h.orig Mon Dec 8 00:39:13 2003
|
||||
+++ include/config.h Tue Aug 10 13:32:55 2004
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
#ifdef QT_GRAPHICS
|
||||
# define DEFAULT_WC_TILED_MAP /* Default to tiles if users doesn't say wc_ascii_map */
|
||||
-# define USER_SOUNDS /* Use sounds */
|
||||
+/* # define USER_SOUNDS /* Use sounds */
|
||||
# define USER_SOUNDS_REGEX
|
||||
# define USE_XPM /* Use XPM format for images (required) */
|
||||
# define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.ppm) */
|
||||
@@ -124,7 +124,7 @@
|
||||
# ifndef __APPLE__
|
||||
# define USER_SOUNDS_REGEX
|
||||
# endif
|
||||
@@ -126,7 +126,7 @@
|
||||
* would allow:
|
||||
* xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 >x11tiles_big.xpm
|
||||
*/
|
||||
@ -19,7 +19,7 @@ $OpenBSD: patch-include_config_h,v 1.4 2003/02/25 00:05:07 espie Exp $
|
||||
# ifdef USE_XPM
|
||||
# define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */
|
||||
# endif
|
||||
@@ -139,6 +139,7 @@
|
||||
@@ -141,6 +141,7 @@
|
||||
* playground.
|
||||
*/
|
||||
|
||||
@ -27,7 +27,7 @@ $OpenBSD: patch-include_config_h,v 1.4 2003/02/25 00:05:07 espie Exp $
|
||||
#ifndef WIZARD /* allow for compile-time or Makefile changes */
|
||||
# ifndef KR1ED
|
||||
# define WIZARD "wizard" /* the person allowed to use the -D option */
|
||||
@@ -167,11 +168,13 @@
|
||||
@@ -169,11 +170,13 @@
|
||||
|
||||
#ifdef UNIX
|
||||
/* path and file name extension for compression program */
|
||||
@ -43,7 +43,7 @@ $OpenBSD: patch-include_config_h,v 1.4 2003/02/25 00:05:07 espie Exp $
|
||||
#endif
|
||||
|
||||
#ifndef COMPRESS
|
||||
@@ -302,7 +305,7 @@ typedef unsigned char uchar;
|
||||
@@ -300,7 +303,7 @@ typedef unsigned char uchar;
|
||||
* functions that have been macroized.
|
||||
*/
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
$OpenBSD: patch-include_system_h,v 1.2 2002/03/23 14:51:46 espie Exp $
|
||||
--- include/system.h.orig Wed Mar 20 18:42:55 2002
|
||||
+++ include/system.h Fri Mar 22 08:11:35 2002
|
||||
$OpenBSD: patch-include_system_h,v 1.3 2004/08/11 10:15:07 espie Exp $
|
||||
--- include/system.h.orig Mon Dec 8 00:39:13 2003
|
||||
+++ include/system.h Tue Aug 10 13:34:10 2004
|
||||
@@ -521,11 +521,15 @@ E struct tm *FDECL(localtime, (const tim
|
||||
# endif
|
||||
# endif
|
||||
|
||||
+# if defined(BSD)
|
||||
+#if defined(BSD)
|
||||
+/* no declaration needed; it's in time.h */
|
||||
+#else
|
||||
# if defined(ULTRIX) || defined(SYSV) || defined(MICRO) || defined(VMS) || defined(MAC) || (defined(HPUX) && defined(_POSIX_SOURCE))
|
||||
# if defined(ULTRIX) || (defined(BSD) && defined(POSIX_TYPES)) || defined(SYSV) || defined(MICRO) || defined(VMS) || defined(MAC) || (defined(HPUX) && defined(_POSIX_SOURCE))
|
||||
E time_t FDECL(time, (time_t *));
|
||||
# else
|
||||
E long FDECL(time, (time_t *));
|
||||
|
@ -1,21 +1,18 @@
|
||||
$OpenBSD: patch-include_unixconf_h,v 1.3 2002/03/23 14:51:46 espie Exp $
|
||||
--- include/unixconf.h.orig Thu Mar 21 00:42:56 2002
|
||||
+++ include/unixconf.h Sat Mar 23 15:25:25 2002
|
||||
@@ -19,7 +19,12 @@
|
||||
$OpenBSD: patch-include_unixconf_h,v 1.4 2004/08/11 10:15:07 espie Exp $
|
||||
--- include/unixconf.h.orig Mon Dec 8 00:39:13 2003
|
||||
+++ include/unixconf.h Tue Aug 10 13:34:38 2004
|
||||
@@ -19,6 +19,10 @@
|
||||
*/
|
||||
|
||||
/* define exactly one of the following four choices */
|
||||
-/* #define BSD 1 */ /* define for 4.n BSD */
|
||||
+/* procure the real define BSD */
|
||||
+#ifdef HAVE_SYS_PARAM_H
|
||||
+#include <sys/param.h>
|
||||
+#endif
|
||||
+/* #define BSD 1 /* define for 4.n BSD */
|
||||
+
|
||||
/* #define BSD 1 */ /* define for 4.n/Free/Open/Net BSD */
|
||||
/* also for relatives like SunOS 4.x, DG/UX, and */
|
||||
/* older versions of Linux */
|
||||
/* #define ULTRIX */ /* define for Ultrix v3.0 or higher (but not lower) */
|
||||
@@ -32,7 +37,7 @@
|
||||
@@ -32,7 +36,7 @@
|
||||
|
||||
|
||||
/* define any of the following that are appropriate */
|
||||
@ -24,7 +21,7 @@ $OpenBSD: patch-include_unixconf_h,v 1.3 2002/03/23 14:51:46 espie Exp $
|
||||
/* including Solaris 2+ */
|
||||
#define NETWORK /* if running on a networked system */
|
||||
/* e.g. Suns sharing a playground through NFS */
|
||||
@@ -47,6 +52,7 @@
|
||||
@@ -47,6 +51,7 @@
|
||||
* job control (note that AIX is SYSV otherwise)
|
||||
* Also define this for AIX 3.2 */
|
||||
|
||||
@ -32,7 +29,7 @@ $OpenBSD: patch-include_unixconf_h,v 1.3 2002/03/23 14:51:46 espie Exp $
|
||||
#define TERMINFO /* uses terminfo rather than termcap */
|
||||
/* Should be defined for most SYSV, SVR4 (including
|
||||
* Solaris 2+), HPUX, and Linux systems. In
|
||||
@@ -132,7 +138,7 @@
|
||||
@@ -132,7 +137,7 @@
|
||||
* "extra output" method is used, but not all systems provide access to
|
||||
* a fine-grained timer.
|
||||
*/
|
||||
@ -41,7 +38,7 @@ $OpenBSD: patch-include_unixconf_h,v 1.3 2002/03/23 14:51:46 espie Exp $
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -143,7 +149,7 @@
|
||||
@@ -143,7 +148,7 @@
|
||||
* A stat system call is done on the mailbox every MAILCKFREQ moves.
|
||||
*/
|
||||
|
||||
@ -50,7 +47,7 @@ $OpenBSD: patch-include_unixconf_h,v 1.3 2002/03/23 14:51:46 espie Exp $
|
||||
|
||||
/* The Andrew Message System does mail a little differently from normal
|
||||
* UNIX. Mail is deposited in the user's own directory in ~/Mailbox
|
||||
@@ -280,7 +286,7 @@
|
||||
@@ -284,7 +289,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(BSD) || defined(ULTRIX)
|
||||
@ -59,7 +56,7 @@ $OpenBSD: patch-include_unixconf_h,v 1.3 2002/03/23 14:51:46 espie Exp $
|
||||
#define memcpy(d, s, n) bcopy(s, d, n)
|
||||
#define memcmp(s1, s2, n) bcmp(s2, s1, n)
|
||||
# endif
|
||||
@@ -304,9 +310,7 @@
|
||||
@@ -308,9 +313,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef TIMED_DELAY
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-sys_unix_Makefile_doc,v 1.3 2002/03/23 14:51:46 espie Exp $
|
||||
--- sys/unix/Makefile.doc.orig Wed Mar 20 18:43:53 2002
|
||||
+++ sys/unix/Makefile.doc Fri Mar 22 08:11:35 2002
|
||||
@@ -38,15 +38,15 @@ Guidebook.dvi: Guidebook.tex
|
||||
$OpenBSD: patch-sys_unix_Makefile_doc,v 1.4 2004/08/11 10:15:07 espie Exp $
|
||||
--- sys/unix/Makefile.doc.orig Mon Dec 8 00:39:13 2003
|
||||
+++ sys/unix/Makefile.doc Tue Aug 10 13:32:07 2004
|
||||
@@ -41,15 +41,15 @@ Guidebook.dvi: Guidebook.tex
|
||||
|
||||
|
||||
GAME = nethack
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-sys_unix_Makefile_src,v 1.7 2003/02/25 00:05:07 espie Exp $
|
||||
--- sys/unix/Makefile.src.orig Sun Feb 23 15:43:39 2003
|
||||
+++ sys/unix/Makefile.src Tue Feb 25 00:50:04 2003
|
||||
$OpenBSD: patch-sys_unix_Makefile_src,v 1.8 2004/08/11 10:15:07 espie Exp $
|
||||
--- sys/unix/Makefile.src.orig Mon Dec 8 00:39:13 2003
|
||||
+++ sys/unix/Makefile.src Tue Aug 10 13:36:00 2004
|
||||
@@ -1,6 +1,7 @@
|
||||
# NetHack Makefile.
|
||||
# SCCS Id: @(#)Makefile.src 3.4 2002/03/02
|
||||
@ -9,17 +9,17 @@ $OpenBSD: patch-sys_unix_Makefile_src,v 1.7 2003/02/25 00:05:07 espie Exp $
|
||||
# newer makes predefine $(MAKE) to 'make' and do smarter processing of
|
||||
# recursive make calls if $(MAKE) is used
|
||||
# these makes allow $(MAKE) to be overridden by the environment if someone
|
||||
@@ -144,8 +145,7 @@ GNOMEINC=-I/usr/lib/glib/include -I/usr/
|
||||
@@ -151,8 +152,7 @@ GNOMEINC=-I/usr/lib/glib/include -I/usr/
|
||||
# flags for debugging:
|
||||
# CFLAGS = -g -I../include
|
||||
|
||||
-CFLAGS = -O -I../include
|
||||
-LFLAGS =
|
||||
-LFLAGS =
|
||||
+CFLAGS += -DHACKDIR=\"${NHDIR}\" -DHAVE_SYS_PARAM_H -I../include
|
||||
|
||||
# The Qt and Be window systems are written in C++, while the rest of
|
||||
# NetHack is standard C. If using Qt, uncomment the LD line here to get
|
||||
@@ -204,8 +204,6 @@ WINBEOBJ =
|
||||
# NetHack is standard C. If using Qt, uncomment the LINK line here to get
|
||||
@@ -214,8 +214,6 @@ WINBEOBJ =
|
||||
|
||||
#
|
||||
#
|
||||
@ -28,7 +28,7 @@ $OpenBSD: patch-sys_unix_Makefile_src,v 1.7 2003/02/25 00:05:07 espie Exp $
|
||||
|
||||
# on some systems the termcap library is in -ltermcap or -lcurses
|
||||
# on 386 Xenix, the -ltermlib tputs() seems not to work; use -lcurses instead
|
||||
@@ -225,7 +223,7 @@ WINTTYLIB = -ltermlib
|
||||
@@ -235,7 +233,7 @@ WINTTYLIB = -ltermlib
|
||||
#
|
||||
# libraries for X11
|
||||
# If USE_XPM is defined in config.h, you will also need -lXpm here.
|
||||
@ -37,7 +37,7 @@ $OpenBSD: patch-sys_unix_Makefile_src,v 1.7 2003/02/25 00:05:07 espie Exp $
|
||||
# WINX11LIB = -lXaw -lXmu -lXt -lX11
|
||||
# WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11 -lm
|
||||
# WINX11LIB = -lXaw -lXmu -lXpm -lXext -lXt -lX11 -lSM -lICE -lm # BSD/OS 2.0
|
||||
@@ -245,8 +243,6 @@ WINGEMLIB = -le_gem -lgem
|
||||
@@ -255,8 +253,6 @@ WINGEMLIB = -le_gem -lgem
|
||||
# libraries for BeOS
|
||||
WINBELIB = -lbe
|
||||
|
||||
@ -46,16 +46,16 @@ $OpenBSD: patch-sys_unix_Makefile_src,v 1.7 2003/02/25 00:05:07 espie Exp $
|
||||
# any other strange libraries your system needs (for Sysunix only -- the more
|
||||
# specialized targets should already be right)
|
||||
#
|
||||
@@ -382,7 +378,7 @@ $(GAME): $(SYSTEM)
|
||||
@@ -392,7 +388,7 @@ $(GAME): $(SYSTEM)
|
||||
|
||||
Sysunix: $(HOBJ) Makefile
|
||||
@echo "Loading ..."
|
||||
- @$(CC) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) $(LIBS)
|
||||
- $(LINK) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) $(LIBS)
|
||||
+ @$(LINKCMD) $(LFLAGS) -o $(GAME) $(HOBJ) $(WINLIB) $(LIBS)
|
||||
@touch Sysunix
|
||||
|
||||
Sys3B2: $(HOBJ) Makefile
|
||||
@@ -449,15 +445,16 @@ objects.o:
|
||||
@@ -459,15 +455,16 @@ objects.o:
|
||||
$(CC) $(CFLAGS) -c objects.c
|
||||
@rm -f $(MAKEDEFS)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
$OpenBSD: patch-sys_unix_Makefile_top,v 1.5 2004/08/10 11:23:24 espie Exp $
|
||||
--- sys/unix/Makefile.top.orig Sun Feb 23 15:43:39 2003
|
||||
+++ sys/unix/Makefile.top Tue Aug 10 12:24:23 2004
|
||||
$OpenBSD: patch-sys_unix_Makefile_top,v 1.6 2004/08/11 10:15:07 espie Exp $
|
||||
--- sys/unix/Makefile.top.orig Mon Dec 8 00:39:13 2003
|
||||
+++ sys/unix/Makefile.top Tue Aug 10 13:37:18 2004
|
||||
@@ -13,19 +13,19 @@
|
||||
# execute things like 'data' and 'rumors')
|
||||
# MAKE = make
|
||||
@ -42,10 +42,10 @@ $OpenBSD: patch-sys_unix_Makefile_top,v 1.5 2004/08/10 11:23:24 espie Exp $
|
||||
# per discussion in Install.X11 and Install.Qt
|
||||
-VARDATND =
|
||||
+# VARDATND =
|
||||
# VARDATND = x11tiles pet_mark.xbm
|
||||
# VARDATND = x11tiles pet_mark.xbm rip.xpm
|
||||
# VARDATND = x11tiles NetHack.ad pet_mark.xbm
|
||||
# VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm
|
||||
# for Atari/Gem
|
||||
@@ -183,7 +184,7 @@ dofiles:
|
||||
@@ -186,7 +187,7 @@ dofiles:
|
||||
cp src/$(GAME) $(GAMEDIR)
|
||||
cp util/recover $(GAMEDIR)
|
||||
-rm -f $(SHELLDIR)/$(GAME)
|
||||
|
@ -1,357 +0,0 @@
|
||||
$OpenBSD: patch-win_Qt_qt_win_cpp,v 1.4 2004/02/13 07:17:23 brad Exp $
|
||||
--- win/Qt/qt_win.cpp.orig 2003-02-23 09:43:45.000000000 -0500
|
||||
+++ win/Qt/qt_win.cpp 2004-01-19 20:39:22.000000000 -0500
|
||||
@@ -57,6 +57,7 @@ extern "C" {
|
||||
#include "dlb.h"
|
||||
#include "patchlevel.h"
|
||||
#include "tile2x11.h"
|
||||
+#undef Invisible
|
||||
#undef Warning
|
||||
#undef red
|
||||
#undef green
|
||||
@@ -69,6 +70,7 @@ extern "C" {
|
||||
#undef max
|
||||
#undef alloc
|
||||
#undef lock
|
||||
+#undef yn
|
||||
|
||||
}
|
||||
|
||||
@@ -103,7 +105,7 @@ extern "C" {
|
||||
#ifdef Q_WS_MACX
|
||||
# include <sys/malloc.h>
|
||||
#else
|
||||
-# include <malloc.h>
|
||||
+# include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WS_X11_
|
||||
@@ -976,7 +978,7 @@ public:
|
||||
};
|
||||
|
||||
NetHackQtPlayerSelector::NetHackQtPlayerSelector(NetHackQtKeyBuffer& ks) :
|
||||
- QDialog(0,"plsel",TRUE),
|
||||
+ QDialog(qApp->mainWidget(),"plsel",TRUE),
|
||||
keysource(ks),
|
||||
fully_specified_role(TRUE)
|
||||
{
|
||||
@@ -1145,7 +1147,7 @@ NetHackQtPlayerSelector::NetHackQtPlayer
|
||||
a = rn2(ROLE_ALIGNS);
|
||||
}
|
||||
alignment[a]->setChecked(TRUE);
|
||||
- selectAlignment(g);
|
||||
+ selectAlignment(a);
|
||||
|
||||
QListViewItem* li;
|
||||
|
||||
@@ -1156,6 +1158,9 @@ NetHackQtPlayerSelector::NetHackQtPlayer
|
||||
li = race->firstChild();
|
||||
while (ra--) li=li->nextSibling();
|
||||
race->setSelected(li,TRUE);
|
||||
+
|
||||
+ flags.initrace = race->selectedItemNumber();
|
||||
+ flags.initrole = role->selectedItemNumber();
|
||||
}
|
||||
|
||||
|
||||
@@ -1326,7 +1331,7 @@ bool NetHackQtPlayerSelector::Choose()
|
||||
|
||||
|
||||
NetHackQtStringRequestor::NetHackQtStringRequestor(NetHackQtKeyBuffer& ks, const char* p, const char* cancelstr) :
|
||||
- QDialog(0,"string",FALSE),
|
||||
+ QDialog(qApp->mainWidget(),"string",FALSE),
|
||||
prompt(p,this,"prompt"),
|
||||
input(this,"input"),
|
||||
keysource(ks)
|
||||
@@ -1637,8 +1642,6 @@ void NetHackQtMapWindow::paintEvent(QPai
|
||||
painter.setClipRect( event->rect() ); // (normally we don't clip)
|
||||
painter.fillRect( event->rect(), black );
|
||||
|
||||
- int offset;
|
||||
-
|
||||
if ( !rogue_font ) {
|
||||
// Find font...
|
||||
int pts = 5;
|
||||
@@ -1826,10 +1829,10 @@ public:
|
||||
int uncleared;
|
||||
|
||||
NetHackQtScrollText(int maxlength) :
|
||||
+ uncleared(0),
|
||||
maxitems(maxlength),
|
||||
first(0),
|
||||
count(0),
|
||||
- uncleared(0),
|
||||
item_cycle(maxlength)
|
||||
{
|
||||
setNumCols(1);
|
||||
@@ -2027,21 +2030,21 @@ void NetHackQtMessageWindow::PutStr(int
|
||||
|
||||
NetHackQtLabelledIcon::NetHackQtLabelledIcon(QWidget* parent, const char* l) :
|
||||
QWidget(parent),
|
||||
+ low_is_good(FALSE),
|
||||
+ prev_value(-123),
|
||||
turn_count(-1),
|
||||
label(new QLabel(l,this)),
|
||||
- icon(0),
|
||||
- low_is_good(FALSE),
|
||||
- prev_value(-123)
|
||||
+ icon(0)
|
||||
{
|
||||
initHighlight();
|
||||
}
|
||||
NetHackQtLabelledIcon::NetHackQtLabelledIcon(QWidget* parent, const char* l, const QPixmap& i) :
|
||||
QWidget(parent),
|
||||
low_is_good(FALSE),
|
||||
+ prev_value(-123),
|
||||
turn_count(-1),
|
||||
label(new QLabel(l,this)),
|
||||
- icon(new QLabel(this)),
|
||||
- prev_value(-123)
|
||||
+ icon(new QLabel(this))
|
||||
{
|
||||
setIcon(i);
|
||||
initHighlight();
|
||||
@@ -2174,7 +2177,7 @@ tryload(QPixmap& pm, const char* fn)
|
||||
if (!pm.load(fn)) {
|
||||
QString msg;
|
||||
msg.sprintf("Cannot load \"%s\"", fn);
|
||||
- QMessageBox::warning(0, "IO Error", msg);
|
||||
+ QMessageBox::warning(qApp->mainWidget(), "IO Error", msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2183,14 +2186,14 @@ NetHackQtStatusWindow::NetHackQtStatusWi
|
||||
// Alignment needs -2 init value, because -1 is an alignment.
|
||||
// Armor Class is an schar, so 256 is out of range.
|
||||
// Blank value is 0 and should never change.
|
||||
+ name(this,"(name)"),
|
||||
+ dlevel(this,"(dlevel)"),
|
||||
str(this,"STR"),
|
||||
dex(this,"DEX"),
|
||||
con(this,"CON"),
|
||||
intel(this,"INT"),
|
||||
wis(this,"WIS"),
|
||||
cha(this,"CHA"),
|
||||
- name(this,"(name)"),
|
||||
- dlevel(this,"(dlevel)"),
|
||||
gold(this,"Gold"),
|
||||
hp(this,"Hit Points"),
|
||||
power(this,"Power"),
|
||||
@@ -2337,7 +2340,6 @@ void NetHackQtStatusWindow::resizeEvent(
|
||||
|
||||
int h=height();
|
||||
int x=0,y=0;
|
||||
- double space=1.0;
|
||||
|
||||
int iw; // Width of an item across line
|
||||
int lh; // Height of a line of values
|
||||
@@ -2535,7 +2537,7 @@ void NetHackQtStatusWindow::updateStats(
|
||||
name.setLabel(buf,NetHackQtLabelledIcon::NoNum,u.ulevel);
|
||||
|
||||
if (describe_level(buf)) {
|
||||
- dlevel.setLabel(buf,TRUE);
|
||||
+ dlevel.setLabel(buf,(bool)TRUE);
|
||||
} else {
|
||||
Sprintf(buf, "%s, level ", dungeons[u.uz.dnum].dname);
|
||||
dlevel.setLabel(buf,(long)depth(&u.uz));
|
||||
@@ -2638,7 +2640,7 @@ void NetHackQtStatusWindow::checkTurnEve
|
||||
|
||||
|
||||
NetHackQtMenuDialog::NetHackQtMenuDialog() :
|
||||
- QDialog(0,0,FALSE)
|
||||
+ QDialog(qApp->mainWidget(),0,FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -2681,8 +2683,8 @@ NetHackQtMenuWindow::NetHackQtMenuWindow
|
||||
QTableView(),
|
||||
keysource(ks),
|
||||
dialog(new NetHackQtMenuDialog()),
|
||||
- pressed(-1),
|
||||
- prompt(0)
|
||||
+ prompt(0),
|
||||
+ pressed(-1)
|
||||
{
|
||||
setNumCols(4);
|
||||
setCellHeight(QMAX(qt_settings->glyphs().height()+1,fontMetrics().height()));
|
||||
@@ -2690,8 +2692,6 @@ NetHackQtMenuWindow::NetHackQtMenuWindow
|
||||
setFrameStyle(Panel|Sunken);
|
||||
setLineWidth(2);
|
||||
|
||||
- int x=0;
|
||||
-
|
||||
ok=new QPushButton("Ok",dialog);
|
||||
connect(ok,SIGNAL(clicked()),dialog,SLOT(accept()));
|
||||
|
||||
@@ -2789,7 +2789,7 @@ void NetHackQtMenuWindow::AddMenu(int gl
|
||||
}
|
||||
}
|
||||
|
||||
- if (item.size()<itemcount+1) {
|
||||
+ if ((int)item.size() < itemcount+1) {
|
||||
item.resize(itemcount*4+10);
|
||||
}
|
||||
item[itemcount].glyph=glyph;
|
||||
@@ -3091,7 +3091,7 @@ void NetHackQtMenuWindow::mousePressEven
|
||||
if (item[row].count>0)
|
||||
Sprintf(buf,"%d", item[row].count);
|
||||
else
|
||||
- Sprintf(buf,"");
|
||||
+ Strcpy(buf, "");
|
||||
|
||||
requestor.SetDefault(buf);
|
||||
if (requestor.Get(buf)) {
|
||||
@@ -3215,7 +3215,7 @@ void NetHackQtRIP::paintEvent(QPaintEven
|
||||
}
|
||||
|
||||
NetHackQtTextWindow::NetHackQtTextWindow(NetHackQtKeyBuffer& ks) :
|
||||
- QDialog(0,0,FALSE),
|
||||
+ QDialog(qApp->mainWidget(),0,FALSE),
|
||||
keysource(ks),
|
||||
use_rip(FALSE),
|
||||
str_fixed(FALSE),
|
||||
@@ -3417,7 +3417,7 @@ void NetHackQtTextWindow::Search()
|
||||
requestor.SetDefault(line);
|
||||
if (requestor.Get(line)) {
|
||||
int current=lines->currentItem();
|
||||
- for (int i=1; i<lines->count(); i++) {
|
||||
+ for (uint i=1; i<lines->count(); i++) {
|
||||
int lnum=(i+current)%lines->count();
|
||||
QString str=lines->text(lnum);
|
||||
if (str.contains(line)) {
|
||||
@@ -3584,7 +3584,7 @@ NetHackQtMainWindow::NetHackQtMainWindow
|
||||
{ game, "Options\tShift+O", "O", 3},
|
||||
{ game, "Explore mode\tShift+X", "X", 3},
|
||||
{ game, 0, 0, 3},
|
||||
- { game, "Save\tShift+S", "Sy", 3},
|
||||
+ { game, "Save\tSy", "Sy", 3},
|
||||
{ game, "Quit\tAlt+Q", "\361", 3},
|
||||
|
||||
{ apparel, "Apparel off\tShift+A", "A", 2},
|
||||
@@ -3625,10 +3625,11 @@ NetHackQtMainWindow::NetHackQtMainWindow
|
||||
{ act2, "Search\ts", "s", 3},
|
||||
{ act2, "Sit\tAlt+S", "\363", 3},
|
||||
{ act2, "Throw\tt", "t", 2},
|
||||
+ { act2, "Untrap\t#u", "#u", 3},
|
||||
{ act2, "Up\t<", "<", 3},
|
||||
{ act2, "Wipe face\tAlt+W", "\367", 3},
|
||||
|
||||
- { magic, "Quaff potion\tq", "q?", 3},
|
||||
+ { magic, "Quaff potion\tq?", "q?", 3},
|
||||
{ magic, "Read scroll/book\tr?", "r?", 3},
|
||||
{ magic, "Zap wand\tz?", "z?", 3},
|
||||
{ magic, "Zap spell\tShift+Z", "Z", 3},
|
||||
@@ -3647,7 +3648,7 @@ NetHackQtMainWindow::NetHackQtMainWindow
|
||||
{ help, 0, 0, 3},
|
||||
{ help, "What is here\t:", ":", 3},
|
||||
{ help, "What is there\t;", ";", 3},
|
||||
- { help, "What is...\t/", "/y", 2},
|
||||
+ { help, "What is...\t/y", "/y", 2},
|
||||
{ help, 0, 0, 1},
|
||||
|
||||
{ info, "Inventory\ti", "i", 3},
|
||||
@@ -4075,9 +4076,9 @@ void NetHackQtMainWindow::ShowIfReady()
|
||||
|
||||
|
||||
NetHackQtYnDialog::NetHackQtYnDialog(NetHackQtKeyBuffer& keysrc,const char* q,const char* ch,char df) :
|
||||
- QDialog(0,0,FALSE),
|
||||
- keysource(keysrc),
|
||||
- question(q), choices(ch), def(df)
|
||||
+ QDialog(qApp->mainWidget(),0,FALSE),
|
||||
+ question(q), choices(ch), def(df),
|
||||
+ keysource(keysrc)
|
||||
{
|
||||
setCaption("NetHack: Question");
|
||||
}
|
||||
@@ -4164,7 +4165,6 @@ char NetHackQtYnDialog::Exec()
|
||||
const int margin=8;
|
||||
const int gutter=8;
|
||||
const int extra=fontMetrics().height(); // Extra for group
|
||||
- int row=0;
|
||||
int x=margin, y=extra+margin;
|
||||
int butsize=fontMetrics().height()*2+5;
|
||||
|
||||
@@ -4202,7 +4202,7 @@ char NetHackQtYnDialog::Exec()
|
||||
show();
|
||||
char choice=0;
|
||||
char ch_esc=0;
|
||||
- for (int i=0; i<ch.length(); i++) {
|
||||
+ for (uint i=0; i<ch.length(); i++) {
|
||||
if (ch[i].latin1()=='q') ch_esc='q';
|
||||
else if (!ch_esc && ch[i].latin1()=='n') ch_esc='n';
|
||||
}
|
||||
@@ -4211,7 +4211,7 @@ char NetHackQtYnDialog::Exec()
|
||||
if (!keysource.Empty()) {
|
||||
char k=keysource.GetAscii();
|
||||
char ch_esc=0;
|
||||
- for (int i=0; i<ch.length(); i++)
|
||||
+ for (uint i=0; i<ch.length(); i++)
|
||||
if (ch[i].latin1()==k)
|
||||
choice=k;
|
||||
if (!choice) {
|
||||
@@ -4298,7 +4298,7 @@ NetHackQtGlyphs::NetHackQtGlyphs()
|
||||
} else {
|
||||
tiles_per_row = 40;
|
||||
}
|
||||
- int rows = ((total_tiles_used+tiles_per_row-1) / tiles_per_row);
|
||||
+
|
||||
if ( iflags.wc_tile_width )
|
||||
tilefile_tile_W = iflags.wc_tile_width;
|
||||
else
|
||||
@@ -4371,8 +4371,8 @@ void NetHackQtGlyphs::setSize(int w, int
|
||||
|
||||
|
||||
NetHackQtMenuOrTextWindow::NetHackQtMenuOrTextWindow(NetHackQtKeyBuffer& ks) :
|
||||
- keysource(ks),
|
||||
- actual(0)
|
||||
+ actual(0),
|
||||
+ keysource(ks)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -4546,7 +4546,7 @@ void NetHackQtBind::qt_player_selection(
|
||||
}
|
||||
|
||||
NetHackQtSavedGameSelector::NetHackQtSavedGameSelector(const char** saved) :
|
||||
- QDialog(0,"sgsel",TRUE)
|
||||
+ QDialog(qApp->mainWidget(),"sgsel",TRUE)
|
||||
{
|
||||
QVBoxLayout *vbl = new QVBoxLayout(this,6);
|
||||
QHBox* hb;
|
||||
@@ -4664,11 +4664,11 @@ static QArray<NetHackQtWindow*> id_to_wi
|
||||
winid NetHackQtBind::qt_create_nhwindow(int type)
|
||||
{
|
||||
winid id;
|
||||
- for (id = 0; id < id_to_window.size(); id++) {
|
||||
+ for (id = 0; id < (winid) id_to_window.size(); id++) {
|
||||
if ( !id_to_window[id] )
|
||||
break;
|
||||
}
|
||||
- if ( id == id_to_window.size() )
|
||||
+ if ( id == (winid) id_to_window.size() )
|
||||
id_to_window.resize(id+1);
|
||||
|
||||
NetHackQtWindow* window=0;
|
||||
@@ -4998,7 +4998,7 @@ void NetHackQtBind::qt_getlin(const char
|
||||
}
|
||||
|
||||
NetHackQtExtCmdRequestor::NetHackQtExtCmdRequestor(NetHackQtKeyBuffer& ks) :
|
||||
- QDialog(0, "ext-cmd", FALSE),
|
||||
+ QDialog(qApp->mainWidget(), "ext-cmd", FALSE),
|
||||
keysource(ks)
|
||||
{
|
||||
int marg=4;
|
||||
@@ -5152,8 +5152,12 @@ bool NetHackQtBind::notify(QObject *rece
|
||||
}
|
||||
}
|
||||
char ch=key_event->ascii();
|
||||
+ if ( !ch && (key_event->state() & Qt::ControlButton) ) {
|
||||
+ // On Mac, ascii control codes are not sent, force them.
|
||||
+ if ( k>=Qt::Key_A && k<=Qt::Key_Z )
|
||||
+ ch = k - Qt::Key_A + 1;
|
||||
+ }
|
||||
if (!macro && ch) {
|
||||
- int k = key_event->key();
|
||||
bool alt = (key_event->state()&AltButton) ||
|
||||
(k >= Key_0 && k <= Key_9 && (key_event->state()&ControlButton));
|
||||
keybuffer.Put(key_event->key(),ch + (alt ? 128 : 0),
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PFRAG.qt,v 1.3 2004/08/10 09:36:45 espie Exp $
|
||||
@comment $OpenBSD: PFRAG.qt,v 1.4 2004/08/11 10:15:07 espie Exp $
|
||||
${GAMEDIR}/pet_mark.xbm
|
||||
${GAMEDIR}/x11tiles
|
||||
${GAMEDIR}/rip.xpm
|
||||
${GAMEDIR}/x11tiles
|
||||
|
Loading…
x
Reference in New Issue
Block a user