Modified objects initialization to support re-entry.
This commit is contained in:
@@ -109,8 +109,7 @@ struct lc_vardefs *FDECL(vardef_defined, (struct lc_vardefs *, char *, int));
|
||||
void FDECL(splev_add_from, (sp_lev *, sp_lev *));
|
||||
|
||||
extern void NDECL(monst_init);
|
||||
extern void NDECL(objects_init);
|
||||
extern void NDECL(decl_init);
|
||||
extern void NDECL(objects_globals_init);
|
||||
|
||||
void FDECL(add_opcode, (sp_lev *, int, genericptr_t));
|
||||
|
||||
@@ -256,12 +255,15 @@ char **argv;
|
||||
argc = SIZE(mac_argv);
|
||||
argv = mac_argv;
|
||||
#endif
|
||||
|
||||
decl_globals_init();
|
||||
objects_globals_init();
|
||||
|
||||
/* Note: these initializers don't do anything except guarantee that
|
||||
* we're linked properly.
|
||||
*/
|
||||
monst_init();
|
||||
objects_init();
|
||||
decl_init();
|
||||
|
||||
/* this one does something... */
|
||||
init_obj_classes();
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ void NDECL(do_oracles);
|
||||
void NDECL(do_vision);
|
||||
|
||||
extern void NDECL(monst_init); /* monst.c */
|
||||
extern void NDECL(objects_init); /* objects.c */
|
||||
extern void NDECL(objects_globals_init); /* objects.c */
|
||||
|
||||
static void NDECL(link_sanity_check);
|
||||
static char *FDECL(name_file, (const char *, const char *));
|
||||
@@ -296,7 +296,6 @@ link_sanity_check()
|
||||
we're linked properly.
|
||||
*/
|
||||
monst_init();
|
||||
objects_init();
|
||||
|
||||
}
|
||||
|
||||
@@ -306,6 +305,8 @@ char *options;
|
||||
{
|
||||
boolean more_than_one;
|
||||
|
||||
objects_globals_init();
|
||||
|
||||
link_sanity_check();
|
||||
|
||||
/* construct the current version number */
|
||||
|
||||
Reference in New Issue
Block a user