diff --git a/sc2/doc/users/manual.txt b/sc2/doc/users/manual.txt index d4e71f23e..e30517eb8 100644 --- a/sc2/doc/users/manual.txt +++ b/sc2/doc/users/manual.txt @@ -86,6 +86,10 @@ Use the .MOD based PC soundtrack everywhere. Can be "high", "medium", or "low". Specifies how nice the audio sounds. Slower machines should lower the audio quality. + -u (or --nosubtitles) + +Disables subtitles. + THE STORY SO FAR For the past decade, Earth and the rest of the Alliance of Free Stars diff --git a/sc2/src/options.c b/sc2/src/options.c index 64717d665..503e20d3e 100644 --- a/sc2/src/options.c +++ b/sc2/src/options.c @@ -25,7 +25,7 @@ #include "options.h" int optWhichMusic = MUSIC_3DO; - +BOOLEAN optSubtitles = TRUE; BOOLEAN FileExists (char *filename) { diff --git a/sc2/src/options.h b/sc2/src/options.h index e822a0dda..884007d5a 100644 --- a/sc2/src/options.h +++ b/sc2/src/options.h @@ -33,6 +33,8 @@ enum }; extern int optWhichMusic; +extern BOOLEAN optSubtitles; + BOOLEAN FileExists (char *filename); #endif diff --git a/sc2/src/sc2code/comm.c b/sc2/src/sc2code/comm.c index 48f571140..3bd7c580f 100644 --- a/sc2/src/sc2code/comm.c +++ b/sc2/src/sc2code/comm.c @@ -21,6 +21,7 @@ #include "libs/sound/trackplayer.h" #include "starcon.h" #include "commglue.h" +#include "options.h" void InitOscilloscope (int x, int y, int width, int height, void *f); @@ -1854,6 +1855,10 @@ do_subtitles (UNICODE *pStr) { static DWORD TimeOut; + // TODO: proper disabling of subtitles, this one prolly isn't 'safe' + if (optSubtitles == FALSE) + return 0; + if (pStr == 0) return (subtitle_state = NEXT_SUBTITLE); else if (pStr == (void *)~0) diff --git a/sc2/src/starcon2.c b/sc2/src/starcon2.c index 1f7ded512..e5b660d36 100644 --- a/sc2/src/starcon2.c +++ b/sc2/src/starcon2.c @@ -77,6 +77,7 @@ main (int argc, char *argv[]) {"3domusic", 0, NULL, 'e'}, {"pcmusic", 0, NULL, 'm'}, {"audioquality", 1, NULL, 'q'}, + {"nosubtitles", 0, NULL, 'u'}, {0, 0, 0, 0} }; @@ -90,7 +91,7 @@ main (int argc, char *argv[]) strcpy (contentdir, "content"); #endif - while ((c = getopt_long(argc, argv, "r:d:foc:spn:?hM:S:T:emq:", long_options, &option_index)) != -1) + while ((c = getopt_long(argc, argv, "r:d:foc:spn:?hM:S:T:emq:u", long_options, &option_index)) != -1) { switch (c) { case 'r': @@ -177,6 +178,9 @@ main (int argc, char *argv[]) soundflags |= TFB_SOUNDFLAGS_LQAUDIO; } break; + case 'u': + optSubtitles = FALSE; + break; default: printf ("\nOption %s not found!\n", long_options[option_index].name); case '?': @@ -196,6 +200,7 @@ main (int argc, char *argv[]) printf(" -e, --3domusic (default)\n"); printf(" -m, --pcmusic\n"); printf(" -q, --audioquality=QUALITY (high, medium or low, default medium)\n"); + printf(" -u, --nosubtitles\n"); return 0; break; }