Added decl_early_init() which is called when PLAYAGAIN is supported.

decl_early_init() is called when we are starting a game.  On first
start, it validates that global state is in the expected state.
When called on subsequent starts, it initializes global state to
expected state.
This commit is contained in:
Bart House
2018-11-22 15:20:17 -08:00
parent 3e8d98dee5
commit 6737fee07d
6 changed files with 279 additions and 4 deletions

View File

@@ -97,7 +97,11 @@ char *argv[];
nethack_enter(argc, argv);
#ifdef PLAYAGAIN
decl_early_init();
#endif
sys_early_init();
#if defined(WIN32) && defined(TTY_GRAPHICS)
Strcpy(default_window_sys, "tty");
#else

View File

@@ -37,6 +37,9 @@ char *argv[];
{
boolean resuming;
#ifdef PLAYAGAIN
decl_early_init();
#endif
sys_early_init();
Strcpy(default_window_sys, "tty");
resuming = pcmain(argc, argv);