qbsp: add -splitsky and -splitturb, finer control over -splitspecial
This commit is contained in:
parent
fff8cbffbc
commit
1340529234
|
|
@ -128,11 +128,13 @@ IsSkipName(const char *name)
|
|||
}
|
||||
|
||||
static bool
|
||||
IsSplitName(const char *name)
|
||||
IsSpecialName(const char *name)
|
||||
{
|
||||
if (options.fSplitspecial)
|
||||
return false;
|
||||
if (name[0] == '*' || !Q_strncasecmp(name, "sky", 3))
|
||||
if (name[0] == '*' && !options.fSplitturb)
|
||||
return true;
|
||||
if (!Q_strncasecmp(name, "sky", 3) && !options.fSplitsky)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
|
@ -220,7 +222,7 @@ FindTexinfoEnt(texinfo_t *texinfo, const mapentity_t *entity)
|
|||
flags |= TEX_SKIP;
|
||||
if (IsHintName(texname))
|
||||
flags |= TEX_HINT;
|
||||
if (IsSplitName(texname))
|
||||
if (IsSpecialName(texname))
|
||||
flags |= TEX_SPECIAL;
|
||||
if (atoi(ValueForKey(entity, "_dirt")) == -1)
|
||||
flags |= TEX_NODIRT;
|
||||
|
|
|
|||
|
|
@ -594,6 +594,8 @@ PrintOptions(void)
|
|||
" -verbose Print out more .MAP information\n"
|
||||
" -noverbose Print out almost no information at all\n"
|
||||
" -splitspecial Doesn't combine sky and water faces into one large face\n"
|
||||
" -splitsky Doesn't combine sky faces into one large face\n"
|
||||
" -splitturb Doesn't combine water faces into one large face\n"
|
||||
" -notranswater Computes portal information for opaque water\n"
|
||||
" -transsky Computes portal information for transparent sky\n"
|
||||
" -notex Write only placeholder textures, to depend upon replacements, to keep file sizes down, or to skirt copyrights\n"
|
||||
|
|
@ -714,6 +716,10 @@ ParseOptions(char *szOptions)
|
|||
options.fAllverbose = true;
|
||||
else if (!Q_strcasecmp(szTok, "splitspecial"))
|
||||
options.fSplitspecial = true;
|
||||
else if (!Q_strcasecmp(szTok, "splitsky"))
|
||||
options.fSplitsky = true;
|
||||
else if (!Q_strcasecmp(szTok, "splitturb"))
|
||||
options.fSplitturb = true;
|
||||
else if (!Q_strcasecmp(szTok, "notranswater"))
|
||||
options.fTranswater = false;
|
||||
else if (!Q_strcasecmp(szTok, "transwater"))
|
||||
|
|
|
|||
|
|
@ -471,6 +471,8 @@ typedef struct options_s {
|
|||
bool fVerbose;
|
||||
bool fAllverbose;
|
||||
bool fSplitspecial;
|
||||
bool fSplitturb;
|
||||
bool fSplitsky;
|
||||
bool fTranswater;
|
||||
bool fTranssky;
|
||||
bool fOldaxis;
|
||||
|
|
|
|||
Loading…
Reference in New Issue