X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=9deb974cc553d439dc8279ff8e45e61f22b5c28f;hb=bb49e2b2a9bb4aefe76182be725e998bf9495976;hp=3ffcb48493dcb0b11ae1bd0b2196b08d2b2fc8c2;hpb=41165ff0a84cf7c0391f6b56520a1f7f97ccf496;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index 3ffcb484..9deb974c 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1642,6 +1642,7 @@ void DrawMainMenu() DrawCursorAndText_Main(-1, FALSE, FALSE); DrawPreviewLevelInitial(); + DrawNetworkPlayers(); HandleMainMenu(0, 0, 0, 0, MB_MENU_INITIALIZE); @@ -4531,14 +4532,15 @@ void DrawHallOfFame(int level_nr, int highlight_position) 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; @@ -4581,15 +4583,18 @@ static void drawHallOfFameList(int first_entry, int highlight_position) 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; } @@ -4605,7 +4610,7 @@ void HandleHallOfFame(int mx, int my, int dx, int dy, int button) if (first_entry < 0) first_entry = 0; - drawHallOfFameList(first_entry, highlight_position); + drawHallOfFameList(level_nr, first_entry, highlight_position); } } else if (dy > 0) @@ -4616,7 +4621,7 @@ void HandleHallOfFame(int mx, int my, int dx, int dy, int button) 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) @@ -6449,12 +6454,9 @@ static void changeSetupValue(int screen_pos, int setup_info_pos_raw, int dx) { network.enabled = setup.network_mode; - SetGameStatus(GAME_MODE_LOADING); - SetDrawBackgroundMask(REDRAW_NONE); - FadeOut(REDRAW_ALL); - ClearRectangle(drawto, 0, 0, WIN_XSIZE, WIN_YSIZE); + ClearField(); FadeIn(REDRAW_ALL); @@ -6463,11 +6465,6 @@ static void changeSetupValue(int screen_pos, int setup_info_pos_raw, int dx) else DisconnectFromNetworkServer(); - SetGameStatus(GAME_MODE_SETUP); - SetDrawBackgroundMask(REDRAW_FIELD); - - redraw_mask = REDRAW_ALL; - DrawSetupScreen(); } }