We've been getting numerous complaints from people
about "dungeon failure", often related to attempts
to start NetHack from within various zip utilities
that present a folder-like view.
The dungeon failure was actually misleading. The
real problem was a dlb file open failure, but the
return value of dlb_init() was not being checked
in pcmain.
This moves the dlb_init earlier in the startup,
checks for failure, and provides some feedback
around the common zip utility problem for win32.
Platform- and/or Interface-Specific New Features
------------------------------------------------
+pcmain: check for dlb_init failure rather than relying on dungeon open failure
win32gui: support perm_invent
win32gui: menu option to add/remove windows captions
win32gui: support for saving/restoring message history
#include "hack.h"
#include "dlb.h"
+#include "patchlevel.h"
#ifndef NO_SIGNAL
#include <signal.h>
if (comp_times((long)time(&clock_time)))
error("Your clock is incorrectly set!");
#endif
+ if (!dlb_init()) {
+ pline("%s\n%s\n%s\n\nNetHack was unable to open the required file \"%s\".%s",
+ COPYRIGHT_BANNER_A, COPYRIGHT_BANNER_B,
+ COPYRIGHT_BANNER_C, DLBFILE,
+#ifdef WIN32
+ "\nAre you perhaps trying to run NetHack within a zip utility?");
+#else
+ "");
+#endif
+ error("dlb_init failure.");
+ }
+
u.uhp = 1; /* prevent RIP on early quits */
u.ux = 0; /* prevent flush_screen() */
*/
vision_init();
- dlb_init();
-
display_gamewindows();
#ifdef WIN32
getreturn_enabled = TRUE;