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

@@ -552,10 +552,13 @@ typedef unsigned char uchar;
#endif
/* PLAYAGAIN is support for allowing the game shell to stay open after the player
saves or dies. This requires that the game engine can be re-entered to start
another game. This support is primarily about ensuring that game engine
state is cleaned up properly to allow the game engine to be re-initialized. */
/* PLAYAGAIN support for allowing the game shell to stay open after the player
* saves or dies. This requires that the game engine can be re-entered to
* start another game.
*
* This support does not include supporting playing another game when
* a panic has occured due to undetermined state the engine is left in after a
* panic */
/* #define PLAYAGAIN */
/* End of Section 4 */

View File

@@ -251,6 +251,9 @@ E void FDECL(destroy_drawbridge, (int, int));
/* ### decl.c ### */
E void NDECL(decl_init);
#ifdef PLAYAGAIN
E void NDECL(decl_early_init);
#endif
/* ### detect.c ### */