Fix line breaks; simple cleanup.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3200 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
Meep-Eep
2009-10-08 19:24:23 +00:00
parent 219afbe6ed
commit 1cc4d404b7
+34 -27
View File
@@ -236,8 +236,8 @@ main (int argc, char *argv[])
} }
if (res_HasKey ("config.usegl")) if (res_HasKey ("config.usegl"))
{ {
options.gfxDriver = res_GetBoolean ("config.usegl") ? TFB_GFXDRIVER_SDL_OPENGL : options.gfxDriver = res_GetBoolean ("config.usegl") ?
TFB_GFXDRIVER_SDL_PURE; TFB_GFXDRIVER_SDL_OPENGL : TFB_GFXDRIVER_SDL_PURE;
} }
if (res_HasKey ("config.scaler")) if (res_HasKey ("config.scaler"))
{ {
@@ -254,11 +254,13 @@ main (int argc, char *argv[])
else if (!strcmp (arg, "hq")) else if (!strcmp (arg, "hq"))
options.gfxFlags |= TFB_GFXFLAGS_SCALE_HQXX; options.gfxFlags |= TFB_GFXFLAGS_SCALE_HQXX;
} }
if (res_HasKey ("config.scanlines") && res_GetBoolean ("config.scanlines")) if (res_HasKey ("config.scanlines") &&
res_GetBoolean ("config.scanlines"))
{ {
options.gfxFlags |= TFB_GFXFLAGS_SCANLINES; options.gfxFlags |= TFB_GFXFLAGS_SCANLINES;
} }
if (res_HasKey ("config.fullscreen") && res_GetBoolean ("config.fullscreen")) if (res_HasKey ("config.fullscreen") &&
res_GetBoolean ("config.fullscreen"))
{ {
options.gfxFlags |= TFB_GFXFLAGS_FULLSCREEN; options.gfxFlags |= TFB_GFXFLAGS_FULLSCREEN;
} }
@@ -268,19 +270,23 @@ main (int argc, char *argv[])
} }
if (res_HasKey ("config.textmenu")) if (res_HasKey ("config.textmenu"))
{ {
options.whichMenu = res_GetBoolean ("config.textmenu") ? OPT_PC : OPT_3DO; options.whichMenu = res_GetBoolean ("config.textmenu") ?
OPT_PC : OPT_3DO;
} }
if (res_HasKey ("config.textgradients")) if (res_HasKey ("config.textgradients"))
{ {
options.whichFonts = res_GetBoolean ("config.textgradients") ? OPT_PC : OPT_3DO; options.whichFonts = res_GetBoolean ("config.textgradients") ?
OPT_PC : OPT_3DO;
} }
if (res_HasKey ("config.iconicscan")) if (res_HasKey ("config.iconicscan"))
{ {
options.whichCoarseScan = res_GetBoolean ("config.iconicscan") ? OPT_3DO : OPT_PC; options.whichCoarseScan = res_GetBoolean ("config.iconicscan") ?
OPT_3DO : OPT_PC;
} }
if (res_HasKey ("config.smoothscroll")) if (res_HasKey ("config.smoothscroll"))
{ {
options.smoothScroll = res_GetBoolean ("config.smoothscroll") ? OPT_3DO : OPT_PC; options.smoothScroll = res_GetBoolean ("config.smoothscroll") ?
OPT_3DO : OPT_PC;
} }
if (res_HasKey ("config.3domusic")) if (res_HasKey ("config.3domusic"))
{ {
@@ -292,7 +298,8 @@ main (int argc, char *argv[])
} }
if (res_HasKey ("config.3domovies")) if (res_HasKey ("config.3domovies"))
{ {
options.whichIntro = res_GetBoolean ("config.3domovies") ? OPT_3DO : OPT_PC; options.whichIntro = res_GetBoolean ("config.3domovies") ?
OPT_3DO : OPT_PC;
} }
if (res_HasKey ("config.showfps") && res_GetBoolean ("config.showfps")) if (res_HasKey ("config.showfps") && res_GetBoolean ("config.showfps"))
{ {
@@ -300,7 +307,8 @@ main (int argc, char *argv[])
} }
if (res_HasKey ("config.smoothmelee")) if (res_HasKey ("config.smoothmelee"))
{ {
options.meleeScale = res_GetBoolean ("config.smoothmelee") ? TFB_SCALE_TRILINEAR : TFB_SCALE_STEP; options.meleeScale = res_GetBoolean ("config.smoothmelee") ?
TFB_SCALE_TRILINEAR : TFB_SCALE_STEP;
} }
if (res_HasKey ("config.positionalsfx")) if (res_HasKey ("config.positionalsfx"))
{ {
@@ -1036,10 +1044,10 @@ usage (FILE *out, const struct options_struct *defaultOptions)
log_add (log_User, " -o, --opengl (default off)"); log_add (log_User, " -o, --opengl (default off)");
log_add (log_User, " -x, --nogl (default on)"); log_add (log_User, " -x, --nogl (default on)");
log_add (log_User, " -k, --keepaspectratio (default off)"); log_add (log_User, " -k, --keepaspectratio (default off)");
log_add (log_User, " -c, --scale=MODE (bilinear, biadapt, biadv, triscan, " log_add (log_User, " -c, --scale=MODE (bilinear, biadapt, biadv, "
"hq or none (default) )"); "triscan, hq or none (default) )");
log_add (log_User, " -b, --meleezoom=MODE (step, aka pc, or smooth, aka 3do; " log_add (log_User, " -b, --meleezoom=MODE (step, aka pc, or smooth, "
"default is 3do)"); "aka 3do; default is 3do)");
log_add (log_User, " -s, --scanlines (default off)"); log_add (log_User, " -s, --scanlines (default off)");
log_add (log_User, " -p, --fps (default off)"); log_add (log_User, " -p, --fps (default off)");
log_add (log_User, " -g, --gamma=CORRECTIONVALUE (default 1.0, which " log_add (log_User, " -g, --gamma=CORRECTIONVALUE (default 1.0, which "
@@ -1052,11 +1060,12 @@ usage (FILE *out, const struct options_struct *defaultOptions)
log_add (log_User, " -q, --audioquality=QUALITY (high, medium or low, " log_add (log_User, " -q, --audioquality=QUALITY (high, medium or low, "
"default medium)"); "default medium)");
log_add (log_User, " -u, --nosubtitles"); log_add (log_User, " -u, --nosubtitles");
log_add (log_User, " -l, --logfile=FILE (sends console output to logfile " log_add (log_User, " -l, --logfile=FILE (sends console output to "
"FILE)"); "logfile FILE)");
log_add (log_User, " --addon ADDON (using a specific addon; " log_add (log_User, " --addon ADDON (using a specific addon; "
"may be specified multiple times)"); "may be specified multiple times)");
log_add (log_User, " --addondir=ADDONDIR (directory where addons reside)"); log_add (log_User, " --addondir=ADDONDIR (directory where addons "
"reside)");
log_add (log_User, " --sound=DRIVER (openal, mixsdl, none; default " log_add (log_User, " --sound=DRIVER (openal, mixsdl, none; default "
"mixsdl)"); "mixsdl)");
log_add (log_User, " --stereosfx (enables positional sound effects, " log_add (log_User, " --stereosfx (enables positional sound effects, "
@@ -1126,18 +1135,16 @@ Check_PC_3DO_opt (const char *value, DWORD mask, const char *optName,
static const char * static const char *
PC_3DO_optString (DWORD optMask) PC_3DO_optString (DWORD optMask)
{ {
if (optMask & OPT_3DO) switch (optMask & (OPT_3DO | OPT_PC))
{ {
if (optMask & OPT_PC) case OPT_3DO:
return "both"; return "3do";
return "3do"; case OPT_PC:
}
else
{
if (optMask & OPT_PC)
return "pc"; return "pc";
return "none"; case (OPT_3DO | OPT_PC):
return "both";
default: /* 0 */
return "none";
} }
} }