Added -musicnosound option.
authorFlorian Schulze <crow@icculus.org>
Fri, 5 Jul 2002 13:05:33 +0000 (13:05 +0000)
committerFlorian Schulze <crow@icculus.org>
Fri, 5 Jul 2002 13:05:33 +0000 (13:05 +0000)
globals.h
main.c
sdl/sound.c

index 07234a1..30641f4 100644 (file)
--- 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 (file)
--- 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)
index 0e31c86..a14869e 100644 (file)
@@ -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) {