From 050a2f10dc68013dd10549a951667f5dfde52228 Mon Sep 17 00:00:00 2001 From: Florian Schulze Date: Fri, 5 Jul 2002 13:05:33 +0000 Subject: [PATCH] Added -musicnosound option. --- globals.h | 2 +- main.c | 2 ++ sdl/sound.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/globals.h b/globals.h index 07234a1..30641f4 100644 --- a/globals.h +++ b/globals.h @@ -168,7 +168,7 @@ typedef struct { typedef struct { int joy_enabled, mouse_enabled; - int no_sound, no_gore, fireworks; + int no_sound, music_no_sound, no_gore, fireworks; char error_str[256]; int draw_page, view_page; struct { diff --git a/main.c b/main.c index 78aeda4..f664039 100644 --- a/main.c +++ b/main.c @@ -1874,6 +1874,8 @@ int init_program(int argc, char *argv[], char *pal) for (c1 = 1; c1 < argc; c1++) { if (stricmp(argv[c1], "-nosound") == 0) main_info.no_sound = 1; + else if (stricmp(argv[c1], "-musicnosound") == 0) + main_info.music_no_sound = 1; else if (stricmp(argv[c1], "-nogore") == 0) main_info.no_gore = 1; else if (stricmp(argv[c1], "-nojoy") == 0) diff --git a/sdl/sound.c b/sdl/sound.c index 0e31c86..a14869e 100644 --- a/sdl/sound.c +++ b/sdl/sound.c @@ -353,7 +353,7 @@ void dj_play_sfx(unsigned char sfx_num, unsigned short freq, char volume, char p { int slot; - if (main_info.no_sound) + if (main_info.music_no_sound || main_info.no_sound) return; if (channel<0) { -- 2.39.2