-/* SCCS Id: @(#)extern.h 3.5 2007/06/27 */
+/* SCCS Id: @(#)extern.h 3.5 2008/01/19 */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
E int NDECL(doextlist);
E int NDECL(extcmd_via_menu);
E int NDECL(enter_explore_mode);
-E void FDECL(enlightenment, (int));
+E void FDECL(enlightenment, (int,int));
E void FDECL(show_conduct, (int));
E int FDECL(xytod, (SCHAR_P,SCHAR_P));
E void FDECL(dtoxy, (coord *,int));
-/* SCCS Id: @(#)hack.h 3.5 2007/03/24 */
+/* SCCS Id: @(#)hack.h 3.5 2008/01/19 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
#define EXPL_FROSTY 6
#define EXPL_MAX 7
+/* enlightenment control flags */
+#define BASICENLIGHTENMENT 1 /* show mundane stuff */
+#define MAGICENLIGHTENMENT 2 /* show intrinsics and such */
+#define ENL_GAMEINPROGRESS 0
+#define ENL_GAMEOVERALIVE 1 /* ascension, escape, quit, trickery */
+#define ENL_GAMEOVERDEAD 2
+
/* Macros for messages referring to hands, eyes, feet, etc... */
#define ARM 0
#define EYE 1
-/* SCCS Id: @(#)artifact.c 3.5 2007/05/09 */
+/* SCCS Id: @(#)artifact.c 3.5 2008/01/19 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
break;
}
case ENLIGHTENING:
- enlightenment(0);
+ enlightenment(MAGICENLIGHTENMENT, ENL_GAMEINPROGRESS);
break;
case CREATE_AMMO: {
struct obj *otmp = mksobj(ARROW, TRUE, FALSE);
-/* SCCS Id: @(#)cmd.c 3.5 2007/05/05 */
+/* SCCS Id: @(#)cmd.c 3.5 2008/01/19 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
/* -enlightenment and conduct- */
-static winid en_win;
+static winid en_win = WIN_ERR;
static const char
You_[] = "You ",
are[] = "are ", were[] = "were ",
}
void
-enlightenment(final)
-int final; /* 0 => still in progress; 1 => over, survived; 2 => dead */
+enlightenment(mode, final)
+int mode; /* BASICENLIGHTENMENT | MAGICENLIGHTENMENT (| both) */
+int final; /* ENL_GAMEINPROGRESS:0, ENL_GAVEOVERALIVE, ENL_GAMEOVERDEAD */
{
int ltmp, armpro;
char buf[BUFSZ];
display_nhwindow(en_win, TRUE);
destroy_nhwindow(en_win);
+ en_win = WIN_ERR;
return;
}
if (!minimal_enlightenment())
return 0;
if (wizard || discover)
- enlightenment(0);
+ enlightenment(MAGICENLIGHTENMENT, ENL_GAMEINPROGRESS);
return 0;
}
/* Pop up the window and wait for a key */
display_nhwindow(en_win, TRUE);
destroy_nhwindow(en_win);
+ en_win = WIN_ERR;
}
#ifndef M
-/* SCCS Id: @(#)end.c 3.5 2007/05/12 */
+/* SCCS Id: @(#)end.c 3.5 2008/01/19 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
c = ask ? yn_function("Do you want to see your attributes?",
ynqchars, defquery) : defquery;
if (c == 'y')
- enlightenment(how >= PANICKED ? 1 : 2); /* final */
+ enlightenment((BASICENLIGHTENMENT|MAGICENLIGHTENMENT),
+ (how >= PANICKED) ? ENL_GAMEOVERALIVE : ENL_GAMEOVERDEAD);
if (c == 'q') done_stopprint++;
}
-/* SCCS Id: @(#)fountain.c 3.5 2006/05/08 */
+/* SCCS Id: @(#)fountain.c 3.5 2008/01/19 */
/* Copyright Scott R. Turner, srt@ucla, 10/27/86 */
/* NetHack may be freely redistributed. See license for details. */
You_feel("self-knowledgeable...");
display_nhwindow(WIN_MESSAGE, FALSE);
- enlightenment(0);
+ enlightenment(MAGICENLIGHTENMENT, ENL_GAMEINPROGRESS);
exercise(A_WIS, TRUE);
pline_The("feeling subsides.");
break;
-/* SCCS Id: @(#)potion.c 3.5 2007/05/29 */
+/* SCCS Id: @(#)potion.c 3.5 2008/01/19 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
}
You_feel("self-knowledgeable...");
display_nhwindow(WIN_MESSAGE, FALSE);
- enlightenment(0);
+ enlightenment(MAGICENLIGHTENMENT, ENL_GAMEINPROGRESS);
pline_The("feeling subsides.");
exercise(A_WIS, TRUE);
}
-/* SCCS Id: @(#)zap.c 3.5 2007/05/30 */
+/* SCCS Id: @(#)zap.c 3.5 2008/01/19 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
known = TRUE;
You_feel("self-knowledgeable...");
display_nhwindow(WIN_MESSAGE, FALSE);
- enlightenment(FALSE);
+ enlightenment(MAGICENLIGHTENMENT, ENL_GAMEINPROGRESS);
pline_The("feeling subsides.");
exercise(A_WIS, TRUE);
break;