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:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user