]> granicus.if.org Git - nethack/commitdiff
Make "black" characters visible.
authorwarwick <warwick>
Thu, 1 Jul 2004 18:21:51 +0000 (18:21 +0000)
committerwarwick <warwick>
Thu, 1 Jul 2004 18:21:51 +0000 (18:21 +0000)
Stop RIP window maximizing (C syntax!).
Make Cancel button more sensible.

win/Qt/Install.Qt
win/Qt/qpe-nethack.control
win/Qt/qt_win.cpp

index 7b6ef148db74c37a767f2df5faf0be5a0a86a094..bb204568d9409bdfbe894ab78999720b9aed76b3 100644 (file)
@@ -5,11 +5,10 @@ This document describes the installation of NetHack with a Qt interface
 on UNIX/X11 or Mac OS X. This code should also work with Qt/Windows, but
 support for that is not currently official.
 
-You can download Qt for UNIX and Qt for Windows from http://www.trolltech.com.
-Qt for Mac OS X is currently only available commercially.  You need Qt 2.0 or
-later to use this code.
+You can download Qt from http://www.trolltech.com.
+You need Qt 2.0 or later to use this code.
 
-To use this code:
+To use this code on UNIX (not Mac OS X):
 
    1. follow the directions for the UNIX installation (in ../../sys/unix)
       to create the Makefiles.
@@ -27,7 +26,7 @@ To use this code:
        you installed Qt - $QTDIR/include/qwidget.h should exist, for
        example.
 
-       ensure CXX and LD are set to the compiler and linker you need
+       ensure CXX and LINK are set to the compiler and linker you need
        for compiling and linking C++ software (e.g., set both to g++).
 
         add $(WINQTSRC), $(WINQTOBJ), and $(WINQTLIB) to WINSRC, WINOBJ,
@@ -36,8 +35,8 @@ To use this code:
 
    4. ../../Makefile (the top-level makefile)
 
-        change the VARDATND setting to contain the files "x11tiles",
-        "rip.xpm", and "nhsplash.xpm":
+        Just change the VARDATND setting to contain the files
+       "x11tiles", "rip.xpm", and "nhsplash.xpm":
 
             VARDATND = x11tiles rip.xpm nhsplash.xpm
 
@@ -50,7 +49,6 @@ To use this code:
         OPTIONS=name:player,number_pad,menustyle:partial,!time,showexp
         OPTIONS=hilite_pet,toptenwin,msghistory:200,windowtype:Qt
 
-
 If you are using KDE, you may want to also try the KDE version. It just
 uses the KDE menubar and follows other KDE conventions - there is no
 extra functionality. To do so:
@@ -67,7 +65,6 @@ extra functionality. To do so:
       knethack.lnk are useful if you want to install "knethack" in
       the KDE games directory.  
 
-
 If you are using Qtopia, you can compile NetHack for that environment
 with the following additional steps:
 
@@ -89,4 +86,25 @@ with the following additional steps:
    5. After building, use the "mkipks" program that ships with Qtopia
       to package the result into an ipk file.
 
+To use this code on Mac OS X:
+
+   1. follow the directions for the UNIX installation (in ../../sys/unix)
+      to create the Makefiles.
+
+   2. quite a number of changes are required to the Makefiles. They are
+        slowly being made 'official', but for now they are all in the patch
+       nethack-macosx-qt.patch:
+
+           cd ../..
+           patch -p0 < win/Qt/nethack-macosx-qt.patch
+
+   3. Follow all the instructions in ../../sys/unix/Install.unx for
+      the remainder of the installation process (basically run "make install").
+
+   4. Consider adding the lines below to a file called "NetHack Defaults",
+      in your "Library/Preferences" folder, as they are likely to give
+      the best interface for this window port:
+
+        OPTIONS=name:player,number_pad,menustyle:partial,!time,showexp
+        OPTIONS=hilite_pet,toptenwin,msghistory:200,windowtype:Qt
 
index 46ad8c3a407bec7d082aab28e4ba039f97e04fb5..c8b73f5f7e047b4df4ac4007a33b0d0b6bfab474 100644 (file)
@@ -1,9 +1,9 @@
-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]*
+Files: bin/nethack pics/NetHack.png 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]*
 Priority: optional
 Section: qpe/games
 Maintainer: Warwick Allison <warwick@trolltech.com>
 Architecture: arm
-Version: 3.4.0-1
+Version: 3.5.0-1
 Depends: qpe-base ($QPE_VERSION)
 Description: NetHack - The Dungeon Game
  Graphical version of NetHack for Qtopia
index 02bce25eb348c4a2f3805489790fb34dad8f4a63..670019e888830a5d4462cb5bbd70127e96299c60 100644 (file)
@@ -1606,7 +1606,7 @@ const QPen& nhcolor_to_pen(int c)
     static QPen* pen=0;
     if ( !pen ) {
        pen = new QPen[17];
-       pen[0] = Qt::black;
+       pen[0] = QColor(24,24,24); // "black" on black
        pen[1] = Qt::red;
        pen[2] = QColor(0,191,0);
        pen[3] = QColor(127,127,0);
@@ -1622,7 +1622,7 @@ const QPen& nhcolor_to_pen(int c)
        pen[13] = QColor(255,127,255);
        pen[14] = QColor(127,255,255);
        pen[15] = Qt::white;
-       pen[16] = Qt::black;
+       pen[16] = QColor(24,24,24); // "black" on black
     }
 
     return pen[c];
@@ -2859,7 +2859,7 @@ int NetHackQtMenuWindow::SelectMenu(int h, MENU_ITEM_P **menu_list)
     how=h;
 
     ok->setEnabled(how!=PICK_ONE);ok->setDefault(how!=PICK_ONE);
-    cancel->setEnabled(how!=PICK_NONE);
+    cancel->setEnabled(TRUE);
     all->setEnabled(how==PICK_ANY);
     none->setEnabled(how==PICK_ANY);
     invert->setEnabled(how==PICK_ANY);
@@ -2922,7 +2922,10 @@ int NetHackQtMenuWindow::SelectMenu(int h, MENU_ITEM_P **menu_list)
        keysource.GetAscii();
 
     *menu_list=0;
-    if (result>0 && how!=PICK_NONE) {
+    if (how==PICK_NONE)
+       return result==0 ? -1 : 0;
+
+    if (result>0) {
        if (how==PICK_ONE) {
            int i;
            for (i=0; i<itemcount && !item[i].selected; i++)
@@ -3377,7 +3380,7 @@ void NetHackQtTextWindow::Display(bool block)
        rip.hide();
     }
     int mh = QApplication::desktop()->height()*3/5;
-    if ( qt_compact_mode && lines->TotalHeight() > mh || use_rip ) {
+    if ( qt_compact_mode && (lines->TotalHeight() > mh || use_rip) ) {
        // big, so make it fill
        showMaximized();
     } else {