pull in the recent unconditionals merge from master
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
Installing NetHack with a Qt or KDE interface
|
||||
---------------------------------------------
|
||||
$NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
$Date: 2004/07/01 18:21:51 $ $Revision: 1.7 $
|
||||
|
||||
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
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 qt_clust.cpp $Date$ $Revision$ */
|
||||
/* NetHack 3.5 qt_clust.cpp $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 qt_clust.cpp $Date: 2009/05/06 10:55:03 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)qt_clust.cpp 3.5 1999/11/19 */
|
||||
/* Copyright (c) Warwick Allison, 1999. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+3
-22
@@ -1,4 +1,5 @@
|
||||
// NetHack 3.5 qt_win.cpp $Date$ $Revision$
|
||||
// NetHack 3.5 qt_win.cpp $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
// NetHack 3.5 qt_win.cpp $Date: 2012/01/24 04:26:24 $ $Revision: 1.59 $
|
||||
// Copyright (c) Warwick Allison, 1999.
|
||||
// NetHack may be freely redistributed. See license for details.
|
||||
|
||||
@@ -1643,12 +1644,7 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
||||
|
||||
painter.begin(this);
|
||||
|
||||
if (
|
||||
#ifdef REINCARNATION
|
||||
Is_rogue_level(&u.uz) ||
|
||||
#endif
|
||||
iflags.wc_ascii_map
|
||||
)
|
||||
if (Is_rogue_level(&u.uz) || iflags.wc_ascii_map)
|
||||
{
|
||||
// You enter a VERY primitive world!
|
||||
|
||||
@@ -1729,7 +1725,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
||||
}
|
||||
|
||||
if (garea.contains(cursor)) {
|
||||
#ifdef REINCARNATION
|
||||
if (Is_rogue_level(&u.uz)) {
|
||||
#ifdef TEXTCOLOR
|
||||
painter.setPen( white );
|
||||
@@ -1737,7 +1732,6 @@ void NetHackQtMapWindow::paintEvent(QPaintEvent* event)
|
||||
painter.setPen( green ); // REALLY primitive
|
||||
#endif
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
int hp100;
|
||||
if (u.mtimedone) {
|
||||
@@ -2556,11 +2550,7 @@ void NetHackQtStatusWindow::updateStats()
|
||||
dlevel.setLabel(buf,(long)depth(&u.uz));
|
||||
}
|
||||
|
||||
#ifndef GOLDOBJ
|
||||
gold.setLabel("Au:", u.ugold);
|
||||
#else
|
||||
gold.setLabel("Au:", money_cnt(invent));
|
||||
#endif
|
||||
if (u.mtimedone) {
|
||||
// You're a monster!
|
||||
|
||||
@@ -3302,11 +3292,7 @@ static char** rip_line=0;
|
||||
Sprintf(rip_line[NAME_LINE], "%s", plname);
|
||||
|
||||
/* Put $ on stone */
|
||||
#ifndef GOLDOBJ
|
||||
Sprintf(rip_line[GOLD_LINE], "%ld Au", u.ugold);
|
||||
#else
|
||||
Sprintf(rip_line[GOLD_LINE], "%ld Au", done_money);
|
||||
#endif
|
||||
|
||||
/* Put together death description */
|
||||
formatkiller(buf, sizeof buf, how);
|
||||
@@ -3497,13 +3483,8 @@ void NetHackQtInvUsageWindow::paintEvent(QPaintEvent*)
|
||||
drawWorn(painter,uarms,0,1); // Shield
|
||||
drawWorn(painter,uarmg,0,2); // Gloves - repeated
|
||||
drawWorn(painter,uarmg,2,2); // Gloves - repeated
|
||||
#ifdef TOURIST
|
||||
drawWorn(painter,uarmf,1,5); // Shoes (feet)
|
||||
drawWorn(painter,uarmu,1,4); // Undershirt
|
||||
#else
|
||||
drawWorn(painter,0 ,1,5,FALSE);
|
||||
drawWorn(painter,uarmf,1,4); // Shoes (feet)
|
||||
#endif
|
||||
drawWorn(painter,uleft,0,3); // RingL
|
||||
drawWorn(painter,uright,2,3); // RingR
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/**********************************************************************
|
||||
** $Id$
|
||||
** $NHDT-Branch$:$NHDT-Revision$ $NHDT-Date$
|
||||
** $Id: qttableview.cpp,v 1.2 2002/03/09 03:13:15 jwalz Exp $
|
||||
**
|
||||
** Implementation of QtTableView class
|
||||
**
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 tileedit.cpp $Date$ $Revision$ */
|
||||
/* NetHack 3.5 tileedit.cpp $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 tileedit.cpp $Date: 2009/05/06 10:55:09 $ $Revision: 1.6 $ */
|
||||
/* SCCS Id: @(#)tileedit.cpp 3.5 1999/11/19 */
|
||||
/* Copyright (c) Warwick Allison, 1999. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 tileedit.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 tileedit.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 tileedit.h $Date: 2009/05/06 10:55:10 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)tileedit.h 3.5 1999/11/19 */
|
||||
/* Copyright (c) Warwick Allison, 1999. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
$NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
$Date: 2007/12/13 20:17:11 $ $Revision: 1.6 $
|
||||
|
||||
This document describes the installation of NetHack with an X11 interface.
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
! $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
! $Date: 2003/10/03 02:09:25 $ $Revision: 1.5 $
|
||||
|
||||
! The display_file, tombstone, and menu windows are all formatted assuming
|
||||
! a fixed width font. Text windows may or may not be formatted as above.
|
||||
! The rip window applies if the GRAPHIC_TOMBSTONE option is turned on, and
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 Window.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 Window.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 Window.c $Date: 2009/05/06 10:55:43 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)Window.c 3.5 1993/02/02 */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
* + Added workaround for SYSV include problem.
|
||||
* + Changed the default width response text widget to be as wide as the
|
||||
* window itself. Suggestion from David E. Wexelblat, dwex@goblin.org.
|
||||
*
|
||||
* $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
* $Date: 2002/03/31 17:11:23 $ $Revision: 1.2 $
|
||||
*/
|
||||
|
||||
#ifndef SYSV
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#
|
||||
# Nethack configuration file.
|
||||
# $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
# $Date: 2007/12/13 20:17:11 $ $Revision: 1.2 $
|
||||
#
|
||||
# Naming this file $(HOME)/.nethackrc (for UNIX) or setting the environment
|
||||
# variable NETHACKOPTIONS to point to its full path name elsewhere tells
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 nh32icon $Date$ $Revision$ */
|
||||
/* NetHack 3.5 nh32icon $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 nh32icon $Date: 2009/05/06 10:55:43 $ $Revision: 1.5 $ */
|
||||
/* SCCS Id: @(#)nh32icon 3.5 2002/02/12 */
|
||||
/* Copyright (C) 1993,1995 by Robert Patrick Rankin */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 nh56icon $Date$ $Revision$ */
|
||||
/* NetHack 3.5 nh56icon $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 nh56icon $Date: 2009/05/06 10:55:43 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)nh56icon 3.5 2002/02/12 */
|
||||
/* Copyright (c) 1993,1995 by M. Stephenson */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 nh72icon $Date$ $Revision$ */
|
||||
/* NetHack 3.5 nh72icon $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 nh72icon $Date: 2009/05/06 10:55:43 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)nh72icon 3.5 1993/01/21 */
|
||||
/* Copyright (c) 1993 by M. Stephenson */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
/*
|
||||
* Convert the given input files into an output file that is expected
|
||||
* by nethack.
|
||||
*
|
||||
* $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
* $Date: 2002/03/17 20:02:47 $ $Revision: 1.2 $
|
||||
*
|
||||
* Assumptions:
|
||||
* + Two dimensional byte arrays are in row order and are not padded
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 winX.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 winX.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 winX.c $Date: 2012/01/24 04:26:26 $ $Revision: 1.27 $ */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
+4
-10
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 winmap.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 winmap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 winmap.c $Date: 2009/05/06 10:55:49 $ $Revision: 1.14 $ */
|
||||
/* SCCS Id: @(#)winmap.c 3.5 2005/11/12 */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -838,10 +839,7 @@ display_map_window(wp)
|
||||
register int row;
|
||||
struct map_info_t *map_info = wp->map_information;
|
||||
|
||||
if ((
|
||||
#ifdef REINCARNATION
|
||||
Is_rogue_level(&u.uz) ? map_info->is_tile :
|
||||
#endif
|
||||
if ((Is_rogue_level(&u.uz) ? map_info->is_tile :
|
||||
(map_info->is_tile != iflags.wc_tiled_map)) &&
|
||||
map_info->tile_map.image_width) {
|
||||
/* changed map display mode, re-display the full map */
|
||||
@@ -849,11 +847,7 @@ display_map_window(wp)
|
||||
sizeof(map_info->t_start));
|
||||
(void) memset((genericptr_t) map_info->t_stop, (char) COLNO-1,
|
||||
sizeof(map_info->t_stop));
|
||||
map_info->is_tile = iflags.wc_tiled_map
|
||||
#ifdef REINCARNATION
|
||||
&& !Is_rogue_level(&u.uz)
|
||||
#endif
|
||||
;
|
||||
map_info->is_tile = iflags.wc_tiled_map && !Is_rogue_level(&u.uz);
|
||||
XClearWindow(XtDisplay(wp->w), XtWindow(wp->w));
|
||||
set_map_size(wp, COLNO, ROWNO);
|
||||
check_cursor_visibility(wp);
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 winmenu.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 winmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 winmenu.c $Date: 2009/05/06 10:55:53 $ $Revision: 1.5 $ */
|
||||
/* SCCS Id: @(#)winmenu.c 3.5 1996/08/15 */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 winmesg.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 winmesg.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 winmesg.c $Date: 2009/05/06 10:55:57 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)winmesg.c 3.5 1996/04/05 */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 winmisc.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 winmisc.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 winmisc.c $Date: 2009/05/06 10:55:57 $ $Revision: 1.7 $ */
|
||||
/* SCCS Id: @(#)winmisc.c 3.5 2000/05/21 */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-18
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 winstat.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 winstat.c $NHDT-Date: 1425083083 2015/02/28 00:24:43 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.5 $ */
|
||||
/* NetHack 3.5 winstat.c $Date: 2009/05/06 10:55:59 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)winstat.c 3.5 1996/04/05 */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -426,7 +427,6 @@ update_val(attr_rec, new_value)
|
||||
/* special case: exp can be enabled & disabled */
|
||||
else if (attr_rec == &shown_stats[F_EXP]) {
|
||||
static boolean flagexp = TRUE;
|
||||
#ifdef EXP_ON_BOTL
|
||||
|
||||
if (flags.showexp && !flagexp) {
|
||||
set_name(attr_rec->w, shown_stats[F_EXP].name);
|
||||
@@ -438,14 +438,6 @@ update_val(attr_rec, new_value)
|
||||
flagexp = flags.showexp;
|
||||
}
|
||||
if (!flagexp) return;
|
||||
#else
|
||||
if (flagexp) {
|
||||
set_name(attr_rec->w, "");
|
||||
set_value(attr_rec->w, "");
|
||||
flagexp = FALSE;
|
||||
}
|
||||
return; /* don't show it at all */
|
||||
#endif
|
||||
}
|
||||
|
||||
/* special case: score can be enabled & disabled */
|
||||
@@ -599,11 +591,7 @@ update_fancy_status(wp)
|
||||
|
||||
case F_NAME: val = (long) 0L; break; /* special */
|
||||
case F_DLEVEL: val = (long) 0L; break; /* special */
|
||||
#ifndef GOLDOBJ
|
||||
case F_GOLD: val = (long) u.ugold; break;
|
||||
#else
|
||||
case F_GOLD: val = money_cnt(invent); break;
|
||||
#endif
|
||||
case F_HP: val = (long) (u.mtimedone ?
|
||||
(u.mh > 0 ? u.mh : 0):
|
||||
(u.uhp > 0 ? u.uhp : 0)); break;
|
||||
@@ -615,11 +603,7 @@ update_fancy_status(wp)
|
||||
case F_LEVEL: val = (long) (u.mtimedone ?
|
||||
mons[u.umonnum].mlevel :
|
||||
u.ulevel); break;
|
||||
#ifdef EXP_ON_BOTL
|
||||
case F_EXP: val = flags.showexp ? u.uexp : 0L; break;
|
||||
#else
|
||||
case F_EXP: val = 0L; break;
|
||||
#endif
|
||||
case F_ALIGN: val = (long) u.ualign.type; break;
|
||||
case F_TIME: val = flags.time ? (long) moves : 0L; break;
|
||||
#ifdef SCORE_ON_BOTL
|
||||
|
||||
+2
-5
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 wintext.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 wintext.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 wintext.c $Date: 2012/01/24 04:26:27 $ $Revision: 1.7 $ */
|
||||
/* SCCS Id: @(#)wintext.c 3.5 1996/04/05 */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -468,11 +469,7 @@ calculate_rip_text(int how, time_t when)
|
||||
|
||||
/* Put $ on stone */
|
||||
Sprintf(rip_line[GOLD_LINE], "%ld Au",
|
||||
#ifndef GOLDOBJ
|
||||
u.ugold);
|
||||
#else
|
||||
done_money);
|
||||
#endif
|
||||
/* Put together death description */
|
||||
formatkiller(buf, sizeof buf, how);
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 winval.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 winval.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 winval.c $Date: 2009/05/06 10:56:06 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)winval.c 3.5 1992/3/7 */
|
||||
/* Copyright (c) Dean Luick, 1992 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 wc_chainin.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 wc_chainin.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 wc_chainin.c $Date: 2012/01/23 10:45:31 $ $Revision: 1.2 $ */
|
||||
/* Copyright (c) Kenneth Lorber, 2012 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 wc_chainout.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 wc_chainout.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 wc_chainout.c $Date: 2012/01/23 10:45:31 $ $Revision: 1.2 $ */
|
||||
/* Copyright (c) Kenneth Lorber, 2012 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 wc_trace.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 wc_trace.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 wc_trace.c $Date: 2012/01/23 10:45:31 $ $Revision: 1.2 $ */
|
||||
/* Copyright (c) Kenneth Lorber, 2012 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
$NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
$Date: 2005/01/02 17:20:12 $ $Revision: 1.4 $
|
||||
|
||||
Hi,
|
||||
|
||||
This is nethack3.5.0 for Atari Gem and tty
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
* Bieber, Dez. 1994 *
|
||||
* -> Programmcode *
|
||||
\****************************/
|
||||
/*
|
||||
* $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
* $Date: 2002/01/05 21:06:00 $ $Revision: 1.1 $
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gr_rect.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gr_rect.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gr_rect.c $Date: 2009/05/06 10:56:40 $ $Revision: 1.3 $ */
|
||||
/* SCCS Id: @(#)gr_rect.c 3.5 2001/12/10 */
|
||||
/* Copyright (c) Christian Bressler, 2001 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/* gr_rect.h */
|
||||
/*
|
||||
* $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
* $Date: 2002/03/20 03:50:49 $ $Revision: 1.1 $
|
||||
*/
|
||||
#include <e_gem.h>
|
||||
/********** structs **********/
|
||||
typedef struct {
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
* $Date: 2002/03/20 03:45:03 $ $Revision: 1.2 $
|
||||
*/
|
||||
#define __TCC_COMPAT__
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 tile2img.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 tile2img.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 tile2img.c $Date: 2009/05/06 10:56:40 $ $Revision: 1.2 $ */
|
||||
/* SCCS Id: @(#)tile2bmp.c 3.2 95/09/06 */
|
||||
/* Copyright (c) NetHack PC Development Team 1995 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+3
-12
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 wingem.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 wingem.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 wingem.c $Date: 2012/01/24 04:26:29 $ $Revision: 1.16 $ */
|
||||
/* Copyright (c) Christian Bressler, 1999 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -910,9 +911,7 @@ int x, y;
|
||||
|
||||
void mar_print_gl_char(winid,xchar,xchar,int);
|
||||
|
||||
#ifdef REINCARNATION
|
||||
extern int mar_set_rogue(int);
|
||||
#endif
|
||||
|
||||
extern void mar_add_pet_sign(winid,int,int);
|
||||
|
||||
@@ -925,9 +924,7 @@ Gem_print_glyph(window, x, y, glyph)
|
||||
/* Move the cursor. */
|
||||
Gem_curs(window, x,y);
|
||||
|
||||
# ifdef REINCARNATION
|
||||
mar_set_rogue(Is_rogue_level(&u.uz) ? TRUE : FALSE);
|
||||
# endif
|
||||
mar_set_rogue(Is_rogue_level(&u.uz) ? TRUE : FALSE);
|
||||
|
||||
x--; /* MAR -- because x ranges from 1 to COLNO */
|
||||
if(mar_set_tile_mode(-1)){
|
||||
@@ -959,9 +956,7 @@ void mar_print_gl_char(window, x, y, glyph)
|
||||
|
||||
#ifdef TEXTCOLOR
|
||||
/* Turn off color if rogue level. */
|
||||
# ifdef REINCARNATION
|
||||
if (Is_rogue_level(&u.uz)) color = NO_COLOR;
|
||||
# endif
|
||||
#endif /* TEXTCOLOR */
|
||||
|
||||
mar_print_char(window,x,y,ch,color);
|
||||
@@ -1093,11 +1088,7 @@ time_t when;
|
||||
Sprintf(rip_line[NAME_LINE], "%s", plname);
|
||||
/* Put $ on stone */
|
||||
Sprintf(rip_line[GOLD_LINE], "%ld Au",
|
||||
#ifndef GOLDOBJ
|
||||
u.ugold);
|
||||
#else
|
||||
done_money);
|
||||
#endif
|
||||
/* Put together death description */
|
||||
formatkiller(buf, sizeof buf, how);
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 wingem1.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 wingem1.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 wingem1.c $Date: 2009/05/06 10:56:42 $ $Revision: 1.8 $ */
|
||||
/* SCCS Id: @(#)wingem1.c 3.5 1999/12/10 */
|
||||
/* Copyright (c) Christian Bressler 1999 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 xpm2img.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 xpm2img.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 xpm2img.c $Date: 2009/05/06 10:56:48 $ $Revision: 1.3 $ */
|
||||
/* SCCS Id: @(#)xpm2img.c 3.5 2002/03/17 */
|
||||
/* Copyright (c) Christian Bressler 2002 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gn_xpms.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gn_xpms.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gn_xpms.h $Date: 2009/05/06 10:57:19 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)gnxpms.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnaskstr.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnaskstr.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnaskstr.c $Date: 2009/05/06 10:57:24 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)gnaskstr.c 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnaskstr.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnaskstr.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnaskstr.h $Date: 2009/05/06 10:57:24 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)gnaskstr.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+3
-7
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnbind.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnbind.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnbind.c $Date: 2012/01/24 04:26:31 $ $Revision: 1.25 $ */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1182,12 +1183,7 @@ void gnome_outrip(winid wid, int how, time_t when)
|
||||
Strcat(ripString, buf);
|
||||
|
||||
/* Put $ on stone */
|
||||
Sprintf(buf, "%ld Au\n",
|
||||
#ifndef GOLDOBJ
|
||||
u.ugold);
|
||||
#else
|
||||
done_money);
|
||||
#endif
|
||||
Sprintf(buf, "%ld Au\n", done_money);
|
||||
Strcat(ripString, buf);
|
||||
|
||||
/* Put together death description */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnbind.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnbind.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnbind.h $Date: 2012/01/24 04:26:31 $ $Revision: 1.6 $ */
|
||||
/* SCCS Id: @(#)gnbind.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnglyph.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnglyph.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnglyph.c $Date: 2009/05/06 10:57:29 $ $Revision: 1.6 $ */
|
||||
/* SCCS Id: @(#)gnglyph.c 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnglyph.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnglyph.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnglyph.h $Date: 2009/05/06 10:57:30 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)gnglyph.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-3
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnmain.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnmain.c $Date: 2009/05/06 10:57:32 $ $Revision: 1.9 $ */
|
||||
/* SCCS Id: @(#)gnmain.c 3.5 2008/01/30 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -365,14 +366,12 @@ GnomeUIInfo action_menu[] = {
|
||||
ghack_accelerator_selected,
|
||||
GINT_TO_POINTER(M('j')), NULL, GNOME_APP_PIXMAP_NONE, NULL, 'j',GDK_MOD1_MASK
|
||||
},
|
||||
#ifdef STEED
|
||||
{
|
||||
GNOME_APP_UI_ITEM, N_("Ride"),
|
||||
N_("Ride (or stop riding) a monster"),
|
||||
doride,
|
||||
GINT_TO_POINTER(M('r')), NULL, GNOME_APP_PIXMAP_NONE, NULL, 'R',GDK_MOD1_MASK
|
||||
},
|
||||
#endif
|
||||
{
|
||||
GNOME_APP_UI_ITEM, N_("Wipe face"),
|
||||
N_("wipe off your face"),
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnmain.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnmain.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnmain.h $Date: 2009/05/06 10:57:32 $ $Revision: 1.5 $ */
|
||||
/* SCCS Id: @(#)gnmain.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnmap.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnmap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnmap.c $Date: 2009/05/06 10:57:34 $ $Revision: 1.6 $ */
|
||||
/* SCCS Id: @(#)gnmap.c 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* Copyright (C) 1998 by Anthony Taylor <tonyt@ptialaska.net> */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnmap.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnmap.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnmap.h $Date: 2009/05/06 10:57:35 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)gnmap.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnmenu.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnmenu.c $Date: 2009/05/06 10:57:36 $ $Revision: 1.6 $ */
|
||||
/* SCCS Id: @(#)gnmenu.c 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnmenu.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnmenu.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnmenu.h $Date: 2009/05/06 10:57:39 $ $Revision: 1.5 $ */
|
||||
/* SCCS Id: @(#)gnmenu.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnmesg.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnmesg.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnmesg.c $Date: 2009/05/06 10:57:39 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)gnmesg.c 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnmesg.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnmesg.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnmesg.h $Date: 2009/05/06 10:57:39 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)gnmesg.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnomeprv.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnomeprv.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnomeprv.h $Date: 2009/05/06 10:57:40 $ $Revision: 1.5 $ */
|
||||
/* SCCS Id: @(#)gnomeprv.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnopts.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnopts.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnopts.c $Date: 2009/05/06 10:57:40 $ $Revision: 1.5 $ */
|
||||
/* SCCS Id: @(#)gnopts.c 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnopts.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnopts.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnopts.h $Date: 2009/05/06 10:57:42 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)gnopts.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnplayer.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnplayer.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnplayer.c $Date: 2009/05/06 10:57:42 $ $Revision: 1.6 $ */
|
||||
/* SCCS Id: @(#)gnplayer.c 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnplayer.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnplayer.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnplayer.h $Date: 2009/05/06 10:57:44 $ $Revision: 1.5 $ */
|
||||
/* SCCS Id: @(#)gnplayer.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnsignal.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnsignal.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnsignal.c $Date: 2009/05/06 10:57:45 $ $Revision: 1.7 $ */
|
||||
/* SCCS Id: @(#)gnsignal.c 3.5 2005/11/19 */
|
||||
/* Copyright (C) 1998 by Anthony Taylor <tonyt@ptialaska.net> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnsignal.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnsignal.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnsignal.h $Date: 2009/05/06 10:57:51 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)gnsignal.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Anthony Taylor <tonyt@ptialaska.net> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-18
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnstatus.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnstatus.c $NHDT-Date: 1425083083 2015/02/28 00:24:43 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.6 $ */
|
||||
/* NetHack 3.5 gnstatus.c $Date: 2009/05/06 10:57:54 $ $Revision: 1.5 $ */
|
||||
/* SCCS Id: @(#)gnstatus.c 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -433,9 +434,7 @@ void ghack_status_window_update_stats()
|
||||
const char* hung;
|
||||
const char* enc;
|
||||
static int firstTime=TRUE;
|
||||
#ifdef GOLDOBJ
|
||||
long umoney;
|
||||
#endif
|
||||
|
||||
/* First, fill in the player name and the dungeon level */
|
||||
strcpy(buf, plname);
|
||||
@@ -564,30 +563,17 @@ void ghack_status_window_update_stats()
|
||||
gtk_label_set( GTK_LABEL( chaLabel), buf);
|
||||
|
||||
/* Now do the non-pixmaped stats (gold and such) */
|
||||
#ifndef GOLDOBJ
|
||||
sprintf(buf,"Au:%ld", u.ugold);
|
||||
if (lastAu < u.ugold && firstTime==FALSE) {
|
||||
#else
|
||||
umoney = money_cnt(invent);
|
||||
sprintf(buf,"Au:%ld", umoney);
|
||||
if (lastAu < umoney && firstTime==FALSE) {
|
||||
#endif
|
||||
/* Ok, this changed so add it to the highlighing list */
|
||||
ghack_highlight_widget( goldLabel, normalStyle, greenStyle);
|
||||
}
|
||||
#ifndef GOLDOBJ
|
||||
else if (lastAu > u.ugold && firstTime==FALSE) {
|
||||
#else
|
||||
else if (lastAu > umoney && firstTime==FALSE) {
|
||||
#endif
|
||||
/* Ok, this changed so add it to the highlighing list */
|
||||
ghack_highlight_widget( goldLabel, normalStyle, redStyle);
|
||||
}
|
||||
#ifndef GOLDOBJ
|
||||
lastAu = u.ugold;
|
||||
#else
|
||||
lastAu = umoney;
|
||||
#endif
|
||||
gtk_label_set( GTK_LABEL( goldLabel), buf);
|
||||
|
||||
if (u.mtimedone) {
|
||||
@@ -669,7 +655,6 @@ void ghack_status_window_update_stats()
|
||||
lastAC = u.uac;
|
||||
gtk_label_set( GTK_LABEL( acLabel), buf);
|
||||
|
||||
#ifdef EXP_ON_BOTL
|
||||
if (flags.showexp) {
|
||||
sprintf(buf,"Exp:%ld", u.uexp);
|
||||
if (lastExp < u.uexp && firstTime==FALSE) {
|
||||
@@ -683,7 +668,6 @@ void ghack_status_window_update_stats()
|
||||
lastExp = u.uexp;
|
||||
gtk_label_set( GTK_LABEL( expLabel), buf);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
gtk_label_set( GTK_LABEL( expLabel), "");
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnstatus.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnstatus.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnstatus.h $Date: 2009/05/06 10:57:57 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)gnstatus.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gntext.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gntext.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gntext.c $Date: 2009/05/06 10:58:00 $ $Revision: 1.5 $ */
|
||||
/* SCCS Id: @(#)gntext.c 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gntext.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gntext.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gntext.h $Date: 2009/05/06 10:58:03 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)gntext.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+4
-11
@@ -1,4 +1,8 @@
|
||||
/* NetHack 3.5 gnworn.c 2009/05/06 10:58:06 1.3 */
|
||||
/*
|
||||
* $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
* $Date: 2012/01/10 17:47:38 $ $Revision: 1.4 $
|
||||
*/
|
||||
/* Copyright (C) 2002, Dylan Alex Simon */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -10,7 +14,6 @@
|
||||
#define WORN_WIDTH 3
|
||||
#define WORN_HEIGHT 6
|
||||
|
||||
#ifdef TOURIST
|
||||
#define WORN_OBJECT_LIST /* struct obj *[WORN_HEIGHT][WORN_WIDTH] = */ { \
|
||||
{ uquiver, uarmh, u.twoweap ? NULL : uswapwep }, \
|
||||
{ u.twoweap ? uswapwep : NULL, ublindf, uwep }, \
|
||||
@@ -19,16 +22,6 @@
|
||||
{ uarmu, uarm, uskin }, \
|
||||
{ uball, uarmf, uchain } \
|
||||
}
|
||||
#else
|
||||
#define WORN_OBJECT_LIST /* struct obj *[WORN_HEIGHT][WORN_WIDTH] = */ { \
|
||||
{ uquiver, uarmh, u.twoweap ? NULL : uswapwep }, \
|
||||
{ u.twoweap ? uswapwep : NULL, ublindf, uwep }, \
|
||||
{ uleft, uamul, uright }, \
|
||||
{ uarms, uarmc, uarmg }, \
|
||||
{ NULL, uarm, uskin }, \
|
||||
{ uball, uarmf, uchain } \
|
||||
}
|
||||
#endif
|
||||
|
||||
static GtkWidget *worn_contents[WORN_HEIGHT][WORN_WIDTH];
|
||||
static struct obj *last_worn_objects[WORN_HEIGHT][WORN_WIDTH];
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
/* NetHack 3.5 gnworn.h 2009/05/06 10:58:06 1.3 */
|
||||
/*
|
||||
* $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
* $Date: 2012/01/10 17:47:38 $ $Revision: 1.4 $
|
||||
*/
|
||||
/* Copyright (C) 2002 by Dylan Alex Simon */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnyesno.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnyesno.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnyesno.c $Date: 2009/05/06 10:58:06 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)gnyesno.c 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 gnyesno.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 gnyesno.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 gnyesno.h $Date: 2009/05/06 10:58:08 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)gnyesno.h 3.5 2000/07/16 */
|
||||
/* Copyright (C) 1998 by Erik Andersen <andersee@debian.org> */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/osascript
|
||||
# NetHack 3.5.0 NetHackGuidebook.applescript $Date$ $Revision$
|
||||
# NetHack 3.5.0 NetHackGuidebook.applescript $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
# NetHack 3.5.0 NetHackGuidebook.applescript $Date: 2011/10/17 01:29:20 $ $Revision: 1.2 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/osascript
|
||||
# NetHack 3.5 NetHackRecover.applescript $Date$ $Revision$
|
||||
# NetHack 3.5 NetHackRecover.applescript $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
# NetHack 3.5 NetHackRecover.applescript $Date: 2011/10/17 01:29:20 $ $Revision: 1.3 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/osascript
|
||||
# NetHack 3.5.0 NetHackTerm.applescript $Date$ $Revision$
|
||||
# NetHack 3.5.0 NetHackTerm.applescript $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
# NetHack 3.5.0 NetHackTerm.applescript $Date: 2011/10/17 01:29:20 $ $Revision: 1.2 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2011
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# NetHack 3.5 recover.pl $Date$ $Revision$
|
||||
# NetHack 3.5 recover.pl $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
# NetHack 3.5 recover.pl $Date: 2011/10/17 01:29:20 $ $Revision: 1.3 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2009
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
/* | provided "as is" without express or implied warranty. | */
|
||||
/* +-------------------------------------------------------------------+ */
|
||||
|
||||
/*
|
||||
* $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
* $Date: 2002/01/05 21:06:02 $ $Revision: 1.1 $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "tile.h"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 ppmwrite.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 ppmwrite.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 ppmwrite.c $Date: 2009/05/06 10:59:00 $ $Revision: 1.2 $ */
|
||||
/* this produces a raw ppm file, with a 15-character header of
|
||||
* "P6 3-digit-width 3-digit-height 255\n"
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 thintile.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 thintile.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 thintile.c $Date: 2012/01/10 17:47:40 $ $Revision: 1.5 $ */
|
||||
/* Copyright (c) NetHack Development Team 1995 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
NetHack 3.5 tile.doc $Date$ $Revision$
|
||||
NetHack 3.5 tile.doc $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
NetHack 3.5 tile.doc $Date: 2009/05/06 10:59:00 $ $Revision: 1.2 $
|
||||
|
||||
Window ports can optionally make use of the tiles (pictures for NetHack
|
||||
symbols) found in this directory. They are distributed in a text format
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 tile.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 tile.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 tile.h $Date: 2009/05/06 21:59:39 $ $Revision: 1.6 $ */
|
||||
typedef unsigned char pixval;
|
||||
|
||||
typedef struct pixel_s {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 tile2bmp.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 tile2bmp.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 tile2bmp.c $Date: 2009/05/06 10:59:00 $ $Revision: 1.6 $ */
|
||||
/* SCCS Id: @(#)tile2bmp.c 3.5 2002/03/14 */
|
||||
/* Copyright (c) NetHack PC Development Team 1995 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+5
-44
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 tilemap.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 tilemap.c $NHDT-Date: 1425082379 2015/02/28 00:12:59 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.12 $ */
|
||||
/* NetHack 3.5 tilemap.c $Date: 2009/05/06 10:59:02 $ $Revision: 1.7 $ */
|
||||
/* SCCS Id: @(#)tilemap.c 3.5 2000/06/04 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -41,49 +42,22 @@ struct conditionals {
|
||||
{ MON_GLYPH, PM_BABY_SILVER_DRAGON, "baby shimmering dragon" },
|
||||
{ MON_GLYPH, PM_SILVER_DRAGON, "shimmering dragon" },
|
||||
{ MON_GLYPH, PM_JABBERWOCK, "vorpal jabberwock" },
|
||||
#ifndef KOPS
|
||||
{ MON_GLYPH, PM_JABBERWOCK, "Keystone Kop" },
|
||||
{ MON_GLYPH, PM_JABBERWOCK, "Kop Sergeant" },
|
||||
{ MON_GLYPH, PM_JABBERWOCK, "Kop Lieutenant" },
|
||||
{ MON_GLYPH, PM_JABBERWOCK, "Kop Kaptain" },
|
||||
#endif
|
||||
{ MON_GLYPH, PM_VAMPIRE_LORD, "vampire mage" },
|
||||
#ifndef CHARON /* not supported yet */
|
||||
{ MON_GLYPH, PM_CROESUS, "Charon" },
|
||||
#endif
|
||||
#ifndef MAIL
|
||||
{ MON_GLYPH, PM_FAMINE, "mail daemon" },
|
||||
#endif
|
||||
#ifndef TOURIST
|
||||
{ MON_GLYPH, PM_SAMURAI, "tourist" },
|
||||
#endif
|
||||
/* commented out in monst.c at present */
|
||||
{ MON_GLYPH, PM_SHAMAN_KARNOV, "Earendil" },
|
||||
{ MON_GLYPH, PM_SHAMAN_KARNOV, "Elwing" },
|
||||
#ifndef TOURIST
|
||||
{ MON_GLYPH, PM_LORD_SATO, "Twoflower" },
|
||||
#endif
|
||||
/* commented out in monst.c at present */
|
||||
{ MON_GLYPH, PM_CHROMATIC_DRAGON, "Goblin King" },
|
||||
{ MON_GLYPH, PM_NEANDERTHAL, "High-elf" },
|
||||
#ifndef TOURIST
|
||||
{ MON_GLYPH, PM_ROSHI, "guide" },
|
||||
#endif
|
||||
#ifndef KOPS
|
||||
{ OBJ_GLYPH, CLUB, "rubber hose" },
|
||||
#endif
|
||||
/* objects commented out in objects.c at present */
|
||||
{ OBJ_GLYPH, SILVER_DRAGON_SCALE_MAIL, "shimmering dragon scale mail" },
|
||||
{ OBJ_GLYPH, SILVER_DRAGON_SCALES, "shimmering dragon scales" },
|
||||
#ifndef TOURIST
|
||||
{ OBJ_GLYPH, LEATHER_JACKET, "Hawaiian shirt" },
|
||||
{ OBJ_GLYPH, LEATHER_JACKET, "T-shirt" },
|
||||
{ OBJ_GLYPH, LOCK_PICK, "credit card" },
|
||||
{ OBJ_GLYPH, MAGIC_LAMP, "expensive camera" },
|
||||
#endif
|
||||
#ifndef STEED
|
||||
{ OBJ_GLYPH, TOWEL, "saddle" },
|
||||
#endif
|
||||
/* allow slime mold to look like slice of pizza, since we
|
||||
* don't know what a slime mold should look like when renamed anyway
|
||||
*/
|
||||
@@ -183,23 +157,10 @@ int set, entry;
|
||||
tilenum = 0; /* set-relative number */
|
||||
for (i = 0; i < (MAXPCHARS - MAXEXPCHARS); i++) {
|
||||
if (set == OTH_GLYPH && tilenum == entry) {
|
||||
if (*defsyms[i].explanation)
|
||||
if (*defsyms[i].explanation) {
|
||||
return defsyms[i].explanation;
|
||||
else {
|
||||
/* if SINKS are turned off, this
|
||||
* string won't be there (and can't be there
|
||||
* to prevent symbol-identification and
|
||||
* special-level mimic appearances from
|
||||
* thinking the items exist)
|
||||
*/
|
||||
switch (i) {
|
||||
case S_sink:
|
||||
Sprintf(buf, "sink");
|
||||
break;
|
||||
default:
|
||||
Sprintf(buf, "cmap %d", tilenum);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
Sprintf(buf, "cmap %d", tilenum);
|
||||
return buf;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 tiletext.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 tiletext.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 tiletext.c $Date: 2009/05/06 10:59:03 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)tiletext.c 3.5 1999/10/24 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
+21
-52
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 getline.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 getline.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 getline.c $Date: 2011/12/11 01:54:56 $ $Revision: 1.18 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -23,25 +24,6 @@ extern int NDECL(extcmd_via_menu); /* cmd.c */
|
||||
|
||||
extern char erase_char, kill_char; /* from appropriate tty.c file */
|
||||
|
||||
/* cloned from topl.c, but not identical
|
||||
*/
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
/* nhwchar is wchar; data from core needs narrow-to-wide conversion;
|
||||
data going back to core needs wide-to-narrow conversion; data
|
||||
used within tty routines typically needs wide-to-wide awareness */
|
||||
STATIC_VAR nhwchar getl_wbuf[BUFSZ];
|
||||
STATIC_VAR char getl_nbuf[BUFSZ];
|
||||
#define T(x) L##x
|
||||
#define Waddtopl(str) addtopl(nhwstrcpy(getl_wbuf,str))
|
||||
#define Wputsyms(str) putsyms(nhwstrcpy(getl_wbuf,str))
|
||||
#define NWstrcpy(wdst,src) nhwstrcpy(wdst,src) /* narrow-to-wide */
|
||||
#else /*!UNICODE_WIDEWINPORT*/
|
||||
/* nhwchar is char; no conversions needed */
|
||||
#define T(x) x
|
||||
#define Waddtopl(str) addtopl(str)
|
||||
#define Wputsyms(str) putsyms(str)
|
||||
#endif /*?UNICODE_WIDEWINPORT*/
|
||||
|
||||
/*
|
||||
* Read a line closed with '\n' into the array char bufp[BUFSZ].
|
||||
* (The '\n' is not stored. The string is closed with a '\0'.)
|
||||
@@ -75,13 +57,8 @@ getlin_hook_proc hook;
|
||||
*obufp = 0;
|
||||
for(;;) {
|
||||
(void) fflush(stdout);
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
Strcat(strcat(strcpy(getl_nbuf, query), " "), obufp);
|
||||
(void)NWstrcpy(toplines, getl_nbuf);
|
||||
#else
|
||||
Strcat(strcat(strcpy(toplines, query), " "), obufp);
|
||||
#endif
|
||||
c = Getchar();
|
||||
c = pgetchar();
|
||||
if (c == '\033' || c == EOF) {
|
||||
obufp[0] = '\033';
|
||||
obufp[1] = '\0';
|
||||
@@ -99,10 +76,10 @@ getlin_hook_proc hook;
|
||||
ttyDisplay->inread = sav;
|
||||
tty_clear_nhwindow(WIN_MESSAGE);
|
||||
cw->maxcol = cw->maxrow;
|
||||
Waddtopl(query);
|
||||
Waddtopl(T(" "));
|
||||
addtopl(query);
|
||||
addtopl(" ");
|
||||
*bufp = 0;
|
||||
Waddtopl(obufp);
|
||||
addtopl(obufp);
|
||||
} else {
|
||||
if (!doprev)
|
||||
(void) tty_doprev_message();/* need two initially */
|
||||
@@ -114,10 +91,10 @@ getlin_hook_proc hook;
|
||||
tty_clear_nhwindow(WIN_MESSAGE);
|
||||
cw->maxcol = cw->maxrow;
|
||||
doprev = 0;
|
||||
Waddtopl(query);
|
||||
Waddtopl(T(" "));
|
||||
addtopl(query);
|
||||
addtopl(" ");
|
||||
*bufp = 0;
|
||||
Waddtopl(obufp);
|
||||
addtopl(obufp);
|
||||
}
|
||||
if(c == erase_char || c == '\b') {
|
||||
if(bufp != obufp) {
|
||||
@@ -127,11 +104,11 @@ getlin_hook_proc hook;
|
||||
#endif /* NEWAUTOCOMP */
|
||||
bufp--;
|
||||
#ifndef NEWAUTOCOMP
|
||||
putsyms(T("\b \b"));/* putsym converts \b */
|
||||
putsyms("\b \b");/* putsym converts \b */
|
||||
#else /* NEWAUTOCOMP */
|
||||
putsyms(T("\b"));
|
||||
for (i = bufp; *i; ++i) putsyms(T(" "));
|
||||
for (; i > bufp; --i) putsyms(T("\b"));
|
||||
putsyms("\b");
|
||||
for (i = bufp; *i; ++i) putsyms(" ");
|
||||
for (; i > bufp; --i) putsyms("\b");
|
||||
*bufp = 0;
|
||||
#endif /* NEWAUTOCOMP */
|
||||
} else tty_nhbell();
|
||||
@@ -154,21 +131,21 @@ getlin_hook_proc hook;
|
||||
#endif /* NEWAUTOCOMP */
|
||||
*bufp = c;
|
||||
bufp[1] = 0;
|
||||
Wputsyms(bufp);
|
||||
putsyms(bufp);
|
||||
bufp++;
|
||||
if (hook && (*hook)(obufp)) {
|
||||
Wputsyms(bufp);
|
||||
putsyms(bufp);
|
||||
#ifndef NEWAUTOCOMP
|
||||
bufp = eos(bufp);
|
||||
#else /* NEWAUTOCOMP */
|
||||
/* pointer and cursor left where they were */
|
||||
for (i = bufp; *i; ++i) putsyms(T("\b"));
|
||||
for (i = bufp; *i; ++i) putsyms("\b");
|
||||
} else if (i > bufp) {
|
||||
char *s = i;
|
||||
|
||||
/* erase rest of prior guess */
|
||||
for (; i > bufp; --i) putsyms(T(" "));
|
||||
for (; s > bufp; --s) putsyms(T("\b"));
|
||||
for (; i > bufp; --i) putsyms(" ");
|
||||
for (; s > bufp; --s) putsyms("\b");
|
||||
#endif /* NEWAUTOCOMP */
|
||||
}
|
||||
} else if(c == kill_char || c == '\177') { /* Robert Viduya */
|
||||
@@ -176,11 +153,11 @@ getlin_hook_proc hook;
|
||||
#ifndef NEWAUTOCOMP
|
||||
while(bufp != obufp) {
|
||||
bufp--;
|
||||
putsyms(T("\b \b"));
|
||||
putsyms("\b \b");
|
||||
}
|
||||
#else /* NEWAUTOCOMP */
|
||||
for (; *bufp; ++bufp) putsyms(T(" "));
|
||||
for (; bufp != obufp; --bufp) putsyms(T("\b \b"));
|
||||
for (; *bufp; ++bufp) putsyms(" ");
|
||||
for (; bufp != obufp; --bufp) putsyms("\b \b");
|
||||
*bufp = 0;
|
||||
#endif /* NEWAUTOCOMP */
|
||||
} else
|
||||
@@ -191,8 +168,6 @@ getlin_hook_proc hook;
|
||||
clear_nhwindow(WIN_MESSAGE); /* clean up after ourselves */
|
||||
}
|
||||
|
||||
#undef T
|
||||
|
||||
void
|
||||
xwaitforspace(s)
|
||||
register const char *s; /* chars allowed besides return */
|
||||
@@ -270,26 +245,20 @@ tty_get_ext_cmd()
|
||||
if (iflags.extmenu) return extcmd_via_menu();
|
||||
/* maybe a runtime option? */
|
||||
/* hooked_tty_getlin("#", buf, flags.cmd_comp ? ext_cmd_getlin_hook : (getlin_hook_proc) 0); */
|
||||
#ifdef REDO
|
||||
hooked_tty_getlin("#", buf, in_doagain ? (getlin_hook_proc)0
|
||||
: ext_cmd_getlin_hook);
|
||||
#else
|
||||
hooked_tty_getlin("#", buf, ext_cmd_getlin_hook);
|
||||
#endif
|
||||
(void) mungspaces(buf);
|
||||
if (buf[0] == 0 || buf[0] == '\033') return -1;
|
||||
|
||||
for (i = 0; extcmdlist[i].ef_txt != (char *)0; i++)
|
||||
if (!strcmpi(buf, extcmdlist[i].ef_txt)) break;
|
||||
|
||||
#ifdef REDO
|
||||
if (!in_doagain) {
|
||||
int j;
|
||||
for (j = 0; buf[j]; j++)
|
||||
savech(buf[j]);
|
||||
savech('\n');
|
||||
}
|
||||
#endif
|
||||
|
||||
if (extcmdlist[i].ef_txt == (char *)0) {
|
||||
pline("%s: unknown extended command.", buf);
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 termcap.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 termcap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 termcap.c $Date: 2009/05/06 10:59:19 $ $Revision: 1.13 $ */
|
||||
/* SCCS Id: @(#)termcap.c 3.5 2007/12/12 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+61
-105
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.5 topl.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 topl.c $NHDT-Date: 1425081315 2015/02/27 23:55:15 $ $NHDT-Branch: (no branch, rebasing scshunt-unconditionals) $:$NHDT-Revision: 1.24 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -14,44 +14,8 @@
|
||||
#define C(c) (0x1f & (c))
|
||||
#endif
|
||||
|
||||
/* use caution with this stuff; it's very easy to get things mixed up...
|
||||
*/
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
/* nhwchar is wchar; data from core needs narrow-to-wide conversion;
|
||||
data going back to core needs wide-to-narrow conversion; data
|
||||
used within tty routines typically needs wide-to-wide awareness */
|
||||
STATIC_VAR nhwchar topl_wbuf[BUFSZ];
|
||||
STATIC_VAR char topl_nbuf[BUFSZ];
|
||||
#define T(x) L##x
|
||||
#define DoGputch(x) ((x) >= 0x80)
|
||||
#define Waddtopl(str) addtopl(nhwstrcpy(topl_wbuf,str))
|
||||
#define Wputstr(win,atr,wstr) putstr(win,atr,strnhwcpy(topl_nbuf,wstr))
|
||||
#define Windex(wstr,wchr) nhwindex(wstr,wchr)
|
||||
#define Wstrlen(wstr) (int)nhwlen(wstr)
|
||||
#define NWstrcpy(wdst,src) nhwstrcpy(wdst,src) /* narrow-to-wide */
|
||||
#define WNstrcpy(dst,wsrc) strnhwcpy(dst,wsrc) /* wide-to-narrow */
|
||||
#define WWstrcpy(wdst,wsrc) nhwcpy(wdst,wsrc) /* wide-to-wide */
|
||||
#define WWstrcat(wdst,wsrc) nhwcat(wdst,wsrc)
|
||||
#define WWstrncpy(wdst,wsrc,ln nhwncpy(wdst,wsrc,ln)
|
||||
#define WWstrncmp(wst1,wst2,ln) nhwncmp(wst1,wst2,ln)
|
||||
#else /*!UNICODE_WIDEWINPORT*/
|
||||
/* nhwchar is char; no conversions needed */
|
||||
#define T(x) x
|
||||
#define DoGputch(x) ((x) & 0x80)
|
||||
#define Waddtopl(str) addtopl(str)
|
||||
#define Wputstr(win,atr,str) putstr(win,atr,str)
|
||||
#define Windex(wstr,wchr) index(wstr,wchr)
|
||||
#define Wstrlen(wstr) (int)strlen(wstr)
|
||||
#define NWstrcpy(wdst,src) strcpy(wdst,src)
|
||||
#define WNstrcpy(dst,wsrc) strcpy(dst,wsrc)
|
||||
#define WWstrcpy(wdst,wsrc) strcpy(wdst,wsrc)
|
||||
#define WWstrcat(wdst,wsrc) strcat(wdst,wsrc)
|
||||
#define WWstrncpy(wdst,wsrc,ln) strncpy(wdst,wsrc,ln)
|
||||
#define WWstrncmp(wst1,wst2,ln) strncmp(wst1,wst2,ln)
|
||||
#endif /*?UNICODE_WIDEWINPORT*/
|
||||
|
||||
STATIC_DCL void FDECL(redotoplin, (const nhwchar*));
|
||||
STATIC_DCL void FDECL(topl_putsym, (NHWCHAR_P));
|
||||
STATIC_DCL void FDECL(redotoplin, (const char*));
|
||||
STATIC_DCL void FDECL(topl_putsym, (CHAR_P));
|
||||
STATIC_DCL void NDECL(remember_topl);
|
||||
STATIC_DCL void FDECL(removetopl, (int));
|
||||
STATIC_DCL void FDECL(msghistory_snapshot, (BOOLEAN_P));
|
||||
@@ -61,9 +25,9 @@ int
|
||||
tty_doprev_message()
|
||||
{
|
||||
register struct WinDesc *cw = wins[WIN_MESSAGE];
|
||||
|
||||
winid prevmsg_win;
|
||||
int i;
|
||||
|
||||
if ((iflags.prevmsg_window != 's') && !ttyDisplay->inread) { /* not single */
|
||||
if(iflags.prevmsg_window == 'f') { /* full */
|
||||
prevmsg_win = create_nhwindow(NHW_MENU);
|
||||
@@ -72,11 +36,11 @@ tty_doprev_message()
|
||||
cw->maxcol = cw->maxrow;
|
||||
i = cw->maxcol;
|
||||
do {
|
||||
if (cw->data[i] && *cw->data[i])
|
||||
Wputstr(prevmsg_win, 0, cw->data[i]);
|
||||
if(cw->data[i] && strcmp(cw->data[i], "") )
|
||||
putstr(prevmsg_win, 0, cw->data[i]);
|
||||
i = (i + 1) % cw->rows;
|
||||
} while (i != cw->maxcol);
|
||||
Wputstr(prevmsg_win, 0, toplines);
|
||||
putstr(prevmsg_win, 0, toplines);
|
||||
display_nhwindow(prevmsg_win, TRUE);
|
||||
destroy_nhwindow(prevmsg_win);
|
||||
} else if (iflags.prevmsg_window == 'c') { /* combination */
|
||||
@@ -103,12 +67,11 @@ tty_doprev_message()
|
||||
cw->maxcol = cw->maxrow;
|
||||
i = cw->maxcol;
|
||||
do {
|
||||
if (cw->data[i] && *cw->data[i])
|
||||
Wputstr(prevmsg_win, 0, cw->data[i]);
|
||||
if(cw->data[i] && strcmp(cw->data[i], "") )
|
||||
putstr(prevmsg_win, 0, cw->data[i]);
|
||||
i = (i + 1) % cw->rows;
|
||||
} while (i != cw->maxcol);
|
||||
|
||||
Wputstr(prevmsg_win, 0, toplines);
|
||||
putstr(prevmsg_win, 0, toplines);
|
||||
display_nhwindow(prevmsg_win, TRUE);
|
||||
destroy_nhwindow(prevmsg_win);
|
||||
}
|
||||
@@ -120,11 +83,11 @@ tty_doprev_message()
|
||||
prevmsg_win = create_nhwindow(NHW_MENU);
|
||||
putstr(prevmsg_win, 0, "Message History");
|
||||
putstr(prevmsg_win, 0, "");
|
||||
Wputstr(prevmsg_win, 0, toplines);
|
||||
putstr(prevmsg_win, 0, toplines);
|
||||
cw->maxcol=cw->maxrow-1;
|
||||
if(cw->maxcol < 0) cw->maxcol = cw->rows-1;
|
||||
do {
|
||||
Wputstr(prevmsg_win, 0, cw->data[cw->maxcol]);
|
||||
putstr(prevmsg_win, 0, cw->data[cw->maxcol]);
|
||||
cw->maxcol--;
|
||||
if (cw->maxcol < 0) cw->maxcol = cw->rows-1;
|
||||
if (!cw->data[cw->maxcol])
|
||||
@@ -155,19 +118,19 @@ tty_doprev_message()
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
redotoplin(symstr)
|
||||
const nhwchar *symstr;
|
||||
redotoplin(str)
|
||||
const char *str;
|
||||
{
|
||||
int otoplin = ttyDisplay->toplin;
|
||||
home();
|
||||
if (DoGputch(*symstr)) {
|
||||
if(*str & 0x80) {
|
||||
/* kludge for the / command, the only time we ever want a */
|
||||
/* graphics character on the top line */
|
||||
g_putch((int)*symstr++);
|
||||
g_putch((int)*str++);
|
||||
ttyDisplay->curx++;
|
||||
}
|
||||
end_glyphout(); /* in case message printed during graphics output */
|
||||
putsyms(symstr);
|
||||
putsyms(str);
|
||||
cl_end();
|
||||
ttyDisplay->toplin = 1;
|
||||
if(ttyDisplay->cury && otoplin != 3)
|
||||
@@ -179,25 +142,25 @@ remember_topl()
|
||||
{
|
||||
register struct WinDesc *cw = wins[WIN_MESSAGE];
|
||||
int idx = cw->maxrow;
|
||||
unsigned len;
|
||||
unsigned len = strlen(toplines) + 1;
|
||||
|
||||
if ((cw->flags & WIN_LOCKHISTORY) || !*toplines) return;
|
||||
|
||||
len = Wstrlen(toplines) + 1;
|
||||
|
||||
if (len > (unsigned)cw->datlen[idx]) {
|
||||
if (cw->data[idx]) free(cw->data[idx]);
|
||||
len += (8 - (len & 7)); /* pad up to next multiple of 8 */
|
||||
cw->data[idx] = (nhwchar *)alloc(sizeof(nhwchar) * len);
|
||||
cw->data[idx] = (char *)alloc(len);
|
||||
cw->datlen[idx] = (short)len;
|
||||
}
|
||||
(void)WWstrcpy(cw->data[idx], toplines);
|
||||
Strcpy(cw->data[idx], toplines);
|
||||
*toplines = '\0';
|
||||
cw->maxcol = cw->maxrow = (idx + 1) % cw->rows;
|
||||
}
|
||||
|
||||
void
|
||||
addtopl(s)
|
||||
const nhwchar *s;
|
||||
const char *s;
|
||||
{
|
||||
register struct WinDesc *cw = wins[WIN_MESSAGE];
|
||||
|
||||
@@ -218,8 +181,7 @@ more()
|
||||
|
||||
if(ttyDisplay->toplin) {
|
||||
tty_curs(BASE_WINDOW, cw->curx+1, cw->cury);
|
||||
if(cw->curx >= CO - 8)
|
||||
topl_putsym(T('\n'));
|
||||
if(cw->curx >= CO - 8) topl_putsym('\n');
|
||||
}
|
||||
|
||||
if(flags.standout)
|
||||
@@ -248,22 +210,22 @@ more()
|
||||
|
||||
void
|
||||
update_topl(bp)
|
||||
register const nhwchar *bp;
|
||||
register const char *bp;
|
||||
{
|
||||
register nhwchar *tl, *otl;
|
||||
register char *tl, *otl;
|
||||
register int n0;
|
||||
int notdied = 1;
|
||||
struct WinDesc *cw = wins[WIN_MESSAGE];
|
||||
|
||||
/* If there is room on the line, print message on same line */
|
||||
/* But messages like "You die..." deserve their own line */
|
||||
n0 = Wstrlen(bp);
|
||||
n0 = strlen(bp);
|
||||
if ((ttyDisplay->toplin == 1 || (cw->flags & WIN_STOP)) &&
|
||||
cw->cury == 0 &&
|
||||
n0 + Wstrlen(toplines) + 3 < CO-8 && /* room for --More-- */
|
||||
(notdied = WWstrncmp(bp, T("You die"), 7))) {
|
||||
(void)WWstrcat(toplines, T(" "));
|
||||
(void)WWstrcat(toplines, bp);
|
||||
n0 + (int)strlen(toplines) + 3 < CO-8 && /* room for --More-- */
|
||||
(notdied = strncmp(bp, "You die", 7))) {
|
||||
Strcat(toplines, " ");
|
||||
Strcat(toplines, bp);
|
||||
cw->curx += 2;
|
||||
if(!(cw->flags & WIN_STOP))
|
||||
addtopl(bp);
|
||||
@@ -276,7 +238,7 @@ update_topl(bp)
|
||||
}
|
||||
}
|
||||
remember_topl();
|
||||
(void)WWstrncpy(toplines, bp, TBUFSZ);
|
||||
(void) strncpy(toplines, bp, TBUFSZ);
|
||||
toplines[TBUFSZ - 1] = 0;
|
||||
|
||||
for(tl = toplines; n0 >= CO; ){
|
||||
@@ -284,11 +246,11 @@ update_topl(bp)
|
||||
for(tl+=CO-1; tl != otl && !isspace(*tl); --tl) ;
|
||||
if(tl == otl) {
|
||||
/* Eek! A huge token. Try splitting after it. */
|
||||
tl = Windex(otl, T(' '));
|
||||
tl = index(otl, ' ');
|
||||
if (!tl) break; /* No choice but to spit it out whole. */
|
||||
}
|
||||
*tl++ = T('\n');
|
||||
n0 = Wstrlen(tl);
|
||||
*tl++ = '\n';
|
||||
n0 = strlen(tl);
|
||||
}
|
||||
if(!notdied) cw->flags &= ~WIN_STOP;
|
||||
if(!(cw->flags & WIN_STOP)) redotoplin(toplines);
|
||||
@@ -297,21 +259,21 @@ update_topl(bp)
|
||||
STATIC_OVL
|
||||
void
|
||||
topl_putsym(c)
|
||||
nhwchar c;
|
||||
char c;
|
||||
{
|
||||
register struct WinDesc *cw = wins[WIN_MESSAGE];
|
||||
|
||||
if(cw == (struct WinDesc *) 0) panic("Putsym window MESSAGE nonexistant");
|
||||
|
||||
switch(c) {
|
||||
case T('\b'):
|
||||
case '\b':
|
||||
if(ttyDisplay->curx == 0 && ttyDisplay->cury > 0)
|
||||
tty_curs(BASE_WINDOW, CO, (int)ttyDisplay->cury-1);
|
||||
backsp();
|
||||
ttyDisplay->curx--;
|
||||
cw->curx = ttyDisplay->curx;
|
||||
return;
|
||||
case T('\n'):
|
||||
case '\n':
|
||||
cl_end();
|
||||
ttyDisplay->curx = 0;
|
||||
ttyDisplay->cury++;
|
||||
@@ -322,7 +284,7 @@ topl_putsym(c)
|
||||
break;
|
||||
default:
|
||||
if(ttyDisplay->curx == CO-1)
|
||||
topl_putsym(T('\n')); /* 1 <= curx <= CO; avoid CO */
|
||||
topl_putsym('\n'); /* 1 <= curx <= CO; avoid CO */
|
||||
#ifdef WIN32CON
|
||||
(void) putchar(c);
|
||||
#endif
|
||||
@@ -336,11 +298,11 @@ topl_putsym(c)
|
||||
}
|
||||
|
||||
void
|
||||
putsyms(symstr)
|
||||
const nhwchar *symstr;
|
||||
putsyms(str)
|
||||
const char *str;
|
||||
{
|
||||
while(*symstr)
|
||||
topl_putsym(*symstr++);
|
||||
while(*str)
|
||||
topl_putsym(*str++);
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
@@ -348,8 +310,7 @@ removetopl(n)
|
||||
register int n;
|
||||
{
|
||||
/* assume addtopl() has been done, so ttyDisplay->toplin is already set */
|
||||
while (n-- > 0)
|
||||
putsyms(T("\b \b"));
|
||||
while (n-- > 0) putsyms("\b \b");
|
||||
}
|
||||
|
||||
extern char erase_char; /* from xxxtty.c; don't need kill_char */
|
||||
@@ -412,7 +373,7 @@ char def;
|
||||
ttyDisplay->inread = sav;
|
||||
tty_clear_nhwindow(WIN_MESSAGE);
|
||||
cw->maxcol = cw->maxrow;
|
||||
Waddtopl(prompt);
|
||||
addtopl(prompt);
|
||||
} else {
|
||||
if(!doprev)
|
||||
(void) tty_doprev_message(); /* need two initially */
|
||||
@@ -428,7 +389,7 @@ char def;
|
||||
tty_clear_nhwindow(WIN_MESSAGE);
|
||||
cw->maxcol = cw->maxrow;
|
||||
doprev = 0;
|
||||
Waddtopl(prompt);
|
||||
addtopl(prompt);
|
||||
q = '\0'; /* force another loop iteration */
|
||||
continue;
|
||||
}
|
||||
@@ -449,14 +410,13 @@ char def;
|
||||
tty_nhbell();
|
||||
q = (char)0;
|
||||
} else if (q == '#' || digit_ok) {
|
||||
char z;
|
||||
nhwchar digit_string[2];
|
||||
char z, digit_string[2];
|
||||
int n_len = 0;
|
||||
long value = 0;
|
||||
addtopl(T("#")), n_len++;
|
||||
digit_string[1] = (nhwchar)0;
|
||||
addtopl("#"), n_len++;
|
||||
digit_string[1] = '\0';
|
||||
if (q != '#') {
|
||||
digit_string[0] = (nhwchar)q;
|
||||
digit_string[0] = q;
|
||||
addtopl(digit_string), n_len++;
|
||||
value = q - '0';
|
||||
q = '#';
|
||||
@@ -466,7 +426,7 @@ char def;
|
||||
if (digit(z)) {
|
||||
value = (10 * value) + (z - '0');
|
||||
if (value < 0) break; /* overflow: try again */
|
||||
digit_string[0] = (nhwchar)z;
|
||||
digit_string[0] = z;
|
||||
addtopl(digit_string), n_len++;
|
||||
} else if (z == 'y' || index(quitchars, z)) {
|
||||
if (z == '\033') value = -1; /* abort */
|
||||
@@ -491,7 +451,7 @@ char def;
|
||||
|
||||
if (q != '#') {
|
||||
Sprintf(rtmp, "%c", q);
|
||||
Waddtopl(rtmp);
|
||||
addtopl(rtmp);
|
||||
}
|
||||
clean_up:
|
||||
ttyDisplay->inread--;
|
||||
@@ -504,7 +464,7 @@ char def;
|
||||
}
|
||||
|
||||
/* shared by tty_getmsghistory() and tty_putmsghistory() */
|
||||
static nhwchar **snapshot_mesgs = 0;
|
||||
static char **snapshot_mesgs = 0;
|
||||
|
||||
/* collect currently available message history data into a sequential array;
|
||||
optionally, purge that data from the active circular buffer set as we go */
|
||||
@@ -512,7 +472,7 @@ STATIC_OVL void
|
||||
msghistory_snapshot(purge)
|
||||
boolean purge; /* clear message history buffer as we copy it */
|
||||
{
|
||||
nhwchar *mesg;
|
||||
char *mesg;
|
||||
int i, inidx, outidx;
|
||||
struct WinDesc *cw;
|
||||
|
||||
@@ -527,24 +487,24 @@ boolean purge; /* clear message history buffer as we copy it */
|
||||
history updating to take place because that could clobber them */
|
||||
if (!purge) cw->flags |= WIN_LOCKHISTORY;
|
||||
|
||||
snapshot_mesgs = (nhwchar **)alloc((cw->rows + 1) * sizeof (nhwchar *));
|
||||
snapshot_mesgs = (char **)alloc((cw->rows + 1) * sizeof (char *));
|
||||
outidx = 0;
|
||||
inidx = cw->maxrow;
|
||||
for (i = 0; i < cw->rows; ++i) {
|
||||
snapshot_mesgs[i] = (nhwchar *)0;
|
||||
snapshot_mesgs[i] = (char *)0;
|
||||
mesg = cw->data[inidx];
|
||||
if (mesg && *mesg) {
|
||||
snapshot_mesgs[outidx++] = mesg;
|
||||
if (purge) {
|
||||
/* we're taking this pointer away; subsequest history
|
||||
updates will eventually allocate a new one to replace it */
|
||||
cw->data[inidx] = (nhwchar *)0;
|
||||
cw->data[inidx] = (char *)0;
|
||||
cw->datlen[inidx] = 0;
|
||||
}
|
||||
}
|
||||
inidx = (inidx + 1) % cw->rows;
|
||||
}
|
||||
snapshot_mesgs[cw->rows] = (nhwchar *)0; /* sentinel */
|
||||
snapshot_mesgs[cw->rows] = (char *)0; /* sentinel */
|
||||
|
||||
/* for a destructive snapshot, history is now completely empty */
|
||||
if (purge) cw->maxcol = cw->maxrow = 0;
|
||||
@@ -564,7 +524,7 @@ boolean purged; /* True: took history's pointers, False: just cloned them */
|
||||
free((genericptr_t)snapshot_mesgs[i]);
|
||||
}
|
||||
|
||||
free((genericptr_t)snapshot_mesgs), snapshot_mesgs = (nhwchar **)0;
|
||||
free((genericptr_t)snapshot_mesgs), snapshot_mesgs = (char **)0;
|
||||
|
||||
/* history can resume being updated at will now... */
|
||||
if (!purged) wins[WIN_MESSAGE]->flags &= ~WIN_LOCKHISTORY;
|
||||
@@ -586,7 +546,7 @@ tty_getmsghistory(init)
|
||||
boolean init;
|
||||
{
|
||||
static int nxtidx;
|
||||
nhwchar *nextmesg;
|
||||
char *nextmesg;
|
||||
char *result = 0;
|
||||
|
||||
if (init) {
|
||||
@@ -597,11 +557,7 @@ boolean init;
|
||||
if (snapshot_mesgs) {
|
||||
nextmesg = snapshot_mesgs[nxtidx++];
|
||||
if (nextmesg) {
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
result = WNstrcpy(topl_nbuf, nextmesg); /* wide-to-narrow */
|
||||
#else
|
||||
result = (char *)nextmesg;
|
||||
#endif
|
||||
} else {
|
||||
free_msghistory_snapshot(FALSE);
|
||||
}
|
||||
@@ -647,12 +603,12 @@ boolean restoring_msghist;
|
||||
if (msg) {
|
||||
/* move most recent message to history, make this become most recent */
|
||||
remember_topl();
|
||||
(void)NWstrcpy(toplines, msg); /* narrow-to-wide */
|
||||
Strcpy(toplines, msg);
|
||||
} else if (snapshot_mesgs) {
|
||||
/* done putting arbitrary messages in; put the snapshot ones back */
|
||||
for (idx = 0; snapshot_mesgs[idx]; ++idx) {
|
||||
remember_topl();
|
||||
(void)WWstrcpy(toplines, snapshot_mesgs[idx]); /* wide-to-wide */
|
||||
Strcpy(toplines, snapshot_mesgs[idx]);
|
||||
}
|
||||
/* now release the snapshot */
|
||||
free_msghistory_snapshot(TRUE);
|
||||
|
||||
+37
-310
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 wintty.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 wintty.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 wintty.c $Date: 2012/01/22 06:27:09 $ $Revision: 1.66 $ */
|
||||
/* Copyright (c) David Cohrs, 1991 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -42,11 +43,6 @@ extern char mapped_menu_cmds[]; /* from options.c */
|
||||
/* this is only needed until tty_status_* routines are written */
|
||||
extern NEARDATA winid WIN_STATUS;
|
||||
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
void FDECL(tty_putmixed,(winid,int,const char *));
|
||||
void FDECL(tty_putstr_core,(winid,int,const nhwchar *));
|
||||
#endif
|
||||
|
||||
/* Interface definition, for windows.c */
|
||||
struct window_procs tty_procs = {
|
||||
"tty",
|
||||
@@ -74,11 +70,7 @@ struct window_procs tty_procs = {
|
||||
tty_destroy_nhwindow,
|
||||
tty_curs,
|
||||
tty_putstr,
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
tty_putmixed,
|
||||
#else
|
||||
genl_putmixed,
|
||||
#endif
|
||||
tty_display_file,
|
||||
tty_start_menu,
|
||||
tty_add_menu,
|
||||
@@ -150,12 +142,7 @@ static char obuf[BUFSIZ]; /* BUFSIZ is defined in stdio.h */
|
||||
#endif
|
||||
|
||||
static char winpanicstr[] = "Bad window id %d";
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
nhwchar defmorestr[] = L"--More--";
|
||||
#else
|
||||
nhwchar defmorestr[] = "--More--";
|
||||
#endif
|
||||
nhwchar emptysym[1] = {0};
|
||||
char defmorestr[] = "--More--";
|
||||
|
||||
#ifdef CLIPPING
|
||||
# if defined(USE_TILES) && defined(MSDOS)
|
||||
@@ -195,11 +182,8 @@ STATIC_DCL void FDECL(process_menu_window, (winid,struct WinDesc *));
|
||||
STATIC_DCL void FDECL(process_text_window, (winid,struct WinDesc *));
|
||||
STATIC_DCL tty_menu_item *FDECL(reverse, (tty_menu_item *));
|
||||
STATIC_DCL const char * FDECL(compress_str, (const char *));
|
||||
STATIC_DCL void FDECL(tty_putsym, (winid, int, int, NHWCHAR_P));
|
||||
STATIC_DCL void FDECL(tty_putsym, (winid, int, int, CHAR_P));
|
||||
STATIC_DCL char *FDECL(copy_of, (const char *));
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
STATIC_DCL nhwchar *FDECL(nhwchar_copy_of, (const nhwchar *));
|
||||
#endif
|
||||
STATIC_DCL void FDECL(bail, (const char *)); /* __attribute__((noreturn)) */
|
||||
|
||||
/*
|
||||
@@ -294,11 +278,7 @@ if(wc_tracelogf)
|
||||
for(i=WIN_INVEN; i < MAXWIN; i++)
|
||||
if(wins[i] && wins[i]->active) {
|
||||
/* cop-out */
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
addtopl(L"Press Return to continue: ");
|
||||
#else
|
||||
addtopl("Press Return to continue: ");
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
(void) fflush(stdout);
|
||||
@@ -1119,24 +1099,24 @@ tty_create_nhwindow(type)
|
||||
|
||||
if(newwin->maxrow) {
|
||||
newwin->data =
|
||||
(nhwchar **) alloc(sizeof(nhwchar *) * (unsigned)newwin->maxrow);
|
||||
(char **) alloc(sizeof(char *) * (unsigned)newwin->maxrow);
|
||||
newwin->datlen =
|
||||
(short *) alloc(sizeof(short) * (unsigned)newwin->maxrow);
|
||||
if(newwin->maxcol) {
|
||||
for (i = 0; i < newwin->maxrow; i++) {
|
||||
newwin->data[i] = (nhwchar *) alloc(sizeof(nhwchar) * (unsigned)newwin->maxcol);
|
||||
newwin->data[i] = (char *) alloc((unsigned)newwin->maxcol);
|
||||
newwin->datlen[i] = newwin->maxcol;
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < newwin->maxrow; i++) {
|
||||
newwin->data[i] = (nhwchar *) 0;
|
||||
newwin->data[i] = (char *) 0;
|
||||
newwin->datlen[i] = 0;
|
||||
}
|
||||
}
|
||||
if(newwin->type == NHW_MESSAGE)
|
||||
newwin->maxrow = 0;
|
||||
} else {
|
||||
newwin->data = (nhwchar **)0;
|
||||
newwin->data = (char **)0;
|
||||
newwin->datlen = (short *)0;
|
||||
}
|
||||
|
||||
@@ -1174,12 +1154,12 @@ free_window_info(cw, free_data)
|
||||
for(i=0; i<cw->maxrow; i++)
|
||||
if(cw->data[i]) {
|
||||
free((genericptr_t)cw->data[i]);
|
||||
cw->data[i] = (nhwchar *)0;
|
||||
cw->data[i] = (char *)0;
|
||||
if (cw->datlen) cw->datlen[i] = 0;
|
||||
}
|
||||
if (free_data) {
|
||||
free((genericptr_t)cw->data);
|
||||
cw->data = (nhwchar **)0;
|
||||
cw->data = (char **)0;
|
||||
if (cw->datlen) free((genericptr_t)cw->datlen);
|
||||
cw->datlen = (short *)0;
|
||||
cw->rows = 0;
|
||||
@@ -1253,25 +1233,15 @@ dmore(cw, s)
|
||||
register struct WinDesc *cw;
|
||||
const char *s; /* valid responses */
|
||||
{
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
char buf[BUFSZ];
|
||||
#endif
|
||||
const nhwchar *prompt = cw->morestr ? cw->morestr : defmorestr;
|
||||
|
||||
const char *prompt = cw->morestr ? cw->morestr : defmorestr;
|
||||
int offset = (cw->type == NHW_TEXT) ? 1 : 2;
|
||||
|
||||
tty_curs(BASE_WINDOW,
|
||||
(int)ttyDisplay->curx + offset, (int)ttyDisplay->cury);
|
||||
if(flags.standout)
|
||||
standoutbeg();
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
strnhwcpy(buf, prompt);
|
||||
xputs(buf);
|
||||
ttyDisplay->curx += strlen(buf);
|
||||
#else
|
||||
xputs(prompt);
|
||||
ttyDisplay->curx += strlen(prompt);
|
||||
#endif
|
||||
if(flags.standout)
|
||||
standoutend();
|
||||
|
||||
@@ -1386,13 +1356,13 @@ struct WinDesc *cw;
|
||||
long count;
|
||||
int n, curr_page, page_lines;
|
||||
boolean finished, counting, reset_count;
|
||||
char *cp, *rp, resp[QBUFSZ], gacc[QBUFSZ];
|
||||
nhwchar *msave, *morestr;
|
||||
char *cp, *rp, resp[QBUFSZ], gacc[QBUFSZ],
|
||||
*msave, *morestr;
|
||||
|
||||
curr_page = page_lines = 0;
|
||||
page_start = page_end = 0;
|
||||
msave = cw->morestr; /* save the morestr */
|
||||
cw->morestr = morestr = (nhwchar*) alloc(sizeof(nhwchar) * (unsigned) QBUFSZ);
|
||||
cw->morestr = morestr = (char*) alloc((unsigned) QBUFSZ);
|
||||
counting = FALSE;
|
||||
count = 0L;
|
||||
reset_count = TRUE;
|
||||
@@ -1509,41 +1479,20 @@ struct WinDesc *cw;
|
||||
Strcat(resp, gacc); /* group accelerators */
|
||||
Strcat(resp, mapped_menu_cmds);
|
||||
|
||||
if (cw->npages > 1) {
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
char buf[BUFSZ];
|
||||
Sprintf(buf, "(%d of %d)",
|
||||
curr_page + 1, (int) cw->npages);
|
||||
(void)nhwstrcpy(cw->morestr, buf);
|
||||
#else
|
||||
if (cw->npages > 1)
|
||||
Sprintf(cw->morestr, "(%d of %d)",
|
||||
curr_page + 1, (int) cw->npages);
|
||||
#endif
|
||||
} else if (msave) {
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
(void)nhwcpy(cw->morestr, msave);
|
||||
#else
|
||||
else if (msave)
|
||||
Strcpy(cw->morestr, msave);
|
||||
#endif
|
||||
} else {
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
(void)nhwcpy(cw->morestr, defmorestr);
|
||||
#else
|
||||
else
|
||||
Strcpy(cw->morestr, defmorestr);
|
||||
#endif
|
||||
}
|
||||
|
||||
tty_curs(window, 1, page_lines);
|
||||
cl_end();
|
||||
dmore(cw, resp);
|
||||
} else {
|
||||
/* just put the cursor back... */
|
||||
tty_curs(window,
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
(int) nhwlen(cw->morestr) + 2,
|
||||
#else
|
||||
(int) strlen(cw->morestr) + 2,
|
||||
#endif
|
||||
page_lines);
|
||||
tty_curs(window, (int) strlen(cw->morestr) + 2, page_lines);
|
||||
xwaitforspace(resp);
|
||||
}
|
||||
|
||||
@@ -1707,7 +1656,7 @@ winid window;
|
||||
struct WinDesc *cw;
|
||||
{
|
||||
int i, n, attr;
|
||||
register nhwchar *cp;
|
||||
register char *cp;
|
||||
|
||||
for (n = 0, i = 0; i < cw->maxrow; i++) {
|
||||
if (!cw->offx && (n + cw->offy == ttyDisplay->rows - 1)) {
|
||||
@@ -1745,11 +1694,7 @@ struct WinDesc *cw;
|
||||
*cp && (int) ttyDisplay->curx < (int) ttyDisplay->cols;
|
||||
cp++, ttyDisplay->curx++)
|
||||
#endif
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
u_putch(*cp);
|
||||
#else
|
||||
(void) putchar(*cp);
|
||||
#endif
|
||||
term_end_attr(attr);
|
||||
}
|
||||
}
|
||||
@@ -1945,7 +1890,7 @@ register int x, y; /* not xchar: perhaps xchar is unsigned and
|
||||
case NHW_TEXT: s = "[text window]"; break;
|
||||
case NHW_BASE: s = "[base window]"; break;
|
||||
}
|
||||
impossible("bad curs positioning win %d %s (%d,%d)", window, s, x, y);
|
||||
debugpline("bad curs positioning win %d %s (%d,%d)", window, s, x, y);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -1995,7 +1940,7 @@ STATIC_OVL void
|
||||
tty_putsym(window, x, y, ch)
|
||||
winid window;
|
||||
int x, y;
|
||||
nhwchar ch;
|
||||
char ch;
|
||||
{
|
||||
register struct WinDesc *cw = 0;
|
||||
|
||||
@@ -2007,11 +1952,7 @@ tty_putsym(window, x, y, ch)
|
||||
case NHW_MAP:
|
||||
case NHW_BASE:
|
||||
tty_curs(window, x, y);
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
u_putch(ch);
|
||||
#else
|
||||
(void) putchar(ch);
|
||||
#endif
|
||||
ttyDisplay->curx++;
|
||||
cw->curx++;
|
||||
break;
|
||||
@@ -2054,14 +1995,9 @@ tty_putstr(window, attr, str)
|
||||
const char *str;
|
||||
{
|
||||
register struct WinDesc *cw = 0;
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
nhwchar symbuf[BUFSZ];
|
||||
register const nhwchar *symstr = symbuf;
|
||||
#else
|
||||
register const nhwchar *nb;
|
||||
register nhwchar *ob;
|
||||
register char *ob;
|
||||
register const char *nb;
|
||||
register int i, j, n0;
|
||||
#endif
|
||||
|
||||
/* Assume there's a real problem if the window is missing --
|
||||
* probably a panic message
|
||||
@@ -2076,52 +2012,21 @@ tty_putstr(window, attr, str)
|
||||
return;
|
||||
if(cw->type != NHW_MESSAGE)
|
||||
str = compress_str(str);
|
||||
#if defined(USER_SOUNDS) && defined(WIN32CON)
|
||||
else
|
||||
play_sound_for_message(str);
|
||||
#endif
|
||||
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
nhwstrcpy(symbuf, str);
|
||||
tty_putstr_core(window, attr, symstr);
|
||||
}
|
||||
|
||||
void
|
||||
tty_putstr_core(window, attr, symstr)
|
||||
winid window;
|
||||
int attr;
|
||||
const nhwchar *symstr;
|
||||
{
|
||||
register struct WinDesc *cw = wins[window];
|
||||
register const nhwchar *nb;
|
||||
register nhwchar *ob;
|
||||
register int i, j, n0;
|
||||
#endif
|
||||
|
||||
ttyDisplay->lastwin = window;
|
||||
|
||||
switch(cw->type) {
|
||||
case NHW_MESSAGE:
|
||||
/* really do this later */
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
update_topl(symstr);
|
||||
#else
|
||||
update_topl(str);
|
||||
#if defined(USER_SOUNDS) && defined(WIN32CON)
|
||||
play_sound_for_message(str);
|
||||
#endif
|
||||
update_topl(str);
|
||||
break;
|
||||
|
||||
case NHW_STATUS:
|
||||
ob = &cw->data[cw->cury][j = cw->curx];
|
||||
if(context.botlx) *ob = 0;
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
if(!cw->cury && (int)nhwlen(symstr) >= CO) {
|
||||
/* the characters before "St:" are unnecessary */
|
||||
nb = nhwindex(symstr, L':');
|
||||
if(nb && nb > symstr+2)
|
||||
symstr = nb - 2;
|
||||
}
|
||||
nb = symstr;
|
||||
#else
|
||||
if(!cw->cury && (int)strlen(str) >= CO) {
|
||||
/* the characters before "St:" are unnecessary */
|
||||
nb = index(str, ':');
|
||||
@@ -2129,8 +2034,6 @@ tty_putstr_core(window, attr, symstr)
|
||||
str = nb - 2;
|
||||
}
|
||||
nb = str;
|
||||
#endif
|
||||
|
||||
for(i = cw->curx+1, n0 = cw->cols; i < n0; i++, nb++) {
|
||||
if(!*nb) {
|
||||
if(*ob || context.botlx) {
|
||||
@@ -2145,31 +2048,19 @@ tty_putstr_core(window, attr, symstr)
|
||||
if(*ob) ob++;
|
||||
}
|
||||
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
(void) nhwncpy(&cw->data[cw->cury][j], symstr, cw->cols - j - 1);
|
||||
#else
|
||||
(void) strncpy(&cw->data[cw->cury][j], str, cw->cols - j - 1);
|
||||
#endif
|
||||
cw->data[cw->cury][cw->cols-1] = (nhwchar)0; /* null terminate */
|
||||
cw->data[cw->cury][cw->cols-1] = '\0'; /* null terminate */
|
||||
cw->cury = (cw->cury+1) % 2;
|
||||
cw->curx = 0;
|
||||
break;
|
||||
case NHW_MAP:
|
||||
tty_curs(window, cw->curx+1, cw->cury);
|
||||
term_start_attr(attr);
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
while(*symstr && (int) ttyDisplay->curx < (int) ttyDisplay->cols-1) {
|
||||
u_putch(*symstr);
|
||||
symstr++;
|
||||
ttyDisplay->curx++;
|
||||
}
|
||||
#else
|
||||
while(*str && (int) ttyDisplay->curx < (int) ttyDisplay->cols-1) {
|
||||
(void) putchar(*str);
|
||||
str++;
|
||||
ttyDisplay->curx++;
|
||||
}
|
||||
#endif
|
||||
cw->curx = 0;
|
||||
cw->cury++;
|
||||
term_end_attr(attr);
|
||||
@@ -2177,23 +2068,14 @@ tty_putstr_core(window, attr, symstr)
|
||||
case NHW_BASE:
|
||||
tty_curs(window, cw->curx+1, cw->cury);
|
||||
term_start_attr(attr);
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
while (*symstr) {
|
||||
#else
|
||||
while (*str) {
|
||||
#endif
|
||||
if ((int) ttyDisplay->curx >= (int) ttyDisplay->cols-1) {
|
||||
cw->curx = 0;
|
||||
cw->cury++;
|
||||
tty_curs(window, cw->curx+1, cw->cury);
|
||||
}
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
u_putch(*symstr);
|
||||
symstr++;
|
||||
#else
|
||||
(void) putchar(*str);
|
||||
str++;
|
||||
#endif
|
||||
ttyDisplay->curx++;
|
||||
}
|
||||
cw->curx = 0;
|
||||
@@ -2220,10 +2102,10 @@ tty_putstr_core(window, attr, symstr)
|
||||
}
|
||||
/* always grows one at a time, but alloc 12 at a time */
|
||||
if(cw->cury >= cw->rows) {
|
||||
nhwchar **tmp;
|
||||
char **tmp;
|
||||
|
||||
cw->rows += 12;
|
||||
tmp = (nhwchar **) alloc(sizeof(nhwchar *) * (unsigned)cw->rows);
|
||||
tmp = (char **) alloc(sizeof(char *) * (unsigned)cw->rows);
|
||||
for(i=0; i<cw->maxrow; i++)
|
||||
tmp[i] = cw->data[i];
|
||||
if(cw->data)
|
||||
@@ -2235,19 +2117,10 @@ tty_putstr_core(window, attr, symstr)
|
||||
}
|
||||
if(cw->data[cw->cury])
|
||||
free((genericptr_t)cw->data[cw->cury]);
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
n0 = nhwlen(symstr) + 1;
|
||||
#else
|
||||
n0 = strlen(str) + 1;
|
||||
#endif
|
||||
|
||||
ob = cw->data[cw->cury] = (nhwchar *)alloc(sizeof(nhwchar) * ((unsigned)n0 + 1));
|
||||
*ob++ = (nhwchar)(attr + 1); /* avoid nuls, for convenience */
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
(void)nhwcpy(ob, symstr);
|
||||
#else
|
||||
ob = cw->data[cw->cury] = (char *)alloc((unsigned)n0 + 1);
|
||||
*ob++ = (char)(attr + 1); /* avoid nuls, for convenience */
|
||||
Strcpy(ob, str);
|
||||
#endif
|
||||
|
||||
if(n0 > cw->maxcol)
|
||||
cw->maxcol = n0;
|
||||
@@ -2255,19 +2128,11 @@ tty_putstr_core(window, attr, symstr)
|
||||
cw->maxrow = cw->cury;
|
||||
if(n0 > CO) {
|
||||
/* attempt to break the line */
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
for(i = CO-1; i && symstr[i] != L' ' && symstr[i] != L'\n';)
|
||||
#else
|
||||
for(i = CO-1; i && str[i] != ' ' && str[i] != '\n';)
|
||||
#endif
|
||||
i--;
|
||||
if(i) {
|
||||
cw->data[cw->cury-1][++i] = (nhwchar)0;
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
tty_putstr_core(window, attr, &symstr[i]);
|
||||
#else
|
||||
cw->data[cw->cury-1][++i] = '\0';
|
||||
tty_putstr(window, attr, &str[i]);
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2275,60 +2140,6 @@ tty_putstr_core(window, attr, symstr)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
/*
|
||||
* This differs from putstr() because the str parameter can
|
||||
* contain a sequence of characters representing:
|
||||
* \GXXXXNNNN a glyph value, encoded by encglyph().
|
||||
*
|
||||
*/
|
||||
void
|
||||
tty_putmixed(window, attr, str)
|
||||
winid window;
|
||||
int attr;
|
||||
const char *str;
|
||||
{
|
||||
nhwchar wbuf[BUFSZ];
|
||||
const char *cp = str;
|
||||
nhwchar *put = wbuf;
|
||||
while (*cp) {
|
||||
if (*cp == '\\') {
|
||||
int rndchk = 0, so = 0, gv = 0, ch, oc, dcount;
|
||||
unsigned os;
|
||||
const char *dp, *hex = "00112233445566778899aAbBcCdDeEfF";
|
||||
const char *save_cp = cp;
|
||||
|
||||
cp++;
|
||||
switch(*cp) {
|
||||
case 'G': /* glyph value \GXXXXNNNN*/
|
||||
dcount = 0;
|
||||
for (++cp; *cp && (dp = index(hex, *cp)) && (dcount++ < 4); cp++)
|
||||
rndchk = (int)((rndchk * 16) + ((int)(dp - hex) / 2));
|
||||
|
||||
if (rndchk == context.rndencode) {
|
||||
dcount = 0;
|
||||
for (; *cp && (dp = index(hex, *cp)) && (dcount++ < 4); cp++)
|
||||
gv = (int)((gv * 16) + ((int)(dp - hex) / 2));
|
||||
so = mapglyph(gv, &ch, &oc, &os, 0, 0);
|
||||
*put++ = (nhwchar)showsyms[so];
|
||||
continue;
|
||||
} else {
|
||||
/* possible forgery - leave it the way it is */
|
||||
cp = save_cp;
|
||||
}
|
||||
break;
|
||||
case '\\':
|
||||
break;
|
||||
}
|
||||
}
|
||||
*put++ = (nhwchar)*cp++;
|
||||
}
|
||||
*put = (nhwchar)0;
|
||||
/* now send it to tty_putstr_core() */
|
||||
tty_putstr_core(window, attr, wbuf);
|
||||
}
|
||||
#endif /*UNICODE_WIDEWINPORT*/
|
||||
|
||||
void
|
||||
tty_display_file(fname, complain)
|
||||
const char *fname;
|
||||
@@ -2514,7 +2325,7 @@ tty_end_menu(window, prompt)
|
||||
/* Reverse the list so that items are in correct order. */
|
||||
cw->mlist = reverse(cw->mlist);
|
||||
|
||||
/* Put the prompt at the beginning of the menu. */
|
||||
/* Put the promt at the beginning of the menu. */
|
||||
if (prompt) {
|
||||
anything any;
|
||||
|
||||
@@ -2566,19 +2377,10 @@ tty_end_menu(window, prompt)
|
||||
/* produce the largest demo string */
|
||||
Sprintf(buf, "(%d of %d) ", cw->npages, cw->npages);
|
||||
len = strlen(buf);
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
cw->morestr = nhwchar_copy_of(emptysym);
|
||||
#else
|
||||
cw->morestr = copy_of("");
|
||||
#endif
|
||||
} else {
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
cw->morestr = nhwchar_copy_of(L"(end) ");
|
||||
len = nhwlen(cw->morestr);
|
||||
#else
|
||||
cw->morestr = copy_of("(end) ");
|
||||
len = strlen(cw->morestr);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (len > (int)ttyDisplay->cols) {
|
||||
@@ -2698,11 +2500,7 @@ tty_wait_synch()
|
||||
} else {
|
||||
tty_display_nhwindow(WIN_MAP, FALSE);
|
||||
if(ttyDisplay->inmore) {
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
addtopl(L"--More--");
|
||||
#else
|
||||
addtopl("--More--");
|
||||
#endif
|
||||
(void) fflush(stdout);
|
||||
} else if(ttyDisplay->inread > program_state.gameover) {
|
||||
/* this can only happen if we were reading and got interrupted */
|
||||
@@ -2774,58 +2572,6 @@ end_glyphout()
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef UNICODE_WIDEWINPORT
|
||||
/*
|
||||
* Parts of u_putch() were contributed by Adam Wozniak, 2005.
|
||||
*/
|
||||
void
|
||||
u_putch(sym)
|
||||
nhwchar sym;
|
||||
{
|
||||
unsigned long unicode = sym;
|
||||
if (!iflags.unicodedisp)
|
||||
putchar((char)sym);
|
||||
else {
|
||||
#if defined(UNIX) || defined(VMS)
|
||||
/* send utf8 to display */
|
||||
if (unicode < 0x80) {
|
||||
(void) putchar(unicode);
|
||||
} else if (unicode < 0x00000800) {
|
||||
(void) putchar(0xC0 | (unicode >> 6));
|
||||
(void) putchar(0x80 | (unicode & 0x3F));
|
||||
} else if (unicode < 0x00010000) {
|
||||
(void) putchar(0xE0 | (unicode >> 12));
|
||||
(void) putchar(0x80 | ((unicode >> 6) & 0x3F));
|
||||
(void) putchar(0x80 | (unicode & 0x3F));
|
||||
} else if (unicode < 0x00200000) {
|
||||
(void) putchar(0xF0 | (unicode >> 18));
|
||||
(void) putchar(0x80 | ((unicode >> 12) & 0x3F));
|
||||
(void) putchar(0x80 | ((unicode >> 6) & 0x3F));
|
||||
(void) putchar(0x80 | (unicode & 0x3F));
|
||||
} else if (unicode < 0x04000000) {
|
||||
(void) putchar(0xF8 | (unicode >> 24));
|
||||
(void) putchar(0x80 | ((unicode >> 18) & 0x3F));
|
||||
(void) putchar(0x80 | ((unicode >> 12) & 0x3F));
|
||||
(void) putchar(0x80 | ((unicode >> 6) & 0x3F));
|
||||
(void) putchar(0x80 | (unicode & 0x3F));
|
||||
} else {
|
||||
(void) putchar(0xFC | (unicode >> 30));
|
||||
(void) putchar(0x80 | ((unicode >> 24) & 0x3F));
|
||||
(void) putchar(0x80 | ((unicode >> 18) & 0x3F));
|
||||
(void) putchar(0x80 | ((unicode >> 12) & 0x3F));
|
||||
(void) putchar(0x80 | ((unicode >> 6) & 0x3F));
|
||||
(void) putchar(0x80 | (unicode & 0x3F));
|
||||
}
|
||||
#else
|
||||
/* it is assumed that whatever is being substituted for
|
||||
putchar() can handle unicode characters directly at
|
||||
this point (nttty's xputc() for example) */
|
||||
(void) putchar(sym);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif /*UNICODE_WIDEWINPORT*/
|
||||
|
||||
#ifndef WIN32
|
||||
void
|
||||
g_putch(in_ch)
|
||||
@@ -2834,11 +2580,6 @@ int in_ch;
|
||||
register char ch = (char)in_ch;
|
||||
|
||||
# if defined(ASCIIGRAPH) && !defined(NO_TERMS)
|
||||
# if defined(UNICODE_WIDEWINPORT) && defined(UNICODE_DRAWING)
|
||||
if (iflags.unicodedisp && symset[currentgraphics].name) {
|
||||
u_putch(in_ch);
|
||||
} else
|
||||
# endif
|
||||
if (SYMHANDLING(H_IBM) || iflags.eight_bit_tty) {
|
||||
/* IBM-compatible displays don't need other stuff */
|
||||
(void) putchar(ch);
|
||||
@@ -2922,9 +2663,9 @@ tty_print_glyph(window, x, y, glyph)
|
||||
xchar x, y;
|
||||
int glyph;
|
||||
{
|
||||
int ch, idx;
|
||||
int ch;
|
||||
boolean reverse_on = FALSE;
|
||||
int color;
|
||||
int color;
|
||||
unsigned special;
|
||||
|
||||
#ifdef CLIPPING
|
||||
@@ -2934,7 +2675,7 @@ tty_print_glyph(window, x, y, glyph)
|
||||
}
|
||||
#endif
|
||||
/* map glyph to character and color */
|
||||
idx = mapglyph(glyph, &ch, &color, &special, x, y);
|
||||
(void)mapglyph(glyph, &ch, &color, &special, x, y);
|
||||
|
||||
/* Move the cursor. */
|
||||
tty_curs(window, x,y);
|
||||
@@ -2967,11 +2708,6 @@ tty_print_glyph(window, x, y, glyph)
|
||||
if (iflags.grmode && iflags.tile_view)
|
||||
xputg(glyph,ch,special);
|
||||
else
|
||||
#endif
|
||||
#if defined(UNICODE_WIDEWINPORT) && defined(UNICODE_DRAWING)
|
||||
if (iflags.unicodedisp && symset[currentgraphics].name)
|
||||
g_putch(showsyms[idx]); /* use the unicode symset */
|
||||
else
|
||||
#endif
|
||||
g_putch(ch); /* print the character */
|
||||
|
||||
@@ -3126,15 +2862,6 @@ copy_of(s)
|
||||
return strcpy((char *) alloc((unsigned) (strlen(s) + 1)), s);
|
||||
}
|
||||
|
||||
# ifdef UNICODE_WIDEWINPORT
|
||||
STATIC_OVL nhwchar *
|
||||
nhwchar_copy_of(s)
|
||||
const nhwchar *s;
|
||||
{
|
||||
if (!s) s = emptysym;
|
||||
return nhwcpy((nhwchar *) alloc(sizeof(nhwchar) * (unsigned) (nhwlen(s) + 1)), s);
|
||||
}
|
||||
# endif /*UNICODE_WIDEWINPORT*/
|
||||
#endif /* TTY_GRAPHICS */
|
||||
|
||||
/*wintty.c*/
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
# $Date: 2002/01/22 22:54:54 $ $Revision: 1.3 $
|
||||
|
||||
#Set all of these or none of them
|
||||
#YACC = byacc.exe
|
||||
#LEX = flex.exe
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$
|
||||
# $Date:2002/01/22 22:54:54 $ $Revision: 1.2 $
|
||||
#YACC = byacc.exe
|
||||
#LEX = flex.exe
|
||||
#YTABC = y_tab.c
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhaskyn.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhaskyn.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhaskyn.c $Date: 2009/05/06 10:59:46 $ $Revision: 1.5 $ */
|
||||
/* SCCS Id: @(#)mhaskyn.c 3.5 2005/01/23 */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhaskyn.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhaskyn.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhaskyn.h $Date: 2009/05/06 10:59:46 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)mhaskyn.h 3.5 2005/01/23 */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhdlg.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhdlg.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhdlg.c $Date: 2012/01/11 01:45:02 $ $Revision: 1.18 $ */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhdlg.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhdlg.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhdlg.h $Date: 2012/01/11 01:15:36 $ $Revision: 1.5 $ */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhfont.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhfont.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhfont.c $Date: 2009/05/06 10:59:46 $ $Revision: 1.17 $ */
|
||||
/* SCCS Id: @(#)mhfont.c 3.5 2005/01/23 */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhfont.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhfont.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhfont.h $Date: 2009/05/06 10:59:46 $ $Revision: 1.8 $ */
|
||||
/* SCCS Id: @(#)mhfont.h 3.5 2005/01/23 */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhinput.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhinput.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhinput.c $Date: 2009/05/06 10:59:48 $ $Revision: 1.7 $ */
|
||||
/* SCCS Id: @(#)mhinput.c 3.5 2005/01/23 */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhinput.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhinput.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhinput.h $Date: 2009/05/06 10:59:49 $ $Revision: 1.6 $ */
|
||||
/* SCCS Id: @(#)mhinput.h 3.5 2005/01/23 */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-3
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhmain.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhmain.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhmain.c $Date: 2012/01/11 01:53:44 $ $Revision: 1.49 $ */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1042,9 +1043,7 @@ void mswin_select_map_mode(int mode)
|
||||
data = (PNHMainWindow)GetWindowLong(GetNHApp()->hMainWnd, GWL_USERDATA);
|
||||
|
||||
/* override for Rogue level */
|
||||
#ifdef REINCARNATION
|
||||
if( Is_rogue_level(&u.uz) && !IS_MAP_ASCII(mode) ) return;
|
||||
#endif
|
||||
|
||||
/* set map mode menu mark */
|
||||
if( IS_MAP_ASCII(mode) ) {
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhmain.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhmain.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhmain.h $Date: 2009/05/06 10:59:52 $ $Revision: 1.10 $ */
|
||||
/* SCCS Id: @(#)mhmain.h 3.5 2005/01/23 */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+3
-6
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhmap.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhmap.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhmap.c $Date: 2012/01/11 01:45:02 $ $Revision: 1.37 $ */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -602,12 +603,8 @@ void onPaint(HWND hWnd)
|
||||
paint_rt.right = min(data->xPos + (ps.rcPaint.right - data->map_orig.x)/data->xScrTile+1, COLNO);
|
||||
paint_rt.bottom = min(data->yPos + (ps.rcPaint.bottom - data->map_orig.y)/data->yScrTile+1, ROWNO);
|
||||
|
||||
if( data->bAsciiMode
|
||||
#ifdef REINCARNATION
|
||||
|| Is_rogue_level(&u.uz)
|
||||
if( data->bAsciiMode || Is_rogue_level(&u.uz) ) {
|
||||
/* You enter a VERY primitive world! */
|
||||
#endif
|
||||
) {
|
||||
HGDIOBJ oldFont;
|
||||
|
||||
oldFont = SelectObject(hDC, data->hMapFont);
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhmap.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhmap.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhmap.h $Date: 2009/05/06 10:59:56 $ $Revision: 1.10 $ */
|
||||
/* SCCS Id: @(#)mhmap.h 3.5 2005/01/23 */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhmenu.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhmenu.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhmenu.c $Date: 2012/01/11 01:53:44 $ $Revision: 1.36 $ */
|
||||
/* Copyright (c) Alex Kompel, 2002 */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhmenu.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhmenu.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhmenu.h $Date: 2009/05/06 11:00:00 $ $Revision: 1.4 $ */
|
||||
/* SCCS Id: @(#)mhmenu.h 3.5 2005/01/23 */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhmsg.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhmsg.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhmsg.h $Date: 2009/05/06 11:00:00 $ $Revision: 1.9 $ */
|
||||
/* SCCS Id: @(#)mhmsg.h 3.5 2005/01/23 */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhmsgwnd.c $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhmsgwnd.c $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhmsgwnd.c $Date: 2012/01/11 01:45:02 $ $Revision: 1.25 $ */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* NetHack 3.5 mhmsgwnd.h $Date$ $Revision$ */
|
||||
/* NetHack 3.5 mhmsgwnd.h $NHDT-Date$ $NHDT-Branch$:$NHDT-Revision$ */
|
||||
/* NetHack 3.5 mhmsgwnd.h $Date: 2009/05/06 11:00:10 $ $Revision: 1.5 $ */
|
||||
/* SCCS Id: @(#)mhmsgwnd.h 3.5 2005/01/23 */
|
||||
/* Copyright (C) 2001 by Alex Kompel */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user