diff --git a/tools/quake3/common/imagelib.c b/tools/quake3/common/imagelib.c index 54d8254e..9d25cd12 100644 --- a/tools/quake3/common/imagelib.c +++ b/tools/quake3/common/imagelib.c @@ -819,7 +819,7 @@ void LoadBMP( const char *filename, byte **pic, byte **palette, int *width, int void Load256Image( const char *name, byte **pixels, byte **palette, int *width, int *height ){ const char *ext = path_get_extension( name ); - if ( !Q_stricmp( ext, "lbm" ) ) { + if ( striEqual( ext, "lbm" ) ) { LoadLBM( name, pixels, palette ); if ( width ) { *width = bmhd.w; @@ -828,10 +828,10 @@ void Load256Image( const char *name, byte **pixels, byte **palette, int *width, *height = bmhd.h; } } - else if ( !Q_stricmp( ext, "pcx" ) ) { + else if ( striEqual( ext, "pcx" ) ) { LoadPCX( name, pixels, palette, width, height ); } - else if ( !Q_stricmp( ext, "bmp" ) ) { + else if ( striEqual( ext, "bmp" ) ) { LoadBMP( name, pixels, palette, width, height ); } else{ @@ -851,10 +851,10 @@ void Save256Image( const char *name, byte *pixels, byte *palette, int width, int height ){ const char *ext = path_get_extension( name ); - if ( !Q_stricmp( ext, "lbm" ) ) { + if ( striEqual( ext, "lbm" ) ) { WriteLBMfile( name, pixels, width, height, palette ); } - else if ( !Q_stricmp( ext, "pcx" ) ) { + else if ( striEqual( ext, "pcx" ) ) { WritePCXfile( name, pixels, width, height, palette ); } else{ @@ -1200,7 +1200,7 @@ void Load32BitImage( const char *name, unsigned **pixels, int *width, int *heig int i; int v; - if ( !Q_stricmp( path_get_extension( name ), "tga" ) ) { + if ( striEqual( path_get_extension( name ), "tga" ) ) { LoadTGA( name, (byte **)pixels, width, height ); } else { diff --git a/tools/quake3/common/vfs.c b/tools/quake3/common/vfs.c index 3b757b50..ca69c924 100644 --- a/tools/quake3/common/vfs.c +++ b/tools/quake3/common/vfs.c @@ -184,11 +184,11 @@ void vfsInitDirectory( const char *path ){ const char *ext = path_get_filename_base_end( name ); - if ( !Q_stricmp( ext, ".pk3" ) ) { + if ( striEqual( ext, ".pk3" ) ) { sprintf( filename, "%s/%s", path, name ); vfsInitPakFile( filename ); } - else if ( !Q_stricmp( ext, ".pk3dir" ) ) { + else if ( striEqual( ext, ".pk3dir" ) ) { if ( g_numDirs == VFS_MAXDIRS ) { continue; } @@ -218,7 +218,7 @@ void vfsListShaderFiles( StrList* list, void pushStringCallback( StrList* list, const char* name; while ( ( name = g_dir_read_name( dir ) ) ) { - if ( !Q_stricmp( path_get_filename_base_end( name ), ".shader" ) ) { + if ( striEqual( path_get_filename_base_end( name ), ".shader" ) ) { pushStringCallback( list, name ); } } @@ -231,7 +231,7 @@ void vfsListShaderFiles( StrList* list, void pushStringCallback( StrList* list, for ( lst = g_pakFiles; lst != NULL; lst = g_slist_next( lst ) ) { VFS_PAKFILE* file = (VFS_PAKFILE*)lst->data; - if ( !Q_stricmp( path_get_filename_base_end( file->name ), ".shader" ) ) { + if ( striEqual( path_get_filename_base_end( file->name ), ".shader" ) ) { pushStringCallback( list, path_get_filename_start( file->name ) ); } } diff --git a/tools/quake3/q3data/p3dlib.c b/tools/quake3/q3data/p3dlib.c index 376cafb9..eb0b4571 100644 --- a/tools/quake3/q3data/p3dlib.c +++ b/tools/quake3/q3data/p3dlib.c @@ -96,7 +96,7 @@ int CharIsTokenDelimiter( int ch ){ int P3DSkipToToken( const char *name ){ while ( P3DGetToken( 0 ) ) { - if ( !Q_stricmp( s_token, name ) ) { + if ( striEqual( s_token, name ) ) { return 1; } } @@ -161,14 +161,14 @@ int P3DSkipToTokenInBlock( const char *name ){ while ( P3DGetToken( 0 ) ) { - if ( !Q_stricmp( s_token, "}" ) ) { + if ( strEqual( s_token, "}" ) ) { iLevel--; } - else if ( !Q_stricmp( s_token, "{" ) ) { + else if ( strEqual( s_token, "{" ) ) { iLevel++; } - if ( !Q_stricmp( s_token, name ) ) { + if ( striEqual( s_token, name ) ) { return 1; } @@ -195,7 +195,7 @@ int P3DProcess(){ // skip to the first Obj declaration while ( P3DGetToken( 0 ) ) { - if ( !Q_stricmp( s_token, "Obj" ) ) { + if ( striEqual( s_token, "Obj" ) ) { int j = 0, k = 0; if ( P3DSkipToToken( "Text" ) ) { @@ -290,7 +290,7 @@ void SkinFromP3D( const char *file ){ // corresponds to and append the shader to it for ( i = 0; i < g_data.model.numSurfaces; i++ ) { - if ( !Q_stricmp( g_data.surfData[i].header.name, psetName ) ) { + if ( striEqual( g_data.surfData[i].header.name, psetName ) ) { char *p; if ( strstr( associatedShader, gamedir + 1 ) ) { diff --git a/tools/quake3/q3data/q3data.c b/tools/quake3/q3data/q3data.c index 7d21fbc2..d788b646 100644 --- a/tools/quake3/q3data/q3data.c +++ b/tools/quake3/q3data/q3data.c @@ -386,7 +386,7 @@ void ReleaseTexture( char *name ){ char path[1024]; for ( i = 0 ; i < numrtex ; i++ ) - if ( !Q_stricmp( name, rtex[i] ) ) { + if ( striEqual( name, rtex[i] ) ) { return; } diff --git a/tools/quake3/q3map2/autopk3.c b/tools/quake3/q3map2/autopk3.c index 0181d5a2..fa61707b 100644 --- a/tools/quake3/q3map2/autopk3.c +++ b/tools/quake3/q3map2/autopk3.c @@ -60,7 +60,7 @@ static inline void StrList_append( StrList* list, const char* string ){ /* returns index + 1 for boolean use */ static inline int StrList_find( const StrList* list, const char* string ){ for ( int i = 0; i < list->n; ++i ){ - if ( !Q_stricmp( list->s[i], string ) ) + if ( striEqual( list->s[i], string ) ) return i + 1; } return 0; @@ -80,7 +80,7 @@ static inline void tex2list( StrList* texlist, StrList* EXtex, StrList* rEXtex ) return; //StripExtension( token ); char* dot = path_get_filename_base_end( token ); - if( !Q_stricmp( dot, ".tga" ) || !Q_stricmp( dot, ".jpg" ) || !Q_stricmp( dot, ".png" ) ){ //? might want to also warn on png in non png run + if( striEqual( dot, ".tga" ) || striEqual( dot, ".jpg" ) || striEqual( dot, ".png" ) ){ //? might want to also warn on png in non png run strClear( dot ); } else{ @@ -159,19 +159,19 @@ static void parseEXfile( const char* filename, StrList* ExTextures, StrList* ExS } /* blocks */ - if ( !Q_stricmp( token, "textures" ) ){ + if ( striEqual( token, "textures" ) ){ parseEXblock( ExTextures, exName ); } - else if ( !Q_stricmp( token, "shaders" ) ){ + else if ( striEqual( token, "shaders" ) ){ parseEXblock( ExShaders, exName ); } - else if ( !Q_stricmp( token, "shaderfiles" ) ){ + else if ( striEqual( token, "shaderfiles" ) ){ parseEXblock( ExShaderfiles, exName ); } - else if ( !Q_stricmp( token, "sounds" ) ){ + else if ( striEqual( token, "sounds" ) ){ parseEXblock( ExSounds, exName ); } - else if ( !Q_stricmp( token, "videos" ) ){ + else if ( striEqual( token, "videos" ) ){ parseEXblock( ExVideos, exName ); } else{ @@ -330,11 +330,11 @@ int pk3BSPMain( int argc, char **argv ){ res2list( pk3Sounds, str ); } - if ( !Q_stricmp( ValueForKey( &entities[i], "classname" ), "func_plat" ) ){ + if ( striEqual( ValueForKey( &entities[i], "classname" ), "func_plat" ) ){ res2list( pk3Sounds, "sound/movers/plats/pt1_strt.wav" ); res2list( pk3Sounds, "sound/movers/plats/pt1_end.wav" ); } - if ( !Q_stricmp( ValueForKey( &entities[i], "classname" ), "target_push" ) ){ + if ( striEqual( ValueForKey( &entities[i], "classname" ), "target_push" ) ){ if ( !( IntForKey( &entities[i], "spawnflags") & 1 ) ){ res2list( pk3Sounds, "sound/misc/windfly.wav" ); } @@ -548,7 +548,7 @@ int pk3BSPMain( int argc, char **argv ){ 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" ) ){ + if ( striEqual( token, "mapComp" ) || striEqual( token, "mapNoComp" ) || striEqual( token, "animmapcomp" ) || striEqual( token, "animmapnocomp" ) ){ Sys_FPrintf( SYS_WRN, "WARNING7: %s : line %d : unsupported '%s' map directive\n", scriptFile, scriptline, token ); } /* skip the shader */ @@ -556,8 +556,8 @@ int pk3BSPMain( int argc, char **argv ){ continue; /* digest any images */ - if ( !Q_stricmp( token, "map" ) || - !Q_stricmp( token, "clampMap" ) ) { + if ( striEqual( token, "map" ) || + striEqual( token, "clampMap" ) ) { hasmap = true; /* get an image */ GetToken( false ); @@ -565,8 +565,8 @@ int pk3BSPMain( int argc, char **argv ){ tex2list( pk3Textures, ExTextures, NULL ); } } - else if ( !Q_stricmp( token, "animMap" ) || - !Q_stricmp( token, "clampAnimMap" ) ) { + else if ( striEqual( token, "animMap" ) || + striEqual( token, "clampAnimMap" ) ) { hasmap = true; GetToken( false );// skip num while ( TokenAvailable() ){ @@ -574,7 +574,7 @@ int pk3BSPMain( int argc, char **argv ){ tex2list( pk3Textures, ExTextures, NULL ); } } - else if ( !Q_stricmp( token, "videoMap" ) ){ + else if ( striEqual( token, "videoMap" ) ){ hasmap = true; GetToken( false ); FixDOSName( token ); @@ -600,22 +600,22 @@ int pk3BSPMain( int argc, char **argv ){ ----------------------------------------------------------------- */ /* match surfaceparm */ - else if ( !Q_stricmp( token, "surfaceparm" ) ) { + else if ( striEqual( token, "surfaceparm" ) ) { GetToken( false ); - if ( !Q_stricmp( token, "nodraw" ) ) { + if ( striEqual( token, "nodraw" ) ) { wantShader = false; pk3Shaders->s[shader][0] = '\0'; } } /* skyparms */ - else if ( !Q_stricmp( token, "skyParms" ) ) { + else if ( striEqual( token, "skyParms" ) ) { hasmap = true; /* get image base */ GetToken( false ); /* ignore bogus paths */ - if ( Q_stricmp( token, "-" ) && Q_stricmp( token, "full" ) ) { + if ( !striEqual( token, "-" ) && !striEqual( token, "full" ) ) { const char skysides[6][3] = { "up", "dn", "lf", "rt", "bk", "ft" }; char* const skysidestring = token + strcatQ( token, "_@@.tga", sizeof( token ) ) - 6; for( size_t side = 0; side < 6; ++side ){ @@ -627,7 +627,7 @@ int pk3BSPMain( int argc, char **argv ){ GetToken( false ); GetToken( false ); } - else if ( !Q_stricmp( token, "fogparms" ) ){ + else if ( striEqual( token, "fogparms" ) ){ hasmap = true; } } @@ -902,7 +902,7 @@ int repackBSPMain( int argc, char **argv ){ /* do some path mangling */ strcpy( source, ExpandArg( argv[ argc - 1 ] ) ); - if ( !Q_stricmp( path_get_filename_base_end( source ), ".bsp" ) ){ + if ( striEqual( path_get_filename_base_end( source ), ".bsp" ) ){ strcpy( bspList[bspListN], source ); bspListN++; } @@ -1002,11 +1002,11 @@ int repackBSPMain( int argc, char **argv ){ res2list( pk3Sounds, str ); } - if ( !Q_stricmp( ValueForKey( &entities[i], "classname" ), "func_plat" ) ){ + if ( striEqual( ValueForKey( &entities[i], "classname" ), "func_plat" ) ){ res2list( pk3Sounds, "sound/movers/plats/pt1_strt.wav" ); res2list( pk3Sounds, "sound/movers/plats/pt1_end.wav" ); } - if ( !Q_stricmp( ValueForKey( &entities[i], "classname" ), "target_push" ) ){ + if ( striEqual( ValueForKey( &entities[i], "classname" ), "target_push" ) ){ if ( !( IntForKey( &entities[i], "spawnflags") & 1 ) ){ res2list( pk3Sounds, "sound/misc/windfly.wav" ); } @@ -1277,8 +1277,8 @@ int repackBSPMain( int argc, char **argv ){ continue; /* digest any images */ - if ( !Q_stricmp( token, "map" ) || - !Q_stricmp( token, "clampMap" ) ) { + if ( striEqual( token, "map" ) || + striEqual( token, "clampMap" ) ) { StrBuf_cat2( shaderText, "\n\t\t", token ); hasmap = true; @@ -1289,8 +1289,8 @@ int repackBSPMain( int argc, char **argv ){ } StrBuf_cat2( shaderText, " ", token ); } - else if ( !Q_stricmp( token, "animMap" ) || - !Q_stricmp( token, "clampAnimMap" ) ) { + else if ( striEqual( token, "animMap" ) || + striEqual( token, "clampAnimMap" ) ) { StrBuf_cat2( shaderText, "\n\t\t", token ); hasmap = true; @@ -1303,7 +1303,7 @@ int repackBSPMain( int argc, char **argv ){ } tokenready = true; } - else if ( !Q_stricmp( token, "videoMap" ) ){ + else if ( striEqual( token, "videoMap" ) ){ StrBuf_cat2( shaderText, "\n\t\t", token ); hasmap = true; GetToken( false ); @@ -1318,7 +1318,7 @@ int repackBSPMain( int argc, char **argv ){ !StrList_find( rExVideos, token ) ) StrList_append( pk3Videos, token ); } - else if ( !Q_stricmp( token, "mapComp" ) || !Q_stricmp( token, "mapNoComp" ) || !Q_stricmp( token, "animmapcomp" ) || !Q_stricmp( token, "animmapnocomp" ) ){ + else if ( striEqual( token, "mapComp" ) || striEqual( token, "mapNoComp" ) || striEqual( token, "animmapcomp" ) || striEqual( token, "animmapnocomp" ) ){ Sys_FPrintf( SYS_WRN, "WARNING7: %s : %s shader\n", pk3Shaders->s[shader], token ); hasmap = true; if ( line == scriptline ){ @@ -1345,18 +1345,18 @@ int repackBSPMain( int argc, char **argv ){ ----------------------------------------------------------------- */ /* match surfaceparm */ - else if ( !Q_stricmp( token, "surfaceparm" ) ) { + else if ( striEqual( token, "surfaceparm" ) ) { StrBuf_cat( shaderText, "\n\tsurfaceparm " ); GetToken( false ); StrBuf_cat( shaderText, token ); - if ( !Q_stricmp( token, "nodraw" ) ) { + if ( striEqual( token, "nodraw" ) ) { wantShader = false; pk3Shaders->s[shader][0] = '\0'; } } /* skyparms */ - else if ( !Q_stricmp( token, "skyParms" ) ) { + else if ( striEqual( token, "skyParms" ) ) { StrBuf_cat( shaderText, "\n\tskyParms " ); hasmap = true; /* get image base */ @@ -1364,7 +1364,7 @@ int repackBSPMain( int argc, char **argv ){ StrBuf_cat( shaderText, token ); /* ignore bogus paths */ - if ( Q_stricmp( token, "-" ) && Q_stricmp( token, "full" ) ) { + if ( !striEqual( token, "-" ) && !striEqual( token, "full" ) ) { const char skysides[6][3] = { "up", "dn", "lf", "rt", "bk", "ft" }; char* const skysidestring = token + strcatQ( token, "_@@.tga", sizeof( token ) ) - 6; for( size_t side = 0; side < 6; ++side ){ @@ -1388,7 +1388,7 @@ int repackBSPMain( int argc, char **argv ){ StrBuf_cat2( shaderText, "\n\t", token ); } } - else if ( !Q_stricmp( token, "fogparms" ) ){ + else if ( striEqual( token, "fogparms" ) ){ hasmap = true; if ( line == scriptline ){ StrBuf_cat2( shaderText, " ", token ); @@ -1436,7 +1436,7 @@ int repackBSPMain( int argc, char **argv ){ FixDOSName( pk3Shaders->s[i] ); //what if theres properly slashed one in the list? for ( j = 0; j < pk3Shaders->n; ++j ){ - if ( !Q_stricmp( pk3Shaders->s[i], pk3Shaders->s[j] ) && ( i != j ) ){ + if ( striEqual( pk3Shaders->s[i], pk3Shaders->s[j] ) && ( i != j ) ){ pk3Shaders->s[i][0] = '\0'; break; } diff --git a/tools/quake3/q3map2/bsp.c b/tools/quake3/q3map2/bsp.c index 027b86c8..a589e4cb 100644 --- a/tools/quake3/q3map2/bsp.c +++ b/tools/quake3/q3map2/bsp.c @@ -114,7 +114,7 @@ static void ProcessAdvertisements( void ) { /* is an advertisement? */ className = ValueForKey( &entities[ i ], "classname" ); - if ( !Q_stricmp( "advertisement", className ) ) { + if ( striEqual( "advertisement", className ) ) { modelKey = ValueForKey( &entities[ i ], "model" ); @@ -1081,7 +1081,7 @@ int BSPMain( int argc, char **argv ){ /* expand mapname */ strcpy( name, ExpandArg( argv[ i ] ) ); - if ( Q_stricmp( path_get_filename_base_end( name ), ".reg" ) ) { /* not .reg */ + if ( !striEqual( path_get_filename_base_end( name ), ".reg" ) ) { /* not .reg */ /* if we are doing a full map, delete the last saved region map */ sprintf( path, "%s.reg", source ); remove( path ); diff --git a/tools/quake3/q3map2/bspfile_abstract.c b/tools/quake3/q3map2/bspfile_abstract.c index eb057c26..f0995ca4 100644 --- a/tools/quake3/q3map2/bspfile_abstract.c +++ b/tools/quake3/q3map2/bspfile_abstract.c @@ -687,9 +687,9 @@ void UnparseEntities( void ){ } /* ydnar: certain entities get stripped from bsp file */ value2 = ValueForKey( &entities[ i ], "classname" ); - if ( !Q_stricmp( value2, "misc_model" ) || - !Q_stricmp( value2, "_decal" ) || - !Q_stricmp( value2, "_skybox" ) ) { + if ( striEqual( value2, "misc_model" ) || + striEqual( value2, "_decal" ) || + striEqual( value2, "_skybox" ) ) { continue; } @@ -943,9 +943,9 @@ void GetEntityShadowFlags( const entity_t *ent, const entity_t *ent2, int *castS /* vortex: game-specific default entity keys */ value = ValueForKey( ent, "classname" ); - if ( !Q_stricmp( game->magic, "dq" ) || !Q_stricmp( game->magic, "prophecy" ) ) { + if ( striEqual( game->magic, "dq" ) || striEqual( game->magic, "prophecy" ) ) { /* vortex: deluxe quake default shadow flags */ - if ( !Q_stricmp( value, "func_wall" ) ) { + if ( striEqual( value, "func_wall" ) ) { if ( recvShadows != NULL ) { *recvShadows = 1; } diff --git a/tools/quake3/q3map2/convert_bsp.c b/tools/quake3/q3map2/convert_bsp.c index c28ae6af..9ab65048 100644 --- a/tools/quake3/q3map2/convert_bsp.c +++ b/tools/quake3/q3map2/convert_bsp.c @@ -932,19 +932,19 @@ int ConvertBSPMain( int argc, char **argv ){ /* -format map|ase|... */ if ( strEqual( argv[ i ], "-format" ) ) { i++; - if ( !Q_stricmp( argv[ i ], "ase" ) ) { + if ( striEqual( argv[ i ], "ase" ) ) { convertFunc = ConvertBSPToASE; map_allowed = false; } - else if ( !Q_stricmp( argv[ i ], "obj" ) ) { + else if ( striEqual( argv[ i ], "obj" ) ) { convertFunc = ConvertBSPToOBJ; map_allowed = false; } - else if ( !Q_stricmp( argv[ i ], "map_bp" ) ) { + else if ( striEqual( argv[ i ], "map_bp" ) ) { convertFunc = ConvertBSPToMap_BP; map_allowed = true; } - else if ( !Q_stricmp( argv[ i ], "map" ) ) { + else if ( striEqual( argv[ i ], "map" ) ) { convertFunc = ConvertBSPToMap; map_allowed = true; } @@ -1004,7 +1004,7 @@ int ConvertBSPMain( int argc, char **argv ){ force_bsp = true; } - if ( force_map || ( !force_bsp && !Q_stricmp( path_get_extension( source ), "map" ) && map_allowed ) ) { + if ( force_map || ( !force_bsp && striEqual( path_get_extension( source ), "map" ) && map_allowed ) ) { if ( !map_allowed ) { Sys_Warning( "the requested conversion should not be done from .map files. Compile a .bsp first.\n" ); } diff --git a/tools/quake3/q3map2/convert_map.c b/tools/quake3/q3map2/convert_map.c index 1b95effb..81695c14 100644 --- a/tools/quake3/q3map2/convert_map.c +++ b/tools/quake3/q3map2/convert_map.c @@ -258,7 +258,7 @@ static void ConvertBrushFast( FILE *f, int num, bspBrush_t *brush, vec3_t origin } shader = &bspShaders[ side->shaderNum ]; //"noshader" happens on modelclip and unwanted sides ( usually breaking complex brushes ) - if( Q_stricmp( shader->shader, "noshader" ) ){ + if( !striEqual( shader->shader, "noshader" ) ){ notNoShader++; } if( notNoShader > 1 ){ @@ -280,7 +280,7 @@ static void ConvertBrushFast( FILE *f, int num, bspBrush_t *brush, vec3_t origin } shader = &bspShaders[ side->shaderNum ]; //"noshader" happens on modelclip and unwanted sides ( usually breaking complex brushes ) - if( !Q_stricmp( shader->shader, "default" ) || ( !Q_stricmp( shader->shader, "noshader" ) && !modelclip ) ) + if( striEqual( shader->shader, "default" ) || ( striEqual( shader->shader, "noshader" ) && !modelclip ) ) continue; /* add build side */ @@ -408,7 +408,7 @@ static void ConvertBrush( FILE *f, int num, bspBrush_t *brush, vec3_t origin, bo } shader = &bspShaders[ side->shaderNum ]; //"noshader" happens on modelclip and unwanted sides ( usually breaking complex brushes ) - if( Q_stricmp( shader->shader, "noshader" ) ){ + if( !striEqual( shader->shader, "noshader" ) ){ notNoShader++; } if( notNoShader > 1 ){ @@ -430,7 +430,7 @@ static void ConvertBrush( FILE *f, int num, bspBrush_t *brush, vec3_t origin, bo } shader = &bspShaders[ side->shaderNum ]; //"noshader" happens on modelclip and unwanted sides ( usually breaking complex brushes ) - if( !Q_stricmp( shader->shader, "default" ) || ( !Q_stricmp( shader->shader, "noshader" ) && !modelclip ) ) + if( striEqual( shader->shader, "default" ) || ( striEqual( shader->shader, "noshader" ) && !modelclip ) ) continue; /* add build side */ @@ -772,7 +772,7 @@ for ( i = 0; i < brush->numSides; i++ ) continue; } shader = &bspShaders[ side->shaderNum ]; - if ( !Q_stricmp( shader->shader, "default" ) || !Q_stricmp( shader->shader, "noshader" ) ) { + if ( striEqual( shader->shader, "default" ) || striEqual( shader->shader, "noshader" ) ) { continue; } @@ -979,12 +979,12 @@ static void ConvertEPairs( FILE *f, entity_t *e, bool skip_origin ){ } /* ignore model keys with * prefixed values */ - if ( !Q_stricmp( ep->key, "model" ) && ep->value[ 0 ] == '*' ) { + if ( striEqual( ep->key, "model" ) && ep->value[ 0 ] == '*' ) { continue; } /* ignore origin keys if skip_origin is set */ - if ( skip_origin && !Q_stricmp( ep->key, "origin" ) ) { + if ( skip_origin && striEqual( ep->key, "origin" ) ) { continue; } diff --git a/tools/quake3/q3map2/convert_obj.c b/tools/quake3/q3map2/convert_obj.c index 3fb2f525..6bb831d8 100644 --- a/tools/quake3/q3map2/convert_obj.c +++ b/tools/quake3/q3map2/convert_obj.c @@ -268,7 +268,7 @@ void Convert_ReferenceLightmaps( const char* base, int* lmIndices ){ Sys_FPrintf( SYS_WRN, "WARNING9: %s : line %d : opening brace inside shader stage\n", shaderfile, scriptline ); /* digest any images */ - if ( !Q_stricmp( token, "map" ) ) { + if ( striEqual( token, "map" ) ) { /* get an image */ GetToken( false ); if ( *token != '*' && *token != '$' ) { diff --git a/tools/quake3/q3map2/decals.c b/tools/quake3/q3map2/decals.c index c318088a..aa1069a1 100644 --- a/tools/quake3/q3map2/decals.c +++ b/tools/quake3/q3map2/decals.c @@ -425,7 +425,7 @@ void ProcessDecals( void ){ /* get entity */ e = &entities[ i ]; value = ValueForKey( e, "classname" ); - if ( Q_stricmp( value, "_decal" ) ) { + if ( !striEqual( value, "_decal" ) ) { continue; } diff --git a/tools/quake3/q3map2/light.c b/tools/quake3/q3map2/light.c index a8687914..e91f4702 100644 --- a/tools/quake3/q3map2/light.c +++ b/tools/quake3/q3map2/light.c @@ -2990,7 +2990,7 @@ int LightMain( int argc, char **argv ){ path_set_extension( source, ".bsp" ); strcpy( name, ExpandArg( argv[ i ] ) ); - if ( Q_stricmp( path_get_filename_base_end( name ), ".reg" ) ) { /* not .reg */ + if ( !striEqual( path_get_filename_base_end( name ), ".reg" ) ) { /* not .reg */ path_set_extension( name, ".map" ); } diff --git a/tools/quake3/q3map2/map.c b/tools/quake3/q3map2/map.c index e1de28e7..ec18f375 100644 --- a/tools/quake3/q3map2/map.c +++ b/tools/quake3/q3map2/map.c @@ -1590,7 +1590,7 @@ void LoadEntityIndexMap( entity_t *e ){ Sys_FPrintf( SYS_VRB, "Entity %d (%s) has shader index map \"%s\"\n", mapEnt->mapEntityNum, ValueForKey( e, "classname" ), indexMapFilename ); /* handle tga image */ - if ( !Q_stricmp( path_get_extension( indexMapFilename ), "tga" ) ) { + if ( striEqual( path_get_extension( indexMapFilename ), "tga" ) ) { /* load it */ Load32BitImage( indexMapFilename, &pixels32, &w, &h ); @@ -1802,7 +1802,7 @@ static bool ParseMapEntity( bool onlyLights, bool noCollapseGroups ){ } /* ydnar: determine if this is a func_group */ - funcGroup = !Q_stricmp( "func_group", classname ); + funcGroup = striEqual( "func_group", classname ); /* worldspawn (and func_groups) default to cast/recv shadows in worldspawn group */ if ( funcGroup || mapEnt->mapEntityNum == 0 ) { @@ -1946,7 +1946,7 @@ static bool ParseMapEntity( bool onlyLights, bool noCollapseGroups ){ } /* group_info entities are just for editor grouping (fixme: leak!) */ - if ( !noCollapseGroups && !Q_stricmp( "group_info", classname ) ) { + if ( !noCollapseGroups && striEqual( "group_info", classname ) ) { numEntities--; return true; } diff --git a/tools/quake3/q3map2/model.c b/tools/quake3/q3map2/model.c index ed419148..d8983121 100644 --- a/tools/quake3/q3map2/model.c +++ b/tools/quake3/q3map2/model.c @@ -359,7 +359,7 @@ void InsertModel( const char *name, int skin, int frame, m4x4_t transform, remap picoShaderName = NULL; for ( sf2 = sf; sf2 != NULL; sf2 = sf2->next ) { - if ( !Q_stricmp( surface->name, sf2->name ) ) { + if ( striEqual( surface->name, sf2->name ) ) { Sys_FPrintf( SYS_VRB, "Skin file: mapping %s to %s\n", surface->name, sf2->to ); picoShaderName = sf2->to; break; @@ -1421,7 +1421,7 @@ void AddTriangleModels( entity_t *e ){ e2 = &entities[ num ]; /* convert misc_models into raw geometry */ - if ( Q_stricmp( "misc_model", ValueForKey( e2, "classname" ) ) ) { + if ( !striEqual( "misc_model", ValueForKey( e2, "classname" ) ) ) { continue; } diff --git a/tools/quake3/q3map2/path_init.c b/tools/quake3/q3map2/path_init.c index 955c3369..7ecbc4ff 100644 --- a/tools/quake3/q3map2/path_init.c +++ b/tools/quake3/q3map2/path_init.c @@ -210,13 +210,13 @@ game_t *GetGame( char *arg ){ } /* joke */ - if ( !Q_stricmp( arg, "quake1" ) || - !Q_stricmp( arg, "quake2" ) || - !Q_stricmp( arg, "unreal" ) || - !Q_stricmp( arg, "ut2k3" ) || - !Q_stricmp( arg, "dn3d" ) || - !Q_stricmp( arg, "dnf" ) || - !Q_stricmp( arg, "hl" ) ) { + if ( striEqual( arg, "quake1" ) || + striEqual( arg, "quake2" ) || + striEqual( arg, "unreal" ) || + striEqual( arg, "ut2k3" ) || + striEqual( arg, "dn3d" ) || + striEqual( arg, "dnf" ) || + striEqual( arg, "hl" ) ) { Sys_Printf( "April fools, silly rabbit!\n" ); exit( 0 ); } @@ -225,7 +225,7 @@ game_t *GetGame( char *arg ){ i = 0; while ( games[ i ].arg != NULL ) { - if ( Q_stricmp( arg, games[ i ].arg ) == 0 ) { + if ( striEqual( arg, games[ i ].arg ) ) { return &games[ i ]; } i++; diff --git a/tools/quake3/q3map2/portals.c b/tools/quake3/q3map2/portals.c index c34cfe24..f2b22968 100644 --- a/tools/quake3/q3map2/portals.c +++ b/tools/quake3/q3map2/portals.c @@ -680,7 +680,7 @@ int FloodEntities( tree_t *tree ){ /* handle skybox entities */ value = ValueForKey( e, "classname" ); - if ( !Q_stricmp( value, "_skybox" ) ) { + if ( striEqual( value, "_skybox" ) ) { skybox = true; skyboxPresent = true; diff --git a/tools/quake3/q3map2/shaders.c b/tools/quake3/q3map2/shaders.c index 60e4a334..da0c3bd3 100644 --- a/tools/quake3/q3map2/shaders.c +++ b/tools/quake3/q3map2/shaders.c @@ -261,7 +261,7 @@ bool ApplySurfaceParm( char *name, int *contentFlags, int *surfaceFlags, int *co while ( sp->name != NULL ) { /* match? */ - if ( !Q_stricmp( name, sp->name ) ) { + if ( striEqual( name, sp->name ) ) { /* clear and set flags */ *contentFlags &= ~( sp->contentFlagsClear ); *contentFlags |= sp->contentFlags; @@ -285,7 +285,7 @@ bool ApplySurfaceParm( char *name, int *contentFlags, int *surfaceFlags, int *co sp = &custSurfaceParms[ i ]; /* match? */ - if ( !Q_stricmp( name, sp->name ) ) { + if ( striEqual( name, sp->name ) ) { /* clear and set flags */ *contentFlags &= ~( sp->contentFlagsClear ); *contentFlags |= sp->contentFlags; @@ -848,7 +848,7 @@ shaderInfo_t *ShaderInfoForShader( const char *shaderName ){ for ( i = 0; i < numShaderInfo; i++ ) { si = &shaderInfo[ i ]; - if ( !Q_stricmp( shader, si->shader ) ) { + if ( striEqual( shader, si->shader ) ) { /* check if shader is deprecated */ if ( deprecationDepth < MAX_SHADER_DEPRECATION_DEPTH && si->deprecateShader && si->deprecateShader[ 0 ] ) { /* override name */ @@ -1048,14 +1048,14 @@ static void ParseShaderFile( const char *filename ){ /* only care about images if we don't have a editor/light image */ if ( si->editorImagePath[ 0 ] == '\0' && si->lightImagePath[ 0 ] == '\0' && si->implicitImagePath[ 0 ] == '\0' ) { /* digest any images */ - if ( !Q_stricmp( token, "map" ) || - !Q_stricmp( token, "clampMap" ) || - !Q_stricmp( token, "animMap" ) || - !Q_stricmp( token, "clampAnimMap" ) || - !Q_stricmp( token, "mapComp" ) || - !Q_stricmp( token, "mapNoComp" ) ) { + if ( striEqual( token, "map" ) || + striEqual( token, "clampMap" ) || + striEqual( token, "animMap" ) || + striEqual( token, "clampAnimMap" ) || + striEqual( token, "mapComp" ) || + striEqual( token, "mapNoComp" ) ) { /* skip one token for animated stages */ - if ( !Q_stricmp( token, "animMap" ) || !Q_stricmp( token, "clampAnimMap" ) ) { + if ( striEqual( token, "animMap" ) || striEqual( token, "clampAnimMap" ) ) { GetTokenAppend( shaderText, false ); } @@ -1079,7 +1079,7 @@ static void ParseShaderFile( const char *filename ){ ----------------------------------------------------------------- */ /* match surfaceparm */ - else if ( !Q_stricmp( token, "surfaceparm" ) ) { + else if ( striEqual( token, "surfaceparm" ) ) { GetTokenAppend( shaderText, false ); if ( !ApplySurfaceParm( token, &si->contentFlags, &si->surfaceFlags, &si->compileFlags ) ) { Sys_Warning( "Unknown surfaceparm: \"%s\"\n", token ); @@ -1092,25 +1092,25 @@ static void ParseShaderFile( const char *filename ){ ----------------------------------------------------------------- */ /* ydnar: fogparms (for determining fog volumes) */ - else if ( !Q_stricmp( token, "fogparms" ) ) { + else if ( striEqual( token, "fogparms" ) ) { si->fogParms = true; } /* ydnar: polygonoffset (for no culling) */ - else if ( !Q_stricmp( token, "polygonoffset" ) ) { + else if ( striEqual( token, "polygonoffset" ) ) { si->polygonOffset = true; } /* tesssize is used to force liquid surfaces to subdivide */ - else if ( !Q_stricmp( token, "tessSize" ) || !Q_stricmp( token, "q3map_tessSize" ) /* sof2 */ ) { + else if ( striEqual( token, "tessSize" ) || striEqual( token, "q3map_tessSize" ) /* sof2 */ ) { GetTokenAppend( shaderText, false ); si->subdivisions = atof( token ); } /* cull none will set twoSided (ydnar: added disable too) */ - else if ( !Q_stricmp( token, "cull" ) ) { + else if ( striEqual( token, "cull" ) ) { GetTokenAppend( shaderText, false ); - if ( !Q_stricmp( token, "none" ) || !Q_stricmp( token, "disable" ) || !Q_stricmp( token, "twosided" ) ) { + if ( striEqual( token, "none" ) || striEqual( token, "disable" ) || striEqual( token, "twosided" ) ) { si->twoSided = true; } } @@ -1118,7 +1118,7 @@ static void ParseShaderFile( const char *filename ){ /* deformVertexes autosprite[ 2 ] we catch this so autosprited surfaces become point lights instead of area lights */ - else if ( !Q_stricmp( token, "deformVertexes" ) ) { + else if ( striEqual( token, "deformVertexes" ) ) { GetTokenAppend( shaderText, false ); /* deformVertexes autosprite(2) */ @@ -1133,7 +1133,7 @@ static void ParseShaderFile( const char *filename ){ } /* deformVertexes move (ydnar: for particle studio support) */ - if ( !Q_stricmp( token, "move" ) ) { + if ( striEqual( token, "move" ) ) { vec3_t amt, mins, maxs; float base, amp; @@ -1159,13 +1159,13 @@ static void ParseShaderFile( const char *filename ){ } /* light (old-style flare specification) */ - else if ( !Q_stricmp( token, "light" ) ) { + else if ( striEqual( token, "light" ) ) { GetTokenAppend( shaderText, false ); si->flareShader = game->flareShader; } /* ydnar: damageShader (sof2 mods) */ - else if ( !Q_stricmp( token, "damageShader" ) ) { + else if ( striEqual( token, "damageShader" ) ) { GetTokenAppend( shaderText, false ); if ( token[ 0 ] != '\0' ) { si->damageShader = copystring( token ); @@ -1174,7 +1174,7 @@ static void ParseShaderFile( const char *filename ){ } /* ydnar: enemy territory implicit shaders */ - else if ( !Q_stricmp( token, "implicitMap" ) ) { + else if ( striEqual( token, "implicitMap" ) ) { si->implicitMap = IM_OPAQUE; GetTokenAppend( shaderText, false ); if ( token[ 0 ] == '-' && token[ 1 ] == '\0' ) { @@ -1185,7 +1185,7 @@ static void ParseShaderFile( const char *filename ){ } } - else if ( !Q_stricmp( token, "implicitMask" ) ) { + else if ( striEqual( token, "implicitMask" ) ) { si->implicitMap = IM_MASKED; GetTokenAppend( shaderText, false ); if ( token[ 0 ] == '-' && token[ 1 ] == '\0' ) { @@ -1196,7 +1196,7 @@ static void ParseShaderFile( const char *filename ){ } } - else if ( !Q_stricmp( token, "implicitBlend" ) ) { + else if ( striEqual( token, "implicitBlend" ) ) { si->implicitMap = IM_MASKED; GetTokenAppend( shaderText, false ); if ( token[ 0 ] == '-' && token[ 1 ] == '\0' ) { @@ -1213,33 +1213,33 @@ static void ParseShaderFile( const char *filename ){ ----------------------------------------------------------------- */ /* qer_editorimage */ - else if ( !Q_stricmp( token, "qer_editorImage" ) ) { + else if ( striEqual( token, "qer_editorImage" ) ) { GetTokenAppend( shaderText, false ); strcpy( si->editorImagePath, token ); DefaultExtension( si->editorImagePath, ".tga" ); } /* ydnar: q3map_normalimage (bumpmapping normal map) */ - else if ( !Q_stricmp( token, "q3map_normalImage" ) ) { + else if ( striEqual( token, "q3map_normalImage" ) ) { GetTokenAppend( shaderText, false ); strcpy( si->normalImagePath, token ); DefaultExtension( si->normalImagePath, ".tga" ); } /* q3map_lightimage */ - else if ( !Q_stricmp( token, "q3map_lightImage" ) ) { + else if ( striEqual( token, "q3map_lightImage" ) ) { GetTokenAppend( shaderText, false ); strcpy( si->lightImagePath, token ); DefaultExtension( si->lightImagePath, ".tga" ); } /* ydnar: skyparms */ - else if ( !Q_stricmp( token, "skyParms" ) ) { + else if ( striEqual( token, "skyParms" ) ) { /* get image base */ GetTokenAppend( shaderText, false ); /* ignore bogus paths */ - if ( Q_stricmp( token, "-" ) && Q_stricmp( token, "full" ) ) { + if ( !striEqual( token, "-" ) && !striEqual( token, "full" ) ) { strcpy( si->skyParmsImageBase, token ); /* use top image as sky light image */ @@ -1262,11 +1262,11 @@ static void ParseShaderFile( const char *filename ){ intensity falls off with angle but not distance 100 is a fairly bright sun degree of 0 = from the east, 90 = north, etc. altitude of 0 = sunrise/set, 90 = noon ydnar: sof2map has bareword 'sun' token, so we support that as well */ - else if ( !Q_stricmp( token, "sun" ) /* sof2 */ || !Q_stricmp( token, "q3map_sun" ) || !Q_stricmp( token, "q3map_sunExt" ) ) { + else if ( striEqual( token, "sun" ) /* sof2 */ || striEqual( token, "q3map_sun" ) || striEqual( token, "q3map_sunExt" ) ) { float a, b; sun_t *sun; /* ydnar: extended sun directive? */ - const bool ext = !Q_stricmp( token, "q3map_sunext" ); + const bool ext = striEqual( token, "q3map_sunext" ); /* allocate sun */ sun = safe_calloc( sizeof( *sun ) ); @@ -1335,7 +1335,7 @@ static void ParseShaderFile( const char *filename ){ /* match q3map_ */ else if ( !Q_strncasecmp( token, "q3map_", 6 ) ) { /* ydnar: q3map_baseShader (inherit this shader's parameters) */ - if ( !Q_stricmp( token, "q3map_baseShader" ) ) { + if ( striEqual( token, "q3map_baseShader" ) ) { shaderInfo_t *si2; bool oldWarnImage; @@ -1365,7 +1365,7 @@ static void ParseShaderFile( const char *filename ){ } /* ydnar: q3map_surfacemodel */ - else if ( !Q_stricmp( token, "q3map_surfacemodel" ) ) { + else if ( striEqual( token, "q3map_surfacemodel" ) ) { surfaceModel_t *model; /* allocate new model and attach it */ @@ -1397,7 +1397,7 @@ static void ParseShaderFile( const char *filename ){ } /* ydnar/sd: q3map_foliage */ - else if ( !Q_stricmp( token, "q3map_foliage" ) ) { + else if ( striEqual( token, "q3map_foliage" ) ) { foliage_t *foliage; @@ -1421,13 +1421,13 @@ static void ParseShaderFile( const char *filename ){ } /* ydnar: q3map_bounce (fraction of light to re-emit during radiosity passes) */ - else if ( !Q_stricmp( token, "q3map_bounce" ) || !Q_stricmp( token, "q3map_bounceScale" ) ) { + else if ( striEqual( token, "q3map_bounce" ) || striEqual( token, "q3map_bounceScale" ) ) { GetTokenAppend( shaderText, false ); si->bounceScale = atof( token ); } /* ydnar/splashdamage: q3map_skyLight */ - else if ( !Q_stricmp( token, "q3map_skyLight" ) ) { + else if ( striEqual( token, "q3map_skyLight" ) ) { GetTokenAppend( shaderText, false ); si->skyLightValue = atof( token ); GetTokenAppend( shaderText, false ); @@ -1443,13 +1443,13 @@ static void ParseShaderFile( const char *filename ){ } /* q3map_surfacelight */ - else if ( !Q_stricmp( token, "q3map_surfacelight" ) ) { + else if ( striEqual( token, "q3map_surfacelight" ) ) { GetTokenAppend( shaderText, false ); si->value = atof( token ); } /* q3map_lightStyle (sof2/jk2 lightstyle) */ - else if ( !Q_stricmp( token, "q3map_lightStyle" ) ) { + else if ( striEqual( token, "q3map_lightStyle" ) ) { GetTokenAppend( shaderText, false ); val = atoi( token ); if ( val < 0 ) { @@ -1462,7 +1462,7 @@ static void ParseShaderFile( const char *filename ){ } /* wolf: q3map_lightRGB */ - else if ( !Q_stricmp( token, "q3map_lightRGB" ) ) { + else if ( striEqual( token, "q3map_lightRGB" ) ) { VectorClear( si->color ); GetTokenAppend( shaderText, false ); si->color[ 0 ] = atof( token ); @@ -1479,13 +1479,13 @@ static void ParseShaderFile( const char *filename ){ } /* q3map_lightSubdivide */ - else if ( !Q_stricmp( token, "q3map_lightSubdivide" ) ) { + else if ( striEqual( token, "q3map_lightSubdivide" ) ) { GetTokenAppend( shaderText, false ); si->lightSubdivide = atoi( token ); } /* q3map_backsplash */ - else if ( !Q_stricmp( token, "q3map_backsplash" ) ) { + else if ( striEqual( token, "q3map_backsplash" ) ) { GetTokenAppend( shaderText, false ); si->backsplashFraction = atof( token ) * 0.01f; GetTokenAppend( shaderText, false ); @@ -1493,7 +1493,7 @@ static void ParseShaderFile( const char *filename ){ } /* q3map_floodLight */ - else if ( !Q_stricmp( token, "q3map_floodLight" ) ) { + else if ( striEqual( token, "q3map_floodLight" ) ) { /* get color */ GetTokenAppend( shaderText, false ); si->floodlightRGB[ 0 ] = atof( token ); @@ -1516,24 +1516,24 @@ static void ParseShaderFile( const char *filename ){ } /* jal: q3map_nodirty : skip dirty */ - else if ( !Q_stricmp( token, "q3map_nodirty" ) ) { + else if ( striEqual( token, "q3map_nodirty" ) ) { si->noDirty = true; } /* q3map_lightmapSampleSize */ - else if ( !Q_stricmp( token, "q3map_lightmapSampleSize" ) ) { + else if ( striEqual( token, "q3map_lightmapSampleSize" ) ) { GetTokenAppend( shaderText, false ); si->lightmapSampleSize = atoi( token ); } /* q3map_lightmapSampleOffset */ - else if ( !Q_stricmp( token, "q3map_lightmapSampleOffset" ) ) { + else if ( striEqual( token, "q3map_lightmapSampleOffset" ) ) { GetTokenAppend( shaderText, false ); si->lightmapSampleOffset = atof( token ); } /* ydnar: q3map_lightmapFilterRadius */ - else if ( !Q_stricmp( token, "q3map_lightmapFilterRadius" ) ) { + else if ( striEqual( token, "q3map_lightmapFilterRadius" ) ) { GetTokenAppend( shaderText, false ); si->lmFilterRadius = atof( token ); GetTokenAppend( shaderText, false ); @@ -1541,15 +1541,15 @@ static void ParseShaderFile( const char *filename ){ } /* ydnar: q3map_lightmapAxis [xyz] */ - else if ( !Q_stricmp( token, "q3map_lightmapAxis" ) ) { + else if ( striEqual( token, "q3map_lightmapAxis" ) ) { GetTokenAppend( shaderText, false ); - if ( !Q_stricmp( token, "x" ) ) { + if ( striEqual( token, "x" ) ) { VectorSet( si->lightmapAxis, 1, 0, 0 ); } - else if ( !Q_stricmp( token, "y" ) ) { + else if ( striEqual( token, "y" ) ) { VectorSet( si->lightmapAxis, 0, 1, 0 ); } - else if ( !Q_stricmp( token, "z" ) ) { + else if ( striEqual( token, "z" ) ) { VectorSet( si->lightmapAxis, 0, 0, 1 ); } else @@ -1560,7 +1560,7 @@ static void ParseShaderFile( const char *filename ){ } /* ydnar: q3map_lightmapSize (for autogenerated shaders + external tga lightmaps) */ - else if ( !Q_stricmp( token, "q3map_lightmapSize" ) ) { + else if ( striEqual( token, "q3map_lightmapSize" ) ) { GetTokenAppend( shaderText, false ); si->lmCustomWidth = atoi( token ); GetTokenAppend( shaderText, false ); @@ -1577,7 +1577,7 @@ static void ParseShaderFile( const char *filename ){ } /* ydnar: q3map_lightmapBrightness N (for autogenerated shaders + external tga lightmaps) */ - else if ( !Q_stricmp( token, "q3map_lightmapBrightness" ) || !Q_stricmp( token, "q3map_lightmapGamma" ) ) { + else if ( striEqual( token, "q3map_lightmapBrightness" ) || striEqual( token, "q3map_lightmapGamma" ) ) { GetTokenAppend( shaderText, false ); si->lmBrightness *= atof( token ); if ( si->lmBrightness < 0 ) { @@ -1586,18 +1586,18 @@ static void ParseShaderFile( const char *filename ){ } /* q3map_vertexScale (scale vertex lighting by this fraction) */ - else if ( !Q_stricmp( token, "q3map_vertexScale" ) ) { + else if ( striEqual( token, "q3map_vertexScale" ) ) { GetTokenAppend( shaderText, false ); si->vertexScale *= atof( token ); } /* q3map_noVertexLight */ - else if ( !Q_stricmp( token, "q3map_noVertexLight" ) ) { + else if ( striEqual( token, "q3map_noVertexLight" ) ) { si->noVertexLight = true; } /* q3map_flare[Shader] */ - else if ( !Q_stricmp( token, "q3map_flare" ) || !Q_stricmp( token, "q3map_flareShader" ) ) { + else if ( striEqual( token, "q3map_flare" ) || striEqual( token, "q3map_flareShader" ) ) { GetTokenAppend( shaderText, false ); if ( token[ 0 ] != '\0' ) { si->flareShader = copystring( token ); @@ -1605,7 +1605,7 @@ static void ParseShaderFile( const char *filename ){ } /* q3map_backShader */ - else if ( !Q_stricmp( token, "q3map_backShader" ) ) { + else if ( striEqual( token, "q3map_backShader" ) ) { GetTokenAppend( shaderText, false ); if ( token[ 0 ] != '\0' ) { si->backShader = copystring( token ); @@ -1613,7 +1613,7 @@ static void ParseShaderFile( const char *filename ){ } /* ydnar: q3map_cloneShader */ - else if ( !Q_stricmp( token, "q3map_cloneShader" ) ) { + else if ( striEqual( token, "q3map_cloneShader" ) ) { GetTokenAppend( shaderText, false ); if ( token[ 0 ] != '\0' ) { si->cloneShader = copystring( token ); @@ -1621,7 +1621,7 @@ static void ParseShaderFile( const char *filename ){ } /* q3map_remapShader */ - else if ( !Q_stricmp( token, "q3map_remapShader" ) ) { + else if ( striEqual( token, "q3map_remapShader" ) ) { GetTokenAppend( shaderText, false ); if ( token[ 0 ] != '\0' ) { si->remapShader = copystring( token ); @@ -1629,7 +1629,7 @@ static void ParseShaderFile( const char *filename ){ } /* q3map_deprecateShader */ - else if ( !Q_stricmp( token, "q3map_deprecateShader" ) ) { + else if ( striEqual( token, "q3map_deprecateShader" ) ) { GetTokenAppend( shaderText, false ); if ( token[ 0 ] != '\0' ) { si->deprecateShader = copystring( token ); @@ -1637,13 +1637,13 @@ static void ParseShaderFile( const char *filename ){ } /* ydnar: q3map_offset */ - else if ( !Q_stricmp( token, "q3map_offset" ) ) { + else if ( striEqual( token, "q3map_offset" ) ) { GetTokenAppend( shaderText, false ); si->offset = atof( token ); } /* ydnar: q3map_fur */ - else if ( !Q_stricmp( token, "q3map_fur" ) ) { + else if ( striEqual( token, "q3map_fur" ) ) { GetTokenAppend( shaderText, false ); si->furNumLayers = atoi( token ); GetTokenAppend( shaderText, false ); @@ -1653,7 +1653,7 @@ static void ParseShaderFile( const char *filename ){ } /* ydnar: gs mods: legacy support for terrain/terrain2 shaders */ - else if ( !Q_stricmp( token, "q3map_terrain" ) ) { + else if ( striEqual( token, "q3map_terrain" ) ) { /* team arena terrain is assumed to be nonplanar, with full normal averaging, passed through the metatriangle surface pipeline, with a lightmap axis on z */ si->legacyTerrain = true; @@ -1667,18 +1667,18 @@ static void ParseShaderFile( const char *filename ){ } /* ydnar: picomodel: q3map_forceMeta (forces brush faces and/or triangle models to go through the metasurface pipeline) */ - else if ( !Q_stricmp( token, "q3map_forceMeta" ) ) { + else if ( striEqual( token, "q3map_forceMeta" ) ) { si->forceMeta = true; } /* ydnar: gs mods: q3map_shadeAngle */ - else if ( !Q_stricmp( token, "q3map_shadeAngle" ) ) { + else if ( striEqual( token, "q3map_shadeAngle" ) ) { GetTokenAppend( shaderText, false ); si->shadeAngleDegrees = atof( token ); } /* ydnar: q3map_textureSize (substitute for q3map_lightimage derivation for terrain) */ - else if ( !Q_stricmp( token, "q3map_textureSize" ) ) { + else if ( striEqual( token, "q3map_textureSize" ) ) { GetTokenAppend( shaderText, false ); si->shaderWidth = atoi( token ); GetTokenAppend( shaderText, false ); @@ -1686,18 +1686,18 @@ static void ParseShaderFile( const char *filename ){ } /* ydnar: gs mods: q3map_tcGen