cleanup when exiting tutorial

When returning to play from within the tutorial, remove the level files
similar to how they're discarded for the rest of the dungeon when going
into the endgame.  It turned out to be a bit messier than anticipated.

The dungeon.c bit is sufficient for #overview, which now hides regular
level 1 while in the tutorial and hides all tutorial levels once exited.
Those will still appear in end-of-game disclosure.
This commit is contained in:
PatR
2023-07-17 14:27:28 -07:00
parent 536a4bd8b3
commit 8d60b92407
6 changed files with 39 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 extern.h $NHDT-Date: 1687343496 2023/06/21 10:31:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1276 $ */
/* NetHack 3.7 extern.h $NHDT-Date: 1689629242 2023/07/17 21:27:22 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1279 $ */
/* Copyright (c) Steve Creps, 1988. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1399,7 +1399,7 @@ extern void sort_rooms(void);
extern void add_room(int, int, int, int, boolean, schar, boolean);
extern void add_subroom(struct mkroom *, int, int, int, int, boolean, schar,
boolean);
extern void free_luathemes(boolean);
extern void free_luathemes(enum lua_theme_group);
extern void makecorridors(void);
extern void add_door(coordxy, coordxy, struct mkroom *);
extern void count_level_features(void);

View File

@@ -1,4 +1,4 @@
/* NetHack 3.7 hack.h $NHDT-Date: 1684374685 2023/05/18 01:51:25 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.218 $ */
/* NetHack 3.7 hack.h $NHDT-Date: 1689629241 2023/07/17 21:27:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.222 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Pasi Kallinen, 2017. */
/* NetHack may be freely redistributed. See license for details. */
@@ -400,6 +400,11 @@ struct dgn_topology { /* special dungeon levels for speed */
#define dunlev_reached(x) (gd.dungeons[(x)->dnum].dunlev_ureached)
#define MAXLINFO (MAXDUNGEON * MAXLEVEL)
enum lua_theme_group {
all_themes = 1, /* for end of game */
most_themes = 2, /* for entering endgame */
tut_themes = 3, /* for leaving tutorial */
};
enum earlyarg {
ARG_DEBUG, ARG_VERSION, ARG_SHOWPATHS