X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=1c261a00b951a036d28cedd0f28ba1c5466a6f2e;hb=c6bdf2fa014d0a3dd50260a409704e487e73e572;hp=558e83a61c2a54413394bdeb417220def55948fb;hpb=0868de4751d9e3d4b2f3185c52edb5569217d39a;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 558e83a6..1c261a00 100644 --- a/src/tools.c +++ b/src/tools.c @@ -242,8 +242,7 @@ void DrawMaskedBorder_ALL() void DrawMaskedBorder(int redraw_mask) { /* do not draw masked screen borders when displaying title screens */ - if (effectiveGameStatus() == GAME_MODE_TITLE || - effectiveGameStatus() == GAME_MODE_MESSAGE) + if (effectiveGameStatus() == GAME_MODE_TITLE) return; if (redraw_mask & REDRAW_ALL) @@ -1766,11 +1765,7 @@ static void DrawPreviewLevelExt(int from_x, int from_y) int real_preview_xsize = MIN(level_xsize, preview.xsize); int real_preview_ysize = MIN(level_ysize, preview.ysize); int dst_x = SX + ALIGNED_XPOS(preview.x, preview_width, preview.align); -#if 1 int dst_y = SY + ALIGNED_YPOS(preview.y, preview_height, preview.valign); -#else - int dst_y = SY + preview.y; -#endif int x, y; DrawBackground(dst_x, dst_y, preview_width, preview_height); @@ -6450,10 +6445,8 @@ void InitGraphicInfo_EM(void) #endif } -void PlayMenuSound() +void PlayMenuSoundExt(int sound) { - int sound = menu.sound[game_status]; - if (sound == SND_UNDEFINED) return; @@ -6467,6 +6460,11 @@ void PlayMenuSound() PlaySound(sound); } +void PlayMenuSound() +{ + PlayMenuSoundExt(menu.sound[game_status]); +} + void PlayMenuSoundStereo(int sound, int stereo_position) { if (sound == SND_UNDEFINED) @@ -6482,10 +6480,8 @@ void PlayMenuSoundStereo(int sound, int stereo_position) PlaySoundStereo(sound, stereo_position); } -void PlayMenuSoundIfLoop() +void PlayMenuSoundIfLoopExt(int sound) { - int sound = menu.sound[game_status]; - if (sound == SND_UNDEFINED) return; @@ -6497,10 +6493,13 @@ void PlayMenuSoundIfLoop() PlaySoundLoop(sound); } -void PlayMenuMusic() +void PlayMenuSoundIfLoop() { - int music = menu.music[game_status]; + PlayMenuSoundIfLoopExt(menu.sound[game_status]); +} +void PlayMenuMusicExt(int music) +{ if (music == MUS_UNDEFINED) return; @@ -6510,6 +6509,11 @@ void PlayMenuMusic() PlayMusic(music); } +void PlayMenuMusic() +{ + PlayMenuMusicExt(menu.music[game_status]); +} + void PlaySoundActivating() { #if 0