make program_state initialization a discrete step
Having it rolled into decl_globals_init() was causing some early options to misbehave because those early options were trying to use program_state fields to determine their behavior, but decl_globals_init() was resetting the program_state fields that were being used to do that.
This commit is contained in:
@@ -510,6 +510,7 @@ extern void destroy_drawbridge(coordxy, coordxy);
|
||||
|
||||
/* ### decl.c ### */
|
||||
|
||||
extern void program_state_init(void);
|
||||
extern void decl_globals_init(void);
|
||||
extern void sa_victual(volatile struct victual_info *);
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ staticfn void interrupt_multi(const char *);
|
||||
void
|
||||
early_init(int argc USED_FOR_CRASHREPORT, char *argv[] USED_FOR_CRASHREPORT)
|
||||
{
|
||||
program_state_init();
|
||||
#ifdef CRASHREPORT
|
||||
/* Do this as early as possible, but let ports do other things first. */
|
||||
crashreport_init(argc, argv);
|
||||
|
||||
@@ -1063,6 +1063,12 @@ const struct const_globals cg = {
|
||||
} \
|
||||
} while(0);
|
||||
|
||||
void
|
||||
program_state_init(void)
|
||||
{
|
||||
program_state = init_program_state;
|
||||
}
|
||||
|
||||
void
|
||||
decl_globals_init(void)
|
||||
{
|
||||
@@ -1114,7 +1120,6 @@ decl_globals_init(void)
|
||||
svu = init_svu;
|
||||
svx = init_svx;
|
||||
svy = init_svy;
|
||||
program_state = init_program_state;
|
||||
|
||||
gv.valuables[0].list = gg.gems;
|
||||
gv.valuables[0].size = SIZE(gg.gems);
|
||||
|
||||
Reference in New Issue
Block a user