wrap strcmp use
This commit is contained in:
parent
9485b925ff
commit
cf98275ee4
|
|
@ -349,10 +349,10 @@ static void ASE_ParseBracedBlock( void ( *parser )( const char *token ) ){
|
|||
|
||||
while ( ASE_GetToken( false ) )
|
||||
{
|
||||
if ( !strcmp( s_token, "{" ) ) {
|
||||
if ( strEqual( s_token, "{" ) ) {
|
||||
indent++;
|
||||
}
|
||||
else if ( !strcmp( s_token, "}" ) ) {
|
||||
else if ( strEqual( s_token, "}" ) ) {
|
||||
--indent;
|
||||
if ( indent == 0 ) {
|
||||
break;
|
||||
|
|
@ -375,10 +375,10 @@ static void ASE_SkipEnclosingBraces( void ){
|
|||
|
||||
while ( ASE_GetToken( false ) )
|
||||
{
|
||||
if ( !strcmp( s_token, "{" ) ) {
|
||||
if ( strEqual( s_token, "{" ) ) {
|
||||
indent++;
|
||||
}
|
||||
else if ( !strcmp( s_token, "}" ) ) {
|
||||
else if ( strEqual( s_token, "}" ) ) {
|
||||
indent--;
|
||||
if ( indent == 0 ) {
|
||||
break;
|
||||
|
|
@ -400,7 +400,7 @@ static void ASE_KeyMAP_DIFFUSE( const char *token ){
|
|||
|
||||
strcpy( filename, gl_filename );
|
||||
|
||||
if ( !strcmp( token, "*BITMAP" ) ) {
|
||||
if ( strEqual( token, "*BITMAP" ) ) {
|
||||
ASE_GetToken( false );
|
||||
|
||||
// the purpose of this whole chunk of code below is to extract the relative path
|
||||
|
|
@ -446,7 +446,7 @@ static void ASE_KeyMAP_DIFFUSE( const char *token ){
|
|||
}
|
||||
|
||||
static void ASE_KeyMATERIAL( const char *token ){
|
||||
if ( !strcmp( token, "*MAP_DIFFUSE" ) ) {
|
||||
if ( strEqual( token, "*MAP_DIFFUSE" ) ) {
|
||||
ASE_ParseBracedBlock( ASE_KeyMAP_DIFFUSE );
|
||||
}
|
||||
else
|
||||
|
|
@ -455,7 +455,7 @@ static void ASE_KeyMATERIAL( const char *token ){
|
|||
}
|
||||
|
||||
static void ASE_KeyMATERIAL_LIST( const char *token ){
|
||||
if ( !strcmp( token, "*MATERIAL_COUNT" ) ) {
|
||||
if ( strEqual( token, "*MATERIAL_COUNT" ) ) {
|
||||
ASE_GetToken( false );
|
||||
VERBOSE( ( "..num materials: %s\n", s_token ) );
|
||||
if ( atoi( s_token ) > MAX_ASE_MATERIALS ) {
|
||||
|
|
@ -463,7 +463,7 @@ static void ASE_KeyMATERIAL_LIST( const char *token ){
|
|||
}
|
||||
ase.numMaterials = 0;
|
||||
}
|
||||
else if ( !strcmp( token, "*MATERIAL" ) ) {
|
||||
else if ( strEqual( token, "*MATERIAL" ) ) {
|
||||
VERBOSE( ( "..material %d ", ase.numMaterials ) );
|
||||
ASE_ParseBracedBlock( ASE_KeyMATERIAL );
|
||||
ase.numMaterials++;
|
||||
|
|
@ -473,7 +473,7 @@ static void ASE_KeyMATERIAL_LIST( const char *token ){
|
|||
static void ASE_KeyMESH_VERTEX_LIST( const char *token ){
|
||||
aseMesh_t *pMesh = ASE_GetCurrentMesh();
|
||||
|
||||
if ( !strcmp( token, "*MESH_VERTEX" ) ) {
|
||||
if ( strEqual( token, "*MESH_VERTEX" ) ) {
|
||||
ASE_GetToken( false ); // skip number
|
||||
|
||||
ASE_GetToken( false );
|
||||
|
|
@ -500,7 +500,7 @@ static void ASE_KeyMESH_VERTEX_LIST( const char *token ){
|
|||
static void ASE_KeyMESH_FACE_LIST( const char *token ){
|
||||
aseMesh_t *pMesh = ASE_GetCurrentMesh();
|
||||
|
||||
if ( !strcmp( token, "*MESH_FACE" ) ) {
|
||||
if ( strEqual( token, "*MESH_FACE" ) ) {
|
||||
ASE_GetToken( false ); // skip face number
|
||||
|
||||
ASE_GetToken( false ); // skip label
|
||||
|
|
@ -540,7 +540,7 @@ static void ASE_KeyMESH_FACE_LIST( const char *token ){
|
|||
static void ASE_KeyTFACE_LIST( const char *token ){
|
||||
aseMesh_t *pMesh = ASE_GetCurrentMesh();
|
||||
|
||||
if ( !strcmp( token, "*MESH_TFACE" ) ) {
|
||||
if ( strEqual( token, "*MESH_TFACE" ) ) {
|
||||
int a, b, c;
|
||||
|
||||
ASE_GetToken( false );
|
||||
|
|
@ -567,7 +567,7 @@ static void ASE_KeyTFACE_LIST( const char *token ){
|
|||
static void ASE_KeyMESH_TVERTLIST( const char *token ){
|
||||
aseMesh_t *pMesh = ASE_GetCurrentMesh();
|
||||
|
||||
if ( !strcmp( token, "*MESH_TVERT" ) ) {
|
||||
if ( strEqual( token, "*MESH_TVERT" ) ) {
|
||||
char u[80], v[80], w[80];
|
||||
|
||||
ASE_GetToken( false );
|
||||
|
|
@ -599,63 +599,63 @@ static void ASE_KeyMESH_TVERTLIST( const char *token ){
|
|||
static void ASE_KeyMESH( const char *token ){
|
||||
aseMesh_t *pMesh = ASE_GetCurrentMesh();
|
||||
|
||||
if ( !strcmp( token, "*TIMEVALUE" ) ) {
|
||||
if ( strEqual( token, "*TIMEVALUE" ) ) {
|
||||
ASE_GetToken( false );
|
||||
|
||||
pMesh->timeValue = atoi( s_token );
|
||||
VERBOSE( ( ".....timevalue: %d\n", pMesh->timeValue ) );
|
||||
}
|
||||
else if ( !strcmp( token, "*MESH_NUMVERTEX" ) ) {
|
||||
else if ( strEqual( token, "*MESH_NUMVERTEX" ) ) {
|
||||
ASE_GetToken( false );
|
||||
|
||||
pMesh->numVertexes = atoi( s_token );
|
||||
VERBOSE( ( ".....TIMEVALUE: %d\n", pMesh->timeValue ) );
|
||||
VERBOSE( ( ".....num vertexes: %d\n", pMesh->numVertexes ) );
|
||||
}
|
||||
else if ( !strcmp( token, "*MESH_NUMFACES" ) ) {
|
||||
else if ( strEqual( token, "*MESH_NUMFACES" ) ) {
|
||||
ASE_GetToken( false );
|
||||
|
||||
pMesh->numFaces = atoi( s_token );
|
||||
VERBOSE( ( ".....num faces: %d\n", pMesh->numFaces ) );
|
||||
}
|
||||
else if ( !strcmp( token, "*MESH_NUMTVFACES" ) ) {
|
||||
else if ( strEqual( token, "*MESH_NUMTVFACES" ) ) {
|
||||
ASE_GetToken( false );
|
||||
|
||||
if ( atoi( s_token ) != pMesh->numFaces ) {
|
||||
Error( "MESH_NUMTVFACES != MESH_NUMFACES" );
|
||||
}
|
||||
}
|
||||
else if ( !strcmp( token, "*MESH_NUMTVERTEX" ) ) {
|
||||
else if ( strEqual( token, "*MESH_NUMTVERTEX" ) ) {
|
||||
ASE_GetToken( false );
|
||||
|
||||
pMesh->numTVertexes = atoi( s_token );
|
||||
VERBOSE( ( ".....num tvertexes: %d\n", pMesh->numTVertexes ) );
|
||||
}
|
||||
else if ( !strcmp( token, "*MESH_VERTEX_LIST" ) ) {
|
||||
else if ( strEqual( token, "*MESH_VERTEX_LIST" ) ) {
|
||||
pMesh->vertexes = calloc( sizeof( aseVertex_t ) * pMesh->numVertexes, 1 );
|
||||
pMesh->currentVertex = 0;
|
||||
VERBOSE( ( ".....parsing MESH_VERTEX_LIST\n" ) );
|
||||
ASE_ParseBracedBlock( ASE_KeyMESH_VERTEX_LIST );
|
||||
}
|
||||
else if ( !strcmp( token, "*MESH_TVERTLIST" ) ) {
|
||||
else if ( strEqual( token, "*MESH_TVERTLIST" ) ) {
|
||||
pMesh->currentVertex = 0;
|
||||
pMesh->tvertexes = calloc( sizeof( aseTVertex_t ) * pMesh->numTVertexes, 1 );
|
||||
VERBOSE( ( ".....parsing MESH_TVERTLIST\n" ) );
|
||||
ASE_ParseBracedBlock( ASE_KeyMESH_TVERTLIST );
|
||||
}
|
||||
else if ( !strcmp( token, "*MESH_FACE_LIST" ) ) {
|
||||
else if ( strEqual( token, "*MESH_FACE_LIST" ) ) {
|
||||
pMesh->faces = calloc( sizeof( aseFace_t ) * pMesh->numFaces, 1 );
|
||||
pMesh->currentFace = 0;
|
||||
VERBOSE( ( ".....parsing MESH_FACE_LIST\n" ) );
|
||||
ASE_ParseBracedBlock( ASE_KeyMESH_FACE_LIST );
|
||||
}
|
||||
else if ( !strcmp( token, "*MESH_TFACELIST" ) ) {
|
||||
else if ( strEqual( token, "*MESH_TFACELIST" ) ) {
|
||||
pMesh->tfaces = calloc( sizeof( aseFace_t ) * pMesh->numFaces, 1 );
|
||||
pMesh->currentFace = 0;
|
||||
VERBOSE( ( ".....parsing MESH_TFACE_LIST\n" ) );
|
||||
ASE_ParseBracedBlock( ASE_KeyTFACE_LIST );
|
||||
}
|
||||
else if ( !strcmp( token, "*MESH_NORMALS" ) ) {
|
||||
else if ( strEqual( token, "*MESH_NORMALS" ) ) {
|
||||
ASE_ParseBracedBlock( 0 );
|
||||
}
|
||||
}
|
||||
|
|
@ -664,7 +664,7 @@ static void ASE_KeyMESH_ANIMATION( const char *token ){
|
|||
aseMesh_t *pMesh = ASE_GetCurrentMesh();
|
||||
|
||||
// loads a single animation frame
|
||||
if ( !strcmp( token, "*MESH" ) ) {
|
||||
if ( strEqual( token, "*MESH" ) ) {
|
||||
VERBOSE( ( "...found MESH\n" ) );
|
||||
assert( pMesh->faces == 0 );
|
||||
assert( pMesh->vertexes == 0 );
|
||||
|
|
@ -684,7 +684,7 @@ static void ASE_KeyMESH_ANIMATION( const char *token ){
|
|||
}
|
||||
|
||||
static void ASE_KeyGEOMOBJECT( const char *token ){
|
||||
if ( !strcmp( token, "*NODE_NAME" ) ) {
|
||||
if ( strEqual( token, "*NODE_NAME" ) ) {
|
||||
char *name = ase.objects[ase.currentObject].name;
|
||||
|
||||
ASE_GetToken( true );
|
||||
|
|
@ -705,16 +705,16 @@ static void ASE_KeyGEOMOBJECT( const char *token ){
|
|||
}
|
||||
}
|
||||
}
|
||||
else if ( !strcmp( token, "*NODE_PARENT" ) ) {
|
||||
else if ( strEqual( token, "*NODE_PARENT" ) ) {
|
||||
ASE_SkipRestOfLine();
|
||||
}
|
||||
// ignore unused data blocks
|
||||
else if ( !strcmp( token, "*NODE_TM" ) ||
|
||||
!strcmp( token, "*TM_ANIMATION" ) ) {
|
||||
else if ( strEqual( token, "*NODE_TM" ) ||
|
||||
strEqual( token, "*TM_ANIMATION" ) ) {
|
||||
ASE_ParseBracedBlock( 0 );
|
||||
}
|
||||
// ignore regular meshes that aren't part of animation
|
||||
else if ( !strcmp( token, "*MESH" ) && !ase.grabAnims ) {
|
||||
else if ( strEqual( token, "*MESH" ) && !ase.grabAnims ) {
|
||||
/*
|
||||
if ( strstr( ase.objects[ase.currentObject].name, "tag_" ) == ase.objects[ase.currentObject].name )
|
||||
{
|
||||
|
|
@ -739,13 +739,13 @@ static void ASE_KeyGEOMOBJECT( const char *token ){
|
|||
*/
|
||||
}
|
||||
// according to spec these are obsolete
|
||||
else if ( !strcmp( token, "*MATERIAL_REF" ) ) {
|
||||
else if ( strEqual( token, "*MATERIAL_REF" ) ) {
|
||||
ASE_GetToken( false );
|
||||
|
||||
ase.objects[ase.currentObject].materialRef = atoi( s_token );
|
||||
}
|
||||
// loads a sequence of animation frames
|
||||
else if ( !strcmp( token, "*MESH_ANIMATION" ) ) {
|
||||
else if ( strEqual( token, "*MESH_ANIMATION" ) ) {
|
||||
if ( ase.grabAnims ) {
|
||||
VERBOSE( ( "..found MESH_ANIMATION\n" ) );
|
||||
|
||||
|
|
@ -762,9 +762,9 @@ static void ASE_KeyGEOMOBJECT( const char *token ){
|
|||
}
|
||||
}
|
||||
// skip unused info
|
||||
else if ( !strcmp( token, "*PROP_MOTIONBLUR" ) ||
|
||||
!strcmp( token, "*PROP_CASTSHADOW" ) ||
|
||||
!strcmp( token, "*PROP_RECVSHADOW" ) ) {
|
||||
else if ( strEqual( token, "*PROP_MOTIONBLUR" ) ||
|
||||
strEqual( token, "*PROP_CASTSHADOW" ) ||
|
||||
strEqual( token, "*PROP_RECVSHADOW" ) ) {
|
||||
ASE_SkipRestOfLine();
|
||||
}
|
||||
}
|
||||
|
|
@ -809,19 +809,19 @@ static void CollapseObjects( void ){
|
|||
static void ASE_Process( void ){
|
||||
while ( ASE_GetToken( false ) )
|
||||
{
|
||||
if ( !strcmp( s_token, "*3DSMAX_ASCIIEXPORT" ) ||
|
||||
!strcmp( s_token, "*COMMENT" ) ) {
|
||||
if ( strEqual( s_token, "*3DSMAX_ASCIIEXPORT" ) ||
|
||||
strEqual( s_token, "*COMMENT" ) ) {
|
||||
ASE_SkipRestOfLine();
|
||||
}
|
||||
else if ( !strcmp( s_token, "*SCENE" ) ) {
|
||||
else if ( strEqual( s_token, "*SCENE" ) ) {
|
||||
ASE_SkipEnclosingBraces();
|
||||
}
|
||||
else if ( !strcmp( s_token, "*MATERIAL_LIST" ) ) {
|
||||
else if ( strEqual( s_token, "*MATERIAL_LIST" ) ) {
|
||||
VERBOSE( ( "MATERIAL_LIST\n" ) );
|
||||
|
||||
ASE_ParseBracedBlock( ASE_KeyMATERIAL_LIST );
|
||||
}
|
||||
else if ( !strcmp( s_token, "*GEOMOBJECT" ) ) {
|
||||
else if ( strEqual( s_token, "*GEOMOBJECT" ) ) {
|
||||
VERBOSE( ( "GEOMOBJECT" ) );
|
||||
|
||||
ASE_ParseBracedBlock( ASE_KeyGEOMOBJECT );
|
||||
|
|
|
|||
|
|
@ -528,7 +528,7 @@ bool ParseEntity( void ) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if ( strcmp( token, "{" ) ) {
|
||||
if ( !strEqual( token, "{" ) ) {
|
||||
Error( "ParseEntity: { not found" );
|
||||
}
|
||||
if ( num_entities == MAX_MAP_ENTITIES ) {
|
||||
|
|
@ -541,7 +541,7 @@ bool ParseEntity( void ) {
|
|||
if ( !GetToken( true ) ) {
|
||||
Error( "ParseEntity: EOF without closing brace" );
|
||||
}
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
break;
|
||||
}
|
||||
e = ParseEpair();
|
||||
|
|
@ -631,7 +631,7 @@ void SetKeyValue( entity_t *ent, const char *key, const char *value ) {
|
|||
epair_t *ep;
|
||||
|
||||
for ( ep = ent->epairs ; ep ; ep = ep->next ) {
|
||||
if ( !strcmp( ep->key, key ) ) {
|
||||
if ( strEqual( ep->key, key ) ) {
|
||||
free( ep->value );
|
||||
ep->value = copystring( value );
|
||||
return;
|
||||
|
|
@ -648,7 +648,7 @@ const char *ValueForKey( const entity_t *ent, const char *key ) {
|
|||
epair_t *ep;
|
||||
|
||||
for ( ep = ent->epairs ; ep ; ep = ep->next ) {
|
||||
if ( !strcmp( ep->key, key ) ) {
|
||||
if ( strEqual( ep->key, key ) ) {
|
||||
return ep->value;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ bool EndOfScript( bool crossline ){
|
|||
Error( "Line %i is incomplete\nFile location be: %s\n", scriptline, g_strLoadedFileLocation );
|
||||
}
|
||||
|
||||
if ( !strcmp( script->filename, "memory buffer" ) ) {
|
||||
if ( strEqual( script->filename, "memory buffer" ) ) {
|
||||
endofscript = true;
|
||||
return false;
|
||||
}
|
||||
|
|
@ -313,7 +313,7 @@ skipspace:
|
|||
|
||||
*token_p = 0;
|
||||
|
||||
if ( !strcmp( token, "$include" ) ) {
|
||||
if ( strEqual( token, "$include" ) ) {
|
||||
GetToken( false );
|
||||
AddScriptToStack( token, 0 );
|
||||
return GetToken( crossline );
|
||||
|
|
@ -359,7 +359,7 @@ bool TokenAvailable( void ) {
|
|||
void MatchToken( char *match ) {
|
||||
GetToken( true );
|
||||
|
||||
if ( strcmp( token, match ) ) {
|
||||
if ( !strEqual( token, match ) ) {
|
||||
Error( "MatchToken( \"%s\" ) failed at line %i in file %s", match, scriptline, script->filename );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ int vfsGetFileCount( const char *filename ){
|
|||
{
|
||||
VFS_PAKFILE* file = (VFS_PAKFILE*)lst->data;
|
||||
|
||||
if ( strcmp( file->name, fixed ) == 0 ) {
|
||||
if ( strEqual( file->name, fixed ) ) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
|
@ -363,7 +363,7 @@ int vfsLoadFile( const char *filename, void **bufferptr, int index ){
|
|||
{
|
||||
VFS_PAKFILE* file = (VFS_PAKFILE*)lst->data;
|
||||
|
||||
if ( strcmp( file->name, fixed ) != 0 ) {
|
||||
if ( !strEqual( file->name, fixed ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -450,7 +450,7 @@ bool vfsPackFile( const char *filename, const char *packname, const int compLeve
|
|||
{
|
||||
VFS_PAKFILE* file = (VFS_PAKFILE*)lst->data;
|
||||
|
||||
if ( strcmp( file->name, fixed ) != 0 ) {
|
||||
if ( !strEqual( file->name, fixed ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ static inline void res2list( StrList* list, const char* res ){
|
|||
}
|
||||
|
||||
static inline void parseEXblock( StrList* list, const char *exName ){
|
||||
if ( !GetToken( true ) || strcmp( token, "{" ) ) {
|
||||
if ( !GetToken( true ) || !strEqual( token, "{" ) ) {
|
||||
Error( "ReadExclusionsFile: %s, line %d: { not found", exName, scriptline );
|
||||
}
|
||||
while ( 1 )
|
||||
|
|
@ -122,10 +122,10 @@ static inline void parseEXblock( StrList* list, const char *exName ){
|
|||
if ( !GetToken( true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "{" ) ) {
|
||||
if ( strEqual( token, "{" ) ) {
|
||||
Error( "ReadExclusionsFile: %s, line %d: brace, opening twice in a row.", exName, scriptline );
|
||||
}
|
||||
|
||||
|
|
@ -252,13 +252,13 @@ int pk3BSPMain( int argc, char **argv ){
|
|||
|
||||
/* process arguments */
|
||||
for ( i = 1; i < ( argc - 1 ); ++i ){
|
||||
if ( !strcmp( argv[ i ], "-dbg" ) ) {
|
||||
if ( strEqual( argv[ i ], "-dbg" ) ) {
|
||||
dbg = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-png" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-png" ) ) {
|
||||
png = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-complevel" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-complevel" ) ) {
|
||||
compLevel = atoi( argv[ i + 1 ] );
|
||||
i++;
|
||||
if ( compLevel < -1 ) compLevel = -1;
|
||||
|
|
@ -463,7 +463,7 @@ int pk3BSPMain( int argc, char **argv ){
|
|||
if ( !GetToken( true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( strcmp( token, "{" ) ) {
|
||||
if ( !strEqual( token, "{" ) ) {
|
||||
Error( "ParseShaderFile: %s, line %d: { not found!\nFound instead: %s\nFile location be: %s",
|
||||
scriptFile, scriptline, token, g_strLoadedFileLocation );
|
||||
}
|
||||
|
|
@ -474,17 +474,17 @@ int pk3BSPMain( int argc, char **argv ){
|
|||
if ( !GetToken( true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
break;
|
||||
}
|
||||
/* parse stage directives */
|
||||
if ( !strcmp( token, "{" ) ) {
|
||||
if ( strEqual( token, "{" ) ) {
|
||||
while ( 1 )
|
||||
{
|
||||
if ( !GetToken( true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -514,7 +514,7 @@ int pk3BSPMain( int argc, char **argv ){
|
|||
if ( !GetToken( true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( strcmp( token, "{" ) ) {
|
||||
if ( !strEqual( token, "{" ) ) {
|
||||
Error( "ParseShaderFile: %s, line %d: { not found!\nFound instead: %s\nFile location be: %s",
|
||||
scriptFile, scriptline, token, g_strLoadedFileLocation );
|
||||
}
|
||||
|
|
@ -526,7 +526,7 @@ int pk3BSPMain( int argc, char **argv ){
|
|||
if ( !GetToken( true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -536,16 +536,16 @@ int pk3BSPMain( int argc, char **argv ){
|
|||
----------------------------------------------------------------- */
|
||||
|
||||
/* parse stage directives */
|
||||
if ( !strcmp( token, "{" ) ) {
|
||||
if ( strEqual( token, "{" ) ) {
|
||||
while ( 1 )
|
||||
{
|
||||
if ( !GetToken( true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "{" ) ) {
|
||||
if ( strEqual( token, "{" ) ) {
|
||||
Sys_FPrintf( SYS_WRN, "WARNING9: %s : line %d : opening brace inside shader stage\n", scriptFile, scriptline );
|
||||
}
|
||||
if ( !Q_stricmp( token, "mapComp" ) || !Q_stricmp( token, "mapNoComp" ) || !Q_stricmp( token, "animmapcomp" ) || !Q_stricmp( token, "animmapnocomp" ) ){
|
||||
|
|
@ -812,13 +812,13 @@ int repackBSPMain( int argc, char **argv ){
|
|||
|
||||
/* process arguments */
|
||||
for ( i = 1; i < ( argc - 1 ); ++i ){
|
||||
if ( !strcmp( argv[ i ], "-dbg" ) ) {
|
||||
if ( strEqual( argv[ i ], "-dbg" ) ) {
|
||||
dbg = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-png" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-png" ) ) {
|
||||
png = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-complevel" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-complevel" ) ) {
|
||||
compLevel = atoi( argv[ i + 1 ] );
|
||||
i++;
|
||||
if ( compLevel < -1 ) compLevel = -1;
|
||||
|
|
@ -1232,7 +1232,7 @@ int repackBSPMain( int argc, char **argv ){
|
|||
if ( !GetToken( true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( strcmp( token, "{" ) ) {
|
||||
if ( !strEqual( token, "{" ) ) {
|
||||
Error( "ParseShaderFile: %s, line %d: { not found!\nFound instead: %s\nFile location be: %s",
|
||||
scriptFile, scriptline, token, g_strLoadedFileLocation );
|
||||
}
|
||||
|
|
@ -1246,12 +1246,12 @@ int repackBSPMain( int argc, char **argv ){
|
|||
if ( !GetToken( true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
StrBuf_cat( shaderText, "\n}\n\n" );
|
||||
break;
|
||||
}
|
||||
/* parse stage directives */
|
||||
if ( !strcmp( token, "{" ) ) {
|
||||
if ( strEqual( token, "{" ) ) {
|
||||
bool tokenready = false;
|
||||
StrBuf_cat( shaderText, "\n\t{" );
|
||||
while ( 1 )
|
||||
|
|
@ -1264,11 +1264,11 @@ int repackBSPMain( int argc, char **argv ){
|
|||
if ( !GetToken( true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
StrBuf_cat( shaderText, "\n\t}" );
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "{" ) ) {
|
||||
if ( strEqual( token, "{" ) ) {
|
||||
StrBuf_cat( shaderText, "\n\t{" );
|
||||
Sys_FPrintf( SYS_WRN, "WARNING9: %s : line %d : opening brace inside shader stage\n", scriptFile, scriptline );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,7 +239,7 @@ static void SetCloneModelNumbers( void ){
|
|||
}
|
||||
|
||||
/* do they match? */
|
||||
if ( strcmp( value, value2 ) == 0 ) {
|
||||
if ( strEqual( value, value2 ) ) {
|
||||
/* get the model num */
|
||||
value3 = ValueForKey( &entities[ j ], "model" );
|
||||
if ( value3[ 0 ] == '\0' ) {
|
||||
|
|
@ -300,7 +300,7 @@ static void FixBrushSides( entity_t *e ){
|
|||
//% Sys_FPrintf( SYS_VRB, "DS: %7d Side: %7d ", ds->outputNum, sideRef->side->outputNum );
|
||||
|
||||
/* set shader */
|
||||
if ( strcmp( bspShaders[ side->shaderNum ].shader, ds->shaderInfo->shader ) ) {
|
||||
if ( !strEqual( bspShaders[ side->shaderNum ].shader, ds->shaderInfo->shader ) ) {
|
||||
//% Sys_FPrintf( SYS_VRB, "Remapping %s to %s\n", bspShaders[ side->shaderNum ].shader, ds->shaderInfo->shader );
|
||||
side->shaderNum = EmitShader( ds->shaderInfo->shader, &ds->shaderInfo->contentFlags, &ds->shaderInfo->surfaceFlags );
|
||||
}
|
||||
|
|
@ -500,7 +500,7 @@ void ProcessWorldModel( void ){
|
|||
/* get light */
|
||||
light = &entities[ i ];
|
||||
value = ValueForKey( light, "classname" );
|
||||
if ( !strcmp( value, "light" ) ) {
|
||||
if ( strEqual( value, "light" ) ) {
|
||||
/* get flare shader */
|
||||
flareShader = ValueForKey( light, "_flareshader" );
|
||||
value = ValueForKey( light, "_flare" );
|
||||
|
|
@ -756,7 +756,7 @@ int BSPMain( int argc, char **argv ){
|
|||
char path[ 1024 ], tempSource[ 1024 ];
|
||||
bool onlyents = false;
|
||||
|
||||
if ( argc >= 2 && !strcmp( argv[ 1 ], "-bsp" ) ) {
|
||||
if ( argc >= 2 && strEqual( argv[ 1 ], "-bsp" ) ) {
|
||||
Sys_Printf( "-bsp argument unnecessary\n" );
|
||||
argv++;
|
||||
argc--;
|
||||
|
|
@ -783,61 +783,61 @@ int BSPMain( int argc, char **argv ){
|
|||
/* process arguments */
|
||||
for ( i = 1; i < ( argc - 1 ); i++ )
|
||||
{
|
||||
if ( !strcmp( argv[ i ], "-onlyents" ) ) {
|
||||
if ( strEqual( argv[ i ], "-onlyents" ) ) {
|
||||
Sys_Printf( "Running entity-only compile\n" );
|
||||
onlyents = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-tempname" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-tempname" ) ) {
|
||||
strcpy( tempSource, argv[ ++i ] );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-tmpout" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-tmpout" ) ) {
|
||||
strcpy( outbase, "/tmp" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nowater" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nowater" ) ) {
|
||||
Sys_Printf( "Disabling water\n" );
|
||||
nowater = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-keeplights" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-keeplights" ) ) {
|
||||
keepLights = true;
|
||||
Sys_Printf( "Leaving light entities on map after compile\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nodetail" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nodetail" ) ) {
|
||||
Sys_Printf( "Ignoring detail brushes\n" ) ;
|
||||
nodetail = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-fulldetail" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-fulldetail" ) ) {
|
||||
Sys_Printf( "Turning detail brushes into structural brushes\n" );
|
||||
fulldetail = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nofog" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nofog" ) ) {
|
||||
Sys_Printf( "Fog volumes disabled\n" );
|
||||
nofog = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nosubdivide" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nosubdivide" ) ) {
|
||||
Sys_Printf( "Disabling brush face subdivision\n" );
|
||||
nosubdivide = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-leaktest" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-leaktest" ) ) {
|
||||
Sys_Printf( "Leaktest enabled\n" );
|
||||
leaktest = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-verboseentities" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-verboseentities" ) ) {
|
||||
Sys_Printf( "Verbose entities enabled\n" );
|
||||
verboseEntities = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nocurves" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nocurves" ) ) {
|
||||
Sys_Printf( "Ignoring curved surfaces (patches)\n" );
|
||||
noCurveBrushes = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-notjunc" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-notjunc" ) ) {
|
||||
Sys_Printf( "T-junction fixing disabled\n" );
|
||||
notjunc = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-fakemap" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-fakemap" ) ) {
|
||||
Sys_Printf( "Generating fakemap.map\n" );
|
||||
fakemap = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-samplesize" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-samplesize" ) ) {
|
||||
sampleSize = atoi( argv[ i + 1 ] );
|
||||
if ( sampleSize < 1 ) {
|
||||
sampleSize = 1;
|
||||
|
|
@ -845,7 +845,7 @@ int BSPMain( int argc, char **argv ){
|
|||
i++;
|
||||
Sys_Printf( "Lightmap sample size set to %dx%d units\n", sampleSize, sampleSize );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-minsamplesize" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-minsamplesize" ) ) {
|
||||
minSampleSize = atoi( argv[ i + 1 ] );
|
||||
if ( minSampleSize < 1 ) {
|
||||
minSampleSize = 1;
|
||||
|
|
@ -853,29 +853,29 @@ int BSPMain( int argc, char **argv ){
|
|||
i++;
|
||||
Sys_Printf( "Minimum lightmap sample size set to %dx%d units\n", minSampleSize, minSampleSize );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-custinfoparms" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-custinfoparms" ) ) {
|
||||
Sys_Printf( "Custom info parms enabled\n" );
|
||||
useCustomInfoParms = true;
|
||||
}
|
||||
|
||||
/* sof2 args */
|
||||
else if ( !strcmp( argv[ i ], "-rename" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-rename" ) ) {
|
||||
Sys_Printf( "Appending _bsp suffix to misc_model shaders (SOF2)\n" );
|
||||
renameModelShaders = true;
|
||||
}
|
||||
|
||||
/* ydnar args */
|
||||
else if ( !strcmp( argv[ i ], "-ne" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-ne" ) ) {
|
||||
normalEpsilon = atof( argv[ i + 1 ] );
|
||||
i++;
|
||||
Sys_Printf( "Normal epsilon set to %f\n", normalEpsilon );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-de" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-de" ) ) {
|
||||
distanceEpsilon = atof( argv[ i + 1 ] );
|
||||
i++;
|
||||
Sys_Printf( "Distance epsilon set to %f\n", distanceEpsilon );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-mv" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-mv" ) ) {
|
||||
maxLMSurfaceVerts = atoi( argv[ i + 1 ] );
|
||||
if ( maxLMSurfaceVerts < 3 ) {
|
||||
maxLMSurfaceVerts = 3;
|
||||
|
|
@ -886,7 +886,7 @@ int BSPMain( int argc, char **argv ){
|
|||
i++;
|
||||
Sys_Printf( "Maximum lightmapped surface vertex count set to %d\n", maxLMSurfaceVerts );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-mi" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-mi" ) ) {
|
||||
maxSurfaceIndexes = atoi( argv[ i + 1 ] );
|
||||
if ( maxSurfaceIndexes < 3 ) {
|
||||
maxSurfaceIndexes = 3;
|
||||
|
|
@ -894,7 +894,7 @@ int BSPMain( int argc, char **argv ){
|
|||
i++;
|
||||
Sys_Printf( "Maximum per-surface index count set to %d\n", maxSurfaceIndexes );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-np" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-np" ) ) {
|
||||
npDegrees = atof( argv[ i + 1 ] );
|
||||
if ( npDegrees < 0.0f ) {
|
||||
npDegrees = 0.0f;
|
||||
|
|
@ -904,7 +904,7 @@ int BSPMain( int argc, char **argv ){
|
|||
}
|
||||
i++;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-snap" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-snap" ) ) {
|
||||
bevelSnap = atoi( argv[ i + 1 ] );
|
||||
if ( bevelSnap < 0 ) {
|
||||
bevelSnap = 0;
|
||||
|
|
@ -914,7 +914,7 @@ int BSPMain( int argc, char **argv ){
|
|||
Sys_Printf( "Snapping brush bevel planes to %d units\n", bevelSnap );
|
||||
}
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-texrange" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-texrange" ) ) {
|
||||
texRange = atoi( argv[ i + 1 ] );
|
||||
if ( texRange < 0 ) {
|
||||
texRange = 0;
|
||||
|
|
@ -922,15 +922,15 @@ int BSPMain( int argc, char **argv ){
|
|||
i++;
|
||||
Sys_Printf( "Limiting per-surface texture range to %d texels\n", texRange );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nohint" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nohint" ) ) {
|
||||
Sys_Printf( "Hint brushes disabled\n" );
|
||||
noHint = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-flat" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-flat" ) ) {
|
||||
Sys_Printf( "Flatshading enabled\n" );
|
||||
flat = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-celshader" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-celshader" ) ) {
|
||||
++i;
|
||||
if ( argv[i][0] ) {
|
||||
sprintf( globalCelShader, "textures/%s", argv[ i ] );
|
||||
|
|
@ -940,11 +940,11 @@ int BSPMain( int argc, char **argv ){
|
|||
}
|
||||
Sys_Printf( "Global cel shader set to \"%s\"\n", globalCelShader );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-meta" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-meta" ) ) {
|
||||
Sys_Printf( "Creating meta surfaces from brush faces\n" );
|
||||
meta = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-metaadequatescore" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-metaadequatescore" ) ) {
|
||||
metaAdequateScore = atoi( argv[ i + 1 ] );
|
||||
if ( metaAdequateScore < 0 ) {
|
||||
metaAdequateScore = -1;
|
||||
|
|
@ -954,7 +954,7 @@ int BSPMain( int argc, char **argv ){
|
|||
Sys_Printf( "Setting ADEQUATE meta score to %d (see surface_meta.c)\n", metaAdequateScore );
|
||||
}
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-metagoodscore" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-metagoodscore" ) ) {
|
||||
metaGoodScore = atoi( argv[ i + 1 ] );
|
||||
if ( metaGoodScore < 0 ) {
|
||||
metaGoodScore = -1;
|
||||
|
|
@ -964,7 +964,7 @@ int BSPMain( int argc, char **argv ){
|
|||
Sys_Printf( "Setting GOOD meta score to %d (see surface_meta.c)\n", metaGoodScore );
|
||||
}
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-metamaxbboxdistance" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-metamaxbboxdistance" ) ) {
|
||||
metaMaxBBoxDistance = atof( argv[ i + 1 ] );
|
||||
if ( metaMaxBBoxDistance < 0 ) {
|
||||
metaMaxBBoxDistance = -1;
|
||||
|
|
@ -974,82 +974,82 @@ int BSPMain( int argc, char **argv ){
|
|||
Sys_Printf( "Setting meta maximum bounding box distance to %f\n", metaMaxBBoxDistance );
|
||||
}
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-patchmeta" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-patchmeta" ) ) {
|
||||
Sys_Printf( "Creating meta surfaces from patches\n" );
|
||||
patchMeta = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-flares" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-flares" ) ) {
|
||||
Sys_Printf( "Flare surfaces enabled\n" );
|
||||
emitFlares = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-noflares" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-noflares" ) ) {
|
||||
Sys_Printf( "Flare surfaces disabled\n" );
|
||||
emitFlares = false;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-skyfix" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-skyfix" ) ) {
|
||||
Sys_Printf( "GL_CLAMP sky fix/hack/workaround enabled\n" );
|
||||
skyFixHack = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-debugsurfaces" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-debugsurfaces" ) ) {
|
||||
Sys_Printf( "emitting debug surfaces\n" );
|
||||
debugSurfaces = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-debuginset" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-debuginset" ) ) {
|
||||
Sys_Printf( "Debug surface triangle insetting enabled\n" );
|
||||
debugInset = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-debugportals" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-debugportals" ) ) {
|
||||
Sys_Printf( "Debug portal surfaces enabled\n" );
|
||||
debugPortals = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-debugclip" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-debugclip" ) ) {
|
||||
Sys_Printf( "Debug model clip enabled\n" );
|
||||
debugClip = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-clipdepth" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-clipdepth" ) ) {
|
||||
clipDepthGlobal = atof( argv[ i + 1 ] );
|
||||
i++;
|
||||
Sys_Printf( "Model autoclip thickness set to %.3f\n", clipDepthGlobal );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-sRGBtex" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-sRGBtex" ) ) {
|
||||
texturesRGB = true;
|
||||
Sys_Printf( "Textures are in sRGB\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nosRGBtex" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nosRGBtex" ) ) {
|
||||
texturesRGB = false;
|
||||
Sys_Printf( "Textures are linear\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-sRGBcolor" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-sRGBcolor" ) ) {
|
||||
colorsRGB = true;
|
||||
Sys_Printf( "Colors are in sRGB\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nosRGBcolor" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nosRGBcolor" ) ) {
|
||||
colorsRGB = false;
|
||||
Sys_Printf( "Colors are linear\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nosRGB" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nosRGB" ) ) {
|
||||
texturesRGB = false;
|
||||
Sys_Printf( "Textures are linear\n" );
|
||||
colorsRGB = false;
|
||||
Sys_Printf( "Colors are linear\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-altsplit" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-altsplit" ) ) {
|
||||
Sys_Printf( "Alternate BSP splitting (by 27) enabled\n" );
|
||||
bspAlternateSplitWeights = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-deep" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-deep" ) ) {
|
||||
Sys_Printf( "Deep BSP tree generation enabled\n" );
|
||||
deepBSP = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-maxarea" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-maxarea" ) ) {
|
||||
Sys_Printf( "Max Area face surface generation enabled\n" );
|
||||
maxAreaFaceSurface = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-noob" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-noob" ) ) {
|
||||
Sys_Printf( "No oBs!\n" );
|
||||
noob = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-autocaulk" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-autocaulk" ) ) {
|
||||
Sys_Printf( "\trunning in autocaulk mode\n" );
|
||||
g_autocaulk = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -558,7 +558,7 @@ bool ParseEntity( void ){
|
|||
if ( !GetToken( true ) ) {
|
||||
return false;
|
||||
}
|
||||
if ( strcmp( token, "{" ) ) {
|
||||
if ( !strEqual( token, "{" ) ) {
|
||||
Error( "ParseEntity: { not found" );
|
||||
}
|
||||
AUTOEXPAND_BY_REALLOC( entities, numEntities, allocatedEntities, 32 );
|
||||
|
|
@ -887,7 +887,7 @@ entity_t *FindTargetEntity( const char *target ){
|
|||
for ( i = 0; i < numEntities; i++ )
|
||||
{
|
||||
n = ValueForKey( &entities[ i ], "targetname" );
|
||||
if ( !strcmp( n, target ) ) {
|
||||
if ( strEqual( n, target ) ) {
|
||||
return &entities[ i ];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -497,7 +497,7 @@ void LoadIBSPFile( const char *filename ){
|
|||
CopyLightGridLumps( header );
|
||||
|
||||
/* advertisements */
|
||||
if ( header->version == 47 && !strcmp( game->arg, "quakelive" ) ) { // quake live's bsp version minus wolf, et, etut
|
||||
if ( header->version == 47 && strEqual( game->arg, "quakelive" ) ) { // quake live's bsp version minus wolf, et, etut
|
||||
numBSPAds = CopyLump( (bspHeader_t*) header, LUMP_ADVERTISEMENTS, bspAds, sizeof( bspAdvertisement_t ) );
|
||||
}
|
||||
else{
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ int AnalyzeBSP( int argc, char **argv ){
|
|||
for ( i = 1; i < ( argc - 1 ); i++ )
|
||||
{
|
||||
/* -format map|ase|... */
|
||||
if ( !strcmp( argv[ i ], "-lumpswap" ) ) {
|
||||
if ( strEqual( argv[ i ], "-lumpswap" ) ) {
|
||||
Sys_Printf( "Swapped lump structs enabled\n" );
|
||||
lumpSwap = true;
|
||||
}
|
||||
|
|
@ -413,10 +413,10 @@ int ScaleBSPMain( int argc, char **argv ){
|
|||
texscale = false;
|
||||
for ( i = 1; i < argc - 2; ++i )
|
||||
{
|
||||
if ( !strcmp( argv[i], "-tex" ) ) {
|
||||
if ( strEqual( argv[i], "-tex" ) ) {
|
||||
texscale = true;
|
||||
}
|
||||
else if ( !strcmp( argv[i], "-spawn_ref" ) ) {
|
||||
else if ( strEqual( argv[i], "-spawn_ref" ) ) {
|
||||
spawn_ref = atof( argv[i + 1] );
|
||||
++i;
|
||||
}
|
||||
|
|
@ -661,9 +661,9 @@ int ShiftBSPMain( int argc, char **argv ){
|
|||
|
||||
for ( i = 1; i < argc - 2; ++i )
|
||||
{
|
||||
if ( !strcmp( argv[i], "-tex" ) ) {
|
||||
if ( strEqual( argv[i], "-tex" ) ) {
|
||||
}
|
||||
else if ( !strcmp( argv[i], "-spawn_ref" ) ) {
|
||||
else if ( strEqual( argv[i], "-spawn_ref" ) ) {
|
||||
spawn_ref = atof( argv[i + 1] );
|
||||
++i;
|
||||
}
|
||||
|
|
@ -930,7 +930,7 @@ int ConvertBSPMain( int argc, char **argv ){
|
|||
for ( i = 1; i < ( argc - 1 ); i++ )
|
||||
{
|
||||
/* -format map|ase|... */
|
||||
if ( !strcmp( argv[ i ], "-format" ) ) {
|
||||
if ( strEqual( argv[ i ], "-format" ) ) {
|
||||
i++;
|
||||
if ( !Q_stricmp( argv[ i ], "ase" ) ) {
|
||||
convertFunc = ConvertBSPToASE;
|
||||
|
|
@ -957,40 +957,40 @@ int ConvertBSPMain( int argc, char **argv ){
|
|||
}
|
||||
}
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-ne" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-ne" ) ) {
|
||||
normalEpsilon = atof( argv[ i + 1 ] );
|
||||
i++;
|
||||
Sys_Printf( "Normal epsilon set to %f\n", normalEpsilon );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-de" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-de" ) ) {
|
||||
distanceEpsilon = atof( argv[ i + 1 ] );
|
||||
i++;
|
||||
Sys_Printf( "Distance epsilon set to %f\n", distanceEpsilon );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-shaderasbitmap" ) || !strcmp( argv[ i ], "-shadersasbitmap" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-shaderasbitmap" ) || strEqual( argv[ i ], "-shadersasbitmap" ) ) {
|
||||
shadersAsBitmap = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-lightmapastexcoord" ) || !strcmp( argv[ i ], "-lightmapsastexcoord" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-lightmapastexcoord" ) || strEqual( argv[ i ], "-lightmapsastexcoord" ) ) {
|
||||
lightmapsAsTexcoord = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-deluxemapastexcoord" ) || !strcmp( argv[ i ], "-deluxemapsastexcoord" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-deluxemapastexcoord" ) || strEqual( argv[ i ], "-deluxemapsastexcoord" ) ) {
|
||||
lightmapsAsTexcoord = true;
|
||||
deluxemap = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-readbsp" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-readbsp" ) ) {
|
||||
force_bsp = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-readmap" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-readmap" ) ) {
|
||||
force_map = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-meta" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-meta" ) ) {
|
||||
meta = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-patchmeta" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-patchmeta" ) ) {
|
||||
meta = true;
|
||||
patchMeta = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-fast" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-fast" ) ) {
|
||||
fast = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ void GetBestSurfaceTriangleMatchForBrushside( side_t *buildSide, bspDrawVert_t *
|
|||
if ( s->surfaceType != MST_PLANAR && s->surfaceType != MST_TRIANGLE_SOUP ) {
|
||||
continue;
|
||||
}
|
||||
if ( strcmp( buildSide->shaderInfo->shader, bspShaders[s->shaderNum].shader ) ) {
|
||||
if ( !strEqual( buildSide->shaderInfo->shader, bspShaders[s->shaderNum].shader ) ) {
|
||||
continue;
|
||||
}
|
||||
for ( t = 0; t + 3 <= s->numIndexes; t += 3 )
|
||||
|
|
@ -714,8 +714,8 @@ static void ConvertBrush( FILE *f, int num, bspBrush_t *brush, vec3_t origin, bo
|
|||
{
|
||||
//vec3_t vecs[ 2 ];
|
||||
if ( strncmp( buildSide->shaderInfo->shader, "textures/common/", 16 ) ) {
|
||||
if ( strcmp( buildSide->shaderInfo->shader, "noshader" ) ) {
|
||||
if ( strcmp( buildSide->shaderInfo->shader, "default" ) ) {
|
||||
if ( !strEqual( buildSide->shaderInfo->shader, "noshader" ) ) {
|
||||
if ( !strEqual( buildSide->shaderInfo->shader, "default" ) ) {
|
||||
//fprintf( stderr, "no matching triangle for brushside using %s (hopefully nobody can see this side anyway)\n", buildSide->shaderInfo->shader );
|
||||
texture = "common/WTF";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ void Convert_ReferenceLightmaps( const char* base, int* lmIndices ){
|
|||
/* handle { } section */
|
||||
if ( !GetToken( true ) )
|
||||
break;
|
||||
if ( strcmp( token, "{" ) )
|
||||
if ( !strEqual( token, "{" ) )
|
||||
Error( "ParseShaderFile: %s, line %d: { not found!\nFound instead: %s\nFile location be: %s",
|
||||
shaderfile, scriptline, token, g_strLoadedFileLocation );
|
||||
while ( 1 )
|
||||
|
|
@ -254,17 +254,17 @@ void Convert_ReferenceLightmaps( const char* base, int* lmIndices ){
|
|||
/* get the next token */
|
||||
if ( !GetToken( true ) )
|
||||
break;
|
||||
if ( !strcmp( token, "}" ) )
|
||||
if ( strEqual( token, "}" ) )
|
||||
break;
|
||||
/* parse stage directives */
|
||||
if ( !strcmp( token, "{" ) ) {
|
||||
if ( strEqual( token, "{" ) ) {
|
||||
while ( 1 )
|
||||
{
|
||||
if ( !GetToken( true ) )
|
||||
break;
|
||||
if ( !strcmp( token, "}" ) )
|
||||
if ( strEqual( token, "}" ) )
|
||||
break;
|
||||
if ( !strcmp( token, "{" ) )
|
||||
if ( strEqual( token, "{" ) )
|
||||
Sys_FPrintf( SYS_WRN, "WARNING9: %s : line %d : opening brace inside shader stage\n", shaderfile, scriptline );
|
||||
|
||||
/* digest any images */
|
||||
|
|
@ -278,7 +278,7 @@ void Convert_ReferenceLightmaps( const char* base, int* lmIndices ){
|
|||
if( sscanf( token + strlen( token ) - ( strlen( EXTERNAL_LIGHTMAP ) + 1 ), "/" EXTERNAL_LIGHTMAP "%n", &lmindex, &okcount )
|
||||
&& okcount == ( strlen( EXTERNAL_LIGHTMAP ) + 1 ) ){
|
||||
for ( int i = 0; i < numBSPShaders; ++i ){ // find bspShaders[i]<->lmindex pair
|
||||
if( !strcmp( bspShaders[i].shader, shadername ) ){
|
||||
if( strEqual( bspShaders[i].shader, shadername ) ){
|
||||
lmIndices[i] = lmindex;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -452,7 +452,7 @@ void HelpMain(const char* arg)
|
|||
|
||||
unsigned i;
|
||||
for ( i = 0; i < sizeof(stages)/sizeof(struct HelpOption); i++ )
|
||||
if ( strcmp(arg, stages[i].name+1) == 0 )
|
||||
if ( strEqual(arg, stages[i].name+1) )
|
||||
{
|
||||
help_funcs[i]();
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ image_t *ImageFind( const char *name ){
|
|||
/* search list */
|
||||
for ( int i = 0; i < MAX_IMAGES; ++i )
|
||||
{
|
||||
if ( images[ i ].name != NULL && !strcmp( name, images[ i ].name ) ) {
|
||||
if ( images[ i ].name != NULL && strEqual( name, images[ i ].name ) ) {
|
||||
return &images[ i ];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2211,7 +2211,7 @@ int LightMain( int argc, char **argv ){
|
|||
for ( i = 1; i < ( argc - 1 ); i++ )
|
||||
{
|
||||
/* lightsource scaling */
|
||||
if ( !strcmp( argv[ i ], "-point" ) || !strcmp( argv[ i ], "-pointscale" ) ) {
|
||||
if ( strEqual( argv[ i ], "-point" ) || strEqual( argv[ i ], "-pointscale" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
pointScale *= f;
|
||||
spotScale *= f;
|
||||
|
|
@ -2220,42 +2220,42 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-spherical" ) || !strcmp( argv[ i ], "-sphericalscale" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-spherical" ) || strEqual( argv[ i ], "-sphericalscale" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
pointScale *= f;
|
||||
Sys_Printf( "Spherical point (entity) light scaled by %f to %f\n", f, pointScale );
|
||||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-spot" ) || !strcmp( argv[ i ], "-spotscale" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-spot" ) || strEqual( argv[ i ], "-spotscale" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
spotScale *= f;
|
||||
Sys_Printf( "Spot point (entity) light scaled by %f to %f\n", f, spotScale );
|
||||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-area" ) || !strcmp( argv[ i ], "-areascale" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-area" ) || strEqual( argv[ i ], "-areascale" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
areaScale *= f;
|
||||
Sys_Printf( "Area (shader) light scaled by %f to %f\n", f, areaScale );
|
||||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-sky" ) || !strcmp( argv[ i ], "-skyscale" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-sky" ) || strEqual( argv[ i ], "-skyscale" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
skyScale *= f;
|
||||
Sys_Printf( "Sky/sun light scaled by %f to %f\n", f, skyScale );
|
||||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-vertexscale" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-vertexscale" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
vertexglobalscale *= f;
|
||||
Sys_Printf( "Vertexlight scaled by %f to %f\n", f, vertexglobalscale );
|
||||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-backsplash" ) && i < ( argc - 3 ) ) {
|
||||
else if ( strEqual( argv[ i ], "-backsplash" ) && i < ( argc - 3 ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
g_backsplashFractionScale = f;
|
||||
Sys_Printf( "Area lights backsplash fraction scaled by %f\n", f, g_backsplashFractionScale );
|
||||
|
|
@ -2267,12 +2267,12 @@ int LightMain( int argc, char **argv ){
|
|||
i+=2;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-nolm" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nolm" ) ) {
|
||||
nolm = true;
|
||||
Sys_Printf( "No lightmaps yo\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-bouncecolorratio" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-bouncecolorratio" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
bounceColorRatio *= f;
|
||||
if ( bounceColorRatio > 1 ) {
|
||||
|
|
@ -2285,14 +2285,14 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-bouncescale" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-bouncescale" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
bounceScale *= f;
|
||||
Sys_Printf( "Bounce (radiosity) light scaled by %f to %f\n", f, bounceScale );
|
||||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-scale" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-scale" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
pointScale *= f;
|
||||
spotScale *= f;
|
||||
|
|
@ -2303,21 +2303,21 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-gridscale" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-gridscale" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
Sys_Printf( "Grid lightning scaled by %f\n", f );
|
||||
gridScale *= f;
|
||||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-gridambientscale" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-gridambientscale" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
Sys_Printf( "Grid ambient lightning scaled by %f\n", f );
|
||||
gridAmbientScale *= f;
|
||||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-griddirectionality" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-griddirectionality" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
if ( f > 1 ) {
|
||||
f = 1;
|
||||
|
|
@ -2330,7 +2330,7 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-gridambientdirectionality" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-gridambientdirectionality" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
if ( f < -1 ) {
|
||||
f = -1;
|
||||
|
|
@ -2343,44 +2343,44 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-gamma" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-gamma" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
lightmapGamma = f;
|
||||
Sys_Printf( "Lighting gamma set to %f\n", lightmapGamma );
|
||||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-sRGBlight" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-sRGBlight" ) ) {
|
||||
lightmapsRGB = true;
|
||||
Sys_Printf( "Lighting is in sRGB\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-nosRGBlight" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nosRGBlight" ) ) {
|
||||
lightmapsRGB = false;
|
||||
Sys_Printf( "Lighting is linear\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-sRGBtex" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-sRGBtex" ) ) {
|
||||
texturesRGB = true;
|
||||
Sys_Printf( "Textures are in sRGB\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-nosRGBtex" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nosRGBtex" ) ) {
|
||||
texturesRGB = false;
|
||||
Sys_Printf( "Textures are linear\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-sRGBcolor" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-sRGBcolor" ) ) {
|
||||
colorsRGB = true;
|
||||
Sys_Printf( "Colors are in sRGB\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-nosRGBcolor" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nosRGBcolor" ) ) {
|
||||
colorsRGB = false;
|
||||
Sys_Printf( "Colors are linear\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-sRGB" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-sRGB" ) ) {
|
||||
lightmapsRGB = true;
|
||||
Sys_Printf( "Lighting is in sRGB\n" );
|
||||
texturesRGB = true;
|
||||
|
|
@ -2389,7 +2389,7 @@ int LightMain( int argc, char **argv ){
|
|||
Sys_Printf( "Colors are in sRGB\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-nosRGB" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nosRGB" ) ) {
|
||||
lightmapsRGB = false;
|
||||
Sys_Printf( "Lighting is linear\n" );
|
||||
texturesRGB = false;
|
||||
|
|
@ -2398,14 +2398,14 @@ int LightMain( int argc, char **argv ){
|
|||
Sys_Printf( "Colors are linear\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-exposure" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-exposure" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
lightmapExposure = f;
|
||||
Sys_Printf( "Lighting exposure set to %f\n", lightmapExposure );
|
||||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-compensate" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-compensate" ) ) {
|
||||
f = atof( argv[ i + 1 ] );
|
||||
if ( f <= 0.0f ) {
|
||||
f = 1.0f;
|
||||
|
|
@ -2416,14 +2416,14 @@ int LightMain( int argc, char **argv ){
|
|||
}
|
||||
|
||||
/* Lightmaps brightness */
|
||||
else if( !strcmp( argv[ i ], "-brightness" ) ){
|
||||
else if( strEqual( argv[ i ], "-brightness" ) ){
|
||||
lightmapBrightness = atof( argv[ i + 1 ] );
|
||||
Sys_Printf( "Scaling lightmaps brightness by %f\n", lightmapBrightness );
|
||||
i++;
|
||||
}
|
||||
|
||||
/* Lighting contrast */
|
||||
else if( !strcmp( argv[ i ], "-contrast" ) ){
|
||||
else if( strEqual( argv[ i ], "-contrast" ) ){
|
||||
f = atof( argv[ i + 1 ] );
|
||||
lightmapContrast = f > 255? 255 : f < -255? -255 : f;
|
||||
Sys_Printf( "Lighting contrast set to %f\n", lightmapContrast );
|
||||
|
|
@ -2433,7 +2433,7 @@ int LightMain( int argc, char **argv ){
|
|||
}
|
||||
|
||||
/* ydnar switches */
|
||||
else if ( !strcmp( argv[ i ], "-bounce" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-bounce" ) ) {
|
||||
bounce = atoi( argv[ i + 1 ] );
|
||||
if ( bounce < 0 ) {
|
||||
bounce = 0;
|
||||
|
|
@ -2444,7 +2444,7 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-supersample" ) || !strcmp( argv[ i ], "-super" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-supersample" ) || strEqual( argv[ i ], "-super" ) ) {
|
||||
superSample = atoi( argv[ i + 1 ] );
|
||||
if ( superSample < 1 ) {
|
||||
superSample = 1;
|
||||
|
|
@ -2455,12 +2455,12 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-randomsamples" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-randomsamples" ) ) {
|
||||
lightRandomSamples = true;
|
||||
Sys_Printf( "Random sampling enabled\n", lightRandomSamples );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-samples" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-samples" ) ) {
|
||||
lightSamplesInsist = ( *argv[i + 1] == '+' );
|
||||
lightSamples = atoi( argv[ i + 1 ] );
|
||||
if ( lightSamples < 1 ) {
|
||||
|
|
@ -2472,7 +2472,7 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-samplessearchboxsize" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-samplessearchboxsize" ) ) {
|
||||
lightSamplesSearchBoxSize = atoi( argv[ i + 1 ] );
|
||||
// lightSamplesSearchBoxSize = MAX( MIN( lightSamplesSearchBoxSize, 4 ), 1 );
|
||||
lightSamplesSearchBoxSize = lightSamplesSearchBoxSize < 1 ? 1
|
||||
|
|
@ -2483,17 +2483,17 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-filter" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-filter" ) ) {
|
||||
filter = true;
|
||||
Sys_Printf( "Lightmap filtering enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-dark" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-dark" ) ) {
|
||||
dark = true;
|
||||
Sys_Printf( "Dark lightmap seams enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-shadeangle" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-shadeangle" ) ) {
|
||||
shadeAngleDegrees = atof( argv[ i + 1 ] );
|
||||
if ( shadeAngleDegrees < 0.0f ) {
|
||||
shadeAngleDegrees = 0.0f;
|
||||
|
|
@ -2505,7 +2505,7 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-thresh" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-thresh" ) ) {
|
||||
subdivideThreshold = atof( argv[ i + 1 ] );
|
||||
if ( subdivideThreshold < 0 ) {
|
||||
subdivideThreshold = DEFAULT_SUBDIVIDE_THRESHOLD;
|
||||
|
|
@ -2516,7 +2516,7 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-approx" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-approx" ) ) {
|
||||
approximateTolerance = atoi( argv[ i + 1 ] );
|
||||
if ( approximateTolerance < 0 ) {
|
||||
approximateTolerance = 0;
|
||||
|
|
@ -2526,11 +2526,11 @@ int LightMain( int argc, char **argv ){
|
|||
}
|
||||
i++;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-deluxe" ) || !strcmp( argv[ i ], "-deluxemap" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-deluxe" ) || strEqual( argv[ i ], "-deluxemap" ) ) {
|
||||
deluxemap = true;
|
||||
Sys_Printf( "Generating deluxemaps for average light direction\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-deluxemode" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-deluxemode" ) ) {
|
||||
deluxemode = atoi( argv[ i + 1 ] );
|
||||
if ( deluxemode == 0 || deluxemode > 1 || deluxemode < 0 ) {
|
||||
Sys_Printf( "Generating modelspace deluxemaps\n" );
|
||||
|
|
@ -2541,17 +2541,17 @@ int LightMain( int argc, char **argv ){
|
|||
}
|
||||
i++;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nodeluxe" ) || !strcmp( argv[ i ], "-nodeluxemap" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nodeluxe" ) || strEqual( argv[ i ], "-nodeluxemap" ) ) {
|
||||
deluxemap = false;
|
||||
Sys_Printf( "Disabling generating of deluxemaps for average light direction\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-external" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-external" ) ) {
|
||||
externalLightmaps = true;
|
||||
Sys_Printf( "Storing all lightmaps externally\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-lightmapsize" )
|
||||
|| !strcmp( argv[ i ], "-extlmhacksize" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-lightmapsize" )
|
||||
|| strEqual( argv[ i ], "-extlmhacksize" ) ) {
|
||||
lmCustomSize = atoi( argv[ i + 1 ] );
|
||||
|
||||
/* must be a power of 2 and greater than 2 */
|
||||
|
|
@ -2566,19 +2566,19 @@ int LightMain( int argc, char **argv ){
|
|||
if ( lmCustomSize != game->lightmapSize ) {
|
||||
/* -lightmapsize might just require -external for native external lms, but it has already been used in existing batches alone,
|
||||
so brand new switch here for external lms, referenced by shaders hack/behavior */
|
||||
externalLightmaps = strcmp( argv[ i - 1 ], "-extlmhacksize" );
|
||||
externalLightmaps = !strEqual( argv[ i - 1 ], "-extlmhacksize" );
|
||||
Sys_Printf( "Storing all lightmaps externally\n" );
|
||||
}
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-rawlightmapsizelimit" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-rawlightmapsizelimit" ) ) {
|
||||
lmLimitSize = atoi( argv[ i + 1 ] );
|
||||
|
||||
i++;
|
||||
Sys_Printf( "Raw lightmap size limit set to %d x %d pixels\n", lmLimitSize, lmLimitSize );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-lightmapdir" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-lightmapdir" ) ) {
|
||||
lmCustomDir = argv[i + 1];
|
||||
i++;
|
||||
Sys_Printf( "Lightmap directory set to %s\n", lmCustomDir );
|
||||
|
|
@ -2587,24 +2587,24 @@ int LightMain( int argc, char **argv ){
|
|||
}
|
||||
|
||||
/* ydnar: add this to suppress warnings */
|
||||
else if ( !strcmp( argv[ i ], "-custinfoparms" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-custinfoparms" ) ) {
|
||||
Sys_Printf( "Custom info parms enabled\n" );
|
||||
useCustomInfoParms = true;
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-wolf" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-wolf" ) ) {
|
||||
/* -game should already be set */
|
||||
wolfLight = true;
|
||||
Sys_Printf( "Enabling Wolf lighting model (linear default)\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-q3" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-q3" ) ) {
|
||||
/* -game should already be set */
|
||||
wolfLight = false;
|
||||
Sys_Printf( "Enabling Quake 3 lighting model (nonlinear default)\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-extradist" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-extradist" ) ) {
|
||||
extraDist = atof( argv[ i + 1 ] );
|
||||
if ( extraDist < 0 ) {
|
||||
extraDist = 0;
|
||||
|
|
@ -2613,68 +2613,68 @@ int LightMain( int argc, char **argv ){
|
|||
Sys_Printf( "Default extra radius set to %f units\n", extraDist );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-sunonly" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-sunonly" ) ) {
|
||||
sunOnly = true;
|
||||
Sys_Printf( "Only computing sunlight\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-bounceonly" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-bounceonly" ) ) {
|
||||
bounceOnly = true;
|
||||
Sys_Printf( "Storing bounced light (radiosity) only\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-nocollapse" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nocollapse" ) ) {
|
||||
noCollapse = true;
|
||||
Sys_Printf( "Identical lightmap collapsing disabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-nolightmapsearch" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nolightmapsearch" ) ) {
|
||||
lightmapSearchBlockSize = 1;
|
||||
Sys_Printf( "No lightmap searching - all lightmaps will be sequential\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-lightmapsearchpower" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-lightmapsearchpower" ) ) {
|
||||
lightmapMergeSize = ( game->lightmapSize << atoi( argv[i + 1] ) );
|
||||
++i;
|
||||
Sys_Printf( "Restricted lightmap searching enabled - optimize for lightmap merge power %d (size %d)\n", atoi( argv[i] ), lightmapMergeSize );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-lightmapsearchblocksize" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-lightmapsearchblocksize" ) ) {
|
||||
lightmapSearchBlockSize = atoi( argv[i + 1] );
|
||||
++i;
|
||||
Sys_Printf( "Restricted lightmap searching enabled - block size set to %d\n", lightmapSearchBlockSize );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-shade" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-shade" ) ) {
|
||||
shade = true;
|
||||
Sys_Printf( "Phong shading enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-bouncegrid" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-bouncegrid" ) ) {
|
||||
bouncegrid = true;
|
||||
if ( bounce > 0 ) {
|
||||
Sys_Printf( "Grid lighting with radiosity enabled\n" );
|
||||
}
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-smooth" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-smooth" ) ) {
|
||||
lightSamples = EXTRA_SCALE;
|
||||
Sys_Printf( "The -smooth argument is deprecated, use \"-samples 2\" instead\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-nofastpoint" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nofastpoint" ) ) {
|
||||
fastpoint = false;
|
||||
Sys_Printf( "Automatic fast mode for point lights disabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-fast" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-fast" ) ) {
|
||||
fast = true;
|
||||
fastgrid = true;
|
||||
fastbounce = true;
|
||||
Sys_Printf( "Fast mode enabled for all area lights\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-faster" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-faster" ) ) {
|
||||
faster = true;
|
||||
fast = true;
|
||||
fastgrid = true;
|
||||
|
|
@ -2682,105 +2682,105 @@ int LightMain( int argc, char **argv ){
|
|||
Sys_Printf( "Faster mode enabled\n" );
|
||||
}
|
||||
|
||||
// else if ( !strcmp( argv[ i ], "-fastallocate" ) ) {
|
||||
// else if ( strEqual( argv[ i ], "-fastallocate" ) ) {
|
||||
// fastAllocate = true;
|
||||
// Sys_Printf( "Fast allocation mode enabled\n" );
|
||||
// }
|
||||
else if ( !strcmp( argv[ i ], "-slowallocate" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-slowallocate" ) ) {
|
||||
fastAllocate = false;
|
||||
Sys_Printf( "Slow allocation mode enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-fastgrid" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-fastgrid" ) ) {
|
||||
fastgrid = true;
|
||||
Sys_Printf( "Fast grid lighting enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-fastbounce" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-fastbounce" ) ) {
|
||||
fastbounce = true;
|
||||
Sys_Printf( "Fast bounce mode enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-cheap" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-cheap" ) ) {
|
||||
cheap = true;
|
||||
cheapgrid = true;
|
||||
Sys_Printf( "Cheap mode enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-cheapgrid" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-cheapgrid" ) ) {
|
||||
cheapgrid = true;
|
||||
Sys_Printf( "Cheap grid mode enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-normalmap" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-normalmap" ) ) {
|
||||
normalmap = true;
|
||||
Sys_Printf( "Storing normal map instead of lightmap\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-trisoup" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-trisoup" ) ) {
|
||||
trisoup = true;
|
||||
Sys_Printf( "Converting brush faces to triangle soup\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-debug" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-debug" ) ) {
|
||||
debug = true;
|
||||
Sys_Printf( "Lightmap debugging enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-debugsurfaces" ) || !strcmp( argv[ i ], "-debugsurface" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-debugsurfaces" ) || strEqual( argv[ i ], "-debugsurface" ) ) {
|
||||
debugSurfaces = true;
|
||||
Sys_Printf( "Lightmap surface debugging enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-debugunused" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-debugunused" ) ) {
|
||||
debugUnused = true;
|
||||
Sys_Printf( "Unused luxel debugging enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-debugaxis" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-debugaxis" ) ) {
|
||||
debugAxis = true;
|
||||
Sys_Printf( "Lightmap axis debugging enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-debugcluster" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-debugcluster" ) ) {
|
||||
debugCluster = true;
|
||||
Sys_Printf( "Luxel cluster debugging enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-debugorigin" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-debugorigin" ) ) {
|
||||
debugOrigin = true;
|
||||
Sys_Printf( "Luxel origin debugging enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-debugdeluxe" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-debugdeluxe" ) ) {
|
||||
deluxemap = true;
|
||||
debugDeluxemap = true;
|
||||
Sys_Printf( "Deluxemap debugging enabled\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-export" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-export" ) ) {
|
||||
exportLightmaps = true;
|
||||
Sys_Printf( "Exporting lightmaps\n" );
|
||||
}
|
||||
|
||||
else if ( !strcmp( argv[ i ], "-notrace" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-notrace" ) ) {
|
||||
noTrace = true;
|
||||
Sys_Printf( "Shadow occlusion disabled\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-patchshadows" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-patchshadows" ) ) {
|
||||
patchShadows = true;
|
||||
Sys_Printf( "Patch shadow casting enabled\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-extra" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-extra" ) ) {
|
||||
superSample = EXTRA_SCALE; /* ydnar */
|
||||
Sys_Printf( "The -extra argument is deprecated, use \"-super 2\" instead\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-extrawide" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-extrawide" ) ) {
|
||||
superSample = EXTRAWIDE_SCALE; /* ydnar */
|
||||
filter = true; /* ydnar */
|
||||
Sys_Printf( "The -extrawide argument is deprecated, use \"-filter [-super 2]\" instead\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-samplesize" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-samplesize" ) ) {
|
||||
sampleSize = atoi( argv[ i + 1 ] );
|
||||
if ( sampleSize < 1 ) {
|
||||
sampleSize = 1;
|
||||
|
|
@ -2788,7 +2788,7 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
Sys_Printf( "Default lightmap sample size set to %dx%d units\n", sampleSize, sampleSize );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-minsamplesize" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-minsamplesize" ) ) {
|
||||
minSampleSize = atoi( argv[ i + 1 ] );
|
||||
if ( minSampleSize < 1 ) {
|
||||
minSampleSize = 1;
|
||||
|
|
@ -2796,16 +2796,16 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
Sys_Printf( "Minimum lightmap sample size set to %dx%d units\n", minSampleSize, minSampleSize );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-samplescale" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-samplescale" ) ) {
|
||||
sampleScale = atoi( argv[ i + 1 ] );
|
||||
i++;
|
||||
Sys_Printf( "Lightmaps sample scale set to %d\n", sampleScale );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-debugsamplesize" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-debugsamplesize" ) ) {
|
||||
debugSampleSize = 1;
|
||||
Sys_Printf( "debugging Lightmaps SampleSize\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-novertex" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-novertex" ) ) {
|
||||
noVertexLighting = 1;
|
||||
if ( ( atof( argv[ i + 1 ] ) != 0 ) && ( atof( argv[ i + 1 ] )) < 1 ) {
|
||||
noVertexLighting = ( atof( argv[ i + 1 ] ) );
|
||||
|
|
@ -2816,27 +2816,27 @@ int LightMain( int argc, char **argv ){
|
|||
Sys_Printf( "Disabling vertex lighting\n" );
|
||||
}
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nogrid" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nogrid" ) ) {
|
||||
noGridLighting = true;
|
||||
Sys_Printf( "Disabling grid lighting\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-border" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-border" ) ) {
|
||||
lightmapBorder = true;
|
||||
Sys_Printf( "Adding debug border to lightmaps\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nosurf" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nosurf" ) ) {
|
||||
noSurfaces = true;
|
||||
Sys_Printf( "Not tracing against surfaces\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-dump" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-dump" ) ) {
|
||||
dump = true;
|
||||
Sys_Printf( "Dumping radiosity lights into numbered prefabs\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-lomem" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-lomem" ) ) {
|
||||
loMem = true;
|
||||
Sys_Printf( "Enabling low-memory (potentially slower) lighting mode\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-lightanglehl" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-lightanglehl" ) ) {
|
||||
if ( ( atoi( argv[ i + 1 ] ) != 0 ) != lightAngleHL ) {
|
||||
lightAngleHL = ( atoi( argv[ i + 1 ] ) != 0 );
|
||||
if ( lightAngleHL ) {
|
||||
|
|
@ -2848,41 +2848,41 @@ int LightMain( int argc, char **argv ){
|
|||
i++;
|
||||
}
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nostyle" ) || !strcmp( argv[ i ], "-nostyles" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nostyle" ) || strEqual( argv[ i ], "-nostyles" ) ) {
|
||||
noStyles = true;
|
||||
Sys_Printf( "Disabling lightstyles\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-style" ) || !strcmp( argv[ i ], "-styles" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-style" ) || strEqual( argv[ i ], "-styles" ) ) {
|
||||
noStyles = false;
|
||||
Sys_Printf( "Enabling lightstyles\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-cpma" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-cpma" ) ) {
|
||||
cpmaHack = true;
|
||||
Sys_Printf( "Enabling Challenge Pro Mode Asstacular Vertex Lighting Mode (tm)\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-floodlight" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-floodlight" ) ) {
|
||||
floodlighty = true;
|
||||
Sys_Printf( "FloodLighting enabled\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-debugnormals" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-debugnormals" ) ) {
|
||||
debugnormals = true;
|
||||
Sys_Printf( "DebugNormals enabled\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-lowquality" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-lowquality" ) ) {
|
||||
floodlight_lowquality = true;
|
||||
Sys_Printf( "Low Quality FloodLighting enabled\n" );
|
||||
}
|
||||
|
||||
/* r7: dirtmapping */
|
||||
else if ( !strcmp( argv[ i ], "-dirty" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-dirty" ) ) {
|
||||
dirty = true;
|
||||
Sys_Printf( "Dirtmapping enabled\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-dirtdebug" ) || !strcmp( argv[ i ], "-debugdirt" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-dirtdebug" ) || strEqual( argv[ i ], "-debugdirt" ) ) {
|
||||
dirtDebug = true;
|
||||
Sys_Printf( "Dirtmap debugging enabled\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-dirtmode" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-dirtmode" ) ) {
|
||||
dirtMode = atoi( argv[ i + 1 ] );
|
||||
if ( dirtMode != 0 && dirtMode != 1 ) {
|
||||
dirtMode = 0;
|
||||
|
|
@ -2895,7 +2895,7 @@ int LightMain( int argc, char **argv ){
|
|||
}
|
||||
i++;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-dirtdepth" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-dirtdepth" ) ) {
|
||||
dirtDepth = atof( argv[ i + 1 ] );
|
||||
if ( dirtDepth <= 0.0f ) {
|
||||
dirtDepth = 128.0f;
|
||||
|
|
@ -2903,7 +2903,7 @@ int LightMain( int argc, char **argv ){
|
|||
Sys_Printf( "Dirtmapping depth set to %.1f\n", dirtDepth );
|
||||
i++;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-dirtscale" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-dirtscale" ) ) {
|
||||
dirtScale = atof( argv[ i + 1 ] );
|
||||
if ( dirtScale <= 0.0f ) {
|
||||
dirtScale = 1.0f;
|
||||
|
|
@ -2911,7 +2911,7 @@ int LightMain( int argc, char **argv ){
|
|||
Sys_Printf( "Dirtmapping scale set to %.1f\n", dirtScale );
|
||||
i++;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-dirtgain" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-dirtgain" ) ) {
|
||||
dirtGain = atof( argv[ i + 1 ] );
|
||||
if ( dirtGain <= 0.0f ) {
|
||||
dirtGain = 1.0f;
|
||||
|
|
@ -2919,17 +2919,17 @@ int LightMain( int argc, char **argv ){
|
|||
Sys_Printf( "Dirtmapping gain set to %.1f\n", dirtGain );
|
||||
i++;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-trianglecheck" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-trianglecheck" ) ) {
|
||||
lightmapTriangleCheck = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-extravisnudge" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-extravisnudge" ) ) {
|
||||
lightmapExtraVisClusterNudge = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-fill" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-fill" ) ) {
|
||||
lightmapFill = true;
|
||||
Sys_Printf( "Filling lightmap colors from surrounding pixels to improve JPEG compression\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-fillpink" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-fillpink" ) ) {
|
||||
lightmapPink = true;
|
||||
}
|
||||
/* unhandled args */
|
||||
|
|
|
|||
|
|
@ -1190,10 +1190,10 @@ static void PopulateTraceNodes( void ){
|
|||
/* external model */
|
||||
default:
|
||||
frame = 0;
|
||||
if ( strcmp( "", ValueForKey( e, "_frame" ) ) ) {
|
||||
if ( !strEmpty( ValueForKey( e, "_frame" ) ) ) {
|
||||
frame = IntForKey( e, "_frame" );
|
||||
}
|
||||
else if ( strcmp( "", ValueForKey( e, "frame" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( e, "frame" ) ) ) {
|
||||
frame = IntForKey( e, "frame" );
|
||||
}
|
||||
model = LoadModel( value, frame );
|
||||
|
|
|
|||
|
|
@ -82,14 +82,14 @@ int main( int argc, char **argv ){
|
|||
for ( i = 1; i < argc; i++ )
|
||||
{
|
||||
/* -help */
|
||||
if ( !strcmp( argv[ i ], "-h" ) || !strcmp( argv[ i ], "--help" )
|
||||
|| !strcmp( argv[ i ], "-help" ) ) {
|
||||
if ( strEqual( argv[ i ], "-h" ) || strEqual( argv[ i ], "--help" )
|
||||
|| strEqual( argv[ i ], "-help" ) ) {
|
||||
HelpMain( ( i + 1 < argc ) ? argv[ i + 1 ] : NULL );
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* -connect */
|
||||
if ( !strcmp( argv[ i ], "-connect" ) ) {
|
||||
if ( strEqual( argv[ i ], "-connect" ) ) {
|
||||
if ( ++i >= argc || !argv[ i ] ) {
|
||||
Error( "Out of arguments: No address specified after %s", argv[ i - 1 ] );
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ int main( int argc, char **argv ){
|
|||
}
|
||||
|
||||
/* verbose */
|
||||
else if ( !strcmp( argv[ i ], "-v" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-v" ) ) {
|
||||
if ( !verbose ) {
|
||||
verbose = true;
|
||||
argv[ i ] = NULL;
|
||||
|
|
@ -107,13 +107,13 @@ int main( int argc, char **argv ){
|
|||
}
|
||||
|
||||
/* force */
|
||||
else if ( !strcmp( argv[ i ], "-force" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-force" ) ) {
|
||||
force = true;
|
||||
argv[ i ] = NULL;
|
||||
}
|
||||
|
||||
/* patch subdivisions */
|
||||
else if ( !strcmp( argv[ i ], "-subdivisions" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-subdivisions" ) ) {
|
||||
if ( ++i >= argc || !argv[ i ] ) {
|
||||
Error( "Out of arguments: No value specified after %s", argv[ i - 1 ] );
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ int main( int argc, char **argv ){
|
|||
}
|
||||
|
||||
/* threads */
|
||||
else if ( !strcmp( argv[ i ], "-threads" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-threads" ) ) {
|
||||
if ( ++i >= argc || !argv[ i ] ) {
|
||||
Error( "Out of arguments: No value specified after %s", argv[ i - 1 ] );
|
||||
}
|
||||
|
|
@ -135,7 +135,7 @@ int main( int argc, char **argv ){
|
|||
argv[ i ] = NULL;
|
||||
}
|
||||
|
||||
else if( !strcmp( argv[ i ], "-nocmdline" ) )
|
||||
else if( strEqual( argv[ i ], "-nocmdline" ) )
|
||||
{
|
||||
Sys_Printf( "noCmdLine\n" );
|
||||
nocmdline = true;
|
||||
|
|
@ -187,79 +187,79 @@ int main( int argc, char **argv ){
|
|||
}
|
||||
|
||||
/* fixaas */
|
||||
if ( !strcmp( argv[ 1 ], "-fixaas" ) ) {
|
||||
if ( strEqual( argv[ 1 ], "-fixaas" ) ) {
|
||||
r = FixAAS( argc - 1, argv + 1 );
|
||||
}
|
||||
|
||||
/* analyze */
|
||||
else if ( !strcmp( argv[ 1 ], "-analyze" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-analyze" ) ) {
|
||||
r = AnalyzeBSP( argc - 1, argv + 1 );
|
||||
}
|
||||
|
||||
/* info */
|
||||
else if ( !strcmp( argv[ 1 ], "-info" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-info" ) ) {
|
||||
r = BSPInfo( argc - 2, argv + 2 );
|
||||
}
|
||||
|
||||
/* vis */
|
||||
else if ( !strcmp( argv[ 1 ], "-vis" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-vis" ) ) {
|
||||
r = VisMain( argc - 1, argv + 1 );
|
||||
}
|
||||
|
||||
/* light */
|
||||
else if ( !strcmp( argv[ 1 ], "-light" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-light" ) ) {
|
||||
r = LightMain( argc - 1, argv + 1 );
|
||||
}
|
||||
|
||||
/* vlight */
|
||||
else if ( !strcmp( argv[ 1 ], "-vlight" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-vlight" ) ) {
|
||||
Sys_Warning( "VLight is no longer supported, defaulting to -light -fast instead\n\n" );
|
||||
argv[ 1 ] = "-fast"; /* eek a hack */
|
||||
r = LightMain( argc, argv );
|
||||
}
|
||||
|
||||
/* QBall: export entities */
|
||||
else if ( !strcmp( argv[ 1 ], "-exportents" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-exportents" ) ) {
|
||||
r = ExportEntitiesMain( argc - 1, argv + 1 );
|
||||
}
|
||||
|
||||
/* ydnar: lightmap export */
|
||||
else if ( !strcmp( argv[ 1 ], "-export" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-export" ) ) {
|
||||
r = ExportLightmapsMain( argc - 1, argv + 1 );
|
||||
}
|
||||
|
||||
/* ydnar: lightmap import */
|
||||
else if ( !strcmp( argv[ 1 ], "-import" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-import" ) ) {
|
||||
r = ImportLightmapsMain( argc - 1, argv + 1 );
|
||||
}
|
||||
|
||||
/* ydnar: bsp scaling */
|
||||
else if ( !strcmp( argv[ 1 ], "-scale" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-scale" ) ) {
|
||||
r = ScaleBSPMain( argc - 1, argv + 1 );
|
||||
}
|
||||
|
||||
/* bsp shifting */
|
||||
else if ( !strcmp( argv[ 1 ], "-shift" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-shift" ) ) {
|
||||
r = ShiftBSPMain( argc - 1, argv + 1 );
|
||||
}
|
||||
|
||||
/* autopacking */
|
||||
else if ( !strcmp( argv[ 1 ], "-pk3" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-pk3" ) ) {
|
||||
r = pk3BSPMain( argc - 1, argv + 1 );
|
||||
}
|
||||
|
||||
/* repacker */
|
||||
else if ( !strcmp( argv[ 1 ], "-repack" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-repack" ) ) {
|
||||
r = repackBSPMain( argc - 1, argv + 1 );
|
||||
}
|
||||
|
||||
/* ydnar: bsp conversion */
|
||||
else if ( !strcmp( argv[ 1 ], "-convert" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-convert" ) ) {
|
||||
r = ConvertBSPMain( argc - 1, argv + 1 );
|
||||
}
|
||||
|
||||
/* div0: minimap */
|
||||
else if ( !strcmp( argv[ 1 ], "-minimap" ) ) {
|
||||
else if ( strEqual( argv[ 1 ], "-minimap" ) ) {
|
||||
r = MiniMapBSPMain( argc - 1, argv + 1 );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1105,7 +1105,7 @@ static void ParseRawBrush( bool onlyLights ){
|
|||
if ( !GetToken( true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1113,7 +1113,7 @@ static void ParseRawBrush( bool onlyLights ){
|
|||
if ( g_brushType == BPRIMIT_BP ) {
|
||||
while ( 1 )
|
||||
{
|
||||
if ( strcmp( token, "(" ) ) {
|
||||
if ( !strEqual( token, "(" ) ) {
|
||||
GetToken( false );
|
||||
}
|
||||
else{
|
||||
|
|
@ -1151,7 +1151,7 @@ static void ParseRawBrush( bool onlyLights ){
|
|||
/* AP or 220? */
|
||||
if ( g_brushType == BPRIMIT_UNDEFINED ){
|
||||
GetToken( false );
|
||||
if ( !strcmp( token, "[" ) ){
|
||||
if ( strEqual( token, "[" ) ){
|
||||
g_brushType = BPRIMIT_VALVE220;
|
||||
Sys_FPrintf( SYS_VRB, "detected brushType = VALVE 220\n" );
|
||||
}
|
||||
|
|
@ -1715,7 +1715,7 @@ static bool ParseMapEntity( bool onlyLights, bool noCollapseGroups ){
|
|||
}
|
||||
|
||||
/* conformance check */
|
||||
if ( strcmp( token, "{" ) ) {
|
||||
if ( !strEqual( token, "{" ) ) {
|
||||
Sys_Warning( "ParseEntity: { not found, found %s on line %d - last entity was at: <%4.2f, %4.2f, %4.2f>...\n"
|
||||
"Continuing to process map, but resulting BSP may be invalid.\n",
|
||||
token, scriptline, entities[ numEntities ].origin[ 0 ], entities[ numEntities ].origin[ 1 ], entities[ numEntities ].origin[ 2 ] );
|
||||
|
|
@ -1745,26 +1745,26 @@ static bool ParseMapEntity( bool onlyLights, bool noCollapseGroups ){
|
|||
return false;
|
||||
}
|
||||
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !strcmp( token, "{" ) ) {
|
||||
if ( strEqual( token, "{" ) ) {
|
||||
/* parse a brush or patch */
|
||||
if ( !GetToken( true ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
/* check */
|
||||
if ( !strcmp( token, "patchDef2" ) ) {
|
||||
if ( strEqual( token, "patchDef2" ) ) {
|
||||
numMapPatches++;
|
||||
ParsePatch( onlyLights );
|
||||
}
|
||||
else if ( !strcmp( token, "terrainDef" ) ) {
|
||||
else if ( strEqual( token, "terrainDef" ) ) {
|
||||
//% ParseTerrain();
|
||||
Sys_Warning( "Terrain entity parsing not supported in this build.\n" ); /* ydnar */
|
||||
}
|
||||
else if ( !strcmp( token, "brushDef" ) ) {
|
||||
else if ( strEqual( token, "brushDef" ) ) {
|
||||
if ( g_brushType == BPRIMIT_UNDEFINED ) {
|
||||
Sys_FPrintf( SYS_VRB, "detected brushType = BRUSH PRIMITIVES\n" );
|
||||
g_brushType = BPRIMIT_BP;
|
||||
|
|
@ -1825,9 +1825,9 @@ static bool ParseMapEntity( bool onlyLights, bool noCollapseGroups ){
|
|||
/* vortex: added _ls key (short name of lightmapscale) */
|
||||
/* ydnar: get lightmap scaling value for this entity */
|
||||
lightmapScale = 0.0f;
|
||||
if ( strcmp( "", ValueForKey( mapEnt, "lightmapscale" ) ) ||
|
||||
strcmp( "", ValueForKey( mapEnt, "_lightmapscale" ) ) ||
|
||||
strcmp( "", ValueForKey( mapEnt, "_ls" ) ) ) {
|
||||
if ( !strEmpty( ValueForKey( mapEnt, "lightmapscale" ) ) ||
|
||||
!strEmpty( ValueForKey( mapEnt, "_lightmapscale" ) ) ||
|
||||
!strEmpty( ValueForKey( mapEnt, "_ls" ) ) ) {
|
||||
/* get lightmap scale from entity */
|
||||
lightmapScale = FloatForKey( mapEnt, "lightmapscale" );
|
||||
if ( lightmapScale <= 0.0f ) {
|
||||
|
|
@ -1850,7 +1850,7 @@ static bool ParseMapEntity( bool onlyLights, bool noCollapseGroups ){
|
|||
value = ValueForKey( &entities[ 0 ], "_celshader" );
|
||||
}
|
||||
if ( value[ 0 ] != '\0' ) {
|
||||
if ( strcmp( value, "none" ) ) {
|
||||
if ( !strEqual( value, "none" ) ) {
|
||||
sprintf( shader, "textures/%s", value );
|
||||
celShader = ShaderInfoForShader( shader );
|
||||
Sys_Printf( "Entity %d (%s) has cel shader %s\n", mapEnt->mapEntityNum, classname, celShader->shader );
|
||||
|
|
@ -1866,20 +1866,20 @@ static bool ParseMapEntity( bool onlyLights, bool noCollapseGroups ){
|
|||
|
||||
/* jal : entity based _shadeangle */
|
||||
shadeAngle = 0.0f;
|
||||
if ( strcmp( "", ValueForKey( mapEnt, "_shadeangle" ) ) ) {
|
||||
if ( !strEmpty( ValueForKey( mapEnt, "_shadeangle" ) ) ) {
|
||||
shadeAngle = FloatForKey( mapEnt, "_shadeangle" );
|
||||
}
|
||||
/* vortex' aliases */
|
||||
else if ( strcmp( "", ValueForKey( mapEnt, "_smoothnormals" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( mapEnt, "_smoothnormals" ) ) ) {
|
||||
shadeAngle = FloatForKey( mapEnt, "_smoothnormals" );
|
||||
}
|
||||
else if ( strcmp( "", ValueForKey( mapEnt, "_sn" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( mapEnt, "_sn" ) ) ) {
|
||||
shadeAngle = FloatForKey( mapEnt, "_sn" );
|
||||
}
|
||||
else if ( strcmp( "", ValueForKey( mapEnt, "_sa" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( mapEnt, "_sa" ) ) ) {
|
||||
shadeAngle = FloatForKey( mapEnt, "_sa" );
|
||||
}
|
||||
else if ( strcmp( "", ValueForKey( mapEnt, "_smooth" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( mapEnt, "_smooth" ) ) ) {
|
||||
shadeAngle = FloatForKey( mapEnt, "_smooth" );
|
||||
}
|
||||
|
||||
|
|
@ -1893,13 +1893,13 @@ static bool ParseMapEntity( bool onlyLights, bool noCollapseGroups ){
|
|||
|
||||
/* jal : entity based _samplesize */
|
||||
lightmapSampleSize = 0;
|
||||
if ( strcmp( "", ValueForKey( mapEnt, "_lightmapsamplesize" ) ) ) {
|
||||
if ( !strEmpty( ValueForKey( mapEnt, "_lightmapsamplesize" ) ) ) {
|
||||
lightmapSampleSize = IntForKey( mapEnt, "_lightmapsamplesize" );
|
||||
}
|
||||
else if ( strcmp( "", ValueForKey( mapEnt, "_samplesize" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( mapEnt, "_samplesize" ) ) ) {
|
||||
lightmapSampleSize = IntForKey( mapEnt, "_samplesize" );
|
||||
}
|
||||
else if ( strcmp( "", ValueForKey( mapEnt, "_ss" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( mapEnt, "_ss" ) ) ) {
|
||||
lightmapSampleSize = IntForKey( mapEnt, "_ss" );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -507,17 +507,17 @@ int MiniMapBSPMain( int argc, char **argv ){
|
|||
/* process arguments */
|
||||
for ( i = 1; i < ( argc - 1 ); i++ )
|
||||
{
|
||||
if ( !strcmp( argv[ i ], "-size" ) ) {
|
||||
if ( strEqual( argv[ i ], "-size" ) ) {
|
||||
minimap.width = minimap.height = atoi( argv[i + 1] );
|
||||
i++;
|
||||
Sys_Printf( "Image size set to %i\n", minimap.width );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-sharpen" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-sharpen" ) ) {
|
||||
minimapSharpen = atof( argv[i + 1] );
|
||||
i++;
|
||||
Sys_Printf( "Sharpening coefficient set to %f\n", minimapSharpen );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-samples" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-samples" ) ) {
|
||||
minimap.samples = atoi( argv[i + 1] );
|
||||
i++;
|
||||
Sys_Printf( "Samples set to %i\n", minimap.samples );
|
||||
|
|
@ -525,32 +525,32 @@ int MiniMapBSPMain( int argc, char **argv ){
|
|||
minimap.sample_offsets = malloc( 2 * sizeof( *minimap.sample_offsets ) * minimap.samples );
|
||||
MiniMapMakeSampleOffsets();
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-random" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-random" ) ) {
|
||||
minimap.samples = atoi( argv[i + 1] );
|
||||
i++;
|
||||
Sys_Printf( "Random samples set to %i\n", minimap.samples );
|
||||
free( minimap.sample_offsets );
|
||||
minimap.sample_offsets = NULL;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-border" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-border" ) ) {
|
||||
border = atof( argv[i + 1] );
|
||||
i++;
|
||||
Sys_Printf( "Border set to %f\n", border );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-keepaspect" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-keepaspect" ) ) {
|
||||
keepaspect = true;
|
||||
Sys_Printf( "Keeping aspect ratio by letterboxing\n", border );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-nokeepaspect" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-nokeepaspect" ) ) {
|
||||
keepaspect = false;
|
||||
Sys_Printf( "Not keeping aspect ratio\n", border );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-o" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-o" ) ) {
|
||||
strcpy( minimapFilename, argv[i + 1] );
|
||||
i++;
|
||||
Sys_Printf( "Output file name set to %s\n", minimapFilename );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-minmax" ) && i < ( argc - 7 ) ) {
|
||||
else if ( strEqual( argv[ i ], "-minmax" ) && i < ( argc - 7 ) ) {
|
||||
mins[0] = atof( argv[i + 1] );
|
||||
mins[1] = atof( argv[i + 2] );
|
||||
mins[2] = atof( argv[i + 3] );
|
||||
|
|
@ -560,38 +560,38 @@ int MiniMapBSPMain( int argc, char **argv ){
|
|||
i += 6;
|
||||
Sys_Printf( "Map mins/maxs overridden\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-gray" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-gray" ) ) {
|
||||
mode = MINIMAP_MODE_GRAY;
|
||||
Sys_Printf( "Writing as white-on-black image\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-black" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-black" ) ) {
|
||||
mode = MINIMAP_MODE_BLACK;
|
||||
Sys_Printf( "Writing as black alpha image\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-white" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-white" ) ) {
|
||||
mode = MINIMAP_MODE_WHITE;
|
||||
Sys_Printf( "Writing as white alpha image\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-boost" ) && i < ( argc - 2 ) ) {
|
||||
else if ( strEqual( argv[ i ], "-boost" ) && i < ( argc - 2 ) ) {
|
||||
minimap.boost = atof( argv[i + 1] );
|
||||
i++;
|
||||
Sys_Printf( "Contrast boost set to %f\n", minimap.boost );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-brightness" ) && i < ( argc - 2 ) ) {
|
||||
else if ( strEqual( argv[ i ], "-brightness" ) && i < ( argc - 2 ) ) {
|
||||
minimap.brightness = atof( argv[i + 1] );
|
||||
i++;
|
||||
Sys_Printf( "Brightness set to %f\n", minimap.brightness );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-contrast" ) && i < ( argc - 2 ) ) {
|
||||
else if ( strEqual( argv[ i ], "-contrast" ) && i < ( argc - 2 ) ) {
|
||||
minimap.contrast = atof( argv[i + 1] );
|
||||
i++;
|
||||
Sys_Printf( "Contrast set to %f\n", minimap.contrast );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-autolevel" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-autolevel" ) ) {
|
||||
autolevel = true;
|
||||
Sys_Printf( "Auto level enabled\n", border );
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-noautolevel" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-noautolevel" ) ) {
|
||||
autolevel = false;
|
||||
Sys_Printf( "Auto level disabled\n", border );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ picoModel_t *FindModel( const char *name, int frame ){
|
|||
for ( i = 0; i < MAX_MODELS; i++ )
|
||||
{
|
||||
if ( picoModels[ i ] != NULL &&
|
||||
!strcmp( PicoGetModelName( picoModels[ i ] ), name ) &&
|
||||
strEqual( PicoGetModelName( picoModels[ i ] ), name ) &&
|
||||
PicoGetModelFrameNum( picoModels[ i ] ) == frame ) {
|
||||
return picoModels[ i ];
|
||||
}
|
||||
|
|
@ -1395,9 +1395,9 @@ void AddTriangleModels( entity_t *e ){
|
|||
/* get lightmap scale */
|
||||
/* vortex: added _ls key (short name of lightmapscale) */
|
||||
baseLightmapScale = 0.0f;
|
||||
if ( strcmp( "", ValueForKey( e, "lightmapscale" ) ) ||
|
||||
strcmp( "", ValueForKey( e, "_lightmapscale" ) ) ||
|
||||
strcmp( "", ValueForKey( e, "_ls" ) ) ) {
|
||||
if ( !strEmpty( ValueForKey( e, "lightmapscale" ) ) ||
|
||||
!strEmpty( ValueForKey( e, "_lightmapscale" ) ) ||
|
||||
!strEmpty( ValueForKey( e, "_ls" ) ) ) {
|
||||
baseLightmapScale = FloatForKey( e, "lightmapscale" );
|
||||
if ( baseLightmapScale <= 0.0f ) {
|
||||
baseLightmapScale = FloatForKey( e, "_lightmapscale" );
|
||||
|
|
@ -1427,7 +1427,7 @@ void AddTriangleModels( entity_t *e ){
|
|||
|
||||
/* ydnar: added support for md3 models on non-worldspawn models */
|
||||
target = ValueForKey( e2, "target" );
|
||||
if ( strcmp( target, targetName ) ) {
|
||||
if ( !strEqual( target, targetName ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -1441,10 +1441,10 @@ void AddTriangleModels( entity_t *e ){
|
|||
|
||||
/* get model frame */
|
||||
frame = 0;
|
||||
if ( strcmp( "", ValueForKey( e2, "_frame" ) ) ) {
|
||||
if ( !strEmpty( ValueForKey( e2, "_frame" ) ) ) {
|
||||
frame = IntForKey( e2, "_frame" );
|
||||
}
|
||||
else if ( strcmp( "", ValueForKey( e2, "frame" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( e2, "frame" ) ) ) {
|
||||
frame = IntForKey( e2, "frame" );
|
||||
}
|
||||
|
||||
|
|
@ -1556,13 +1556,13 @@ void AddTriangleModels( entity_t *e ){
|
|||
|
||||
/* jal : entity based _samplesize */
|
||||
lightmapSampleSize = 0;
|
||||
if ( strcmp( "", ValueForKey( e2, "_lightmapsamplesize" ) ) ) {
|
||||
if ( !strEmpty( ValueForKey( e2, "_lightmapsamplesize" ) ) ) {
|
||||
lightmapSampleSize = IntForKey( e2, "_lightmapsamplesize" );
|
||||
}
|
||||
else if ( strcmp( "", ValueForKey( e2, "_samplesize" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( e2, "_samplesize" ) ) ) {
|
||||
lightmapSampleSize = IntForKey( e2, "_samplesize" );
|
||||
}
|
||||
else if ( strcmp( "", ValueForKey( e2, "_ss" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( e2, "_ss" ) ) ) {
|
||||
lightmapSampleSize = IntForKey( e2, "_ss" );
|
||||
}
|
||||
|
||||
|
|
@ -1577,9 +1577,9 @@ void AddTriangleModels( entity_t *e ){
|
|||
/* get lightmap scale */
|
||||
/* vortex: added _ls key (short name of lightmapscale) */
|
||||
lightmapScale = 0.0f;
|
||||
if ( strcmp( "", ValueForKey( e2, "lightmapscale" ) ) ||
|
||||
strcmp( "", ValueForKey( e2, "_lightmapscale" ) ) ||
|
||||
strcmp( "", ValueForKey( e2, "_ls" ) ) ) {
|
||||
if ( !strEmpty( ValueForKey( e2, "lightmapscale" ) ) ||
|
||||
!strEmpty( ValueForKey( e2, "_lightmapscale" ) ) ||
|
||||
!strEmpty( ValueForKey( e2, "_ls" ) ) ) {
|
||||
lightmapScale = FloatForKey( e2, "lightmapscale" );
|
||||
if ( lightmapScale <= 0.0f ) {
|
||||
lightmapScale = FloatForKey( e2, "_lightmapscale" );
|
||||
|
|
@ -1597,20 +1597,20 @@ void AddTriangleModels( entity_t *e ){
|
|||
|
||||
/* jal : entity based _shadeangle */
|
||||
shadeAngle = 0.0f;
|
||||
if ( strcmp( "", ValueForKey( e2, "_shadeangle" ) ) ) {
|
||||
if ( !strEmpty( ValueForKey( e2, "_shadeangle" ) ) ) {
|
||||
shadeAngle = FloatForKey( e2, "_shadeangle" );
|
||||
}
|
||||
/* vortex' aliases */
|
||||
else if ( strcmp( "", ValueForKey( e2, "_smoothnormals" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( e2, "_smoothnormals" ) ) ) {
|
||||
shadeAngle = FloatForKey( e2, "_smoothnormals" );
|
||||
}
|
||||
else if ( strcmp( "", ValueForKey( e2, "_sn" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( e2, "_sn" ) ) ) {
|
||||
shadeAngle = FloatForKey( e2, "_sn" );
|
||||
}
|
||||
else if ( strcmp( "", ValueForKey( e2, "_sa" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( e2, "_sa" ) ) ) {
|
||||
shadeAngle = FloatForKey( e2, "_sa" );
|
||||
}
|
||||
else if ( strcmp( "", ValueForKey( e2, "_smooth" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( e2, "_smooth" ) ) ) {
|
||||
shadeAngle = FloatForKey( e2, "_smooth" );
|
||||
}
|
||||
|
||||
|
|
@ -1623,15 +1623,15 @@ void AddTriangleModels( entity_t *e ){
|
|||
}
|
||||
|
||||
skin = 0;
|
||||
if ( strcmp( "", ValueForKey( e2, "_skin" ) ) ) {
|
||||
if ( !strEmpty( ValueForKey( e2, "_skin" ) ) ) {
|
||||
skin = IntForKey( e2, "_skin" );
|
||||
}
|
||||
else if ( strcmp( "", ValueForKey( e2, "skin" ) ) ) {
|
||||
else if ( !strEmpty( ValueForKey( e2, "skin" ) ) ) {
|
||||
skin = IntForKey( e2, "skin" );
|
||||
}
|
||||
|
||||
clipDepth = clipDepthGlobal;
|
||||
if ( strcmp( "", ValueForKey( e2, "_clipdepth" ) ) ) {
|
||||
if ( !strEmpty( ValueForKey( e2, "_clipdepth" ) ) ) {
|
||||
clipDepth = FloatForKey( e2, "_clipdepth" );
|
||||
Sys_Printf( "misc_model has autoclip depth of %.3f\n", clipDepth );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ void ParsePatch( bool onlyLights ){
|
|||
|
||||
// if brush primitives format, we may have some epairs to ignore here
|
||||
GetToken( true );
|
||||
if ( strcmp( token, "}" ) && ( g_brushType == BPRIMIT_BP || g_brushType == BPRIMIT_UNDEFINED ) ) {
|
||||
if ( !strEqual( token, "}" ) && ( g_brushType == BPRIMIT_BP || g_brushType == BPRIMIT_UNDEFINED ) ) {
|
||||
ep = ParseEPair();
|
||||
free( ep->key );
|
||||
free( ep->value );
|
||||
|
|
|
|||
|
|
@ -279,11 +279,11 @@ void AddHomeBasePath( char *path ){
|
|||
|
||||
/* strip leading dot, if homePath does not end in /. */
|
||||
homePathLen = strlen( homePath );
|
||||
if ( !strcmp( path, "." ) ) {
|
||||
if ( strEqual( path, "." ) ) {
|
||||
/* -fs_homebase . means that -fs_home is to be used as is */
|
||||
strcpy( temp, homePath );
|
||||
}
|
||||
else if ( homePathLen >= 2 && !strcmp( homePath + homePathLen - 2, "/." ) ) {
|
||||
else if ( homePathLen >= 2 && strEqual( homePath + homePathLen - 2, "/." ) ) {
|
||||
/* remove trailing /. of homePath */
|
||||
homePathLen -= 2;
|
||||
|
||||
|
|
@ -334,7 +334,7 @@ void AddGamePath( char *path ){
|
|||
/* don't add it if it's already there */
|
||||
for ( i = 0; i < numGamePaths - 1; i++ )
|
||||
{
|
||||
if ( strcmp( gamePaths[i], gamePaths[numGamePaths - 1] ) == 0 ) {
|
||||
if ( strEqual( gamePaths[i], gamePaths[numGamePaths - 1] ) ) {
|
||||
free( gamePaths[numGamePaths - 1] );
|
||||
gamePaths[numGamePaths - 1] = NULL;
|
||||
numGamePaths--;
|
||||
|
|
@ -397,7 +397,7 @@ void InitPaths( int *argc, char **argv ){
|
|||
}
|
||||
|
||||
/* -game */
|
||||
if ( strcmp( argv[ i ], "-game" ) == 0 ) {
|
||||
if ( strEqual( argv[ i ], "-game" ) ) {
|
||||
if ( ++i >= *argc || !argv[ i ] ) {
|
||||
Error( "Out of arguments: No game specified after %s", argv[ i - 1 ] );
|
||||
}
|
||||
|
|
@ -410,7 +410,7 @@ void InitPaths( int *argc, char **argv ){
|
|||
}
|
||||
|
||||
/* -fs_forbiddenpath */
|
||||
else if ( strcmp( argv[ i ], "-fs_forbiddenpath" ) == 0 ) {
|
||||
else if ( strEqual( argv[ i ], "-fs_forbiddenpath" ) ) {
|
||||
if ( ++i >= *argc || !argv[ i ] ) {
|
||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||
}
|
||||
|
|
@ -424,7 +424,7 @@ void InitPaths( int *argc, char **argv ){
|
|||
}
|
||||
|
||||
/* -fs_basepath */
|
||||
else if ( strcmp( argv[ i ], "-fs_basepath" ) == 0 ) {
|
||||
else if ( strEqual( argv[ i ], "-fs_basepath" ) ) {
|
||||
if ( ++i >= *argc || !argv[ i ] ) {
|
||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||
}
|
||||
|
|
@ -434,7 +434,7 @@ void InitPaths( int *argc, char **argv ){
|
|||
}
|
||||
|
||||
/* -fs_game */
|
||||
else if ( strcmp( argv[ i ], "-fs_game" ) == 0 ) {
|
||||
else if ( strEqual( argv[ i ], "-fs_game" ) ) {
|
||||
if ( ++i >= *argc || !argv[ i ] ) {
|
||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||
}
|
||||
|
|
@ -444,7 +444,7 @@ void InitPaths( int *argc, char **argv ){
|
|||
}
|
||||
|
||||
/* -fs_home */
|
||||
else if ( strcmp( argv[ i ], "-fs_home" ) == 0 ) {
|
||||
else if ( strEqual( argv[ i ], "-fs_home" ) ) {
|
||||
if ( ++i >= *argc || !argv[ i ] ) {
|
||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||
}
|
||||
|
|
@ -454,7 +454,7 @@ void InitPaths( int *argc, char **argv ){
|
|||
}
|
||||
|
||||
/* -fs_homebase */
|
||||
else if ( strcmp( argv[ i ], "-fs_homebase" ) == 0 ) {
|
||||
else if ( strEqual( argv[ i ], "-fs_homebase" ) ) {
|
||||
if ( ++i >= *argc || !argv[ i ] ) {
|
||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||
}
|
||||
|
|
@ -464,7 +464,7 @@ void InitPaths( int *argc, char **argv ){
|
|||
}
|
||||
|
||||
/* -fs_homepath - sets both of them */
|
||||
else if ( strcmp( argv[ i ], "-fs_homepath" ) == 0 ) {
|
||||
else if ( strEqual( argv[ i ], "-fs_homepath" ) ) {
|
||||
if ( ++i >= *argc || !argv[ i ] ) {
|
||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||
}
|
||||
|
|
@ -475,7 +475,7 @@ void InitPaths( int *argc, char **argv ){
|
|||
}
|
||||
|
||||
/* -fs_pakpath */
|
||||
else if ( strcmp( argv[ i ], "-fs_pakpath" ) == 0 ) {
|
||||
else if ( strEqual( argv[ i ], "-fs_pakpath" ) ) {
|
||||
if ( ++i >= *argc || !argv[ i ] ) {
|
||||
Error( "Out of arguments: No path specified after %s.", argv[ i - 1 ] );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -762,7 +762,7 @@ static void LoadShaderImages( shaderInfo_t *si ){
|
|||
/* otherwise, use default image */
|
||||
if ( si->shaderImage == NULL ) {
|
||||
si->shaderImage = ImageLoad( DEFAULT_IMAGE );
|
||||
if ( warnImage && strcmp( si->shader, "noshader" ) ) {
|
||||
if ( warnImage && !strEqual( si->shader, "noshader" ) ) {
|
||||
Sys_Warning( "Couldn't find image for shader %s\n", si->shader );
|
||||
}
|
||||
}
|
||||
|
|
@ -818,7 +818,7 @@ static void LoadShaderImages( shaderInfo_t *si ){
|
|||
#define MAX_SHADER_DEPRECATION_DEPTH 16
|
||||
|
||||
shaderInfo_t *ShaderInfoForShaderNull( const char *shaderName ){
|
||||
if ( !strcmp( shaderName, "noshader" ) ) {
|
||||
if ( strEqual( shaderName, "noshader" ) ) {
|
||||
return NULL;
|
||||
}
|
||||
return ShaderInfoForShader( shaderName );
|
||||
|
|
@ -937,7 +937,7 @@ void Parse1DMatrixAppend( char *buffer, int x, vec_t *m ){
|
|||
int i;
|
||||
|
||||
|
||||
if ( !GetTokenAppend( buffer, true ) || strcmp( token, "(" ) ) {
|
||||
if ( !GetTokenAppend( buffer, true ) || !strEqual( token, "(" ) ) {
|
||||
Error( "Parse1DMatrixAppend(): line %d: ( not found!\nFile location be: %s\n", scriptline, g_strLoadedFileLocation );
|
||||
}
|
||||
for ( i = 0; i < x; i++ )
|
||||
|
|
@ -947,7 +947,7 @@ void Parse1DMatrixAppend( char *buffer, int x, vec_t *m ){
|
|||
}
|
||||
m[ i ] = atof( token );
|
||||
}
|
||||
if ( !GetTokenAppend( buffer, true ) || strcmp( token, ")" ) ) {
|
||||
if ( !GetTokenAppend( buffer, true ) || !strEqual( token, ")" ) ) {
|
||||
Error( "Parse1DMatrixAppend(): line %d: ) not found!\nFile location be: %s\n", scriptline, g_strLoadedFileLocation );
|
||||
}
|
||||
}
|
||||
|
|
@ -1007,7 +1007,7 @@ static void ParseShaderFile( const char *filename ){
|
|||
if ( !GetTokenAppend( shaderText, true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( strcmp( token, "{" ) ) {
|
||||
if ( !strEqual( token, "{" ) ) {
|
||||
if ( si != NULL ) {
|
||||
Error( "ParseShaderFile(): %s, line %d: { not found!\nFound instead: %s\nLast known shader: %s\nFile location be: %s\n",
|
||||
filename, scriptline, token, si->shader, g_strLoadedFileLocation );
|
||||
|
|
@ -1024,7 +1024,7 @@ static void ParseShaderFile( const char *filename ){
|
|||
if ( !GetTokenAppend( shaderText, true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -1034,14 +1034,14 @@ static void ParseShaderFile( const char *filename ){
|
|||
----------------------------------------------------------------- */
|
||||
|
||||
/* parse stage directives */
|
||||
if ( !strcmp( token, "{" ) ) {
|
||||
if ( strEqual( token, "{" ) ) {
|
||||
si->hasPasses = true;
|
||||
while ( 1 )
|
||||
{
|
||||
if ( !GetTokenAppend( shaderText, true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -2009,7 +2009,7 @@ static void ParseCustomInfoParms( void ){
|
|||
break;
|
||||
}
|
||||
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
parsedContent = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -2034,7 +2034,7 @@ static void ParseCustomInfoParms( void ){
|
|||
break;
|
||||
}
|
||||
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
parsedSurface = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -2092,7 +2092,7 @@ void LoadShaderInfo( void ){
|
|||
{
|
||||
/* check for duplicate entries */
|
||||
for ( j = 0; j < numShaderFiles; j++ )
|
||||
if ( !strcmp( shaderFiles[ j ], token ) ) {
|
||||
if ( strEqual( shaderFiles[ j ], token ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ void LoadSurfaceExtraFile( const char *path ){
|
|||
}
|
||||
|
||||
/* handle { } section */
|
||||
if ( !GetToken( true ) || strcmp( token, "{" ) ) {
|
||||
if ( !GetToken( true ) || !strEqual( token, "{" ) ) {
|
||||
Error( "ReadSurfaceExtraFile(): %s, line %d: { not found", srfPath, scriptline );
|
||||
}
|
||||
while ( 1 )
|
||||
|
|
@ -367,7 +367,7 @@ void LoadSurfaceExtraFile( const char *path ){
|
|||
if ( !GetToken( true ) ) {
|
||||
break;
|
||||
}
|
||||
if ( !strcmp( token, "}" ) ) {
|
||||
if ( strEqual( token, "}" ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -901,7 +901,7 @@ void LoadPortals( char *name ){
|
|||
int leafnums[2];
|
||||
visPlane_t plane;
|
||||
|
||||
if ( !strcmp( name, "-" ) ) {
|
||||
if ( strEqual( name, "-" ) ) {
|
||||
f = stdin;
|
||||
}
|
||||
else
|
||||
|
|
@ -915,7 +915,7 @@ void LoadPortals( char *name ){
|
|||
if ( fscanf( f, "%79s\n%i\n%i\n%i\n", magic, &portalclusters, &numportals, &numfaces ) != 4 ) {
|
||||
Error( "LoadPortals: failed to read header" );
|
||||
}
|
||||
if ( strcmp( magic,PORTALFILE ) ) {
|
||||
if ( !strEqual( magic, PORTALFILE ) ) {
|
||||
Error( "LoadPortals: not a portal file" );
|
||||
}
|
||||
|
||||
|
|
@ -1104,48 +1104,48 @@ int VisMain( int argc, char **argv ){
|
|||
/* process arguments */
|
||||
for ( i = 1 ; i < ( argc - 1 ) ; i++ )
|
||||
{
|
||||
if ( !strcmp( argv[i], "-fast" ) ) {
|
||||
if ( strEqual( argv[i], "-fast" ) ) {
|
||||
Sys_Printf( "fastvis = true\n" );
|
||||
fastvis = true;
|
||||
}
|
||||
else if ( !strcmp( argv[i], "-merge" ) ) {
|
||||
else if ( strEqual( argv[i], "-merge" ) ) {
|
||||
Sys_Printf( "merge = true\n" );
|
||||
mergevis = true;
|
||||
}
|
||||
else if ( !strcmp( argv[i], "-mergeportals" ) ) {
|
||||
else if ( strEqual( argv[i], "-mergeportals" ) ) {
|
||||
Sys_Printf( "mergeportals = true\n" );
|
||||
mergevisportals = true;
|
||||
}
|
||||
else if ( !strcmp( argv[i], "-nopassage" ) ) {
|
||||
else if ( strEqual( argv[i], "-nopassage" ) ) {
|
||||
Sys_Printf( "nopassage = true\n" );
|
||||
noPassageVis = true;
|
||||
}
|
||||
else if ( !strcmp( argv[i], "-passageOnly" ) ) {
|
||||
else if ( strEqual( argv[i], "-passageOnly" ) ) {
|
||||
Sys_Printf( "passageOnly = true\n" );
|
||||
passageVisOnly = true;
|
||||
}
|
||||
else if ( !strcmp( argv[i], "-nosort" ) ) {
|
||||
else if ( strEqual( argv[i], "-nosort" ) ) {
|
||||
Sys_Printf( "nosort = true\n" );
|
||||
nosort = true;
|
||||
}
|
||||
else if ( !strcmp( argv[i], "-saveprt" ) ) {
|
||||
else if ( strEqual( argv[i], "-saveprt" ) ) {
|
||||
Sys_Printf( "saveprt = true\n" );
|
||||
saveprt = true;
|
||||
}
|
||||
else if ( !strcmp( argv[ i ], "-v" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-v" ) ) {
|
||||
debugCluster = true;
|
||||
Sys_Printf( "Extra verbose mode enabled\n" );
|
||||
}
|
||||
else if ( !strcmp( argv[i], "-tmpin" ) ) {
|
||||
else if ( strEqual( argv[i], "-tmpin" ) ) {
|
||||
strcpy( inbase, "/tmp" );
|
||||
}
|
||||
else if ( !strcmp( argv[i], "-tmpout" ) ) {
|
||||
else if ( strEqual( argv[i], "-tmpout" ) ) {
|
||||
strcpy( outbase, "/tmp" );
|
||||
}
|
||||
|
||||
|
||||
/* ydnar: -hint to merge all but hint portals */
|
||||
else if ( !strcmp( argv[ i ], "-hint" ) ) {
|
||||
else if ( strEqual( argv[ i ], "-hint" ) ) {
|
||||
Sys_Printf( "hint = true\n" );
|
||||
hint = true;
|
||||
mergevis = true;
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ void SetLightStyles( void ){
|
|||
|
||||
/* find this targetname */
|
||||
for ( j = 0; j < numStyles; j++ )
|
||||
if ( lightStyles[ j ] == style && !strcmp( lightTargets[ j ], t ) ) {
|
||||
if ( lightStyles[ j ] == style && strEqual( lightTargets[ j ], t ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user