From: Holger Schemel Date: Wed, 1 Feb 2017 20:24:52 +0000 (+0100) Subject: added setup option to enable/disable auto-incrementing solved levels X-Git-Tag: 4.0.0.2~9 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=6fe1eea30256f13a8ac86e982cf14f54f26ec3cc;p=rocksndiamonds.git added setup option to enable/disable auto-incrementing solved levels --- diff --git a/src/files.c b/src/files.c index 9a769335..4cdb8199 100644 --- a/src/files.c +++ b/src/files.c @@ -7945,34 +7945,35 @@ void SaveScore(int nr) #define SETUP_TOKEN_TEAM_MODE 14 #define SETUP_TOKEN_HANDICAP 15 #define SETUP_TOKEN_SKIP_LEVELS 16 -#define SETUP_TOKEN_TIME_LIMIT 17 -#define SETUP_TOKEN_FULLSCREEN 18 -#define SETUP_TOKEN_WINDOW_SCALING_PERCENT 19 -#define SETUP_TOKEN_WINDOW_SCALING_QUALITY 20 -#define SETUP_TOKEN_SCREEN_RENDERING_MODE 21 -#define SETUP_TOKEN_ASK_ON_ESCAPE 22 -#define SETUP_TOKEN_ASK_ON_ESCAPE_EDITOR 23 -#define SETUP_TOKEN_QUICK_SWITCH 24 -#define SETUP_TOKEN_INPUT_ON_FOCUS 25 -#define SETUP_TOKEN_PREFER_AGA_GRAPHICS 26 -#define SETUP_TOKEN_GAME_FRAME_DELAY 27 -#define SETUP_TOKEN_SP_SHOW_BORDER_ELEMENTS 28 -#define SETUP_TOKEN_SMALL_GAME_GRAPHICS 29 -#define SETUP_TOKEN_SHOW_SNAPSHOT_BUTTONS 30 -#define SETUP_TOKEN_GRAPHICS_SET 31 -#define SETUP_TOKEN_SOUNDS_SET 32 -#define SETUP_TOKEN_MUSIC_SET 33 -#define SETUP_TOKEN_OVERRIDE_LEVEL_GRAPHICS 34 -#define SETUP_TOKEN_OVERRIDE_LEVEL_SOUNDS 35 -#define SETUP_TOKEN_OVERRIDE_LEVEL_MUSIC 36 -#define SETUP_TOKEN_VOLUME_SIMPLE 37 -#define SETUP_TOKEN_VOLUME_LOOPS 38 -#define SETUP_TOKEN_VOLUME_MUSIC 39 -#define SETUP_TOKEN_TOUCH_CONTROL_TYPE 40 -#define SETUP_TOKEN_TOUCH_MOVE_DISTANCE 41 -#define SETUP_TOKEN_TOUCH_DROP_DISTANCE 42 - -#define NUM_GLOBAL_SETUP_TOKENS 43 +#define SETUP_TOKEN_INCREMENT_LEVELS 17 +#define SETUP_TOKEN_TIME_LIMIT 18 +#define SETUP_TOKEN_FULLSCREEN 19 +#define SETUP_TOKEN_WINDOW_SCALING_PERCENT 20 +#define SETUP_TOKEN_WINDOW_SCALING_QUALITY 21 +#define SETUP_TOKEN_SCREEN_RENDERING_MODE 22 +#define SETUP_TOKEN_ASK_ON_ESCAPE 23 +#define SETUP_TOKEN_ASK_ON_ESCAPE_EDITOR 24 +#define SETUP_TOKEN_QUICK_SWITCH 25 +#define SETUP_TOKEN_INPUT_ON_FOCUS 26 +#define SETUP_TOKEN_PREFER_AGA_GRAPHICS 27 +#define SETUP_TOKEN_GAME_FRAME_DELAY 28 +#define SETUP_TOKEN_SP_SHOW_BORDER_ELEMENTS 29 +#define SETUP_TOKEN_SMALL_GAME_GRAPHICS 30 +#define SETUP_TOKEN_SHOW_SNAPSHOT_BUTTONS 31 +#define SETUP_TOKEN_GRAPHICS_SET 32 +#define SETUP_TOKEN_SOUNDS_SET 33 +#define SETUP_TOKEN_MUSIC_SET 34 +#define SETUP_TOKEN_OVERRIDE_LEVEL_GRAPHICS 35 +#define SETUP_TOKEN_OVERRIDE_LEVEL_SOUNDS 36 +#define SETUP_TOKEN_OVERRIDE_LEVEL_MUSIC 37 +#define SETUP_TOKEN_VOLUME_SIMPLE 38 +#define SETUP_TOKEN_VOLUME_LOOPS 39 +#define SETUP_TOKEN_VOLUME_MUSIC 40 +#define SETUP_TOKEN_TOUCH_CONTROL_TYPE 41 +#define SETUP_TOKEN_TOUCH_MOVE_DISTANCE 42 +#define SETUP_TOKEN_TOUCH_DROP_DISTANCE 43 + +#define NUM_GLOBAL_SETUP_TOKENS 44 /* editor setup */ #define SETUP_TOKEN_EDITOR_EL_CLASSIC 0 @@ -8137,6 +8138,7 @@ static struct TokenInfo global_setup_tokens[] = { TYPE_SWITCH, &si.team_mode, "team_mode" }, { TYPE_SWITCH, &si.handicap, "handicap" }, { TYPE_SWITCH, &si.skip_levels, "skip_levels" }, + { TYPE_SWITCH, &si.increment_levels, "increment_levels" }, { TYPE_SWITCH, &si.time_limit, "time_limit" }, { TYPE_SWITCH, &si.fullscreen, "fullscreen" }, { TYPE_INTEGER,&si.window_scaling_percent, "window_scaling_percent" }, @@ -8335,6 +8337,7 @@ static void setSetupInfoToDefaults(struct SetupInfo *si) si->team_mode = FALSE; si->handicap = TRUE; si->skip_levels = TRUE; + si->increment_levels = TRUE; si->time_limit = TRUE; si->fullscreen = FALSE; si->window_scaling_percent = STD_WINDOW_SCALING_PERCENT; diff --git a/src/game.c b/src/game.c index b543e6d2..8d2ed466 100644 --- a/src/game.c +++ b/src/game.c @@ -4461,7 +4461,8 @@ void GameEnd() SaveLevelSetup_SeriesInfo(); } - if (level_nr < leveldir_current->last_level) + if (setup.increment_levels && + level_nr < leveldir_current->last_level) raise_level = TRUE; /* advance to next level */ if ((hi_pos = NewHiScore()) >= 0) diff --git a/src/libgame/system.h b/src/libgame/system.h index dd007f7f..6816b0ca 100644 --- a/src/libgame/system.h +++ b/src/libgame/system.h @@ -1092,6 +1092,7 @@ struct SetupInfo boolean team_mode; boolean handicap; boolean skip_levels; + boolean increment_levels; boolean time_limit; boolean fullscreen; int window_scaling_percent; diff --git a/src/screens.c b/src/screens.c index c1f16489..0f47d876 100644 --- a/src/screens.c +++ b/src/screens.c @@ -5326,9 +5326,10 @@ static struct TokenInfo setup_info_game[] = { { TYPE_SWITCH, &setup.team_mode, "Team-Mode (Multi-Player):" }, { TYPE_YES_NO, &setup.input_on_focus, "Only Move Focussed Player:" }, + { TYPE_SWITCH, &setup.time_limit, "Time Limit:" }, { TYPE_SWITCH, &setup.handicap, "Handicap:" }, { TYPE_SWITCH, &setup.skip_levels, "Skip Unsolved Levels:" }, - { TYPE_SWITCH, &setup.time_limit, "Time Limit:" }, + { TYPE_SWITCH, &setup.increment_levels,"Increment Solved Levels:" }, { TYPE_SWITCH, &setup.autorecord, "Auto-Record Tapes:" }, { TYPE_ENTER_LIST, execSetupChooseGameSpeed, "Game Speed:" }, { TYPE_STRING, &game_speed_text, "" },