Added --nosubtitles commandline option
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@231 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@
|
||||
#include "options.h"
|
||||
|
||||
int optWhichMusic = MUSIC_3DO;
|
||||
|
||||
BOOLEAN optSubtitles = TRUE;
|
||||
|
||||
BOOLEAN FileExists (char *filename)
|
||||
{
|
||||
|
||||
@@ -33,6 +33,8 @@ enum
|
||||
};
|
||||
extern int optWhichMusic;
|
||||
|
||||
extern BOOLEAN optSubtitles;
|
||||
|
||||
BOOLEAN FileExists (char *filename);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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)
|
||||
|
||||
+6
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user