X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=d48ba4ecf99d7edfc588828899b5c149729b91dc;hb=5a6485f6e5b16c06708c45c2ebb1bfd6d5915c9a;hp=60637697a30ee9e9f381995712c0f55e7dc9bc63;hpb=4dda9ecc045a0247ee427cc0c2626ce9b0b802fe;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index 60637697..d48ba4ec 100644 --- a/src/screens.c +++ b/src/screens.c @@ -3595,6 +3595,51 @@ void HandleInfoScreen_Music(int dx, int dy, int button) ystart += ystep_head; } + if (!strEqual(list->played, UNKNOWN_NAME)) + { + if (!strEqual(list->played_header, UNKNOWN_NAME)) + DrawTextSCentered(ystart, font_head, list->played_header); + else + DrawTextSCentered(ystart, font_head, "played in"); + + ystart += ystep_head; + + DrawTextFCentered(ystart, font_text, "%s", list->played); + ystart += ystep_head; + } + else if (!list->is_sound) + { + int music_level_nr = -1; + int i; + + // check if this music is configured for a certain level + for (i = leveldir_current->first_level; + i <= leveldir_current->last_level; i++) + { + // (special case: "list->music" may be negative for unconfigured music) + if (levelset.music[i] != MUS_UNDEFINED && + levelset.music[i] == list->music) + { + music_level_nr = i; + + break; + } + } + + if (music_level_nr != -1) + { + if (!strEqual(list->played_header, UNKNOWN_NAME)) + DrawTextSCentered(ystart, font_head, list->played_header); + else + DrawTextSCentered(ystart, font_head, "played in"); + + ystart += ystep_head; + + DrawTextFCentered(ystart, font_text, "level %03d", music_level_nr); + ystart += ystep_head; + } + } + DrawTextSCentered(ybottom, font_foot, TEXT_NEXT_PAGE); if (button != MB_MENU_INITIALIZE)