X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=8718bbe1055f1771ee7f869bfeafa1c72aa3756b;hb=refs%2Ftags%2F4.0.1.2;hp=8eff2cd2a2a47770347c3faa80f8b819b50cc5df;hpb=d47c2baf7efb886ca884ec5cdd17386c0f605a25;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 8eff2cd2..8718bbe1 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1444,13 +1444,6 @@ void getSizedGraphicSourceExt(int graphic, int frame, int tilesize, *y = *y * tilesize / g->tile_size; } -void getFixedGraphicSourceExt(int graphic, int frame, Bitmap **bitmap, - int *x, int *y, boolean get_backside) -{ - getSizedGraphicSourceExt(graphic, frame, TILESIZE, bitmap, x, y, - get_backside); -} - void getSizedGraphicSource(int graphic, int frame, int tilesize, Bitmap **bitmap, int *x, int *y) { @@ -3046,9 +3039,8 @@ static int getMaxTextLength(struct TextPosInfo *pos, int font_nr) return max_text_width / font_width; } -static void DrawPreviewLevelLabel(int mode) +static void DrawPreviewLevelLabelExt(int mode, struct TextPosInfo *pos) { - struct TextPosInfo *pos = &menu.main.text.level_info_2; char label_text[MAX_OUTPUT_LINESIZE + 1]; int max_len_label_text; int font_nr = pos->font; @@ -3091,6 +3083,19 @@ static void DrawPreviewLevelLabel(int mode) redraw_mask |= REDRAW_FIELD; } +static void DrawPreviewLevelLabel(int mode) +{ + DrawPreviewLevelLabelExt(mode, &menu.main.text.level_info_2); +} + +static void DrawPreviewLevelInfo(int mode) +{ + if (mode == MICROLABEL_LEVEL_NAME) + DrawPreviewLevelLabelExt(mode, &menu.main.text.level_name); + else if (mode == MICROLABEL_LEVEL_AUTHOR) + DrawPreviewLevelLabelExt(mode, &menu.main.text.level_author); +} + static void DrawPreviewLevelExt(boolean restart) { static unsigned int scroll_delay = 0; @@ -3125,6 +3130,9 @@ static void DrawPreviewLevelExt(boolean restart) DrawPreviewLevelPlayfield(from_x, from_y); DrawPreviewLevelLabel(label_state); + DrawPreviewLevelInfo(MICROLABEL_LEVEL_NAME); + DrawPreviewLevelInfo(MICROLABEL_LEVEL_AUTHOR); + /* initialize delay counters */ DelayReached(&scroll_delay, 0); DelayReached(&label_delay, 0); @@ -3762,12 +3770,10 @@ void WaitForEventToContinue() while (still_wait) { - if (PendingEvent()) - { - Event event; - - NextEvent(&event); + Event event; + if (NextValidEvent(&event)) + { switch (event.type) { case EVENT_BUTTONPRESS: @@ -8485,7 +8491,7 @@ void PlayMenuMusicExt(int music) void PlayMenuMusic() { char *curr_music = getCurrentlyPlayingMusicFilename(); - char *next_music = getMusicListEntry(menu.music[game_status])->filename; + char *next_music = getMusicInfoEntryFilename(menu.music[game_status]); if (!strEqual(curr_music, next_music)) PlayMenuMusicExt(menu.music[game_status]); @@ -8505,7 +8511,7 @@ static void FadeMenuSounds() static void FadeMenuMusic() { char *curr_music = getCurrentlyPlayingMusicFilename(); - char *next_music = getMusicListEntry(menu.music[game_status])->filename; + char *next_music = getMusicInfoEntryFilename(menu.music[game_status]); if (!strEqual(curr_music, next_music)) FadeMusic();