DrawCursorAndText_Main(-1, FALSE, FALSE);
DrawPreviewLevelInitial();
+ DrawNetworkPlayers();
HandleMainMenu(0, 0, 0, 0, MB_MENU_INITIALIZE);
}
else
{
- PlayMusic(list->music);
+ int music = list->music;
+
+ if (music_info[music].loop)
+ PlayMusicLoop(music);
+ else
+ PlayMusic(music);
DrawTextSCentered(ystart, font_title, "The Game Background Music:");
}
OpenDoor(GetDoorState() | DOOR_NO_DELAY | DOOR_FORCE_REDRAW);
- HandleHallOfFame(highlight_position, 0, 0, 0, MB_MENU_INITIALIZE);
+ HandleHallOfFame(level_nr, highlight_position, 0, 0, MB_MENU_INITIALIZE);
DrawMaskedBorder(fade_mask);
FadeIn(fade_mask);
}
-static void drawHallOfFameList(int first_entry, int highlight_position)
+static void drawHallOfFameList(int level_nr, int first_entry,
+ int highlight_position)
{
int i, j;
void HandleHallOfFame(int mx, int my, int dx, int dy, int button)
{
+ static int level_nr = 0;
static int first_entry = 0;
static int highlight_position = 0;
int step = (button == 1 ? 1 : button == 2 ? 5 : 10);
if (button == MB_MENU_INITIALIZE)
{
+ level_nr = mx;
first_entry = 0;
- highlight_position = mx;
- drawHallOfFameList(first_entry, highlight_position);
+ highlight_position = my;
+
+ drawHallOfFameList(level_nr, first_entry, highlight_position);
return;
}
if (first_entry < 0)
first_entry = 0;
- drawHallOfFameList(first_entry, highlight_position);
+ drawHallOfFameList(level_nr, first_entry, highlight_position);
}
}
else if (dy > 0)
if (first_entry + NUM_MENU_ENTRIES_ON_SCREEN > MAX_SCORE_ENTRIES)
first_entry = MAX(0, MAX_SCORE_ENTRIES - NUM_MENU_ENTRIES_ON_SCREEN);
- drawHallOfFameList(first_entry, highlight_position);
+ drawHallOfFameList(level_nr, first_entry, highlight_position);
}
}
else if (button == MB_MENU_LEAVE || button == MB_MENU_CHOICE)
FadeSound(SND_BACKGROUND_SCORES);
- if (game_status_last_screen != GAME_MODE_PLAYING ||
- !setup.auto_play_next_level || !setup.increment_levels)
+ if (game_status_last_screen == GAME_MODE_PLAYING &&
+ setup.auto_play_next_level && setup.increment_levels &&
+ !network_playing)
{
- SetGameStatus(GAME_MODE_MAIN);
-
- DrawMainMenu();
+ StartGameActions(network.enabled, setup.autorecord, level.random_seed);
}
else
{
- StartGameActions(network.enabled, setup.autorecord, level.random_seed);
+ SetGameStatus(GAME_MODE_MAIN);
+
+ DrawMainMenu();
}
}
{ TYPE_SWITCH, &setup.skip_levels, "Skip Unsolved Levels:" },
{ TYPE_SWITCH, &setup.increment_levels,"Increment Solved Levels:" },
{ TYPE_SWITCH, &setup.auto_play_next_level,"Auto-play Next Level:" },
+ { TYPE_SWITCH, &setup.skip_scores_after_game,"Skip Scores After Game:" },
{ TYPE_SWITCH, &setup.autorecord, "Auto-Record Tapes:" },
{ TYPE_ENTER_LIST, execSetupChooseGameSpeed, "Game Speed:" },
{ TYPE_STRING, &game_speed_text, "" },
ToggleFullscreenOrChangeWindowScalingIfNeeded();
if (si->value == &setup.network_mode &&
- setup.network_mode &&
- !network.enabled)
- Request("Please restart game to enable network games!", REQ_CONFIRM);
+ setup.network_mode != network.enabled)
+ {
+ network.enabled = setup.network_mode;
+
+ FadeOut(REDRAW_ALL);
+
+ ClearField();
+
+ FadeIn(REDRAW_ALL);
+
+ if (network.enabled)
+ InitNetworkServer();
+ else
+ DisconnectFromNetworkServer();
+
+ DrawSetupScreen();
+ }
}
static struct TokenInfo *getSetupInfoFinal(struct TokenInfo *setup_info_orig)