TYPE_SWITCH,
&setup.team_mode, "team_mode"
},
+ {
+ TYPE_SWITCH,
+ &setup.handicap, "handicap"
+ },
+ {
+ TYPE_SWITCH,
+ &setup.skip_levels, "skip_levels"
+ },
{
TYPE_SWITCH_3_STATES,
&setup.allow_skipping_levels, "allow_skipping_levels"
si->show_titlescreen = TRUE;
si->quick_doors = FALSE;
si->team_mode = FALSE;
- si->allow_skipping_levels = STATE_ASK;
+ si->handicap = TRUE;
+ si->skip_levels = TRUE;
+ si->allow_skipping_levels = ARG_UNDEFINED_VALUE;
si->increment_levels = TRUE;
si->auto_play_next_level = TRUE;
si->count_score_after_game = TRUE;
// make sure that scroll delay value stays inside valid range
setup.scroll_delay_value =
MIN(MAX(MIN_SCROLL_DELAY, setup.scroll_delay_value), MAX_SCROLL_DELAY);
+
+ if (setup.allow_skipping_levels == ARG_UNDEFINED_VALUE)
+ {
+ // if undefined, set from previously used setup options for same purpose
+ setup.allow_skipping_levels = (setup.handicap && setup.skip_levels ? STATE_ASK :
+ setup.handicap ? STATE_FALSE : STATE_TRUE);
+ }
}
void LoadSetup_Default(void)
boolean show_titlescreen;
boolean quick_doors;
boolean team_mode;
+ boolean handicap;
+ boolean skip_levels;
boolean allow_skipping_levels;
boolean increment_levels;
boolean auto_play_next_level;
}
}
+static void UpdateHandicapAndSkipLevels(void)
+{
+ // these setup options are obsolete and not used anymore;
+ // update them anyway for testing with older game versions
+
+ setup.handicap = (setup.allow_skipping_levels != STATE_TRUE);
+ setup.skip_levels = (setup.allow_skipping_levels != STATE_FALSE);
+}
+
static void ModifyGameSpeedIfNeeded(void)
{
if (strEqual(setup.vsync_mode, STR_VSYNC_MODE_OFF) ||
if (si->value == &setup.sound_simple ||
si->value == &setup.sound_loops)
ToggleMenuSoundsIfNeeded();
+
+ // update old setup options from new setup options
+ if (si->value == &setup.allow_skipping_levels)
+ UpdateHandicapAndSkipLevels();
}
static struct TokenInfo *getSetupInfoFinal(struct TokenInfo *setup_info_orig)