=================================================================== --- mod/src/cl_dll/c_baseanimating.cpp 2005/06/11 22:14:20 1.4 +++ mod/src/cl_dll/c_baseanimating.cpp 2005/10/01 05:52:05 @@ -1061,7 +1061,7 @@ #if _DEBUG - if (stricmp( r_sequence_debug.GetString(), hdr->name ) == 0) + if (Q_stricmp( r_sequence_debug.GetString(), hdr->name ) == 0) { DevMsgRT( "%6.2f : ", gpGlobals->curtime ); for( i=0; i < hdr->GetNumPoseParameters(); i++) @@ -1435,7 +1435,7 @@ flCycle = ClampCycle( flCycle, IsSequenceLooping( blend->nSequence ) ); #if _DEBUG - if (stricmp( r_sequence_debug.GetString(), hdr->name ) == 0) + if (Q_stricmp( r_sequence_debug.GetString(), hdr->name ) == 0) { DevMsgRT( "%6.2f : %30s : %5.3f : %4.2f +\n", gpGlobals->curtime, hdr->pSeqdesc( blend->nSequence ).pszLabel(), flCycle, (float)blend->flWeight ); } @@ -1511,7 +1511,7 @@ float fCycle = GetCycle(); #if _DEBUG - if (stricmp( r_sequence_debug.GetString(), hdr->name ) == 0) + if (Q_stricmp( r_sequence_debug.GetString(), hdr->name ) == 0) { DevMsgRT( "%6.2f : %30s : %5.3f : %4.2f\n", currentTime, hdr->pSeqdesc( GetSequence() ).pszLabel(), fCycle, 1.0 ); } @@ -1984,7 +1984,7 @@ { const mstudioposeparamdesc_t &Pose = pstudiohdr->pPoseParameter( i ); - if ( &Pose && stricmp( Pose.pszName(), pName ) == 0 ) + if ( &Pose && Q_stricmp( Pose.pszName(), pName ) == 0 ) { return Pose; } @@ -3313,7 +3313,7 @@ /* studiohdr_t *hdr = GetModelPtr(); - if (hdr && stricmp( hdr->name, "player.mdl") != 0) + if (hdr && Q_stricmp( hdr->name, "player.mdl") != 0) { Msg("PostDataUpdate : %d %.3f : %.3f %.3f : %d:%d %s\n", GetSequence(), m_flAnimTime, @@ -4247,7 +4247,7 @@ for (int i = 0; i < pstudiohdr->GetNumPoseParameters(); i++) { - if (stricmp( pstudiohdr->pPoseParameter( i ).pszName(), szName ) == 0) + if (Q_stricmp( pstudiohdr->pPoseParameter( i ).pszName(), szName ) == 0) { return i; } =================================================================== --- mod/src/cl_dll/c_baseanimatingoverlay.cpp 2005/06/11 22:14:20 1.4 +++ mod/src/cl_dll/c_baseanimatingoverlay.cpp 2005/10/01 05:49:01 @@ -208,7 +208,7 @@ if ( pHead && pPrev1 && pHead->nSequence != pPrev1->nSequence ) { #if _DEBUG - if ( stricmp( r_sequence_debug.GetString(), hdr->name ) == 0) + if ( Q_stricmp( r_sequence_debug.GetString(), hdr->name ) == 0) { DevMsgRT( "(%5.2f : %30s : %5.3f : %4.2f : %1d)\n", t0, hdr->pSeqdesc( pHead->nSequence ).pszLabel(), (float)pHead->flCycle, (float)pHead->flWeight, i ); DevMsgRT( "(%5.2f : %30s : %5.3f : %4.2f : %1d)\n", t1, hdr->pSeqdesc( pPrev1->nSequence ).pszLabel(), (float)pPrev1->flCycle, (float)pPrev1->flWeight, i ); @@ -245,7 +245,7 @@ } /* - if (stricmp( r_seq_overlay_debug.GetString(), hdr->name ) == 0) + if (Q_stricmp( r_seq_overlay_debug.GetString(), hdr->name ) == 0) { DevMsgRT( "(%30s %6.2f : %6.2f : %6.2f)\n", hdr->pSeqdesc( pHead->nSequence ).pszLabel(), (float)pPrev2->flCycle, (float)pPrev1->flCycle, (float)pHead->flCycle ); } @@ -338,7 +338,7 @@ AccumulatePose( hdr, m_pIk, pos, q, m_AnimOverlay[i].nSequence, fCycle, poseparam, boneMask, fWeight, currentTime ); #if _DEBUG - if (stricmp( r_sequence_debug.GetString(), hdr->name ) == 0) + if (Q_stricmp( r_sequence_debug.GetString(), hdr->name ) == 0) { if (1) { =================================================================== --- mod/src/cl_dll/c_baseflex.cpp 2005/02/18 04:45:43 1.1.1.1 +++ mod/src/cl_dll/c_baseflex.cpp 2005/10/01 05:49:01 @@ -256,7 +256,7 @@ for ( i = 0; i < m_FileList.Size(); i++ ) { CFlexSceneFile *file = m_FileList[ i ]; - if ( file && !stricmp( file->filename, filename ) ) + if ( file && !Q_stricmp( file->filename, filename ) ) { return file->buffer; } @@ -910,7 +910,7 @@ int i; for (i = 0; i < g_numflexcontrollers; i++) { - if (stricmp( g_flexcontroller[i], szName ) == 0) + if (Q_stricmp( g_flexcontroller[i], szName ) == 0) { return i; } @@ -940,7 +940,7 @@ const char *name = pSetting->pszName(); - if ( !stricmp( name, expr ) ) + if ( !Q_stricmp( name, expr ) ) break; } =================================================================== --- mod/src/cl_dll/cdll_util.h 2005/06/11 22:14:22 1.3 +++ mod/src/cl_dll/cdll_util.h 2005/10/01 05:49:02 @@ -153,7 +153,7 @@ // Misc useful inline bool FStrEq(const char *sz1, const char *sz2) { - return(stricmp(sz1, sz2) == 0); + return(Q_stricmp(sz1, sz2) == 0); } #endif // !UTIL_H =================================================================== --- mod/src/cl_dll/hud.cpp 2005/02/18 04:45:44 1.1.1.1 +++ mod/src/cl_dll/hud.cpp 2005/10/01 05:49:02 @@ -638,7 +638,7 @@ { for ( int i = 0; i < m_HudList.Size(); i++ ) { - if ( stricmp( m_HudList[i]->GetName(), pName ) == 0 ) + if ( Q_stricmp( m_HudList[i]->GetName(), pName ) == 0 ) return m_HudList[i]; } =================================================================== --- mod/src/cl_dll/hud_animationinfo.cpp 2005/02/18 04:45:44 1.1.1.1 +++ mod/src/cl_dll/hud_animationinfo.cpp 2005/10/01 05:49:02 @@ -311,7 +311,7 @@ for ( int i = 0; i < gHUD.m_HudList.Size(); i++ ) { - if ( stricmp( gHUD.m_HudList[i]->GetName(), engine->Cmd_Argv(1) ) == 0 ) + if ( Q_stricmp( gHUD.m_HudList[i]->GetName(), engine->Cmd_Argv(1) ) == 0 ) { element = gHUD.m_HudList[i]; break; =================================================================== --- mod/src/cl_dll/hud_pdump.cpp 2005/09/12 00:30:12 1.2 +++ mod/src/cl_dll/hud_pdump.cpp 2005/10/01 05:49:02 @@ -310,7 +310,7 @@ { DumpInfo *slot = &m_DumpEntityInfo[ i ]; - if ( stricmp( slot->classname, currentclass ) ) + if ( Q_stricmp( slot->classname, currentclass ) ) { y += 2; =================================================================== --- mod/src/cl_dll/message.cpp 2005/02/18 04:45:45 1.1.1.1 +++ mod/src/cl_dll/message.cpp 2005/10/01 03:03:21 @@ -409,7 +409,7 @@ // strip off any trailing newlines int len = Q_strlen( pMessage->pMessage ); int tempLen = len + 2; - char *localString = (char *)_alloca( tempLen ); + char *localString = (char *)stackalloc( tempLen ); Q_strncpy( localString, pMessage->pMessage, tempLen ); if (iscntrl(localString[len - 1])) { =================================================================== --- mod/src/cl_dll/weapon_selection.cpp 2005/02/18 04:45:46 1.1.1.1 +++ mod/src/cl_dll/weapon_selection.cpp 2005/10/01 05:49:03 @@ -206,7 +206,7 @@ //----------------------------------------------------------------------------- int CBaseHudWeaponSelection::KeyInput( int down, int keynum, const char *pszCurrentBinding ) { - if (IsInSelectionMode() && pszCurrentBinding && !stricmp(pszCurrentBinding, "cancelselect")) + if (IsInSelectionMode() && pszCurrentBinding && !Q_stricmp(pszCurrentBinding, "cancelselect")) { HideSelection(); // returning 0 indicates, we've handled it, no more action needs to be taken =================================================================== --- mod/src/cl_dll/game_controls/ClientScoreBoardDialog.cpp 2005/06/11 22:14:24 1.2 +++ mod/src/cl_dll/game_controls/ClientScoreBoardDialog.cpp 2005/10/01 03:03:21 @@ -262,7 +262,7 @@ const char *oldName = playerData->GetString("name",""); int bufsize = strlen(oldName) * 2; - char *newName = (char *)_alloca( bufsize ); + char *newName = (char *)stackalloc( bufsize ); UTIL_MakeSafeName( oldName, newName, bufsize ); =================================================================== --- mod/src/cl_dll/game_controls/SpectatorGUI.cpp 2005/06/11 22:14:24 1.3 +++ mod/src/cl_dll/game_controls/SpectatorGUI.cpp 2005/10/01 05:49:03 @@ -181,11 +181,11 @@ void CSpectatorMenu::OnCommand( const char *command ) { - if (!stricmp(command, "specnext") ) + if (!Q_stricmp(command, "specnext") ) { engine->ClientCmd("spec_next"); } - else if (!stricmp(command, "specprev") ) + else if (!Q_stricmp(command, "specprev") ) { engine->ClientCmd("spec_prev"); } @@ -252,7 +252,7 @@ void CSpectatorMenu::SetPlayerNameText(const wchar_t *text ) { - char *ansiText = (char *) _alloca( (wcslen( text ) + 1) * sizeof( char ) ); + char *ansiText = (char *) stackalloc( (wcslen( text ) + 1) * sizeof( char ) ); if ( ansiText ) { localize()->ConvertUnicodeToANSI( text, ansiText, (wcslen( text ) + 1) * sizeof( char ) ); =================================================================== --- mod/src/cl_dll/hl2mp/hl2mp_hud_chat.cpp 2005/02/18 04:45:46 1.1.1.1 +++ mod/src/cl_dll/hl2mp/hl2mp_hud_chat.cpp 2005/10/01 03:03:21 @@ -421,8 +421,8 @@ else line->InsertColorChange( Color( g_ColorYellow[0], g_ColorYellow[1], g_ColorYellow[2], 255 ) ); - char *buf = static_cast( _alloca( strlen( pmsg ) + 1 ) ); - wchar_t *wbuf = static_cast( _alloca( (strlen( pmsg ) + 1 ) * sizeof(wchar_t) ) ); + char *buf = static_cast( stackalloc( strlen( pmsg ) + 1 ) ); + wchar_t *wbuf = static_cast( stackalloc( (strlen( pmsg ) + 1 ) * sizeof(wchar_t) ) ); if ( buf ) { float *flColor = GetClientColor( iPlayerIndex ); =================================================================== --- mod/src/cl_dll/sdk/sdk_hud_chat.cpp 2005/02/18 04:45:47 1.1.1.1 +++ mod/src/cl_dll/sdk/sdk_hud_chat.cpp 2005/10/01 03:03:21 @@ -424,8 +424,8 @@ else line->InsertColorChange( Color( g_ColorYellow[0], g_ColorYellow[1], g_ColorYellow[2], 255 ) ); - char *buf = static_cast( _alloca( strlen( pmsg ) + 1 ) ); - wchar_t *wbuf = static_cast( _alloca( (strlen( pmsg ) + 1 ) * sizeof(wchar_t) ) ); + char *buf = static_cast( stackalloc( strlen( pmsg ) + 1 ) ); + wchar_t *wbuf = static_cast( stackalloc( (strlen( pmsg ) + 1 ) * sizeof(wchar_t) ) ); if ( buf ) { float *flColor = GetClientColor( iPlayerIndex ); =================================================================== --- mod/src/dlls/AI_ResponseSystem.cpp 2005/02/18 04:45:48 1.1.1.1 +++ mod/src/dlls/AI_ResponseSystem.cpp 2005/10/01 03:03:20 @@ -1143,7 +1143,7 @@ void CResponseSystem::DebugPrint( int depth, const char *fmt, ... ) { int indentchars = 3 * depth; - char *indent = (char *)_alloca( indentchars + 1); + char *indent = (char *)stackalloc( indentchars + 1); indent[ indentchars ] = 0; while ( --indentchars >= 0 ) { =================================================================== --- mod/src/dlls/EnvBeam.cpp 2005/02/18 04:45:48 1.1.1.1 +++ mod/src/dlls/EnvBeam.cpp 2005/10/09 02:02:47 @@ -138,7 +138,7 @@ BaseClass::Spawn(); - m_noiseAmplitude = min(MAX_BEAM_NOISEAMPLITUDE, m_noiseAmplitude); + m_noiseAmplitude = min((float)MAX_BEAM_NOISEAMPLITUDE, m_noiseAmplitude); // Check for tapering if ( HasSpawnFlags( SF_BEAM_TAPEROUT ) ) @@ -742,8 +742,8 @@ RelinkBeam(); - SetWidth( min(MAX_BEAM_WIDTH, m_boltWidth) ); - SetNoise( min(MAX_BEAM_NOISEAMPLITUDE, m_noiseAmplitude) ); + SetWidth( min((float)MAX_BEAM_WIDTH, m_boltWidth) ); + SetNoise( min((float)MAX_BEAM_NOISEAMPLITUDE, m_noiseAmplitude) ); SetFrame( m_frameStart ); SetScrollRate( m_speed ); if ( m_spawnflags & SF_BEAM_SHADEIN ) =================================================================== --- mod/src/dlls/PointAngularVelocitySensor.cpp 2005/02/18 04:45:50 1.1.1.1 +++ mod/src/dlls/PointAngularVelocitySensor.cpp 2005/10/03 03:57:52 @@ -146,7 +146,7 @@ { QAngle vecAngVel = pEntity->GetLocalAngularVelocity(); float flMax = max(fabs(vecAngVel[PITCH]), fabs(vecAngVel[YAW])); - return max(flMax, fabs(vecAngVel[ROLL])); + return max(flMax, (float)fabs(vecAngVel[ROLL])); } return 0; =================================================================== --- mod/src/dlls/TemplateEntities.cpp 2005/02/18 04:45:50 1.1.1.1 +++ mod/src/dlls/TemplateEntities.cpp 2005/10/01 05:49:08 @@ -142,7 +142,7 @@ for (int i = 0; i < nCount; i++) { TemplateEntityData_t *pTemplate = g_Templates.Element(i); - if ( !stricmp(pTemplate->pszName, pszName) ) + if ( !Q_stricmp(pTemplate->pszName, pszName) ) return Templates_FindByIndex( i ); } @@ -201,7 +201,7 @@ do { - if ( !stricmp( keyName, lastKeyName ) ) + if ( !Q_stricmp( keyName, lastKeyName ) ) { ++nKeyInstance; } @@ -212,7 +212,7 @@ Q_strncpy( lastKeyName, keyName, MAPKEY_MAXLENGTH ); // Ignore targetnames - if ( !stricmp( keyName, "targetname" ) ) + if ( !Q_stricmp( keyName, "targetname" ) ) continue; // Entity I/O values are stored as "Targetname,", so we need to see if there's a ',' in the string @@ -230,7 +230,7 @@ for ( int iTName = 0; iTName < iCount; iTName++ ) { char *pName = GroupTemplates[iTName].pszName; - if ( stricmp( pName, sValue ) ) + if ( Q_stricmp( pName, sValue ) ) continue; if ( template_debug.GetInt() ) =================================================================== --- mod/src/dlls/ai_baseactor.cpp 2005/02/18 04:45:47 1.1.1.1 +++ mod/src/dlls/ai_baseactor.cpp 2005/10/09 02:10:12 @@ -212,7 +212,7 @@ case CChoreoEvent::GENERIC: { - if (stricmp( event->GetParameters(), "AI_BLINK") == 0) + if (Q_stricmp( event->GetParameters(), "AI_BLINK") == 0) { info->m_nType = SCENE_AI_BLINK; // blink eyes @@ -221,7 +221,7 @@ float flDuration = (event->GetEndTime() - scene->GetTime()); m_flBlinktime = gpGlobals->curtime + max( flDuration, random->RandomFloat( 1.5, 4.5 ) ); } - else if (stricmp( event->GetParameters(), "AI_HOLSTER") == 0) + else if (Q_stricmp( event->GetParameters(), "AI_HOLSTER") == 0) { // FIXME: temp code for test info->m_nType = SCENE_AI_HOLSTER; @@ -232,7 +232,7 @@ info->m_iLayer = AddGesture( ACT_DISARM, true ); } } - else if (stricmp( event->GetParameters(), "AI_UNHOLSTER") == 0) + else if (Q_stricmp( event->GetParameters(), "AI_UNHOLSTER") == 0) { // FIXME: temp code for test info->m_nType = SCENE_AI_UNHOLSTER; @@ -249,27 +249,27 @@ } } } - else if (stricmp( event->GetParameters(), "AI_AIM") == 0) + else if (Q_stricmp( event->GetParameters(), "AI_AIM") == 0) { info->m_nType = SCENE_AI_AIM; } - else if (stricmp( event->GetParameters(), "AI_RANDOMLOOK") == 0) + else if (Q_stricmp( event->GetParameters(), "AI_RANDOMLOOK") == 0) { info->m_nType = SCENE_AI_RANDOMLOOK; info->m_flNext = 0.0; } - else if (stricmp( event->GetParameters(), "AI_RANDOMFACEFLEX") == 0) + else if (Q_stricmp( event->GetParameters(), "AI_RANDOMFACEFLEX") == 0) { info->m_nType = SCENE_AI_RANDOMFACEFLEX; info->m_flNext = 0.0; info->InitWeight( this ); } - else if (stricmp( event->GetParameters(), "AI_RANDOMHEADFLEX") == 0) + else if (Q_stricmp( event->GetParameters(), "AI_RANDOMHEADFLEX") == 0) { info->m_nType = SCENE_AI_RANDOMHEADFLEX; info->m_flNext = 0.0; } - else if (stricmp( event->GetParameters(), "AI_IGNORECOLLISION") == 0) + else if (Q_stricmp( event->GetParameters(), "AI_IGNORECOLLISION") == 0) { CBaseEntity *pTarget = FindNamedEntity( event->GetParameters2( ) ); @@ -383,8 +383,8 @@ { dir = 1; } - flSpineYaw = min( diff, 30 ); - flBodyYaw = min( diff - flSpineYaw, 30 ); + flSpineYaw = min( diff, 30.0f ); + flBodyYaw = min( diff - flSpineYaw, 30.0f ); m_goalSpineYaw = m_goalSpineYaw * (1.0 - intensity) + intensity * flSpineYaw * dir; m_goalBodyYaw = m_goalBodyYaw * (1.0 - intensity) + intensity * flBodyYaw * dir; @@ -422,8 +422,8 @@ spineintensity = 1.0; } - flSpineYaw = min( diff * spineintensity, 30 ); - flBodyYaw = min( diff * spineintensity - flSpineYaw, 30 ); + flSpineYaw = min( diff * spineintensity, 30.0f ); + flBodyYaw = min( diff * spineintensity - flSpineYaw, 30.0f ); info->m_flFacingYaw = info->m_flInitialYaw + (diff - flBodyYaw - flSpineYaw) * dir; if (!event->IsLockBodyFacing()) @@ -1406,7 +1406,7 @@ // no target, decay all head control direction m_goalHeadDirection = m_goalHeadDirection * 0.8 + vHead * 0.2; - m_goalHeadInfluence = max( m_goalHeadInfluence - 0.2, 0 ); + m_goalHeadInfluence = max( m_goalHeadInfluence - 0.2f, 0.0f ); VectorNormalize( m_goalHeadDirection ); UpdateHeadBodyControl( vEyePosition + m_goalHeadDirection * 100, m_goalHeadInfluence, vEyePosition + m_goalHeadDirection * 100, 0.0 ); @@ -1592,7 +1592,7 @@ return 0; } - if ( m_iszExpressionScene != NULL_STRING && stricmp( STRING(m_iszExpressionScene), pszExpressionScene ) == 0 ) + if ( m_iszExpressionScene != NULL_STRING && Q_stricmp( STRING(m_iszExpressionScene), pszExpressionScene ) == 0 ) { return 0; } =================================================================== --- mod/src/dlls/ai_basenpc.cpp 2005/09/11 19:53:58 1.4 +++ mod/src/dlls/ai_basenpc.cpp 2005/10/09 02:17:16 @@ -1500,7 +1500,7 @@ dt = 0.1f; } m_nRenderMode = kRenderTransTexture; - int speed = max(1,256*dt); // fade out over 1 second + int speed = max(1.0f, 256*dt); // fade out over 1 second SetRenderColorA( UTIL_Approach( 0, m_clrRender->a, speed ) ); NetworkStateChanged(); @@ -6270,19 +6270,19 @@ Disposition_t disposition = D_NU; if ( dispositionString ) { - if (!stricmp(dispositionString,"D_HT")) + if (!Q_stricmp(dispositionString,"D_HT")) { disposition = D_HT; } - else if (!stricmp(dispositionString,"D_FR")) + else if (!Q_stricmp(dispositionString,"D_FR")) { disposition = D_FR; } - else if (!stricmp(dispositionString,"D_LI")) + else if (!Q_stricmp(dispositionString,"D_LI")) { disposition = D_LI; } - else if (!stricmp(dispositionString,"D_NU")) + else if (!Q_stricmp(dispositionString,"D_NU")) { disposition = D_NU; } @@ -6320,7 +6320,7 @@ if( !bFoundEntity ) { // Need special condition for player as we can only have one - if (!stricmp("player", entityString) || !stricmp("!player", entityString)) + if (!Q_stricmp("player", entityString) || !Q_stricmp("!player", entityString)) { AddClassRelationship( CLASS_PLAYER, disposition, priority ); } @@ -8588,26 +8588,26 @@ //----------------------------------------------------------------------------- CBaseEntity *CAI_BaseNPC::FindNamedEntity( const char *name ) { - if ( !stricmp( name, "!player" )) + if ( !Q_stricmp( name, "!player" )) { return ( CBaseEntity * )AI_GetSinglePlayer(); } - else if ( !stricmp( name, "!enemy" ) ) + else if ( !Q_stricmp( name, "!enemy" ) ) { if (GetEnemy() != NULL) return GetEnemy(); } - else if ( !stricmp( name, "!self" ) || !stricmp( name, "!target1" ) ) + else if ( !Q_stricmp( name, "!self" ) || !Q_stricmp( name, "!target1" ) ) { return this; } - else if ( !stricmp( name, "!nearestfriend" ) || !stricmp( name, "!friend" ) ) + else if ( !Q_stricmp( name, "!nearestfriend" ) || !Q_stricmp( name, "!friend" ) ) { // FIXME: look at CBaseEntity *CNPCSimpleTalker::FindNearestFriend(bool fPlayer) // punt for now return ( CBaseEntity * )AI_GetSinglePlayer(); } - else if (!stricmp( name, "self" )) + else if (!Q_stricmp( name, "self" )) { static int selfwarningcount = 0; @@ -8618,7 +8618,7 @@ } return this; } - else if ( !stricmp( name, "Player" )) + else if ( !Q_stricmp( name, "Player" )) { static int playerwarningcount = 0; if ( ++playerwarningcount < 5 ) =================================================================== --- mod/src/dlls/ai_basenpc_schedule.cpp 2005/02/18 04:45:47 1.1.1.1 +++ mod/src/dlls/ai_basenpc_schedule.cpp 2005/10/09 02:17:40 @@ -784,11 +784,11 @@ { if ( !GetTacticalServices()->FindCoverPos( pSound->GetSoundReactOrigin(), pSound->GetSoundReactOrigin(), - min( pSound->Volume(), 120.0 ), + min( (float)pSound->Volume(), 120.0f ), CoverRadius(), pResult ) ) { - return GetTacticalServices()->FindLateralCover( pSound->GetSoundReactOrigin(), min( pSound->Volume(), 60.0 ), pResult ); + return GetTacticalServices()->FindLateralCover( pSound->GetSoundReactOrigin(), min( (float)pSound->Volume(), 60.0f ), pResult ); } return true; @@ -3213,7 +3213,7 @@ case 0: { AngleVectors( ang, &move ); - if ( GetNavigator()->SetVectorGoal( move, (float)pTask->flTaskData, min(36,pTask->flTaskData), true ) && IsValidMoveAwayDest( GetNavigator()->GetGoalPos() )) + if ( GetNavigator()->SetVectorGoal( move, (float)pTask->flTaskData, min(36.0f, pTask->flTaskData), true ) && IsValidMoveAwayDest( GetNavigator()->GetGoalPos() )) { TaskComplete(); } @@ -3222,7 +3222,7 @@ ang.y = GetMotor()->GetIdealYaw() + 91; AngleVectors( ang, &move ); - if ( GetNavigator()->SetVectorGoal( move, (float)pTask->flTaskData, min(24,pTask->flTaskData), true ) && IsValidMoveAwayDest( GetNavigator()->GetGoalPos() ) ) + if ( GetNavigator()->SetVectorGoal( move, (float)pTask->flTaskData, min(24.0f, pTask->flTaskData), true ) && IsValidMoveAwayDest( GetNavigator()->GetGoalPos() ) ) { TaskComplete(); } @@ -3239,7 +3239,7 @@ ang.y = GetMotor()->GetIdealYaw() + 271; AngleVectors( ang, &move ); - if ( GetNavigator()->SetVectorGoal( move, (float)pTask->flTaskData, min(24,pTask->flTaskData), true ) && IsValidMoveAwayDest( GetNavigator()->GetGoalPos() ) ) + if ( GetNavigator()->SetVectorGoal( move, (float)pTask->flTaskData, min(24.0f, pTask->flTaskData), true ) && IsValidMoveAwayDest( GetNavigator()->GetGoalPos() ) ) { TaskComplete(); } @@ -3261,7 +3261,7 @@ AngleVectors( ang, &move ); - if ( GetNavigator()->SetVectorGoal( move, (float)pTask->flTaskData, min(6,pTask->flTaskData), false ) && IsValidMoveAwayDest( GetNavigator()->GetGoalPos() ) ) + if ( GetNavigator()->SetVectorGoal( move, (float)pTask->flTaskData, min(6.0f, pTask->flTaskData), false ) && IsValidMoveAwayDest( GetNavigator()->GetGoalPos() ) ) { TaskComplete(); } =================================================================== --- mod/src/dlls/ai_behavior_rappel.cpp 2005/02/18 04:45:47 1.1.1.1 +++ mod/src/dlls/ai_behavior_rappel.cpp 2005/10/09 02:34:01 @@ -148,7 +148,7 @@ float factor; factor = flDist / RAPPEL_DECEL_DIST; - speed = max( RAPPEL_MIN_SPEED, speed * factor ); + speed = max( (float)RAPPEL_MIN_SPEED, speed * factor ); } Vector vecNewVelocity = vec3_origin; =================================================================== --- mod/src/dlls/ai_behavior_standoff.cpp 2005/02/18 04:45:47 1.1.1.1 +++ mod/src/dlls/ai_behavior_standoff.cpp 2005/10/01 05:49:04 @@ -115,7 +115,7 @@ if ( pNpc->NameMatches( pszNamedActor ) || pNpc->ClassMatches( pszNamedActor ) || - ( pNpc->GetSquad() && stricmp( pNpc->GetSquad()->GetName(), pszNamedActor ) == 0 ) ) + ( pNpc->GetSquad() && Q_stricmp( pNpc->GetSquad()->GetName(), pszNamedActor ) == 0 ) ) { return true; } @@ -1082,7 +1082,7 @@ const char *pszWeaponClass = ( pWeapon ) ? pWeapon->GetClassname() : ""; for ( int i = 0; i < ARRAYSIZE(mappings); i++ ) { - if ( !mappings[i].pszWeapon || stricmp( mappings[i].pszWeapon, pszWeaponClass ) == 0 ) + if ( !mappings[i].pszWeapon || Q_stricmp( mappings[i].pszWeapon, pszWeaponClass ) == 0 ) { if ( HaveSequenceForActivity( mappings[i].translation ) || HaveSequenceForActivity( GetOuter()->Weapon_TranslateActivity( mappings[i].translation ) ) ) { =================================================================== --- mod/src/dlls/ai_blended_movement.cpp 2005/02/18 04:45:47 1.1.1.1 +++ mod/src/dlls/ai_blended_movement.cpp 2005/10/09 02:33:44 @@ -1144,7 +1144,7 @@ { float minJumpHeight = 0; - float maxHorzVel = max( GetCurSpeed(), 100 ); + float maxHorzVel = max( GetCurSpeed(), 100.0f ); float gravity = sv_gravity.GetFloat() * GetOuter()->GetGravity(); Vector vecApex; Vector rawJumpVel = GetMoveProbe()->CalcJumpLaunchVelocity(script.vecLocation, pNext->vecLocation, gravity, &minJumpHeight, maxHorzVel, &vecApex ); @@ -1487,7 +1487,7 @@ // clamp the next velocity to the possible accel in the given distance if (!bAlwaysSlowdown && SolveQuadratic( -0.5 * idealAccel, m_scriptMove[0].flMaxVelocity, -distToObstruction, r1, r2 )) { - script.flMaxVelocity = max( 10, m_scriptMove[0].flMaxVelocity - idealAccel * r1 ); + script.flMaxVelocity = max( 10.0f, m_scriptMove[0].flMaxVelocity - idealAccel * r1 ); } else { @@ -1701,7 +1701,7 @@ Remember( bits_MEMORY_TURNING ); // don't overlap the turn portion of the gestures, and don't play them too often - m_flNextTurnGesture = gpGlobals->curtime + max( turnCompletion * actualDuration, 0.3 ); + m_flNextTurnGesture = gpGlobals->curtime + max( turnCompletion * actualDuration, 0.3f ); /* if ( GetOuter()->m_debugOverlays & OVERLAY_NPC_SELECTED_BIT ) =================================================================== --- mod/src/dlls/ai_default.cpp 2005/02/18 04:45:47 1.1.1.1 +++ mod/src/dlls/ai_default.cpp 2005/10/01 05:49:04 @@ -37,7 +37,7 @@ DevMsg( "Unnamed schedule!\n" ); continue; } - if ( stricmp( pName, pList[i]->GetName() ) == 0 ) + if ( Q_stricmp( pName, pList[i]->GetName() ) == 0 ) return pList[i]; } return NULL; =================================================================== --- mod/src/dlls/ai_hint.cpp 2005/02/18 04:45:47 1.1.1.1 +++ mod/src/dlls/ai_hint.cpp 2005/10/01 03:03:20 @@ -434,7 +434,7 @@ return bits_HINT_NODE_NONE; } - char *lowercase = (char *)_alloca( len + 1 ); + char *lowercase = (char *)stackalloc( len + 1 ); Q_strncpy( lowercase, token, len+1 ); strlwr( lowercase ); =================================================================== --- mod/src/dlls/ai_hull.cpp 2005/02/18 04:45:47 1.1.1.1 +++ mod/src/dlls/ai_hull.cpp 2005/10/01 05:49:04 @@ -179,7 +179,7 @@ } for (i = 0; i < NUM_HULLS; i++) { - if (stricmp( szName, NAI_Hull::Name( i )) == 0) + if (Q_stricmp( szName, NAI_Hull::Name( i )) == 0) { return (Hull_t)i; } =================================================================== --- mod/src/dlls/ai_motor.cpp 2005/02/18 04:45:48 1.1.1.1 +++ mod/src/dlls/ai_motor.cpp 2005/10/09 02:18:03 @@ -296,7 +296,7 @@ if (m_nDismountSequence != ACT_INVALID) { // catch situations where the climb mount/dismount finished before reaching goal - climbSpeed = max( climbSpeed, 30.0 ); + climbSpeed = max( climbSpeed, 30.0f ); } else { @@ -744,7 +744,7 @@ ideal = UTIL_AngleMod( GetIdealYaw() ); // FIXME: this needs a proper interval - float dt = min( 0.2, gpGlobals->curtime - GetLastThink() ); + float dt = min( 0.2f, gpGlobals->curtime - GetLastThink() ); newYaw = AI_ClampYaw( (float)yawSpeed * 10.0, current, ideal, dt ); =================================================================== --- mod/src/dlls/ai_moveprobe.cpp 2005/02/18 04:45:48 1.1.1.1 +++ mod/src/dlls/ai_moveprobe.cpp 2005/10/03 01:19:41 @@ -576,8 +576,8 @@ for (;;) { - float flStepSize = min( LOCAL_STEP_SIZE, pMoveTrace->flTotalDist - distClear ); - if ( flStepSize < 0.001 ) + float flStepSize = min( (float)LOCAL_STEP_SIZE, pMoveTrace->flTotalDist - distClear ); + if ( flStepSize < 0.001f ) break; checkStepArgs.stepSize = flStepSize; @@ -691,7 +691,7 @@ // and not a ledge above or below the target. if (!(flags & AITGM_2D)) { - float threshold = max( 0.5f * GetHullHeight(), StepHeight() + 0.1 ); + float threshold = max( 0.5f * GetHullHeight(), StepHeight() + 0.1f ); if (fabs(pMoveTrace->vEndPosition.z - vecDesiredEnd.z) > threshold) { #if 0 =================================================================== --- mod/src/dlls/ai_playerally.cpp 2005/02/18 04:45:48 1.1.1.1 +++ mod/src/dlls/ai_playerally.cpp 2005/10/01 05:49:04 @@ -753,12 +753,12 @@ //----------------------------------------------------------------------------- CBaseEntity *CAI_PlayerAlly::FindNamedEntity( const char *pszName ) { - if ( !stricmp( pszName, "!speechtarget" )) + if ( !Q_stricmp( pszName, "!speechtarget" )) { return GetSpeechTarget(); } - if ( !stricmp( pszName, "!friend" )) + if ( !Q_stricmp( pszName, "!friend" )) { return FindSpeechTarget( AIST_NPCS ); } =================================================================== --- mod/src/dlls/ai_schedule.cpp 2005/02/18 04:45:48 1.1.1.1 +++ mod/src/dlls/ai_schedule.cpp 2005/10/02 06:14:28 @@ -117,14 +117,14 @@ //----------------------------------------------------------------------------- int CAI_SchedulesManager::GetStateID(const char *state_name) { - if (!stricmp(state_name,"NONE")) { return NPC_STATE_NONE; } - else if (!stricmp(state_name,"IDLE")) { return NPC_STATE_IDLE; } - else if (!stricmp(state_name,"COMBAT")) { return NPC_STATE_COMBAT; } - else if (!stricmp(state_name,"PRONE")) { return NPC_STATE_PRONE; } - else if (!stricmp(state_name,"ALERT")) { return NPC_STATE_ALERT; } - else if (!stricmp(state_name,"SCRIPT")) { return NPC_STATE_SCRIPT; } - else if (!stricmp(state_name,"PLAYDEAD")) { return NPC_STATE_PLAYDEAD; } - else if (!stricmp(state_name,"DEAD")) { return NPC_STATE_DEAD; } + if (!Q_stricmp(state_name,"NONE")) { return NPC_STATE_NONE; } + else if (!Q_stricmp(state_name,"IDLE")) { return NPC_STATE_IDLE; } + else if (!Q_stricmp(state_name,"COMBAT")) { return NPC_STATE_COMBAT; } + else if (!Q_stricmp(state_name,"PRONE")) { return NPC_STATE_PRONE; } + else if (!Q_stricmp(state_name,"ALERT")) { return NPC_STATE_ALERT; } + else if (!Q_stricmp(state_name,"SCRIPT")) { return NPC_STATE_SCRIPT; } + else if (!Q_stricmp(state_name,"PLAYDEAD")) { return NPC_STATE_PLAYDEAD; } + else if (!Q_stricmp(state_name,"DEAD")) { return NPC_STATE_DEAD; } else return -1; } @@ -135,19 +135,19 @@ //----------------------------------------------------------------------------- int CAI_SchedulesManager::GetMemoryID(const char *state_name) { - if (!stricmp(state_name,"PROVOKED")) { return bits_MEMORY_PROVOKED; } - else if (!stricmp(state_name,"INCOVER")) { return bits_MEMORY_INCOVER; } - else if (!stricmp(state_name,"SUSPICIOUS")) { return bits_MEMORY_SUSPICIOUS; } - else if (!stricmp(state_name,"PATH_FAILED")) { return bits_MEMORY_PATH_FAILED; } - else if (!stricmp(state_name,"FLINCHED")) { return bits_MEMORY_FLINCHED; } - else if (!stricmp(state_name,"TOURGUIDE")) { return bits_MEMORY_TOURGUIDE; } - else if (!stricmp(state_name,"LOCKED_HINT")) { return bits_MEMORY_LOCKED_HINT; } - else if (!stricmp(state_name,"TURNING")) { return bits_MEMORY_TURNING; } - else if (!stricmp(state_name,"TURNHACK")) { return bits_MEMORY_TURNHACK; } - else if (!stricmp(state_name,"CUSTOM4")) { return bits_MEMORY_CUSTOM4; } - else if (!stricmp(state_name,"CUSTOM3")) { return bits_MEMORY_CUSTOM3; } - else if (!stricmp(state_name,"CUSTOM2")) { return bits_MEMORY_CUSTOM2; } - else if (!stricmp(state_name,"CUSTOM1")) { return bits_MEMORY_CUSTOM1; } + if (!Q_stricmp(state_name,"PROVOKED")) { return bits_MEMORY_PROVOKED; } + else if (!Q_stricmp(state_name,"INCOVER")) { return bits_MEMORY_INCOVER; } + else if (!Q_stricmp(state_name,"SUSPICIOUS")) { return bits_MEMORY_SUSPICIOUS; } + else if (!Q_stricmp(state_name,"PATH_FAILED")) { return bits_MEMORY_PATH_FAILED; } + else if (!Q_stricmp(state_name,"FLINCHED")) { return bits_MEMORY_FLINCHED; } + else if (!Q_stricmp(state_name,"TOURGUIDE")) { return bits_MEMORY_TOURGUIDE; } + else if (!Q_stricmp(state_name,"LOCKED_HINT")) { return bits_MEMORY_LOCKED_HINT; } + else if (!Q_stricmp(state_name,"TURNING")) { return bits_MEMORY_TURNING; } + else if (!Q_stricmp(state_name,"TURNHACK")) { return bits_MEMORY_TURNHACK; } + else if (!Q_stricmp(state_name,"CUSTOM4")) { return bits_MEMORY_CUSTOM4; } + else if (!Q_stricmp(state_name,"CUSTOM3")) { return bits_MEMORY_CUSTOM3; } + else if (!Q_stricmp(state_name,"CUSTOM2")) { return bits_MEMORY_CUSTOM2; } + else if (!Q_stricmp(state_name,"CUSTOM1")) { return bits_MEMORY_CUSTOM1; } else return -1; } @@ -158,12 +158,12 @@ //----------------------------------------------------------------------------- int CAI_SchedulesManager::GetPathID( const char *token ) { - if ( !stricmp( token, "TRAVEL" ) ) { return PATH_TRAVEL; } - else if ( !stricmp( token, "LOS" ) ) { return PATH_LOS; } -// else if ( !stricmp( token, "FLANK" ) ) { return PATH_FLANK; } -// else if ( !stricmp( token, "FLANK_LOS" ) ) { return PATH_FLANK_LOS; } - else if ( !stricmp( token, "COVER" ) ) { return PATH_COVER; } -// else if ( !stricmp( token, "COVER_LOS" ) ) { return PATH_COVER_LOS; } + if ( !Q_stricmp( token, "TRAVEL" ) ) { return PATH_TRAVEL; } + else if ( !Q_stricmp( token, "LOS" ) ) { return PATH_LOS; } +// else if ( !Q_stricmp( token, "FLANK" ) ) { return PATH_FLANK; } +// else if ( !Q_stricmp( token, "FLANK_LOS" ) ) { return PATH_FLANK_LOS; } + else if ( !Q_stricmp( token, "COVER" ) ) { return PATH_COVER; } +// else if ( !Q_stricmp( token, "COVER_LOS" ) ) { return PATH_COVER_LOS; } return -1; } @@ -175,10 +175,10 @@ //----------------------------------------------------------------------------- int CAI_SchedulesManager::GetGoalID( const char *token ) { - if ( !stricmp( token, "ENEMY" ) ) { return GOAL_ENEMY; } - else if ( !stricmp( token, "ENEMY_LKP" ) ) { return GOAL_ENEMY_LKP; } - else if ( !stricmp( token, "TARGET" ) ) { return GOAL_TARGET; } - else if ( !stricmp( token, "SAVED_POSITION" ) ) { return GOAL_SAVED_POSITION; } + if ( !Q_stricmp( token, "ENEMY" ) ) { return GOAL_ENEMY; } + else if ( !Q_stricmp( token, "ENEMY_LKP" ) ) { return GOAL_ENEMY_LKP; } + else if ( !Q_stricmp( token, "TARGET" ) ) { return GOAL_TARGET; } + else if ( !Q_stricmp( token, "SAVED_POSITION" ) ) { return GOAL_SAVED_POSITION; } return -1; } @@ -196,7 +196,7 @@ char save_token[1024]; const char *pfile = engine->ParseFile(pStartFile, token, sizeof( token ) ); - while (!stricmp("Schedule",token)) + while (!Q_stricmp("Schedule",token)) { pfile = engine->ParseFile(pfile, token, sizeof( token ) ); @@ -224,7 +224,7 @@ CAI_Schedule *new_schedule = CreateSchedule(token,scheduleID); pfile = engine->ParseFile(pfile, token, sizeof( token ) ); - if (stricmp(token,"Tasks")) + if (Q_stricmp(token,"Tasks")) { DevMsg( "ERROR: LoadSchd (%s): (%s) Malformed AI Schedule. Expecting 'Tasks' keyword.\n",prefix,new_schedule->GetName()); Assert(0); @@ -239,7 +239,7 @@ int taskNum = 0; pfile = engine->ParseFile(pfile, token, sizeof( token ) ); - while ((token[0]!=NULL) && (stricmp("Interrupts",token))) + while ((token[0]!=NULL) && (Q_stricmp("Interrupts",token))) { // Convert generic ID to sub-class specific enum int taskID = CAI_BaseNPC::GetTaskID(token); @@ -258,11 +258,11 @@ // Read in the task argument pfile = engine->ParseFile(pfile, token, sizeof( token ) ); - if (!stricmp("Activity",token)) + if (!Q_stricmp("Activity",token)) { // Skip the ";", but make sure it's present pfile = engine->ParseFile(pfile, token, sizeof( token ) ); - if (stricmp(token,":")) + if (Q_stricmp(token,":")) { DevMsg( "ERROR: LoadSchd (%s): (%s) Malformed AI Schedule. Expecting ':' after type 'ACTIVITY.\n",prefix,new_schedule->GetName()); Assert(0); @@ -279,11 +279,11 @@ return false; } } - else if (!stricmp("Task",token)) + else if (!Q_stricmp("Task",token)) { // Skip the ";", but make sure it's present pfile = engine->ParseFile(pfile, token, sizeof( token ) ); - if (stricmp(token,":")) + if (Q_stricmp(token,":")) { DevMsg( "ERROR: LoadSchd (%s): (%s) Malformed AI Schedule. Expecting ':' after type 'ACTIVITY.\n",prefix,new_schedule->GetName()); Assert(0); @@ -304,11 +304,11 @@ return false; } } - else if (!stricmp("Schedule",token)) + else if (!Q_stricmp("Schedule",token)) { // Skip the ";", but make sure it's present pfile = engine->ParseFile(pfile, token, sizeof( token ) ); - if (stricmp(token,":")) + if (Q_stricmp(token,":")) { DevMsg( "ERROR: LoadSchd (%s): (%s) Malformed AI Schedule. Expecting ':' after type 'ACTIVITY.\n",prefix,new_schedule->GetName()); Assert(0); @@ -329,11 +329,11 @@ return false; } } - else if (!stricmp("State",token)) + else if (!Q_stricmp("State",token)) { // Skip the ";", but make sure it's present pfile = engine->ParseFile(pfile, token, sizeof( token ) ); - if (stricmp(token,":")) + if (Q_stricmp(token,":")) { DevMsg( "ERROR: LoadSchd (%s): (%s) Malformed AI Schedule. Expecting ':' after type 'STATE.\n",prefix,new_schedule->GetName()); Assert(0); @@ -350,12 +350,12 @@ return false; } } - else if (!stricmp("Memory",token)) + else if (!Q_stricmp("Memory",token)) { // Skip the ";", but make sure it's present pfile = engine->ParseFile(pfile, token, sizeof( token ) ); - if (stricmp(token,":")) + if (Q_stricmp(token,":")) { DevMsg( "ERROR: LoadSchd (%s): (%s) Malformed AI Schedule. Expecting ':' after type 'STATE.\n",prefix,new_schedule->GetName()); Assert(0); @@ -372,11 +372,11 @@ return false; } } - else if (!stricmp("Path",token)) + else if (!Q_stricmp("Path",token)) { // Skip the ";", but make sure it's present pfile = engine->ParseFile(pfile, token, sizeof( token ) ); - if (stricmp(token,":")) + if (Q_stricmp(token,":")) { DevMsg( "ERROR: LoadSchd (%s): (%s) Malformed AI Schedule. Expecting ':' after type 'PATH.\n",prefix,new_schedule->GetName()); Assert(0); @@ -393,11 +393,11 @@ return false; } } - else if (!stricmp("Goal",token)) + else if (!Q_stricmp("Goal",token)) { // Skip the ";", but make sure it's present pfile = engine->ParseFile(pfile, token, sizeof( token ) ); - if (stricmp(token,":")) + if (Q_stricmp(token,":")) { DevMsg( "ERROR: LoadSchd (%s): (%s) Malformed AI Schedule. Expecting ':' after type 'GOAL.\n",prefix,new_schedule->GetName()); Assert(0); @@ -414,11 +414,11 @@ return false; } } - else if ( !stricmp( "HintFlags",token ) ) + else if ( !Q_stricmp( "HintFlags",token ) ) { // Skip the ":", but make sure it's present pfile = engine->ParseFile(pfile, token, sizeof( token ) ); - if (stricmp(token,":")) + if (Q_stricmp(token,":")) { DevMsg( "ERROR: LoadSchd (%s): (%s) Malformed AI Schedule. Expecting ':' after type 'HINTFLAG'\n",prefix,new_schedule->GetName()); Assert(0); @@ -435,7 +435,7 @@ return false; } } - else if (!stricmp("Interrupts",token) || !strnicmp("TASK_",token,5) ) + else if (!Q_stricmp("Interrupts",token) || !Q_strnicmp("TASK_",token,5) ) { // a parse error. Interrupts is the next section, TASK_ is probably the next task, missing task argument? Warning( "ERROR: LoadSchd (%s): (%s) Bad syntax at task #%d (wasn't expecting %s)\n", prefix, new_schedule->GetName(), taskNum, token); @@ -453,7 +453,7 @@ pfile = engine->ParseFile(pfile, token, sizeof( token ) ); // Check for malformed task argument type - if (!stricmp(token,":")) + if (!Q_stricmp(token,":")) { DevMsg( "ERROR: LoadSchd (%s): Schedule (%s),\n Task (%s), has a malformed AI Task Argument = (%s)\n", prefix,new_schedule->GetName(),taskID,save_token); @@ -477,7 +477,7 @@ // Now read in the interrupts // ========================== pfile = engine->ParseFile(pfile, token, sizeof( token ) ); - while ((token[0]!=NULL) && (stricmp("Schedule",token))) + while ((token[0]!=NULL) && (Q_stricmp("Schedule",token))) { // Convert generic ID to sub-class specific enum int condID = CAI_BaseNPC::GetConditionID(token); =================================================================== --- mod/src/dlls/ai_speech.h 2005/02/18 04:45:48 1.1.1.1 +++ mod/src/dlls/ai_speech.h 2005/10/01 05:49:04 @@ -99,7 +99,7 @@ inline bool CompareConcepts( AIConcept_t c1, AIConcept_t c2 ) { - return ( (void *)c1 == (void *)c2 || ( c1 && c2 && stricmp( c1, c2 ) == 0 ) ); + return ( (void *)c1 == (void *)c2 || ( c1 && c2 && Q_stricmp( c1, c2 ) == 0 ) ); } //------------------------------------- =================================================================== --- mod/src/dlls/baseanimating.cpp 2005/02/18 04:45:48 1.1.1.1 +++ mod/src/dlls/baseanimating.cpp 2005/10/09 02:28:09 @@ -999,7 +999,7 @@ for (int i = 0; i < pstudiohdr->GetNumPoseParameters(); i++) { - if (stricmp( pstudiohdr->pPoseParameter( i ).pszName(), szName ) == 0) + if (Q_stricmp( pstudiohdr->pPoseParameter( i ).pszName(), szName ) == 0) { return i; } @@ -1270,7 +1270,7 @@ VectorMA( pTarget->est.pos, pTarget->est.height, up, p1 ); VectorMA( pTarget->est.pos, -pTarget->est.height, up, p2 ); - float r = max(pTarget->est.radius,1); + float r = max(pTarget->est.radius, 1.0f); // don't IK to other characters ray.Init( p1, p2, Vector(-r,-r,0), Vector(r,r,1) ); =================================================================== --- mod/src/dlls/basecombatcharacter.cpp 2005/06/11 22:14:27 1.4 +++ mod/src/dlls/basecombatcharacter.cpp 2005/10/03 01:19:55 @@ -2503,7 +2503,7 @@ { // Even the tiniest explosion gets attention. Don't let the radius // be less than 128 units. - float soundRadius = max( 128.0f, flRadius * 1.5 ); + float soundRadius = max( 128.0f, flRadius * 1.5f ); CSoundEnt::InsertSound( SOUND_COMBAT | SOUND_CONTEXT_EXPLOSION, vecSrc, soundRadius, 1.0, info.GetInflictor() ); } =================================================================== --- mod/src/dlls/baseentity.cpp 2005/08/29 00:14:40 1.5 +++ mod/src/dlls/baseentity.cpp 2005/10/01 05:49:05 @@ -487,7 +487,7 @@ { for (int j = i - 1; --j >= 0; ) { - if (!stricmp(names[i], names[j])) + if (!Q_stricmp(names[i], names[j])) { DevMsg( "%s has multiple data description entries for \"%s\"\n", STRING(m_iClassname), names[i]); break; @@ -2343,7 +2343,7 @@ bool CBaseEntity::NameMatchesComplex( const char *pszNameOrWildcard ) { - if ( !stricmp( "!player", pszNameOrWildcard) ) + if ( !Q_stricmp( "!player", pszNameOrWildcard) ) return IsPlayer(); return NamesMatch( pszNameOrWildcard, m_iName ); @@ -3147,7 +3147,7 @@ { if ( dmap->dataDesc[i].flags & FTYPEDESC_INPUT ) { - if ( !stricmp(dmap->dataDesc[i].externalName, szInputName) ) + if ( !Q_stricmp(dmap->dataDesc[i].externalName, szInputName) ) { // found a match @@ -3268,7 +3268,7 @@ { if ( dmap->dataDesc[i].flags & (FTYPEDESC_OUTPUT | FTYPEDESC_KEY) ) { - if ( !stricmp(dmap->dataDesc[i].externalName, varName) ) + if ( !Q_stricmp(dmap->dataDesc[i].externalName, varName) ) { var->Set( dmap->dataDesc[i].fieldType, ((char*)this) + dmap->dataDesc[i].fieldOffset[ TD_OFFSET_NORMAL ] ); return true; @@ -4335,7 +4335,7 @@ } // don't print out the duplicate keys - if ( !stricmp("parentname",dmap->dataDesc[i].externalName) || !stricmp("targetname",dmap->dataDesc[i].externalName) ) + if ( !Q_stricmp("parentname",dmap->dataDesc[i].externalName) || !Q_stricmp("targetname",dmap->dataDesc[i].externalName) ) continue; // don't print out empty keys =================================================================== --- mod/src/dlls/baseflex.cpp 2005/02/18 04:45:48 1.1.1.1 +++ mod/src/dlls/baseflex.cpp 2005/10/03 01:20:12 @@ -152,7 +152,7 @@ { for (int i = 0; i < GetNumFlexControllers(); i++) { - if (stricmp( GetFlexControllerName( i ), szName ) == 0) + if (Q_stricmp( GetFlexControllerName( i ), szName ) == 0) { return i; } @@ -499,7 +499,7 @@ if (pkvType) { - info->m_bIsPosture = (stricmp( pkvType->GetString(), "posture" ) == 0) ? true : false; + info->m_bIsPosture = (Q_stricmp( pkvType->GetString(), "posture" ) == 0) ? true : false; } } @@ -511,11 +511,11 @@ KeyValues *pkvFaceposer; for ( pkvFaceposer = pkvAllFaceposer->GetFirstSubKey(); pkvFaceposer; pkvFaceposer = pkvFaceposer->GetNextKey() ) { - if (!stricmp( pkvFaceposer->GetName(), "startloop" )) + if (!Q_stricmp( pkvFaceposer->GetName(), "startloop" )) { strcpy( szStartLoop, pkvFaceposer->GetString() ); } - else if (!stricmp( pkvFaceposer->GetName(), "endloop" )) + else if (!Q_stricmp( pkvFaceposer->GetName(), "endloop" )) { strcpy( szEndLoop, pkvFaceposer->GetString() ); } @@ -554,7 +554,7 @@ KeyValues *pkvFaceposer; for ( pkvFaceposer = pkvAllFaceposer->GetFirstSubKey(); pkvFaceposer; pkvFaceposer = pkvFaceposer->GetNextKey() ) { - if (!stricmp( pkvFaceposer->GetName(), "tags" )) + if (!Q_stricmp( pkvFaceposer->GetName(), "tags" )) { KeyValues *pkvTags; for ( pkvTags = pkvFaceposer->GetFirstSubKey(); pkvTags; pkvTags = pkvTags->GetNextKey() ) @@ -895,7 +895,7 @@ for ( i = 0; i < m_FileList.Size(); i++ ) { CFlexSceneFile *file = m_FileList[ i ]; - if ( file && !stricmp( file->filename, filename ) ) + if ( file && !Q_stricmp( file->filename, filename ) ) { // Make sure translations (local to global flex controller) are set up for this instance EnsureTranslations( instance, ( const flexsettinghdr_t * )file->buffer ); @@ -1240,7 +1240,7 @@ float flDist = (info->m_hTarget->EyePosition() - GetAbsOrigin()).Length2D(); - if (flDist > max( max( flDistTolerance, 0.1 ), event->GetDistanceToTarget())) + if (flDist > max( max( flDistTolerance, 0.1f ), event->GetDistanceToTarget())) { // Msg("flDist %.1f\n", flDist ); int result = myNpc->GetNavigator()->SetGoal( goal, AIN_CLEAR_TARGET ); @@ -1406,7 +1406,7 @@ const char *name = pSetting->pszName(); - if ( !stricmp( name, expr ) ) + if ( !Q_stricmp( name, expr ) ) break; } @@ -1567,7 +1567,7 @@ const char *name = pSetting->pszName(); - if ( !stricmp( name, expr ) ) + if ( !Q_stricmp( name, expr ) ) break; } @@ -1659,7 +1659,7 @@ float flWeight = event->GetIntensity( scene->GetTime() ); /* - if (stricmp( event->GetParameters(), "m_g_arms_crossed" ) == 0) + if (Q_stricmp( event->GetParameters(), "m_g_arms_crossed" ) == 0) { Msg("%.2f (%.2f) : %s : %.3f (%.3f) %.2f\n", scene->GetTime(), scene->GetTime() - event->GetStartTime(), event->GetParameters(), flCycle, flEventCycle, flWeight ); } @@ -2133,7 +2133,7 @@ if (i != flexnum) { const char *pszOtherType = GetFlexControllerType( i ); - if (stricmp( pszType, pszOtherType ) == 0) + if (Q_stricmp( pszType, pszOtherType ) == 0) { m_flextarget[i] = 0; } @@ -2157,7 +2157,7 @@ for (int i = 0; i < GetNumFlexControllers(); i++) { const char *pszFlex = GetFlexControllerName( i ); - if (stricmp( szTarget, pszFlex ) == 0) + if (Q_stricmp( szTarget, pszFlex ) == 0) { return i; } @@ -2273,7 +2273,7 @@ m_flextarget[m_flexnum] = 0; // pflex->time = cl.time + 0.1; } - else if (stricmp( GetFlexControllerType( m_flexnum ), "phoneme" ) != 0) + else if (Q_stricmp( GetFlexControllerType( m_flexnum ), "phoneme" ) != 0) { if (strstr( GetFlexControllerName( m_flexnum ), "upper_raiser" ) == NULL) { @@ -2289,7 +2289,7 @@ { if (m_flextarget[i] == 1.0) { - if (stricmp( GetFlexFacs( i ), "upper") != 0 && stricmp( GetFlexFacs( i ), "lower") != 0) + if (Q_stricmp( GetFlexFacs( i ), "upper") != 0 && Q_stricmp( GetFlexFacs( i ), "lower") != 0) { if (szWhat[0] == '\0') Q_strncat( szWhat, "-", sizeof( szWhat ), COPY_ALL_CHARACTERS ); @@ -2355,7 +2355,7 @@ { for (m_phoneme = 0; m_phoneme < GetNumFlexControllers(); m_phoneme++) { - if (stricmp( GetFlexFacs( m_phoneme ), "27") == 0) + if (Q_stricmp( GetFlexFacs( m_phoneme ), "27") == 0) break; } } =================================================================== --- mod/src/dlls/cbase.cpp 2005/02/18 04:45:48 1.1.1.1 +++ mod/src/dlls/cbase.cpp 2005/10/01 05:49:05 @@ -841,8 +841,8 @@ if (pCur->m_pCaller == pCaller) { // Pointers match; make sure everything else matches. - if (!stricmp(STRING(pCur->m_pCaller->GetEntityName()), STRING(pCaller->GetEntityName())) && - !stricmp(pCur->m_pCaller->GetClassname(), pCaller->GetClassname())) + if (!Q_stricmp(STRING(pCur->m_pCaller->GetEntityName()), STRING(pCaller->GetEntityName())) && + !Q_stricmp(pCur->m_pCaller->GetClassname(), pCaller->GetClassname())) { // Found a matching event; delete it from the queue. bDelete = true; =================================================================== --- mod/src/dlls/client.cpp 2005/07/17 04:02:36 1.26 +++ mod/src/dlls/client.cpp 2005/10/01 05:52:05 @@ -111,7 +111,7 @@ if ( engine->Cmd_Argc() == 0 ) return; - if ( !stricmp( pcmd, cpSay) || !stricmp( pcmd, cpSayTeam ) ) + if ( !Q_stricmp( pcmd, cpSay) || !Q_stricmp( pcmd, cpSayTeam ) ) { if ( engine->Cmd_Argc() >= 2 ) { @@ -720,7 +720,7 @@ Q_strlower( item_to_give ); // Dirty hack to avoid suit playing it's pickup sound - if ( !stricmp( item_to_give, "item_suit" ) ) + if ( !Q_stricmp( item_to_give, "item_suit" ) ) { pPlayer->EquipSuit(); return; =================================================================== --- mod/src/dlls/entitylist.cpp 2005/02/18 04:45:48 1.1.1.1 +++ mod/src/dlls/entitylist.cpp 2005/10/02 16:39:41 @@ -1402,7 +1402,7 @@ typedef CBaseEntity *ENTITYPTR; static bool EntityReportLess( const ENTITYPTR &src1, const ENTITYPTR &src2, void *pCtx ) { - if ( stricmp( src1->GetClassname(), src2->GetClassname() ) < 0 ) + if ( Q_stricmp( src1->GetClassname(), src2->GetClassname() ) < 0 ) return true; return false; =================================================================== --- mod/src/dlls/event_tempentity_tester.cpp 2005/09/12 00:30:20 1.2 +++ mod/src/dlls/event_tempentity_tester.cpp 2005/10/03 03:58:20 @@ -30,8 +30,8 @@ if ( lifetime && lifetime[0] ) { life = atoi( lifetime ); - life = max( 1.0, life ); - life = min( 1000.0, life ); + life = max( 1.0f, life ); + life = min( 1000.0f, life ); life += gpGlobals->curtime; } =================================================================== --- mod/src/dlls/fourwheelvehiclephysics.cpp 2005/02/18 04:45:49 1.1.1.1 +++ mod/src/dlls/fourwheelvehiclephysics.cpp 2005/10/09 02:18:32 @@ -230,7 +230,7 @@ while ( !pParse->Finished() ) { const char *pBlock = pParse->GetCurrentBlockName(); - if ( !strcmpi( pBlock, "vehicle" ) ) + if ( !Q_stricmp( pBlock, "vehicle" ) ) { pParse->ParseVehicle( &vehicle, NULL ); } @@ -1091,7 +1091,7 @@ m_controls.throttle = 0; } - float flMaxThrottle = max( 0.1, m_maxThrottle - ( m_maxThrottle * m_flThrottleReduction ) ); + float flMaxThrottle = max( 0.1f, m_maxThrottle - ( m_maxThrottle * m_flThrottleReduction ) ); m_controls.throttle = Approach( flMaxThrottle, m_controls.throttle, flFrameTime * m_throttleRate ); // Apply the brake. @@ -1115,7 +1115,7 @@ m_controls.throttle = 0; } - float flMaxThrottle = min( -0.1, m_flMaxRevThrottle - ( m_flMaxRevThrottle * m_flThrottleReduction ) ); + float flMaxThrottle = min( -0.1f, m_flMaxRevThrottle - ( m_flMaxRevThrottle * m_flThrottleReduction ) ); m_controls.throttle = Approach( flMaxThrottle, m_controls.throttle, flFrameTime * m_throttleRate ); // Apply the brake. @@ -1217,7 +1217,7 @@ //----------------------------------------------------------------------------- void CFourWheelVehiclePhysics::RemoveThrottleReduction( float flPercentage ) { - m_flThrottleReduction = max( 0, m_flThrottleReduction - flPercentage ); + m_flThrottleReduction = max(0.0f, m_flThrottleReduction - flPercentage ); //Msg("Removed speed reduction. Now %.2f\n", m_flThrottleReduction ); } =================================================================== --- mod/src/dlls/func_breakablesurf.cpp 2005/02/18 04:45:49 1.1.1.1 +++ mod/src/dlls/func_breakablesurf.cpp 2005/10/09 02:18:59 @@ -250,11 +250,11 @@ float flMaxsWidth,flMaxsHeight; PanePos(vTouchPos, &flMaxsWidth, &flMaxsHeight); - int nMinWidth = Floor2Int(max(0, min(flMinsWidth,flMaxsWidth))); - int nMaxWidth = Ceil2Int(min(m_nNumWide,max(flMinsWidth,flMaxsWidth))); + int nMinWidth = Floor2Int(max(0.0f, min(flMinsWidth,flMaxsWidth))); + int nMaxWidth = Ceil2Int(min((float)m_nNumWide, max(flMinsWidth,flMaxsWidth))); - int nMinHeight = Floor2Int(max(0, min(flMinsHeight,flMaxsHeight))); - int nMaxHeight = Ceil2Int(min(m_nNumHigh,max(flMinsHeight,flMaxsHeight))); + int nMinHeight = Floor2Int(max(0.0f, min(flMinsHeight,flMaxsHeight))); + int nMaxHeight = Ceil2Int(min((float)m_nNumHigh, max(flMinsHeight,flMaxsHeight))); Vector vHitVel; pOther->GetVelocity( &vHitVel, NULL ); @@ -758,7 +758,7 @@ //------------------------------------------------------------------------------ float CBreakableSurface::GetSupport(int nWidth, int nHeight) { - return max(0,m_flSupport[nWidth][nHeight]); + return max(0.0f, m_flSupport[nWidth][nHeight]); } //------------------------------------------------------------------------------ =================================================================== --- mod/src/dlls/func_dust.cpp 2005/02/18 04:45:49 1.1.1.1 +++ mod/src/dlls/func_dust.cpp 2005/10/01 05:49:06 @@ -172,7 +172,7 @@ bool CFunc_Dust::KeyValue( const char *szKeyName, const char *szValue ) { - if( stricmp( szKeyName, "StartDisabled" ) == 0 ) + if( Q_stricmp( szKeyName, "StartDisabled" ) == 0 ) { if( szValue[0] == '1' ) m_DustFlags &= ~DUSTFLAGS_ON; @@ -181,12 +181,12 @@ return true; } - else if( stricmp( szKeyName, "Alpha" ) == 0 ) + else if( Q_stricmp( szKeyName, "Alpha" ) == 0 ) { m_iAlpha = atoi( szValue ); return true; } - else if( stricmp( szKeyName, "Frozen" ) == 0 ) + else if( Q_stricmp( szKeyName, "Frozen" ) == 0 ) { if( szValue[0] == '1' ) m_DustFlags |= DUSTFLAGS_FROZEN; =================================================================== --- mod/src/dlls/gameinterface.cpp 2005/08/13 04:57:31 1.18 +++ mod/src/dlls/gameinterface.cpp 2005/10/01 05:49:06 @@ -1439,7 +1439,7 @@ // ok we have the string, see if it's newer const char *unlockedChapter = sv_unlockedchapters.GetString(); if ( atoi(unlockedChapter) < atoi(newChapter) - || (atoi(unlockedChapter) == atoi(newChapter) && stricmp(unlockedChapter, newChapter) < 0) ) + || (atoi(unlockedChapter) == atoi(newChapter) && Q_stricmp(unlockedChapter, newChapter) < 0) ) { // ok we're at a higher chapter, unlock sv_unlockedchapters.SetValue( newChapter ); =================================================================== --- mod/src/dlls/genericactor.cpp 2005/02/18 04:45:49 1.1.1.1 +++ mod/src/dlls/genericactor.cpp 2005/10/01 05:49:06 @@ -258,7 +258,7 @@ if (i != flexnum) { const char *pszOtherType = GetFlexControllerType( i ); - if (stricmp( pszType, pszOtherType ) == 0) + if (Q_stricmp( pszType, pszOtherType ) == 0) { m_flextarget[i] = 0; } @@ -290,7 +290,7 @@ for (int i = 0; i < GetNumFlexControllers(); i++) { const char *pszFlex = GetFlexControllerName( i ); - if (stricmp( szTarget, pszFlex ) == 0) + if (Q_stricmp( szTarget, pszFlex ) == 0) { return i; } @@ -393,7 +393,7 @@ { m_flextarget[m_flexnum] = 0; } - else if (stricmp( GetFlexControllerType( m_flexnum ), "phoneme" ) != 0) + else if (Q_stricmp( GetFlexControllerType( m_flexnum ), "phoneme" ) != 0) { if (strstr( GetFlexControllerName( m_flexnum ), "upper_raiser" ) == NULL) { =================================================================== --- mod/src/dlls/gib.cpp 2005/02/18 04:45:49 1.1.1.1 +++ mod/src/dlls/gib.cpp 2005/10/09 02:03:13 @@ -481,7 +481,7 @@ float volume; float zvel = fabs(GetAbsVelocity().z); - volume = 0.8f * min(1.0, ((float)zvel) / 450.0f); + volume = 0.8f * min(1.0f, zvel / 450.0f); CBreakable::MaterialSoundRandom( entindex(), (Materials)m_material, volume ); } =================================================================== --- mod/src/dlls/logicentities.cpp 2005/02/18 04:45:49 1.1.1.1 +++ mod/src/dlls/logicentities.cpp 2005/10/01 05:49:06 @@ -1137,7 +1137,7 @@ // // Set the initial value of the counter. // - if (!stricmp(szKeyName, "startvalue")) + if (!Q_stricmp(szKeyName, "startvalue")) { m_OutValue.Init(atoi(szValue)); return(true); @@ -1425,7 +1425,7 @@ const char *pszValue = inputdata.value.String(); for (int i = 0; i < MAX_LOGIC_CASES; i++) { - if ((m_nCase[i] != NULL_STRING) && !stricmp(STRING(m_nCase[i]), pszValue)) + if ((m_nCase[i] != NULL_STRING) && !Q_stricmp(STRING(m_nCase[i]), pszValue)) { m_OnCase[i].FireOutput( inputdata.pActivator, this ); return; =================================================================== --- mod/src/dlls/movement.cpp 2005/02/18 04:45:49 1.1.1.1 +++ mod/src/dlls/movement.cpp 2005/10/01 05:49:06 @@ -345,7 +345,7 @@ SetMoveDoneTime( 0.5 ); // start moving in 0.2 seconds time // if we are just the basic keyframed entity, cycle our animation - if ( !stricmp(GetClassname(), "move_keyframed") ) + if ( !Q_stricmp(GetClassname(), "move_keyframed") ) { StartMoving( 1 ); } @@ -568,7 +568,7 @@ void CBaseMoveBehavior::MoveDone( void ) { // if we're just a base then keep playing the anim - if ( !stricmp(STRING(m_iClassname), "move_keyframed") ) + if ( !Q_stricmp(STRING(m_iClassname), "move_keyframed") ) { int direction = m_iDirection; // start moving from the keyframe we've just reached =================================================================== --- mod/src/dlls/nav_area.cpp 2005/06/11 22:14:28 1.2 +++ mod/src/dlls/nav_area.cpp 2005/10/03 03:57:07 @@ -3042,8 +3042,8 @@ Vector origin = GetCenter(); origin.z += HalfHumanHeight; - const float sizeX = max( 1, min( GetSizeX()/2 - 5, HalfHumanWidth ) ); - const float sizeY = max( 1, min( GetSizeY()/2 - 5, HalfHumanWidth ) ); + const float sizeX = max( 1.0f, min( GetSizeX()/2 - 5, HalfHumanWidth ) ); + const float sizeY = max( 1.0f, min( GetSizeY()/2 - 5, HalfHumanWidth ) ); Vector mins = Vector( -sizeX, -sizeY, 0 ); Vector maxs = Vector( sizeX, sizeY, VEC_DUCK_HULL_MAX.z ); =================================================================== --- mod/src/dlls/nav_mesh.cpp 2005/06/11 22:14:29 1.3 +++ mod/src/dlls/nav_mesh.cpp 2005/10/02 06:14:29 @@ -617,10 +617,10 @@ bool isAmbiguous = false; for( unsigned int i=0; iGetVelocity( &velocity, &angVel ); float len = VectorNormalize(velocity); - len = max( len, 10 ); + len = max( len, 10.0f ); velocity *= len; len = VectorNormalize(angVel); - len = max( len, 1 ); + len = max( len, 1.0f ); angVel *= len; pObject->SetVelocity( &velocity, &angVel ); } =================================================================== --- mod/src/dlls/physics_prop_ragdoll.cpp 2005/02/18 04:45:50 1.1.1.1 +++ mod/src/dlls/physics_prop_ragdoll.cpp 2005/10/01 05:49:07 @@ -519,7 +519,7 @@ { char const *pszBase = pkvPropData->GetString( pszKeyName ); - if ( pszBase && pszBase[0] && !stricmp( pszBase, pszValue ) ) + if ( pszBase && pszBase[0] && !Q_stricmp( pszBase, pszValue ) ) { modelKeyValues->deleteThis(); return true; =================================================================== --- mod/src/dlls/player.cpp 2005/09/10 06:21:01 1.41 +++ mod/src/dlls/player.cpp 2005/10/03 04:08:55 @@ -5359,7 +5359,7 @@ else #endif // ALLOW_CHEATS #endif // _DEBUG - if( stricmp( cmd, "vehicleRole" ) == 0 ) + if( Q_stricmp( cmd, "vehicleRole" ) == 0 ) { // Get the vehicle role value. if ( engine->Cmd_Argc() == 2 ) @@ -5383,7 +5383,7 @@ return true; } } - else if ( stricmp( cmd, "spectate" ) == 0 ) // join spectator team & start observer mode + else if ( Q_stricmp( cmd, "spectate" ) == 0 ) // join spectator team & start observer mode { if ( GetTeamNumber() == TEAM_SPECTATOR ) return true; @@ -5403,7 +5403,7 @@ StartObserverMode( OBS_MODE_ROAMING ); return true; } - else if ( stricmp( cmd, "spec_mode" ) == 0 ) // new observer mode + else if ( Q_stricmp( cmd, "spec_mode" ) == 0 ) // new observer mode { int mode; @@ -5449,7 +5449,7 @@ return true; } - else if ( stricmp( cmd, "spec_next" ) == 0 ) // chase next player + else if ( Q_stricmp( cmd, "spec_next" ) == 0 ) // chase next player { if ( GetObserverMode() > OBS_MODE_FIXED ) { @@ -5461,7 +5461,7 @@ return true; } - else if ( stricmp( cmd, "spec_prev" ) == 0 ) // chase prevoius player + else if ( Q_stricmp( cmd, "spec_prev" ) == 0 ) // chase prevoius player { if ( GetObserverMode() > OBS_MODE_FIXED ) { @@ -5474,7 +5474,7 @@ return true; } - else if ( stricmp( cmd, "spec_player" ) == 0 ) // chase next player + else if ( Q_stricmp( cmd, "spec_player" ) == 0 ) // chase next player { if ( GetObserverMode() > OBS_MODE_FIXED && engine->Cmd_Argc() == 2 ) @@ -5501,7 +5501,7 @@ return true; } - else if ( stricmp( cmd, "spec_goto" ) == 0 ) // chase next player + else if ( Q_stricmp( cmd, "spec_goto" ) == 0 ) // chase next player { if ( ( GetObserverMode() == OBS_MODE_FIXED || GetObserverMode() == OBS_MODE_ROAMING ) && =================================================================== --- mod/src/dlls/props.cpp 2005/06/11 22:14:30 1.4 +++ mod/src/dlls/props.cpp 2005/10/09 02:19:12 @@ -989,7 +989,7 @@ float flFactor; flFactor = flDist / MAX_BLAST_DIST; const float MAX_BURN_TIME = 5.0f; - flBurnTime = max( 0.5, MAX_BURN_TIME * flFactor ); + flBurnTime = max( 0.5f, MAX_BURN_TIME * flFactor ); flBurnTime += random->RandomFloat( 0, 0.5 ); } else @@ -999,7 +999,7 @@ } // Change my health so that I burn for flBurnTime seconds. - float flIdealHealth = min( m_iHealth, FLAME_DIRECT_DAMAGE_PER_SEC * flBurnTime ); + float flIdealHealth = min((float)m_iHealth, FLAME_DIRECT_DAMAGE_PER_SEC * flBurnTime ); float flIdealDamage = m_iHealth - flIdealHealth; // Scale the damage to do ideal damage. @@ -4408,8 +4408,8 @@ Vector volumeCenter = ((mins+maxs) * 0.5f) + GetAbsOrigin(); // Ignoring the Z - float volumeRadius = max( fabs(mins.x), maxs.x ); - volumeRadius = max( volumeRadius, max( fabs(mins.y), maxs.y ) ); + float volumeRadius = max( (float)fabs(mins.x), maxs.x ); + volumeRadius = max( volumeRadius, max( (vec_t)fabs(mins.y), maxs.y ) ); // Debug if ( g_debug_doors.GetBool() ) =================================================================== --- mod/src/dlls/rope.cpp 2005/02/18 04:45:50 1.1.1.1 +++ mod/src/dlls/rope.cpp 2005/10/01 05:49:07 @@ -520,7 +520,7 @@ pTest = gEntList.NextEntByClass( pTest ); while ( pTest ) { - if( stricmp( STRING(pTest->m_iNextLinkName), STRING(GetEntityName()) ) == 0 ) + if( Q_stricmp( STRING(pTest->m_iNextLinkName), STRING(GetEntityName()) ) == 0 ) { pTest->DetachPoint( 1 ); } @@ -619,29 +619,29 @@ bool CRopeKeyframe::KeyValue( const char *szKeyName, const char *szValue ) { - if( stricmp( szKeyName, "Breakable" ) == 0 ) + if( Q_stricmp( szKeyName, "Breakable" ) == 0 ) { if( atoi( szValue ) == 1 ) m_RopeFlags |= ROPE_BREAKABLE; } - else if( stricmp( szKeyName, "Collide" ) == 0 ) + else if( Q_stricmp( szKeyName, "Collide" ) == 0 ) { if( atoi( szValue ) == 1 ) m_RopeFlags |= ROPE_COLLIDE; } - else if( stricmp( szKeyName, "Barbed" ) == 0 ) + else if( Q_stricmp( szKeyName, "Barbed" ) == 0 ) { if( atoi( szValue ) == 1 ) m_RopeFlags |= ROPE_BARBED; } - else if( stricmp( szKeyName, "Dangling" ) == 0 ) + else if( Q_stricmp( szKeyName, "Dangling" ) == 0 ) { if( atoi( szValue ) == 1 ) m_fLockedPoints &= ~ROPE_LOCK_END_POINT; // detach our dest point return true; } - else if( stricmp( szKeyName, "Type" ) == 0 ) + else if( Q_stricmp( szKeyName, "Type" ) == 0 ) { int iType = atoi( szValue ); if( iType == 0 ) @@ -651,7 +651,7 @@ else m_nSegments = ROPE_TYPE2_NUMSEGMENTS; } - else if ( stricmp( szKeyName, "RopeShader" ) == 0 ) + else if ( Q_stricmp( szKeyName, "RopeShader" ) == 0 ) { // Legacy support for the RopeShader parameter. int iShader = atoi( szValue ); @@ -668,7 +668,7 @@ m_iRopeMaterialModel = PrecacheModel( "cable/chain.vmt" ); } } - else if ( stricmp( szKeyName, "RopeMaterial" ) == 0 ) + else if ( Q_stricmp( szKeyName, "RopeMaterial" ) == 0 ) { // Make sure we have a vmt extension. if ( Q_stristr( szValue, ".vmt" ) ) =================================================================== --- mod/src/dlls/saverestore_gamedll.cpp 2005/02/18 04:45:50 1.1.1.1 +++ mod/src/dlls/saverestore_gamedll.cpp 2005/10/01 05:49:07 @@ -43,7 +43,7 @@ } } - if ( (pField->flags & FTYPEDESC_KEY) && !stricmp(pField->externalName, szKeyName) ) + if ( (pField->flags & FTYPEDESC_KEY) && !Q_stricmp(pField->externalName, szKeyName) ) { switch( pField->fieldType ) { =================================================================== --- mod/src/dlls/sceneentity.cpp 2005/02/18 04:45:50 1.1.1.1 +++ mod/src/dlls/sceneentity.cpp 2005/10/03 03:58:06 @@ -1067,14 +1067,14 @@ // Check for auto resume/cancel const char *buffer = parameters; buffer = engine->ParseFile( buffer, token, sizeof( token ) ); - if ( !stricmp( token, "automate" ) ) + if ( !Q_stricmp( token, "automate" ) ) { buffer = engine->ParseFile( buffer, token, sizeof( token ) ); - if ( !stricmp( token, "Cancel" ) ) + if ( !Q_stricmp( token, "Cancel" ) ) { m_nAutomatedAction = SCENE_ACTION_CANCEL; } - else if ( !stricmp( token, "Resume" ) ) + else if ( !Q_stricmp( token, "Resume" ) ) { m_nAutomatedAction = SCENE_ACTION_RESUME; } @@ -2858,7 +2858,7 @@ //----------------------------------------------------------------------------- CBaseEntity *CSceneEntity::FindNamedTarget( string_t iszTarget, bool bBaseFlexOnly ) { - if ( !stricmp( STRING(iszTarget), "!activator" ) ) + if ( !Q_stricmp( STRING(iszTarget), "!activator" ) ) return m_hActivator; // If we don't have a wildcard in the target, just return the first entity found @@ -2893,11 +2893,11 @@ { CBaseEntity *entity = NULL; - if ( !stricmp( name, "Player" ) || !stricmp( name, "!player" )) + if ( !Q_stricmp( name, "Player" ) || !Q_stricmp( name, "!player" )) { entity = ( gpGlobals->maxClients == 1 ) ? ( CBaseEntity * )UTIL_GetLocalPlayer() : NULL; } - else if ( !stricmp( name, "!target1" ) ) + else if ( !Q_stricmp( name, "!target1" ) ) { if (m_hTarget1 == NULL) { @@ -2905,7 +2905,7 @@ } return m_hTarget1; } - else if ( !stricmp( name, "!target2" ) ) + else if ( !Q_stricmp( name, "!target2" ) ) { if (m_hTarget2 == NULL) { @@ -2913,7 +2913,7 @@ } return m_hTarget2; } - else if ( !stricmp( name, "!target3" ) ) + else if ( !Q_stricmp( name, "!target3" ) ) { if (m_hTarget3 == NULL) { @@ -2921,7 +2921,7 @@ } return m_hTarget3; } - else if ( !stricmp( name, "!target4" ) ) + else if ( !Q_stricmp( name, "!target4" ) ) { if (m_hTarget4 == NULL) { @@ -2929,7 +2929,7 @@ } return m_hTarget4; } - else if ( !stricmp( name, "!target5" ) ) + else if ( !Q_stricmp( name, "!target5" ) ) { if (m_hTarget5 == NULL) { @@ -2937,7 +2937,7 @@ } return m_hTarget5; } - else if ( !stricmp( name, "!target6" ) ) + else if ( !Q_stricmp( name, "!target6" ) ) { if (m_hTarget6 == NULL) { @@ -2945,7 +2945,7 @@ } return m_hTarget6; } - else if ( !stricmp( name, "!target7" ) ) + else if ( !Q_stricmp( name, "!target7" ) ) { if (m_hTarget7 == NULL) { @@ -2953,7 +2953,7 @@ } return m_hTarget7; } - else if ( !stricmp( name, "!target8" ) ) + else if ( !Q_stricmp( name, "!target8" ) ) { if (m_hTarget8 == NULL) { @@ -3201,49 +3201,49 @@ //----------------------------------------------------------------------------- void CSceneEntity::ClearActivatorTargets( void ) { - if ( !stricmp( STRING(m_iszTarget1), "!activator" ) ) + if ( !Q_stricmp( STRING(m_iszTarget1), "!activator" ) ) { // We need to clear out actors so they're re-evaluated m_hActorList.Purge(); m_hTarget1 = NULL; } - if ( !stricmp( STRING(m_iszTarget2), "!activator" ) ) + if ( !Q_stricmp( STRING(m_iszTarget2), "!activator" ) ) { // We need to clear out actors so they're re-evaluated m_hActorList.Purge(); m_hTarget2 = NULL; } - if ( !stricmp( STRING(m_iszTarget3), "!activator" ) ) + if ( !Q_stricmp( STRING(m_iszTarget3), "!activator" ) ) { // We need to clear out actors so they're re-evaluated m_hActorList.Purge(); m_hTarget3 = NULL; } - if ( !stricmp( STRING(m_iszTarget4), "!activator" ) ) + if ( !Q_stricmp( STRING(m_iszTarget4), "!activator" ) ) { // We need to clear out actors so they're re-evaluated m_hActorList.Purge(); m_hTarget4 = NULL; } - if ( !stricmp( STRING(m_iszTarget5), "!activator" ) ) + if ( !Q_stricmp( STRING(m_iszTarget5), "!activator" ) ) { // We need to clear out actors so they're re-evaluated m_hActorList.Purge(); m_hTarget5 = NULL; } - if ( !stricmp( STRING(m_iszTarget6), "!activator" ) ) + if ( !Q_stricmp( STRING(m_iszTarget6), "!activator" ) ) { // We need to clear out actors so they're re-evaluated m_hActorList.Purge(); m_hTarget6 = NULL; } - if ( !stricmp( STRING(m_iszTarget7), "!activator" ) ) + if ( !Q_stricmp( STRING(m_iszTarget7), "!activator" ) ) { // We need to clear out actors so they're re-evaluated m_hActorList.Purge(); m_hTarget7 = NULL; } - if ( !stricmp( STRING(m_iszTarget8), "!activator" ) ) + if ( !Q_stricmp( STRING(m_iszTarget8), "!activator" ) ) { // We need to clear out actors so they're re-evaluated m_hActorList.Purge(); @@ -4139,7 +4139,7 @@ // The manager is always thinking at 20 hz SetNextThink( gpGlobals->curtime + SCENE_THINK_INTERVAL ); float frameTime = ( gpGlobals->curtime - GetLastThink() ); - frameTime = min( 0.1, frameTime ); + frameTime = min( 0.1f, frameTime ); // stop if AI is diabled if (CAI_BaseNPC::m_nDebugBits & bits_debugDisableAI) =================================================================== --- mod/src/dlls/smokestack.cpp 2005/02/18 04:45:50 1.1.1.1 +++ mod/src/dlls/smokestack.cpp 2005/10/01 05:49:07 @@ -164,24 +164,24 @@ bool CSmokeStack::KeyValue( const char *szKeyName, const char *szValue ) { - if( stricmp( szKeyName, "Wind" ) == 0 ) + if( Q_stricmp( szKeyName, "Wind" ) == 0 ) { sscanf( szValue, "%f %f %f", &m_vWind.GetForModify().x, &m_vWind.GetForModify().y, &m_vWind.GetForModify().z ); return true; } - else if( stricmp( szKeyName, "WindAngle" ) == 0 ) + else if( Q_stricmp( szKeyName, "WindAngle" ) == 0 ) { m_WindAngle = atoi( szValue ); RecalcWindVector(); return true; } - else if( stricmp( szKeyName, "WindSpeed" ) == 0 ) + else if( Q_stricmp( szKeyName, "WindSpeed" ) == 0 ) { m_WindSpeed = atoi( szValue ); RecalcWindVector(); return true; } - else if ( stricmp( szKeyName, "SmokeMaterial" ) == 0 ) + else if ( Q_stricmp( szKeyName, "SmokeMaterial" ) == 0 ) { // Make sure we have a vmt extension. if ( Q_stristr( szValue, ".vmt" ) ) =================================================================== --- mod/src/dlls/te_bubbletrail.cpp 2005/09/12 00:30:23 1.2 +++ mod/src/dlls/te_bubbletrail.cpp 2005/10/03 04:08:02 @@ -132,7 +132,7 @@ g_TEBubbleTrail.m_vecMaxs = *maxs; g_TEBubbleTrail.m_flWaterZ = flWaterZ; g_TEBubbleTrail.m_nModelIndex = modelindex; - g_TEBubbleTrail.m_nCount = min( count, BUBBLE_TRAIL_MAX_COUNT ); + g_TEBubbleTrail.m_nCount = min( count, (int)BUBBLE_TRAIL_MAX_COUNT ); g_TEBubbleTrail.m_fSpeed = speed; // Send it over the wire =================================================================== --- mod/src/dlls/triggers.cpp 2005/02/18 04:45:51 1.1.1.1 +++ mod/src/dlls/triggers.cpp 2005/10/03 04:07:39 @@ -1083,7 +1083,7 @@ // Print Look time // ---------------- char tempstr[255]; - Q_snprintf(tempstr,sizeof(tempstr),"Time: %3.2f",m_flLookTime - max(0,m_flLookTimeTotal)); + Q_snprintf(tempstr,sizeof(tempstr),"Time: %3.2f",m_flLookTime - max(0.0f, m_flLookTimeTotal)); NDebugOverlay::EntityText(entindex(),text_offset,tempstr,0); text_offset++; } @@ -1520,12 +1520,12 @@ return 0; // Ignore changelevels to the level we're ready in. Mapmakers love to do this! - if ( stricmp( pMapName, STRING(gpGlobals->mapname) ) == 0 ) + if ( Q_stricmp( pMapName, STRING(gpGlobals->mapname) ) == 0 ) return 0; for ( i = 0; i < listCount; i++ ) { - if ( pLevelList[i].pentLandmark == pentLandmark && stricmp( pLevelList[i].mapName, pMapName ) == 0 ) + if ( pLevelList[i].pentLandmark == pentLandmark && Q_stricmp( pLevelList[i].mapName, pMapName ) == 0 ) return 0; } Q_strncpy( pLevelList[listCount].mapName, pMapName, sizeof(pLevelList[listCount].mapName) ); =================================================================== --- mod/src/dlls/util.cpp 2005/08/14 20:48:17 1.5 +++ mod/src/dlls/util.cpp 2005/10/01 05:49:08 @@ -1339,7 +1339,7 @@ // Both on a team? if ( *pTeamName1 != 0 && *pTeamName2 != 0 ) { - if ( !stricmp( pTeamName1, pTeamName2 ) ) // Same Team? + if ( !Q_stricmp( pTeamName1, pTeamName2 ) ) // Same Team? return true; } =================================================================== --- mod/src/dlls/util.h 2005/08/14 20:48:16 1.5 +++ mod/src/dlls/util.h 2005/10/01 05:55:05 @@ -165,7 +165,7 @@ // Misc useful inline bool FStrEq(const char *sz1, const char *sz2) { - return(stricmp(sz1, sz2) == 0); + return(Q_stricmp(sz1, sz2) == 0); } #if 0 =================================================================== --- mod/src/dlls/vehicle_baseserver.cpp 2005/02/18 04:45:51 1.1.1.1 +++ mod/src/dlls/vehicle_baseserver.cpp 2005/10/02 03:10:02 @@ -184,7 +184,7 @@ while ( !pParse->Finished() ) { const char *pBlock = pParse->GetCurrentBlockName(); - if ( !strcmpi( pBlock, "vehicle_sounds" ) ) + if ( !Q_stricmp( pBlock, "vehicle_sounds" ) ) { pParse->ParseCustom( &m_vehicleSounds, &soundParser ); } @@ -1145,7 +1145,7 @@ for ( int i = 0; i < SS_NUM_STATES; i++ ) { Assert( i < ARRAYSIZE(pSoundStateNames) ); - if ( !strcmpi( pSoundStateNames[i], pName ) ) + if ( !Q_stricmp( pSoundStateNames[i], pName ) ) return i; } return -1; @@ -1763,7 +1763,7 @@ { vehiclesounds_t *pSounds = (vehiclesounds_t *)pData; // New gear? - if ( !strcmpi( pKey, "gear" ) ) + if ( !Q_stricmp( pKey, "gear" ) ) { // Create, initialize, and add a new gear to our list int iNewGear = pSounds->pGears.AddToTail(); @@ -1784,11 +1784,11 @@ // Remember which gear we're reading data from m_iCurrentGear = iNewGear; } - else if ( !strcmpi( pKey, "state" ) ) + else if ( !Q_stricmp( pKey, "state" ) ) { m_iCurrentState = 0; } - else if ( !strcmpi( pKey, "crashsound" ) ) + else if ( !Q_stricmp( pKey, "crashsound" ) ) { m_iCurrentCrashSound = pSounds->crashSounds.AddToTail(); pSounds->crashSounds[m_iCurrentCrashSound].flMinSpeed = 0; @@ -1805,12 +1805,12 @@ Assert( m_iCurrentGear < pSounds->pGears.Count() ); // Check gear keys - if ( !strcmpi( pKey, "max_speed" ) ) + if ( !Q_stricmp( pKey, "max_speed" ) ) { pSounds->pGears[m_iCurrentGear].flMaxSpeed = atof(pValue); return; } - if ( !strcmpi( pKey, "speed_approach_factor" ) ) + if ( !Q_stricmp( pKey, "speed_approach_factor" ) ) { pSounds->pGears[m_iCurrentGear].flSpeedApproachFactor = atof(pValue); return; @@ -1821,19 +1821,19 @@ if ( m_iCurrentState >= 0 ) { - if ( !strcmpi( pKey, "name" ) ) + if ( !Q_stricmp( pKey, "name" ) ) { m_iCurrentState = SoundStateIndexFromName( pValue ); pSounds->iszStateSounds[m_iCurrentState] = NULL_STRING; pSounds->minStateTime[m_iCurrentState] = 0.0f; return; } - else if ( !strcmpi( pKey, "sound" ) ) + else if ( !Q_stricmp( pKey, "sound" ) ) { pSounds->iszStateSounds[m_iCurrentState] = AllocPooledString(pValue); return; } - else if ( !strcmpi( pKey, "min_time" ) ) + else if ( !Q_stricmp( pKey, "min_time" ) ) { pSounds->minStateTime[m_iCurrentState] = atof(pValue); return; @@ -1844,22 +1844,22 @@ if ( m_iCurrentCrashSound >= 0 ) { - if ( !strcmpi( pKey, "min_speed" ) ) + if ( !Q_stricmp( pKey, "min_speed" ) ) { pSounds->crashSounds[m_iCurrentCrashSound].flMinSpeed = atof(pValue); return; } - else if ( !strcmpi( pKey, "sound" ) ) + else if ( !Q_stricmp( pKey, "sound" ) ) { pSounds->crashSounds[m_iCurrentCrashSound].iszCrashSound = AllocPooledString(pValue); return; } - else if ( !strcmpi( pKey, "min_speed_change" ) ) + else if ( !Q_stricmp( pKey, "min_speed_change" ) ) { pSounds->crashSounds[m_iCurrentCrashSound].flMinDeltaSpeed = atof(pValue); return; } - else if ( !strcmpi( pKey, "gear_limit" ) ) + else if ( !Q_stricmp( pKey, "gear_limit" ) ) { pSounds->crashSounds[m_iCurrentCrashSound].gearLimit = atoi(pValue); return; @@ -1869,7 +1869,7 @@ for ( i = 0; i < VS_NUM_SOUNDS; i++ ) { - if ( !strcmpi( pKey, vehiclesound_parsenames[i] ) ) + if ( !Q_stricmp( pKey, vehiclesound_parsenames[i] ) ) { pSounds->iszSound[i] = AllocPooledString(pValue); return; @@ -1905,7 +1905,7 @@ while ( !pParse->Finished() ) { const char *pBlock = pParse->GetCurrentBlockName(); - if ( !strcmpi( pBlock, "vehicle_sounds" ) ) + if ( !Q_stricmp( pBlock, "vehicle_sounds" ) ) { pParse->ParseCustom( &pSounds, this ); } =================================================================== --- mod/src/dlls/hl2_dll/ai_spotlight.cpp 2005/02/18 04:45:51 1.1.1.1 +++ mod/src/dlls/hl2_dll/ai_spotlight.cpp 2005/10/02 06:05:52 @@ -379,7 +379,7 @@ // Adjust end width to keep beam width constant float flNewWidth = SPOTLIGHT_WIDTH * ( flBeamLength / m_flSpotlightMaxLength ); - flNewWidth = min( 100, flNewWidth ); + flNewWidth = min( 100.0f, flNewWidth ); m_hSpotlight->SetWidth(flNewWidth); m_hSpotlight->SetEndWidth(flNewWidth); =================================================================== --- mod/src/dlls/hl2_dll/antlion_maker.cpp 2005/02/18 04:45:51 1.1.1.1 +++ mod/src/dlls/hl2_dll/antlion_maker.cpp 2005/10/01 05:49:08 @@ -218,7 +218,7 @@ if ( pAntlion && pAntlion->GetOwnerEntity() == NULL && pAntlion->IsAlive() ) { // See if its parent was named the same as we are - if ( stricmp( pAntlion->GetParentSpawnerName(), STRING( GetEntityName() ) ) == 0 ) + if ( Q_stricmp( pAntlion->GetParentSpawnerName(), STRING( GetEntityName() ) ) == 0 ) { // Relink us to this antlion, he's come through a transition and was orphaned AddChild( pAntlion ); =================================================================== --- mod/src/dlls/hl2_dll/grenade_homer.cpp 2005/02/18 04:45:51 1.1.1.1 +++ mod/src/dlls/hl2_dll/grenade_homer.cpp 2005/10/09 02:04:23 @@ -330,7 +330,7 @@ { // Figure out how long it'll take for me to reach the target. float flDist = ( pTarget->WorldSpaceCenter() - WorldSpaceCenter() ).Length(); - float flTime = max( 0.5, flDist / GetAbsVelocity().Length() ); + float flTime = max( 0.5f, flDist / GetAbsVelocity().Length() ); CSoundEnt::InsertSound ( SOUND_DANGER, m_hTarget->GetAbsOrigin(), 300, flTime, pOwner ); } =================================================================== --- mod/src/dlls/hl2_dll/hl2_player.cpp 2005/08/29 00:12:16 1.22 +++ mod/src/dlls/hl2_dll/hl2_player.cpp 2005/10/01 05:49:08 @@ -2097,7 +2097,7 @@ #if HL2_SINGLE_PRIMARY_WEAPON_MODE //Drop primary weapon - if( stricmp( cmd, "DropPrimary" ) == 0 ) + if( Q_stricmp( cmd, "DropPrimary" ) == 0 ) { Weapon_DropSlot( WEAPON_PRIMARY_SLOT ); return true; @@ -2105,7 +2105,7 @@ #endif - if ( !stricmp( cmd, "emit" ) ) + if ( !Q_stricmp( cmd, "emit" ) ) { CSingleUserRecipientFilter filter( this ); if ( engine->Cmd_Argc() > 1 ) =================================================================== --- mod/src/dlls/hl2_dll/hl2_triggers.cpp 2005/02/18 04:45:52 1.1.1.1 +++ mod/src/dlls/hl2_dll/hl2_triggers.cpp 2005/10/03 01:23:22 @@ -542,7 +542,7 @@ dt = 0.1f; } m_nRenderMode = kRenderTransTexture; - int speed = max(1,256*dt); // fade out over 1 second + int speed = max(1.0f,256*dt); // fade out over 1 second if ( m_iFadeState == -1 ) SetRenderColorA( UTIL_Approach( 0, m_clrRender->a, speed ) ); @@ -707,7 +707,7 @@ // Kill it if ( pOther->IsPlayer() ) { - m_flPainValue = min( m_flPainValue + WD_PAINVALUE_STEP, WD_MAX_DAMAGE ); + m_flPainValue = min( (float)(m_flPainValue + WD_PAINVALUE_STEP), WD_MAX_DAMAGE ); } else { =================================================================== --- mod/src/dlls/hl2_dll/item_ammo.cpp 2005/03/21 01:14:21 1.2 +++ mod/src/dlls/hl2_dll/item_ammo.cpp 2005/10/01 05:49:09 @@ -875,7 +875,7 @@ { CBaseCombatWeapon *weapon = player->GetActiveWeapon(); - if (weapon && !stricmp(weapon->GetName(), "weapon_crowbar")) + if (weapon && !Q_stricmp(weapon->GetName(), "weapon_crowbar")) { // play the normal use sound player->EmitSound( "HL2Player.Use" ); =================================================================== --- mod/src/dlls/hl2_dll/npc_BaseZombie.cpp 2005/09/11 19:53:58 1.2 +++ mod/src/dlls/hl2_dll/npc_BaseZombie.cpp 2005/10/09 02:27:53 @@ -278,8 +278,8 @@ return false; } - float flNearestDist = min( dist, ZOMBIE_FARTHEST_PHYSICS_OBJECT * 0.5 ); - Vector vecDelta( flNearestDist, flNearestDist, GetHullHeight() * 2.0 ); + float flNearestDist = min( dist, (float)(ZOMBIE_FARTHEST_PHYSICS_OBJECT) * 0.5f ); + Vector vecDelta( flNearestDist, flNearestDist, GetHullHeight() * 2.0f ); class CZombieSwatEntitiesEnum : public CFlaggedEntitiesEnum { @@ -756,7 +756,7 @@ // flDamageThreshold is what percentage of the creature's max health // this amount of damage represents. (clips at 1.0) - float flDamageThreshold = min( 1, info.GetDamage() / m_iMaxHealth ); + float flDamageThreshold = min( 1.0f, info.GetDamage() / m_iMaxHealth ); // Being chopped up by a sharp physics object is a pretty special case // so we handle it with some special code. Mainly for @@ -906,7 +906,7 @@ //----------------------------------------------------------------------------- bool CNPC_BaseZombie::IsChopped( const CTakeDamageInfo &info ) { - float flDamageThreshold = min( 1, info.GetDamage() / m_iMaxHealth ); + float flDamageThreshold = min(1.0f, info.GetDamage() / m_iMaxHealth ); if ( m_iHealth > 0 || flDamageThreshold <= 0.5 ) return false; @@ -1080,7 +1080,7 @@ BaseClass::Ignite( flFlameLifetime, bNPCOnly, flSize, bCalledByLevelDesigner ); // Set the zombie up to burn to death in about ten seconds. - SetHealth( min( m_iHealth, FLAME_DIRECT_DAMAGE_PER_SEC * (ZOMBIE_BURN_TIME + random->RandomFloat( -ZOMBIE_BURN_TIME_NOISE, ZOMBIE_BURN_TIME_NOISE)) ) ); + SetHealth( min((float)m_iHealth, FLAME_DIRECT_DAMAGE_PER_SEC * (ZOMBIE_BURN_TIME + random->RandomFloat( -ZOMBIE_BURN_TIME_NOISE, ZOMBIE_BURN_TIME_NOISE)) ) ); // FIXME: use overlays when they come online //AddOverlay( ACT_ZOM_WALK_ON_FIRE, false ); =================================================================== --- mod/src/dlls/hl2_dll/npc_PoisonZombie.cpp 2005/02/18 04:45:52 1.1.1.1 +++ mod/src/dlls/hl2_dll/npc_PoisonZombie.cpp 2005/10/03 04:01:54 @@ -450,7 +450,7 @@ // Calculate what percentage of the creature's max health // this amount of damage represents (clips at 1.0). // - float flDamagePercent = min( 1, inputInfo.GetDamage() / m_iMaxHealth ); + float flDamagePercent = min( 1.0f, inputInfo.GetDamage() / m_iMaxHealth ); // // Throw one crab for every 20% damage we take. =================================================================== --- mod/src/dlls/hl2_dll/npc_barnacle.cpp 2005/02/18 04:45:52 1.1.1.1 +++ mod/src/dlls/hl2_dll/npc_barnacle.cpp 2005/10/02 06:09:30 @@ -1805,7 +1805,7 @@ length = fabs( GetAbsOrigin().z - tr.endpos.z ); // Pull it up a tad - length = max(8, length - m_flRestUnitsAboveGround); + length = max(8.0f, length - m_flRestUnitsAboveGround); if ( pflLength ) { *pflLength = length; =================================================================== --- mod/src/dlls/hl2_dll/npc_citizen17.cpp 2005/07/17 04:02:37 1.5 +++ mod/src/dlls/hl2_dll/npc_citizen17.cpp 2005/10/03 03:59:40 @@ -626,7 +626,7 @@ { for ( int i = 0; i < ARRAYSIZE(g_ppszRandomHeads); i++ ) { - if ( stricmp( g_ppszRandomHeads[i], pszModelName ) == 0 ) + if ( Q_stricmp( g_ppszRandomHeads[i], pszModelName ) == 0 ) { m_iHead = i; break; @@ -728,10 +728,10 @@ // If the model refers to an obsolete model, pretend it was blank // so that we pick the new default model. // - if (!strnicmp(STRING(iszModelName), "models/c17_", 11) || - !strnicmp(STRING(iszModelName), "models/male", 11) || - !strnicmp(STRING(iszModelName), "models/female", 13) || - !strnicmp(STRING(iszModelName), "models/citizen", 14)) + if (!Q_strnicmp(STRING(iszModelName), "models/c17_", 11) || + !Q_strnicmp(STRING(iszModelName), "models/male", 11) || + !Q_strnicmp(STRING(iszModelName), "models/female", 13) || + !Q_strnicmp(STRING(iszModelName), "models/citizen", 14)) { return NULL_STRING; } @@ -931,7 +931,7 @@ const float TIME_FADE = 1.0; float timeInSquad = gpGlobals->curtime - m_flTimeJoinedPlayerSquad; - timeInSquad = min( TIME_FADE, max( timeInSquad, 0 ) ); + timeInSquad = min( TIME_FADE, max( timeInSquad, 0.0f ) ); float fade = ( 1.0 - timeInSquad / TIME_FADE ); =================================================================== --- mod/src/dlls/hl2_dll/npc_combinedropship.cpp 2005/02/18 04:45:52 1.1.1.1 +++ mod/src/dlls/hl2_dll/npc_combinedropship.cpp 2005/10/03 04:00:01 @@ -1919,8 +1919,8 @@ #define MIN_LAND_VEL -75.0f #define ALTITUDE_CAP 512.0f - float flFactor = min( 1.0, flAltitude / ALTITUDE_CAP ); - float flDescendVelocity = min( -75, MAX_LAND_VEL * flFactor ); + float flFactor = min( 1.0f, flAltitude / ALTITUDE_CAP ); + float flDescendVelocity = min( -75.0f, MAX_LAND_VEL * flFactor ); vecVelocity.z = flDescendVelocity; =================================================================== --- mod/src/dlls/hl2_dll/npc_combines.cpp 2005/02/28 01:46:36 1.2 +++ mod/src/dlls/hl2_dll/npc_combines.cpp 2005/10/01 05:49:09 @@ -82,7 +82,7 @@ { const char *pModelName = STRING( GetModelName() ); - if( !stricmp( pModelName, "models/combine_super_soldier.mdl" ) ) + if( !Q_stricmp( pModelName, "models/combine_super_soldier.mdl" ) ) { m_fIsElite = true; } =================================================================== --- mod/src/dlls/hl2_dll/npc_manhack.cpp 2005/02/18 04:45:52 1.1.1.1 +++ mod/src/dlls/hl2_dll/npc_manhack.cpp 2005/10/03 04:00:57 @@ -1018,7 +1018,7 @@ if ( tr.fraction != 1.0f ) { - float speedAdj = max( 16, (-zSpeed*0.5f) ); + float speedAdj = max( 16.0f, (-zSpeed*0.5f) ); m_vForceVelocity += Vector(0,0,1) * ( speedAdj * ( 1.0f - tr.fraction ) ); } @@ -1196,7 +1196,7 @@ flDist = FLT_MAX; myDecay = 0.3f; myAccel = 500; - myZAccel = min( 500, zDist / flInterval ); + myZAccel = min( 500.0f, zDist / flInterval ); } else { @@ -1691,11 +1691,11 @@ int iPitch1, iPitch2; float flDistFactor; - flDistFactor = min( 1.0, 1 - flEnemyDist / MANHACK_PITCH_DIST1 ); + flDistFactor = min( 1.0f, 1 - flEnemyDist / MANHACK_PITCH_DIST1 ); iPitch1 = MANHACK_MIN_PITCH1 + ( ( MANHACK_MAX_PITCH1 - MANHACK_MIN_PITCH1 ) * flDistFactor); // NOTE: MANHACK_PITCH_DIST2 must be < MANHACK_PITCH_DIST1 - flDistFactor = min( 1.0, 1 - flEnemyDist / MANHACK_PITCH_DIST2 ); + flDistFactor = min( 1.0f, 1 - flEnemyDist / MANHACK_PITCH_DIST2 ); iPitch2 = MANHACK_MIN_PITCH2 + ( ( MANHACK_MAX_PITCH2 - MANHACK_MIN_PITCH2 ) * flDistFactor); m_nEnginePitch1 = iPitch1; @@ -1829,7 +1829,7 @@ else if( GetWaterLevel() > 0 ) { // Allow the manhack to lift off, but not to go deeper. - m_vCurrentVelocity.z = max( m_vCurrentVelocity.z, 0 ); + m_vCurrentVelocity.z = max( (float)m_vCurrentVelocity.z, 0.0f ); } CheckCollisions(flInterval); =================================================================== --- mod/src/dlls/hl2_dll/npc_metropolice.cpp 2005/02/18 04:45:52 1.1.1.1 +++ mod/src/dlls/hl2_dll/npc_metropolice.cpp 2005/10/03 04:01:24 @@ -1992,7 +1992,7 @@ vecShootAtVel.z = 0.0f; float flTargetSpeed = VectorNormalize( vecShootAtVel ); - float flStitchLength = max( AIM_IN_FRONT_OF_DEFAULT_STITCH_LENGTH, flTargetSpeed * flFollowTime * 0.9 ); + float flStitchLength = max( AIM_IN_FRONT_OF_DEFAULT_STITCH_LENGTH, flTargetSpeed * flFollowTime * 0.9f ); // This defines the line of death, which, when crossed, results in damage m_vecBurstLineOfDeathOrigin = vecSidePoint; =================================================================== --- mod/src/dlls/hl2_dll/npc_playercompanion.cpp 2005/02/18 04:45:52 1.1.1.1 +++ mod/src/dlls/hl2_dll/npc_playercompanion.cpp 2005/10/03 04:01:42 @@ -1075,7 +1075,7 @@ int priorReadiness = GetReadinessLevel(); flSet = min( 1.0f, flSet ); - flSet = max( 0.0, flSet ); + flSet = max( 0.0f, flSet ); m_flReadiness = flSet; =================================================================== --- mod/src/dlls/hl2_dll/npc_scanner.cpp 2005/02/18 04:45:52 1.1.1.1 +++ mod/src/dlls/hl2_dll/npc_scanner.cpp 2005/10/09 02:13:23 @@ -1332,7 +1332,7 @@ float speed = GetCurrentVelocity().Length(); float flVolume = 0.25f + (0.75f*(speed/GetMaxSpeed())); - int iPitch = min( 255, 80 + (20*(speed/GetMaxSpeed())) ); + int iPitch = (int)min( 255.0f, 80 + (20*(speed/GetMaxSpeed())) ); //Update our pitch and volume based on our speed controller.SoundChangePitch( m_pEngineSound, iPitch, 0.1f ); =================================================================== --- mod/src/dlls/hl2_dll/npc_strider.cpp 2005/02/18 04:45:52 1.1.1.1 +++ mod/src/dlls/hl2_dll/npc_strider.cpp 2005/10/09 02:13:56 @@ -3167,8 +3167,8 @@ float yawSpeed = fabsf(aimSpeed*flInterval*localEnemyAngles.y); float pitchSpeed = fabsf(aimSpeed*flInterval*localEnemyAngles.x); - yawSpeed = max(yawSpeed,5); - pitchSpeed = max(pitchSpeed,5); + yawSpeed = max(yawSpeed, 5.0f); + pitchSpeed = max(pitchSpeed, 5.0f); m_aimYaw = UTIL_Approach( targetYaw, m_aimYaw, yawSpeed ); m_aimPitch = UTIL_Approach( targetPitch, m_aimPitch, pitchSpeed ); @@ -4327,7 +4327,7 @@ { m_bWarnedAI = true; - CSoundEnt::InsertSound( SOUND_DANGER | SOUND_CONTEXT_REACT_TO_SOURCE, pTargetEnt->EarPosition() + Vector( 0, 0, 1 ), 120, max( 1.0, flRemainingShootTime ), pHost->GetEntity() ); + CSoundEnt::InsertSound( SOUND_DANGER | SOUND_CONTEXT_REACT_TO_SOURCE, pTargetEnt->EarPosition() + Vector( 0, 0, 1 ), 120, max( 1.0f, flRemainingShootTime ), pHost->GetEntity() ); } } } =================================================================== --- mod/src/dlls/hl2_dll/proto_sniper.cpp 2005/02/18 04:45:52 1.1.1.1 +++ mod/src/dlls/hl2_dll/proto_sniper.cpp 2005/10/01 05:49:09 @@ -907,7 +907,7 @@ SetSweepTarget( inputdata.value.String() ); m_bSweepHighestPriority = true; - if( GetCurSchedule() && stricmp( GetCurSchedule()->GetName(), "SCHED_PSNIPER_RELOAD" ) ) + if( GetCurSchedule() && Q_stricmp( GetCurSchedule()->GetName(), "SCHED_PSNIPER_RELOAD" ) ) { // If you're doing anything except reloading, stop and do this. ClearSchedule(); =================================================================== --- mod/src/game_shared/ammodef.cpp 2005/09/11 19:53:58 1.4 +++ mod/src/game_shared/ammodef.cpp 2005/10/01 05:43:21 @@ -42,7 +42,7 @@ for (i = 1; i < m_nAmmoIndex; i++) { - if (stricmp( psz, m_AmmoType[i].pName ) == 0) + if (Q_stricmp( psz, m_AmmoType[i].pName ) == 0) return i; } =================================================================== --- mod/src/game_shared/animation.cpp 2005/06/11 22:14:32 1.2 +++ mod/src/game_shared/animation.cpp 2005/10/01 05:49:10 @@ -314,7 +314,7 @@ for ( int i = 0; i < pstudiohdr->GetNumSeq(); i++ ) { mstudioseqdesc_t &seqdesc = pstudiohdr->pSeqdesc( i ); - if ( stricmp( seqdesc.pszActivityName(), label ) == 0 ) + if ( Q_stricmp( seqdesc.pszActivityName(), label ) == 0 ) { return seqdesc.activity; } @@ -341,7 +341,7 @@ for (int i = 0; i < pstudiohdr->GetNumSeq(); i++) { mstudioseqdesc_t &seqdesc = pstudiohdr->pSeqdesc( i ); - if (stricmp( seqdesc.pszLabel(), label ) == 0) + if (Q_stricmp( seqdesc.pszLabel(), label ) == 0) return i; } @@ -729,7 +729,7 @@ if ( !set ) continue; - if ( !stricmp( set->pszName(), name ) ) + if ( !Q_stricmp( set->pszName(), name ) ) return i; } =================================================================== --- mod/src/game_shared/basecombatweapon_shared.cpp 2005/07/11 03:28:43 1.3 +++ mod/src/game_shared/basecombatweapon_shared.cpp 2005/10/03 01:18:15 @@ -755,7 +755,7 @@ { // FIXME: does this even make sense in non-shoot animations? m_flPlaybackRate = SequenceDuration( sequence ) / duration; - m_flPlaybackRate = min( m_flPlaybackRate, 12.0); // FIXME; magic number!, network encoding range + m_flPlaybackRate = min((float)m_flPlaybackRate, 12.0f); // FIXME; magic number!, network encoding range } else { @@ -1761,7 +1761,7 @@ // Make sure we don't fire more than the amount in the clip if ( UsesClipsForAmmo1() ) { - info.m_iShots = min( info.m_iShots, m_iClip1 ); + info.m_iShots = min( info.m_iShots, (int)m_iClip1 ); m_iClip1 -= info.m_iShots; } else =================================================================== --- mod/src/game_shared/baseentity_shared.cpp 2005/06/11 22:14:32 1.3 +++ mod/src/game_shared/baseentity_shared.cpp 2005/10/01 05:49:10 @@ -386,7 +386,7 @@ bool printKeyHits = false; const char *debugName = ""; - if ( *ent_debugkeys.GetString() && !stricmp(ent_debugkeys.GetString(), STRING(m_iClassname)) ) + if ( *ent_debugkeys.GetString() && !Q_stricmp(ent_debugkeys.GetString(), STRING(m_iClassname)) ) { // Msg( "-- found entity of type %s\n", STRING(m_iClassname) ); printKeyHits = true; @@ -396,7 +396,7 @@ // loop through the data description, and try and place the keys in for ( datamap_t *dmap = GetDataDescMap(); dmap != NULL; dmap = dmap->baseMap ) { - if ( !printKeyHits && *ent_debugkeys.GetString() && !stricmp(dmap->dataClassName, ent_debugkeys.GetString()) ) + if ( !printKeyHits && *ent_debugkeys.GetString() && !Q_stricmp(dmap->dataClassName, ent_debugkeys.GetString()) ) { // Msg( "-- found class of type %s\n", dmap->dataClassName ); printKeyHits = true; =================================================================== --- mod/src/game_shared/baseplayer_shared.cpp 2005/08/13 05:45:00 1.9 +++ mod/src/game_shared/baseplayer_shared.cpp 2005/10/03 01:18:29 @@ -1051,7 +1051,7 @@ vPushAway.z = 0; float flDist = VectorNormalize( vPushAway ); - flDist = max( flDist, 1 ); + flDist = max( flDist, 1.0f ); float flForce = sv_pushaway_force.GetFloat() / flDist; flForce = min( flForce, sv_pushaway_max_force.GetFloat() ); =================================================================== --- mod/src/game_shared/choreoevent.cpp 2005/02/18 04:45:53 1.1.1.1 +++ mod/src/game_shared/choreoevent.cpp 2005/10/03 01:18:47 @@ -1943,7 +1943,7 @@ if ( !prt ) continue; - if ( !stricmp( prt->GetName(), tagname ) ) + if ( !Q_stricmp( prt->GetName(), tagname ) ) { m_RelativeTags.Remove( i ); return; @@ -1964,7 +1964,7 @@ if ( !prt ) continue; - if ( !stricmp( prt->GetName(), tagname ) ) + if ( !Q_stricmp( prt->GetName(), tagname ) ) { return prt; } @@ -2098,7 +2098,7 @@ if ( !ptt ) continue; - if ( !stricmp( ptt->GetName(), tagname ) ) + if ( !Q_stricmp( ptt->GetName(), tagname ) ) { m_TimingTags.Remove( i ); return; @@ -2119,7 +2119,7 @@ if ( !ptt ) continue; - if ( !stricmp( ptt->GetName(), tagname ) ) + if ( !Q_stricmp( ptt->GetName(), tagname ) ) { return ptt; } @@ -2215,7 +2215,7 @@ for ( int i = 0; i < GetNumFlexAnimationTracks(); i++ ) { CFlexAnimationTrack *t = GetFlexAnimationTrack( i ); - if ( t && !stricmp( t->GetFlexControllerName(), controllername ) ) + if ( t && !Q_stricmp( t->GetFlexControllerName(), controllername ) ) { return t; } @@ -2481,7 +2481,7 @@ if ( !ptag ) continue; - if ( !stricmp( ptag->GetName(), tagname ) ) + if ( !Q_stricmp( ptag->GetName(), tagname ) ) { return ptag; } @@ -2534,7 +2534,7 @@ if ( !ptag ) continue; - if ( !stricmp( ptag->GetName(), tagname ) ) + if ( !Q_stricmp( ptag->GetName(), tagname ) ) { m_AbsoluteTags[ type ].Remove( i ); return; @@ -2564,7 +2564,7 @@ CEventAbsoluteTag *t1 = &m_AbsoluteTags[ CChoreoEvent::PLAYBACK ][ i ]; - if ( stricmp( ptag->GetName(), t1->GetName() ) == 0) + if ( Q_stricmp( ptag->GetName(), t1->GetName() ) == 0) continue; bInOrder = false; @@ -2572,7 +2572,7 @@ { CEventAbsoluteTag *t2 = &m_AbsoluteTags[ CChoreoEvent::PLAYBACK ][ j ]; - if ( stricmp( ptag->GetName(), t2->GetName() ) == 0 ) + if ( Q_stricmp( ptag->GetName(), t2->GetName() ) == 0 ) { temp = *t1; *t1 = *t2; @@ -3175,14 +3175,14 @@ { tag->SetPercentage( minP ); - minDp = min( 0.01, minP / (i + 1) ); + minDp = min( 0.01f, minP / (i + 1) ); bHadOverlap = true; } else { minP = tag->GetPercentage(); } - minP = max( minP - minDp, 0 ); + minP = max( minP - minDp, 0.0f ); } return bHadOverlap; =================================================================== --- mod/src/game_shared/choreoscene.cpp 2005/02/18 04:45:53 1.1.1.1 +++ mod/src/game_shared/choreoscene.cpp 2005/10/01 05:49:10 @@ -445,7 +445,7 @@ if ( !a ) continue; - if ( !stricmp( a->GetName(), name ) ) + if ( !Q_stricmp( a->GetName(), name ) ) return a; } @@ -522,7 +522,7 @@ tokenizer->GetToken( true ); - if ( stricmp( tokenizer->CurrentToken(), "{" ) ) + if ( Q_stricmp( tokenizer->CurrentToken(), "{" ) ) tokenizer->Error( "expecting {\n" ); while ( 1 ) @@ -536,7 +536,7 @@ break; } - if ( !stricmp( tokenizer->CurrentToken(), "}" ) ) + if ( !Q_stricmp( tokenizer->CurrentToken(), "}" ) ) break; CUtlVector< CExpressionSample > samples; @@ -572,7 +572,7 @@ tokenizer->GetToken( true ); - if ( stricmp( tokenizer->CurrentToken(), "{" ) ) + if ( Q_stricmp( tokenizer->CurrentToken(), "{" ) ) tokenizer->Error( "expecting {\n" ); while ( 1 ) @@ -586,7 +586,7 @@ break; } - if ( !stricmp( tokenizer->CurrentToken(), "}" ) ) + if ( !Q_stricmp( tokenizer->CurrentToken(), "}" ) ) break; CUtlVector< CExpressionSample > samples; @@ -648,13 +648,13 @@ float event_time = endtime - starttime; // Is it the new file format? - if ( !stricmp( tokenizer->CurrentToken(), "samples_use_time" ) ) + if ( !Q_stricmp( tokenizer->CurrentToken(), "samples_use_time" ) ) { samples_use_realtime = true; tokenizer->GetToken( true ); } - if ( stricmp( tokenizer->CurrentToken(), "{" ) ) + if ( Q_stricmp( tokenizer->CurrentToken(), "{" ) ) tokenizer->Error( "expecting {\n" ); while ( 1 ) @@ -668,7 +668,7 @@ break; } - if ( !stricmp( tokenizer->CurrentToken(), "}" ) ) + if ( !Q_stricmp( tokenizer->CurrentToken(), "}" ) ) break; char flexcontroller[ CFlexAnimationTrack::MAX_CONTROLLER_NAME ]; @@ -681,19 +681,19 @@ float range_max = 1.0f; tokenizer->GetToken( true ); - if ( !stricmp( tokenizer->CurrentToken(), "disabled" ) ) + if ( !Q_stricmp( tokenizer->CurrentToken(), "disabled" ) ) { active = false; tokenizer->GetToken( true ); } - if ( !stricmp( tokenizer->CurrentToken(), "combo" ) ) + if ( !Q_stricmp( tokenizer->CurrentToken(), "combo" ) ) { combo = true; tokenizer->GetToken( true ); } - if ( !stricmp( tokenizer->CurrentToken(), "range" ) ) + if ( !Q_stricmp( tokenizer->CurrentToken(), "range" ) ) { tokenizer->GetToken( false ); range_min = atof( tokenizer->CurrentToken() ); @@ -706,7 +706,7 @@ for ( int samplecount = 0; samplecount < ( combo ? 2 : 1 ); samplecount++ ) { - if ( stricmp( tokenizer->CurrentToken(), "{" ) ) + if ( Q_stricmp( tokenizer->CurrentToken(), "{" ) ) { tokenizer->Error( "expecting {\n" ); } @@ -721,7 +721,7 @@ break; } - if ( !stricmp( tokenizer->CurrentToken(), "}" ) ) + if ( !Q_stricmp( tokenizer->CurrentToken(), "}" ) ) break; float time = (float)atof( tokenizer->CurrentToken() ); @@ -803,13 +803,13 @@ e->SetName( m_pTokenizer->CurrentToken() ); m_pTokenizer->GetToken( true ); - if ( stricmp( m_pTokenizer->CurrentToken(), "{" ) ) + if ( Q_stricmp( m_pTokenizer->CurrentToken(), "{" ) ) m_pTokenizer->Error( "expecting {\n" ); while ( 1 ) { m_pTokenizer->GetToken( true ); - if ( !stricmp( m_pTokenizer->CurrentToken(), "}" ) ) + if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "}" ) ) break; if ( strlen( m_pTokenizer->CurrentToken() ) <= 0 ) @@ -818,7 +818,7 @@ break; } - if ( !stricmp( m_pTokenizer->CurrentToken(), "time" ) ) + if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "time" ) ) { float start, end = 1.0f; @@ -833,7 +833,7 @@ e->SetStartTime( start ); e->SetEndTime( end ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "ramp" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "ramp" ) ) { hadramp = true; @@ -850,56 +850,56 @@ decay = (float)atof( m_pTokenizer->CurrentToken() ); } } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "param" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "param" ) ) { m_pTokenizer->GetToken( false ); e->SetParameters( m_pTokenizer->CurrentToken() ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "param2" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "param2" ) ) { m_pTokenizer->GetToken( false ); e->SetParameters2( m_pTokenizer->CurrentToken() ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "pitch" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "pitch" ) ) { m_pTokenizer->GetToken( false ); e->SetPitch( atoi( m_pTokenizer->CurrentToken() ) ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "yaw" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "yaw" ) ) { m_pTokenizer->GetToken( false ); e->SetYaw( atoi( m_pTokenizer->CurrentToken() ) ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "loopcount" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "loopcount" ) ) { m_pTokenizer->GetToken( false ); e->SetLoopCount( atoi( m_pTokenizer->CurrentToken() ) ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "resumecondition" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "resumecondition" ) ) { e->SetResumeCondition( true ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "fixedlength" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "fixedlength" ) ) { e->SetFixedLength( true ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "lockbodyfacing" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "lockbodyfacing" ) ) { e->SetLockBodyFacing( true ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "distancetotarget" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "distancetotarget" ) ) { m_pTokenizer->GetToken( false ); e->SetDistanceToTarget( atof( m_pTokenizer->CurrentToken() ) ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "tags" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "tags" ) ) { // Parse tags between { } // m_pTokenizer->GetToken( true ); - if ( stricmp( m_pTokenizer->CurrentToken(), "{" ) ) + if ( Q_stricmp( m_pTokenizer->CurrentToken(), "{" ) ) m_pTokenizer->Error( "expecting {\n" ); while ( 1 ) @@ -913,7 +913,7 @@ break; } - if ( !stricmp( m_pTokenizer->CurrentToken(), "}" ) ) + if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "}" ) ) break; char tagname[ CEventRelativeTag::MAX_EVENTTAG_LENGTH ]; @@ -926,7 +926,7 @@ e->AddRelativeTag( tagname, percentage ); } } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "sequenceduration" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "sequenceduration" ) ) { float duration = 0.0f; @@ -935,7 +935,7 @@ e->SetGestureSequenceDuration( duration ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "absolutetags" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "absolutetags" ) ) { m_pTokenizer->GetToken( true ); CChoreoEvent::AbsTagType tagtype; @@ -950,7 +950,7 @@ // Parse tags between { } // m_pTokenizer->GetToken( true ); - if ( stricmp( m_pTokenizer->CurrentToken(), "{" ) ) + if ( Q_stricmp( m_pTokenizer->CurrentToken(), "{" ) ) m_pTokenizer->Error( "expecting {\n" ); while ( 1 ) @@ -964,7 +964,7 @@ break; } - if ( !stricmp( m_pTokenizer->CurrentToken(), "}" ) ) + if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "}" ) ) break; char tagname[ CFlexTimingTag::MAX_EVENTTAG_LENGTH ]; @@ -977,12 +977,12 @@ e->AddAbsoluteTag( tagtype, tagname, t ); } } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "flextimingtags" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "flextimingtags" ) ) { // Parse tags between { } // m_pTokenizer->GetToken( true ); - if ( stricmp( m_pTokenizer->CurrentToken(), "{" ) ) + if ( Q_stricmp( m_pTokenizer->CurrentToken(), "{" ) ) m_pTokenizer->Error( "expecting {\n" ); while ( 1 ) @@ -996,7 +996,7 @@ break; } - if ( !stricmp( m_pTokenizer->CurrentToken(), "}" ) ) + if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "}" ) ) break; char tagname[ CFlexTimingTag::MAX_EVENTTAG_LENGTH ]; @@ -1013,7 +1013,7 @@ e->AddTimingTag( tagname, percentage, locked ); } } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "relativetag" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "relativetag" ) ) { char tagname[ CChoreoEvent::MAX_TAGNAME_STRING ]; char wavname[ CChoreoEvent::MAX_TAGNAME_STRING ]; @@ -1025,11 +1025,11 @@ e->SetUsingRelativeTag( true, tagname, wavname ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "flexanimations" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "flexanimations" ) ) { ParseFlexAnimations( m_pTokenizer, e ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "event_ramp" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "event_ramp" ) ) { ParseRamp( m_pTokenizer, e ); } @@ -1101,25 +1101,25 @@ a->SetName( m_pTokenizer->CurrentToken() ); m_pTokenizer->GetToken( true ); - if ( stricmp( m_pTokenizer->CurrentToken(), "{" ) ) + if ( Q_stricmp( m_pTokenizer->CurrentToken(), "{" ) ) m_pTokenizer->Error( "expecting {" ); // Parse channels while ( 1 ) { m_pTokenizer->GetToken( true ); - if ( !stricmp( m_pTokenizer->CurrentToken(), "}" ) ) + if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "}" ) ) break; - if ( !stricmp( m_pTokenizer->CurrentToken(), "channel" ) ) + if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "channel" ) ) { ParseChannel( a ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "faceposermodel" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "faceposermodel" ) ) { ParseFacePoserModel( a ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "active" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "active" ) ) { m_pTokenizer->GetToken( true ); a->SetActive( atoi( m_pTokenizer->CurrentToken() ) ? true : false ); @@ -1179,7 +1179,7 @@ void CChoreoScene::ParseSnap( void ) { m_pTokenizer->GetToken( true ); - m_bUseFrameSnap = !stricmp( m_pTokenizer->CurrentToken(), "on" ) ? true : false; + m_bUseFrameSnap = !Q_stricmp( m_pTokenizer->CurrentToken(), "on" ) ? true : false; } @@ -1207,21 +1207,21 @@ c->SetName( m_pTokenizer->CurrentToken() ); m_pTokenizer->GetToken( true ); - if ( stricmp( m_pTokenizer->CurrentToken(), "{" ) ) + if ( Q_stricmp( m_pTokenizer->CurrentToken(), "{" ) ) m_pTokenizer->Error( "expecting {" ); // Parse channels while ( 1 ) { m_pTokenizer->GetToken( true ); - if ( !stricmp( m_pTokenizer->CurrentToken(), "}" ) ) + if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "}" ) ) break; - if ( !stricmp( m_pTokenizer->CurrentToken(), "event" ) ) + if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "event" ) ) { ParseEvent( actor, c ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "active" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "active" ) ) { m_pTokenizer->GetToken( true ); c->SetActive( atoi( m_pTokenizer->CurrentToken() ) ? true : false ); @@ -1263,31 +1263,31 @@ if ( strlen( m_pTokenizer->CurrentToken() ) <= 0 ) break; - if ( !stricmp( m_pTokenizer->CurrentToken(), "event" ) ) + if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "event" ) ) { ParseEvent( NULL, NULL ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "actor" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "actor" ) ) { ParseActor(); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "mapname" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "mapname" ) ) { ParseMapname(); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "fps" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "fps" ) ) { ParseFPS(); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "snap" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "snap" ) ) { ParseSnap(); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "scene_ramp" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "scene_ramp" ) ) { ParseSceneRamp( m_pTokenizer, this ); } - else if ( !stricmp( m_pTokenizer->CurrentToken(), "scalesettings" ) ) + else if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "scalesettings" ) ) { ParseScaleSettings( m_pTokenizer, this ); } @@ -2720,10 +2720,10 @@ if ( !e->IsUsingRelativeTag() ) continue; - if ( stricmp( wavname, e->GetRelativeWavName() ) ) + if ( Q_stricmp( wavname, e->GetRelativeWavName() ) ) continue; - if ( stricmp( name, e->GetRelativeTagName() ) ) + if ( Q_stricmp( name, e->GetRelativeTagName() ) ) continue; return e; @@ -2830,7 +2830,7 @@ if ( strlen( m_pTokenizer->CurrentToken() ) <= 0 ) break; - if ( !stricmp( m_pTokenizer->CurrentToken(), "event" ) ) + if ( !Q_stricmp( m_pTokenizer->CurrentToken(), "event" ) ) { ParseEvent( actor, channel ); } @@ -3148,7 +3148,7 @@ { tokenizer->GetToken( true ); - if ( stricmp( tokenizer->CurrentToken(), "{" ) ) + if ( Q_stricmp( tokenizer->CurrentToken(), "{" ) ) tokenizer->Error( "expecting {\n" ); while ( 1 ) @@ -3162,7 +3162,7 @@ break; } - if ( !stricmp( tokenizer->CurrentToken(), "}" ) ) + if ( !Q_stricmp( tokenizer->CurrentToken(), "}" ) ) break; char tool[ 256 ]; =================================================================== --- mod/src/game_shared/gamemovement.cpp 2005/09/10 06:20:21 1.13 +++ mod/src/game_shared/gamemovement.cpp 2005/10/09 02:02:02 @@ -3133,7 +3133,7 @@ // Check the -x, -y quadrant mins = minsSrc; - maxs.Init( min( 0, maxsSrc.x ), min( 0, maxsSrc.y ), maxsSrc.z ); + maxs.Init( min( vec_t(0), maxsSrc.x ), min( vec_t(0), maxsSrc.y ), maxsSrc.z ); ray.Init( start, end, mins, maxs ); UTIL_TraceRay( ray, fMask, player, collisionGroup, &pm ); if ( pm.m_pEnt && pm.plane.normal[2] >= 0.7) @@ -3144,7 +3144,7 @@ } // Check the +x, +y quadrant - mins.Init( max( 0, minsSrc.x ), max( 0, minsSrc.y ), minsSrc.z ); + mins.Init( max( vec_t(0), minsSrc.x ), max( vec_t(0), minsSrc.y ), minsSrc.z ); maxs = maxsSrc; ray.Init( start, end, mins, maxs ); UTIL_TraceRay( ray, fMask, player, collisionGroup, &pm ); @@ -3156,8 +3156,8 @@ } // Check the -x, +y quadrant - mins.Init( minsSrc.x, max( 0, minsSrc.y ), minsSrc.z ); - maxs.Init( min( 0, maxsSrc.x ), maxsSrc.y, maxsSrc.z ); + mins.Init( minsSrc.x, max( vec_t(0), minsSrc.y ), minsSrc.z ); + maxs.Init( min( vec_t(0), maxsSrc.x ), maxsSrc.y, maxsSrc.z ); ray.Init( start, end, mins, maxs ); UTIL_TraceRay( ray, fMask, player, collisionGroup, &pm ); if ( pm.m_pEnt && pm.plane.normal[2] >= 0.7) @@ -3168,8 +3168,8 @@ } // Check the +x, -y quadrant - mins.Init( max( 0, minsSrc.x ), minsSrc.y, minsSrc.z ); - maxs.Init( maxsSrc.x, min( 0, maxsSrc.y ), maxsSrc.z ); + mins.Init( max( vec_t(0), minsSrc.x ), minsSrc.y, minsSrc.z ); + maxs.Init( maxsSrc.x, min( vec_t(0), maxsSrc.y ), maxsSrc.z ); ray.Init( start, end, mins, maxs ); UTIL_TraceRay( ray, fMask, player, collisionGroup, &pm ); if ( pm.m_pEnt && pm.plane.normal[2] >= 0.7) =================================================================== --- mod/src/game_shared/obstacle_pushaway.cpp 2005/09/12 00:30:28 1.2 +++ mod/src/game_shared/obstacle_pushaway.cpp 2005/10/02 05:52:16 @@ -74,14 +74,14 @@ } mass = clamp( mass, minMass, maxMass ); - mass = max( mass, 0 ); + mass = max( mass, 0.0f ); mass /= maxMass; // bring into a 0..1 range // Push away from the collision point. The closer our center is to the collision point, // the harder we push away. Vector vPushAway = (pPlayer->WorldSpaceCenter() - props[i]->WorldSpaceCenter()); float flDist = VectorNormalize( vPushAway ); - flDist = max( flDist, 1 ); + flDist = max( flDist, 1.0f ); float flForce = sv_pushaway_player_force.GetFloat() / flDist * mass; flForce = min( flForce, sv_pushaway_max_player_force.GetFloat() ); @@ -137,7 +137,7 @@ vPushAway.z = 0; float flDist = VectorNormalize( vPushAway ); - flDist = max( flDist, 1 ); + flDist = max( flDist, 1.0f ); float flForce = sv_pushaway_force.GetFloat() / flDist; flForce = min( flForce, sv_pushaway_max_force.GetFloat() ); =================================================================== --- mod/src/game_shared/physics_shared.cpp 2005/02/18 04:45:54 1.1.1.1 +++ mod/src/game_shared/physics_shared.cpp 2005/10/02 03:10:04 @@ -193,7 +193,7 @@ while ( !pParse->Finished() ) { const char *pBlock = pParse->GetCurrentBlockName(); - if ( !strcmpi( pBlock, "solid" ) ) + if ( !Q_stricmp( pBlock, "solid" ) ) { solid_t tmpSolid; memset( &tmpSolid, 0, sizeof(tmpSolid) ); @@ -256,7 +256,7 @@ while ( !pParse->Finished() ) { const char *pBlock = pParse->GetCurrentBlockName(); - if ( !strcmpi( pBlock, "solid" ) ) + if ( !Q_stricmp( pBlock, "solid" ) ) { solid_t tmpSolid; memset( &tmpSolid, 0, sizeof(tmpSolid) ); @@ -561,7 +561,7 @@ { const char *pBlock = pParse->GetCurrentBlockName(); - if ( !strcmpi( pBlock, "solid" ) || !strcmpi( pBlock, "staticsolid" ) ) + if ( !Q_stricmp( pBlock, "solid" ) || !Q_stricmp( pBlock, "staticsolid" ) ) { solid.params = defaultParams; pParse->ParseSolid( &solid, &g_SolidSetup ); @@ -581,7 +581,7 @@ pWorldPhysics = pObject; } } - else if ( !strcmpi( pBlock, "fluid" ) ) + else if ( !Q_stricmp( pBlock, "fluid" ) ) { pParse->ParseFluid( &fluid, NULL ); @@ -602,7 +602,7 @@ physenv->CreateFluidController( pWater, &fluid.params ); } } - else if ( !strcmpi( pBlock, "materialtable" ) ) + else if ( !Q_stricmp( pBlock, "materialtable" ) ) { int surfaceTable[128]; memset( surfaceTable, 0, sizeof(surfaceTable) ); =================================================================== --- mod/src/game_shared/predictioncopy.cpp 2005/02/18 04:45:54 1.1.1.1 +++ mod/src/game_shared/predictioncopy.cpp 2005/10/01 05:49:11 @@ -1256,7 +1256,7 @@ } } - if ( !stricmp( td->fieldName, fieldname ) ) + if ( !Q_stricmp( td->fieldName, fieldname ) ) { return td; } =================================================================== --- mod/src/game_shared/props_shared.cpp 2005/06/11 22:14:33 1.3 +++ mod/src/game_shared/props_shared.cpp 2005/10/02 03:10:04 @@ -358,7 +358,7 @@ if ( pkvCurrentInter ) { char const *pszInterBase = pkvCurrentInter->GetString( pInteraction->pszKeyName ); - if ( pszInterBase && pszInterBase[0] && !stricmp( pszInterBase, pInteraction->pszValue ) ) + if ( pszInterBase && pszInterBase[0] && !Q_stricmp( pszInterBase, pInteraction->pszValue ) ) { pBreakableInterface->SetInteraction( (propdata_interactions_t)i ); } @@ -477,24 +477,24 @@ virtual void ParseKeyValue( void *pData, const char *pKey, const char *pValue ) { breakmodel_t *pModel = (breakmodel_t *)pData; - if ( !strcmpi( pKey, "model" ) ) + if ( !Q_stricmp( pKey, "model" ) ) { ParseModelName( pModel, pValue ); } - else if (!strcmpi( pKey, "ragdoll" ) ) + else if (!Q_stricmp( pKey, "ragdoll" ) ) { ParseModelName( pModel, pValue ); pModel->isRagdoll = true; } - else if ( !strcmpi( pKey, "offset" ) ) + else if ( !Q_stricmp( pKey, "offset" ) ) { UTIL_StringToVector( pModel->offset.Base(), pValue ); } - else if ( !strcmpi( pKey, "health" ) ) + else if ( !Q_stricmp( pKey, "health" ) ) { pModel->health = atof(pValue); } - else if ( !strcmpi( pKey, "fadetime" ) ) + else if ( !Q_stricmp( pKey, "fadetime" ) ) { pModel->fadeTime = atof(pValue); if ( !m_wroteCollisionGroup ) @@ -502,29 +502,29 @@ pModel->collisionGroup = COLLISION_GROUP_DEBRIS; } } - else if ( !strcmpi( pKey, "fademindist" ) ) + else if ( !Q_stricmp( pKey, "fademindist" ) ) { pModel->fadeMinDist = atof(pValue); } - else if ( !strcmpi( pKey, "fademaxdist" ) ) + else if ( !Q_stricmp( pKey, "fademaxdist" ) ) { pModel->fadeMaxDist = atof(pValue); } - else if ( !strcmpi( pKey, "debris" ) ) + else if ( !Q_stricmp( pKey, "debris" ) ) { pModel->collisionGroup = atoi(pValue) > 0 ? COLLISION_GROUP_DEBRIS : COLLISION_GROUP_INTERACTIVE; m_wroteCollisionGroup = true; } - else if ( !strcmpi( pKey, "burst" ) ) + else if ( !Q_stricmp( pKey, "burst" ) ) { pModel->burstScale = atof( pValue ); } - else if ( !strcmpi( pKey, "placementbone" ) ) + else if ( !Q_stricmp( pKey, "placementbone" ) ) { Q_strncpy( pModel->placementName, pValue, sizeof(pModel->placementName) ); pModel->placementIsBone = true; } - else if ( !strcmpi( pKey, "placementattachment" ) ) + else if ( !Q_stricmp( pKey, "placementattachment" ) ) { Q_strncpy( pModel->placementName, pValue, sizeof(pModel->placementName) ); pModel->placementIsBone = false; @@ -565,7 +565,7 @@ CBreakParser breakParser( defBurstScale, defCollisionGroup ); const char *pBlock = pParse->GetCurrentBlockName(); - if ( !strcmpi( pBlock, "break" ) ) + if ( !Q_stricmp( pBlock, "break" ) ) { int index = list.AddToTail(); breakmodel_t &breakModel = list[index]; =================================================================== --- mod/src/game_shared/ragdoll_shared.cpp 2005/06/11 22:14:33 1.2 +++ mod/src/game_shared/ragdoll_shared.cpp 2005/10/02 05:51:18 @@ -67,13 +67,13 @@ } virtual void ParseKeyValue( void *pData, const char *pKey, const char *pValue ) { - if ( !strcmpi( pKey, "selfcollisions" ) ) + if ( !Q_stricmp( pKey, "selfcollisions" ) ) { // keys disabled by default Assert( atoi(pValue) == 0 ); m_bSelfCollisions = false; } - else if ( !strcmpi( pKey, "collisionpair" ) ) + else if ( !Q_stricmp( pKey, "collisionpair" ) ) { if ( m_bSelfCollisions ) { @@ -107,23 +107,23 @@ } virtual void ParseKeyValue( void *pData, const char *pKey, const char *pValue ) { - if ( !strcmpi( pKey, "animfrictionmin" ) ) + if ( !Q_stricmp( pKey, "animfrictionmin" ) ) { m_ragdoll->animfriction.iMinAnimatedFriction = atoi( pValue ); } - else if ( !strcmpi( pKey, "animfrictionmax" ) ) + else if ( !Q_stricmp( pKey, "animfrictionmax" ) ) { m_ragdoll->animfriction.iMaxAnimatedFriction = atoi( pValue ); } - else if ( !strcmpi( pKey, "animfrictiontimein" ) ) + else if ( !Q_stricmp( pKey, "animfrictiontimein" ) ) { m_ragdoll->animfriction.flFrictionTimeIn = atof( pValue ); } - else if ( !strcmpi( pKey, "animfrictiontimeout" ) ) + else if ( !Q_stricmp( pKey, "animfrictiontimeout" ) ) { m_ragdoll->animfriction.flFrictionTimeOut = atof( pValue ); } - else if ( !strcmpi( pKey, "animfrictiontimehold" ) ) + else if ( !Q_stricmp( pKey, "animfrictiontimehold" ) ) { m_ragdoll->animfriction.flFrictionTimeHold = atof( pValue ); } @@ -147,7 +147,7 @@ { const char *pBlock = pParse->GetCurrentBlockName(); - if ( !strcmpi( pBlock, "animatedfriction") ) + if ( !Q_stricmp( pBlock, "animatedfriction") ) { CRagdollAnimatedFriction friction( ragdoll ); pParse->ParseCustom( (void*)&friction, &friction ); @@ -179,7 +179,7 @@ while ( !pParse->Finished() ) { const char *pBlock = pParse->GetCurrentBlockName(); - if ( !strcmpi( pBlock, "solid" ) ) + if ( !Q_stricmp( pBlock, "solid" ) ) { solid_t solid; @@ -213,7 +213,7 @@ } } } - else if ( !strcmpi( pBlock, "ragdollconstraint" ) ) + else if ( !Q_stricmp( pBlock, "ragdollconstraint" ) ) { constraint_ragdollparams_t constraint; pParse->ParseRagdollConstraint( &constraint, NULL ); @@ -250,13 +250,13 @@ childElement.pConstraint = pPhysEnv->CreateRagdollConstraint( childElement.pObject, ragdoll.list[constraint.parentIndex].pObject, ragdoll.pGroup, constraint ); } } - else if ( !strcmpi( pBlock, "collisionrules" ) ) + else if ( !Q_stricmp( pBlock, "collisionrules" ) ) { IPhysicsCollisionSet *pSet = physics->FindOrCreateCollisionSet( params.modelIndex, ragdoll.listCount ); CRagdollCollisionRules rules(pSet); pParse->ParseCustom( (void *)&rules, &rules ); } - else if ( !strcmpi( pBlock, "animatedfriction") ) + else if ( !Q_stricmp( pBlock, "animatedfriction") ) { CRagdollAnimatedFriction friction( &ragdoll ); pParse->ParseCustom( (void*)&friction, &friction ); @@ -287,7 +287,7 @@ while ( !pParse->Finished() ) { const char *pBlock = pParse->GetCurrentBlockName(); - if ( !strcmpi( pBlock, "collisionrules" ) ) + if ( !Q_stricmp( pBlock, "collisionrules" ) ) { IPhysicsCollisionSet *pSet = physics->FindOrCreateCollisionSet( modelIndex, ragdoll.listCount ); CRagdollCollisionRules rules(pSet); @@ -363,7 +363,7 @@ { totalMass += ragdoll.list[i].pObject->GetMass(); } - totalMass = max(totalMass,1); + totalMass = max(totalMass, 1.0f); // apply force to the model Vector nudgeForce = params.forceVector; @@ -483,7 +483,7 @@ while ( !pParse->Finished() ) { const char *pBlock = pParse->GetCurrentBlockName(); - if ( !strcmpi( pBlock, "solid" ) ) + if ( !Q_stricmp( pBlock, "solid" ) ) { solid_t solid; pParse->ParseSolid( &solid, NULL ); =================================================================== --- mod/src/game_shared/saverestore.cpp 2005/02/18 04:45:54 1.1.1.1 +++ mod/src/game_shared/saverestore.cpp 2005/10/01 05:49:11 @@ -1485,7 +1485,7 @@ if ( fieldNumber == fieldCount ) fieldNumber = 0; - if ( stricmp( pTest->fieldName, pszFieldName ) == 0 ) + if ( Q_stricmp( pTest->fieldName, pszFieldName ) == 0 ) return pTest; } } =================================================================== --- mod/src/game_shared/teamplay_gamerules.cpp 2005/09/11 19:53:58 1.5 +++ mod/src/game_shared/teamplay_gamerules.cpp 2005/10/01 05:49:11 @@ -372,7 +372,7 @@ if ( !pPlayer || !pTarget || !pTarget->IsPlayer() ) return GR_NOTTEAMMATE; - if ( (*GetTeamID(pPlayer) != '\0') && (*GetTeamID(pTarget) != '\0') && !stricmp( GetTeamID(pPlayer), GetTeamID(pTarget) ) ) + if ( (*GetTeamID(pPlayer) != '\0') && (*GetTeamID(pTarget) != '\0') && !Q_stricmp( GetTeamID(pPlayer), GetTeamID(pTarget) ) ) { return GR_TEAMMATE; } @@ -441,7 +441,7 @@ // try to find existing team for ( int tm = 0; tm < num_teams; tm++ ) { - if ( !stricmp( team_names[tm], pTeamName ) ) + if ( !Q_stricmp( team_names[tm], pTeamName ) ) return tm; } } =================================================================== --- mod/src/game_shared/util_shared.cpp 2005/06/11 22:14:33 1.3 +++ mod/src/game_shared/util_shared.cpp 2005/10/01 03:03:20 @@ -830,7 +830,7 @@ int blockSize = ice.blockSize(); - unsigned char *temp = (unsigned char *)_alloca( PAD_NUMBER( size, blockSize ) ); + unsigned char *temp = (unsigned char *)stackalloc( PAD_NUMBER( size, blockSize ) ); unsigned char *p1 = buffer; unsigned char *p2 = temp; =================================================================== --- mod/src/game_shared/voice_gamemgr.cpp 2005/02/18 04:45:54 1.1.1.1 +++ mod/src/game_shared/voice_gamemgr.cpp 2005/10/02 05:46:56 @@ -59,7 +59,7 @@ if(pEnt && pEnt->IsPlayer()) { const char *pNetName = STRING(pEnt->GetEntityName()); - if(stricmp(pNetName, pTestName) == 0) + if(Q_stricmp(pNetName, pTestName) == 0) { return (CBasePlayer*)pEnt; } @@ -79,7 +79,7 @@ return; va_start( marker, pFmt ); - _vsnprintf( msg, sizeof(msg), pFmt, marker ); + Q_vsnprintf( msg, sizeof(msg), pFmt, marker ); va_end( marker ); Msg( "%s", msg ); @@ -156,7 +156,7 @@ return true; } - bool bBan = stricmp(cmd, "vban") == 0; + bool bBan = Q_stricmp(cmd, "vban") == 0; if(bBan && engine->Cmd_Argc() >= 2) { for(int i=1; i < engine->Cmd_Argc(); i++) @@ -179,7 +179,7 @@ //UpdateMasks(); return true; } - else if(stricmp(cmd, "VModEnable") == 0 && engine->Cmd_Argc() >= 2) + else if(Q_stricmp(cmd, "VModEnable") == 0 && engine->Cmd_Argc() >= 2) { VoiceServerDebug( "CVoiceGameMgr::ClientCommand: VModEnable (%d)\n", !!atoi(engine->Cmd_Argv(1)) ); g_PlayerModEnable[playerClientIndex] = !!atoi(engine->Cmd_Argv(1)); =================================================================== --- mod/src/game_shared/hl2mp/hl2mp_gamerules.cpp 2005/09/12 00:30:28 1.19 +++ mod/src/game_shared/hl2mp/hl2mp_gamerules.cpp 2005/10/01 05:49:11 @@ -685,7 +685,7 @@ const char *szModelName = engine->GetClientConVarValue( engine->IndexOfEdict( pPlayer->edict() ), "cl_playermodel" ); //If we're different. - if ( stricmp( szModelName, pCurrentModel ) ) + if ( Q_stricmp( szModelName, pCurrentModel ) ) { //Too soon, set the cvar back to what it was. //Note: this will make this function be called again @@ -739,7 +739,7 @@ if ( !pPlayer || !pTarget || !pTarget->IsPlayer() || IsTeamplay() == false ) return GR_NOTTEAMMATE; - if ( (*GetTeamID(pPlayer) != '\0') && (*GetTeamID(pTarget) != '\0') && !stricmp( GetTeamID(pPlayer), GetTeamID(pTarget) ) ) + if ( (*GetTeamID(pPlayer) != '\0') && (*GetTeamID(pTarget) != '\0') && !Q_stricmp( GetTeamID(pPlayer), GetTeamID(pTarget) ) ) { return GR_TEAMMATE; } =================================================================== --- mod/src/game_shared/sdk/sdk_gamerules.cpp 2005/02/18 04:45:55 1.1.1.1 +++ mod/src/game_shared/sdk/sdk_gamerules.cpp 2005/10/01 05:49:12 @@ -124,7 +124,7 @@ int nArgs = engine->Cmd_Argc(); for ( int i=1; i < nArgs; i++ ) { - if ( stricmp( engine->Cmd_Argv(i), pName ) == 0 ) + if ( Q_stricmp( engine->Cmd_Argv(i), pName ) == 0 ) return (i+1) < nArgs ? engine->Cmd_Argv(i+1) : ""; } return 0; @@ -383,7 +383,7 @@ if ( !pPlayer || !pTarget || !pTarget->IsPlayer() || IsTeamplay() == false ) return GR_NOTTEAMMATE; - if ( (*GetTeamID(pPlayer) != '\0') && (*GetTeamID(pTarget) != '\0') && !stricmp( GetTeamID(pPlayer), GetTeamID(pTarget) ) ) + if ( (*GetTeamID(pPlayer) != '\0') && (*GetTeamID(pTarget) != '\0') && !Q_stricmp( GetTeamID(pPlayer), GetTeamID(pTarget) ) ) return GR_TEAMMATE; #endif =================================================================== --- mod/src/public/XZip.cpp 2005/02/18 04:45:57 1.1.1.1 +++ mod/src/public/XZip.cpp 2005/10/01 05:49:13 @@ -2149,14 +2149,14 @@ { const char *ext = fn+strlen(fn); while (ext>fn && *ext!='.') ext--; if (ext==fn && *ext!='.') return false; - if (stricmp(ext,".Z")==0) return true; - if (stricmp(ext,".zip")==0) return true; - if (stricmp(ext,".zoo")==0) return true; - if (stricmp(ext,".arc")==0) return true; - if (stricmp(ext,".lzh")==0) return true; - if (stricmp(ext,".arj")==0) return true; - if (stricmp(ext,".gz")==0) return true; - if (stricmp(ext,".tgz")==0) return true; + if (Q_stricmp(ext,".Z")==0) return true; + if (Q_stricmp(ext,".zip")==0) return true; + if (Q_stricmp(ext,".zoo")==0) return true; + if (Q_stricmp(ext,".arc")==0) return true; + if (Q_stricmp(ext,".lzh")==0) return true; + if (Q_stricmp(ext,".arj")==0) return true; + if (Q_stricmp(ext,".gz")==0) return true; + if (Q_stricmp(ext,".tgz")==0) return true; return false; } =================================================================== --- mod/src/public/bone_setup.cpp 2005/02/18 04:45:55 1.1.1.1 +++ mod/src/public/bone_setup.cpp 2005/10/02 16:41:24 @@ -1083,7 +1083,7 @@ } else { - cycle = max( 0.0, min( cycle, 0.9999 ) ); + cycle = max( 0.0f, min( cycle, 0.9999f ) ); } } @@ -2140,7 +2140,7 @@ } else { - flCycle = max( 0.0, min( flCycle, 0.9999 ) ); + flCycle = max( 0.0f, min( flCycle, 0.9999f ) ); } } @@ -3331,7 +3331,7 @@ // FIXME: a fast acos should be acceptable dot = clamp( dot, -1, 1 ); weight[i] = 1 - (2 * acos( dot ) * pProc->pTrigger( i )->inv_tolerance ); - weight[i] = max( 0, weight[i] ); + weight[i] = max( 0.0f, weight[i] ); scale += weight[i]; } @@ -4197,7 +4197,7 @@ // Extract the bone index from the name for (int i = 0; i < pStudioHdr->GetNumAttachments(); i++) { - if (!stricmp(pAttachmentName,pStudioHdr->pAttachment(i).pszName( ))) + if (!Q_stricmp(pAttachmentName,pStudioHdr->pAttachment(i).pszName( ))) { return i; } =================================================================== --- mod/src/public/chunkfile.cpp 2005/02/18 04:45:55 1.1.1.1 +++ mod/src/public/chunkfile.cpp 2005/10/01 05:49:12 @@ -143,7 +143,7 @@ ChunkHandlerInfoNode_t *pNode = m_pHandlers; while (pNode != NULL) { - if (!stricmp(pNode->Handler.szChunkName, pszChunkName)) + if (!Q_stricmp(pNode->Handler.szChunkName, pszChunkName)) { *ppData = pNode->Handler.pData; return(pNode->Handler.pfnHandler); @@ -495,7 +495,7 @@ { case OPERATOR: { - if (!stricmp(szNext, "{")) + if (!Q_stricmp(szNext, "{")) { // Beginning of new chunk. m_nCurrentDepth++; @@ -536,7 +536,7 @@ case OPERATOR: { - if (!stricmp(szName, "}")) + if (!Q_stricmp(szName, "}")) { // End of current chunk. m_nCurrentDepth--; =================================================================== --- mod/src/public/compressed_vector.h 2005/02/18 04:45:56 1.1.1.1 +++ mod/src/public/compressed_vector.h 2005/10/03 01:22:39 @@ -24,6 +24,7 @@ #include "tier0/dbg.h" #include "vector.h" +#include "minmax.h" #ifdef __cplusplus @@ -65,7 +66,7 @@ static float expScale[4] = { 4.0f, 16.0f, 32.f, 64.f }; float fmax = max( fabs( vOther.x ), fabs( vOther.y ) ); - fmax = max( fmax, fabs( vOther.z ) ); + fmax = max( fmax, (float)fabs( vOther.z ) ); for (exp = 0; exp < 3; exp++) { =================================================================== --- mod/src/public/dt_utlvector_common.cpp 2005/02/18 04:45:56 1.1.1.1 +++ mod/src/public/dt_utlvector_common.cpp 2005/10/03 03:58:31 @@ -15,7 +15,7 @@ char* AllocateStringHelper2( const char *pFormat, va_list marker ) { char str[512]; - _vsnprintf( str, sizeof( str ), pFormat, marker ); + Q_vsnprintf( str, sizeof( str ), pFormat, marker ); int len = strlen( str ) + 1; char *pRet = new char[len]; =================================================================== --- mod/src/public/filesystem_passthru.h 2005/02/18 04:45:56 1.1.1.1 +++ mod/src/public/filesystem_passthru.h 2005/10/01 03:40:44 @@ -16,6 +16,13 @@ #include +#ifdef _MSC_VER +#ifndef vsnprintf +#define vsnprintf _vsnprintf +#endif +#endif + + // // These classes pass all filesystem interface calls through to another filesystem // interface. They can be used anytime you want to override a couple things in @@ -103,7 +110,7 @@ char str[8192]; va_list marker; va_start( marker, pFormat ); - _vsnprintf( str, sizeof( str ), pFormat, marker ); + vsnprintf( str, sizeof( str ), pFormat, marker ); va_end( marker ); return m_pFileSystemPassThru->FPrintf( file, "%s", str ); } @@ -167,5 +174,9 @@ CFileSystemPassThru asdf; } + +#ifdef _MSC_VER +#undef vsnprintf +#endif #endif // FILESYSTEM_PASSTHRU_H =================================================================== --- mod/src/public/imageloader.cpp 2005/02/18 04:45:56 1.1.1.1 +++ mod/src/public/imageloader.cpp 2005/10/01 03:03:21 @@ -881,7 +881,7 @@ width = ( width + 3 ) & ~3; height = ( height + 3 ) & ~3; realDst = dst; - dst = ( CDestPixel * )_alloca( width * height * sizeof( CDestPixel ) ); + dst = ( CDestPixel * )stackalloc( width * height * sizeof( CDestPixel ) ); Assert( dst ); } Assert( !( width % 4 ) ); @@ -942,7 +942,7 @@ width = ( width + 3 ) & ~3; height = ( height + 3 ) & ~3; realDst = dst; - dst = ( CDestPixel * )_alloca( width * height * sizeof( CDestPixel ) ); + dst = ( CDestPixel * )stackalloc( width * height * sizeof( CDestPixel ) ); Assert( dst ); } Assert( !( width % 4 ) ); @@ -1022,7 +1022,7 @@ width = ( width + 3 ) & ~3; height = ( height + 3 ) & ~3; realDst = dst; - dst = ( CDestPixel * )_alloca( width * height * sizeof( CDestPixel ) ); + dst = ( CDestPixel * )stackalloc( width * height * sizeof( CDestPixel ) ); Assert( dst ); } Assert( !( width % 4 ) ); =================================================================== --- mod/src/public/mathlib.h 2005/02/18 04:45:56 1.1.1.1 +++ mod/src/public/mathlib.h 2005/10/03 01:39:50 @@ -12,6 +12,7 @@ #include "basetypes.h" #include "vector.h" #include "vector2d.h" +#include "minmax.h" #include "tier0/dbg.h" // plane_t structure =================================================================== --- mod/src/public/minmax.h 2005/02/18 04:45:56 1.1.1.1 +++ mod/src/public/minmax.h 2005/10/02 16:39:42 @@ -12,11 +12,9 @@ #pragma once #endif -#ifndef min -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#endif -#ifndef max -#define max(a,b) (((a) > (b)) ? (a) : (b)) -#endif +// Avoid #define macros when a function will suffice! +#include +using std::max; +using std::min; #endif // MINMAX_H =================================================================== --- mod/src/public/rope_physics.cpp 2005/02/18 04:45:57 1.1.1.1 +++ mod/src/public/rope_physics.cpp 2005/10/09 02:19:24 @@ -9,6 +9,7 @@ #include "rope_physics.h" #include "tier0/dbg.h" +#include "minmax.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" @@ -60,7 +61,7 @@ void CBaseRopePhysics::ResetSpringLength( float flSpringDist ) { - m_flSpringDist = max( flSpringDist, 0 ); + m_flSpringDist = max( flSpringDist, 0.0f ); m_flSpringDistSqr = m_flSpringDist * m_flSpringDist; for( int i=0; i < NumSprings(); i++ ) =================================================================== --- mod/src/public/sentence.cpp 2005/02/18 04:45:57 1.1.1.1 +++ mod/src/public/sentence.cpp 2005/10/02 03:10:06 @@ -352,7 +352,7 @@ { CCLanguage *entry = &g_CCLanguageLookup[ l ]; Assert( entry->type == l ); - if ( !stricmp( entry->name, name ) ) + if ( !Q_stricmp( entry->name, name ) ) return l; } return -1; @@ -390,7 +390,7 @@ while ( 1 ) { buf.GetString( token ); - if ( !stricmp( token, "}" ) ) + if ( !Q_stricmp( token, "}" ) ) break; Q_strncat( text, token, sizeof( text ), COPY_ALL_CHARACTERS ); @@ -409,10 +409,10 @@ while ( 1 ) { buf.GetString( token ); - if ( !stricmp( token, "}" ) ) + if ( !Q_stricmp( token, "}" ) ) break; - if ( stricmp( token, "WORD" ) ) + if ( Q_stricmp( token, "WORD" ) ) break; buf.GetString( token ); @@ -431,13 +431,13 @@ AddWordTag( wt ); buf.GetString( token ); - if ( stricmp( token, "{" ) ) + if ( Q_stricmp( token, "{" ) ) break; while ( 1 ) { buf.GetString( token ); - if ( !stricmp( token, "}" ) ) + if ( !Q_stricmp( token, "}" ) ) break; // Parse phoneme @@ -475,7 +475,7 @@ while ( 1 ) { buf.GetString( token ); - if ( !stricmp( token, "}" ) ) + if ( !Q_stricmp( token, "}" ) ) break; char t[ 256 ]; @@ -509,21 +509,21 @@ // PHRASE unicode streamlength "streambytes" starttime endtime // } buf.GetString( token ); - if ( !stricmp( token, "}" ) ) + if ( !Q_stricmp( token, "}" ) ) break; buf.GetString( token ); - if ( stricmp( token, "{" ) ) + if ( Q_stricmp( token, "{" ) ) break; buf.GetString( token ); while ( 1 ) { - if ( !stricmp( token, "}" ) ) + if ( !Q_stricmp( token, "}" ) ) break; - if ( stricmp( token, "PHRASE" ) ) + if ( Q_stricmp( token, "PHRASE" ) ) break; char cc_type[32]; @@ -536,11 +536,11 @@ Q_strncpy( cc_type, token, sizeof( cc_type ) ); bool unicode = false; - if ( !stricmp( cc_type, "unicode" ) ) + if ( !Q_stricmp( cc_type, "unicode" ) ) { unicode = true; } - else if ( stricmp( cc_type, "char" ) ) + else if ( Q_stricmp( cc_type, "char" ) ) { Assert( 0 ); } @@ -571,7 +571,7 @@ while ( 1 ) { buf.GetString( token ); - if ( !stricmp( token, "}" ) ) + if ( !Q_stricmp( token, "}" ) ) break; if ( Q_strlen( token ) == 0 ) @@ -583,11 +583,11 @@ buf.GetString( token ); Q_strncpy( value, token, sizeof( value ) ); - if ( !strcmpi( key, "voice_duck" ) ) + if ( !Q_stricmp( key, "voice_duck" ) ) { SetVoiceDuck( atoi(value) ? true : false ); } - else if ( !strcmpi( key, "checksum" ) ) + else if ( !Q_stricmp( key, "checksum" ) ) { SetDataCheckSum( (unsigned int)atoi( value ) ); } @@ -614,28 +614,28 @@ Q_strncpy( section, token, sizeof( section ) ); buf.GetString( token ); - if ( stricmp( token, "{" ) ) + if ( Q_stricmp( token, "{" ) ) break; - if ( !stricmp( section, "PLAINTEXT" ) ) + if ( !Q_stricmp( section, "PLAINTEXT" ) ) { ParsePlaintext( buf ); } - else if ( !stricmp( section, "WORDS" ) ) + else if ( !Q_stricmp( section, "WORDS" ) ) { ParseWords( buf ); } - else if ( !stricmp( section, "EMPHASIS" ) ) + else if ( !Q_stricmp( section, "EMPHASIS" ) ) { ParseEmphasis( buf ); } - else if ( !stricmp( section, "CLOSECAPTION" ) ) + else if ( !Q_stricmp( section, "CLOSECAPTION" ) ) { // NOTE: CLOSECAPTION IS NO LONGER VALID // This just skips the section of data. ParseCloseCaption( buf ); } - else if ( !stricmp( section, "OPTIONS" ) ) + else if ( !Q_stricmp( section, "OPTIONS" ) ) { ParseOptions( buf ); } @@ -903,7 +903,7 @@ char token[ 4096 ]; buf.GetString( token ); - if ( stricmp( token, "VERSION" ) ) + if ( Q_stricmp( token, "VERSION" ) ) return; buf.GetString( token ); =================================================================== --- mod/src/public/server_class.h 2005/02/18 04:45:57 1.1.1.1 +++ mod/src/public/server_class.h 2005/10/01 05:40:36 @@ -23,6 +23,9 @@ extern ServerClass *g_pServerClassHead; +#ifdef _MSC_VER +#define strcasecmp _stricmp +#endif class ServerClass { @@ -43,8 +46,8 @@ ServerClass *p1 = g_pServerClassHead; ServerClass *p2 = p1->m_pNext; - // use _stricmp because Q_stricmp isn't hooked up properly yet - if ( _stricmp( p1->GetName(), pNetworkName ) > 0) + // use strcasecmp because Q_stricmp isn't hooked up properly yet + if (strcasecmp( p1->GetName(), pNetworkName ) > 0) { m_pNext = g_pServerClassHead; g_pServerClassHead = this; @@ -53,7 +56,7 @@ while( p1 ) { - if ( p2 == NULL || _stricmp( p2->GetName(), pNetworkName ) > 0) + if ( p2 == NULL || strcasecmp( p2->GetName(), pNetworkName ) > 0) { m_pNext = p2; p1->m_pNext = this; =================================================================== --- mod/src/public/studio.cpp 2005/02/18 04:45:57 1.1.1.1 +++ mod/src/public/studio.cpp 2005/10/01 05:49:13 @@ -30,7 +30,7 @@ { char *s2 = m_group[ m_seq[k].group ].GetStudioHdr()->pLocalSeqdesc( m_seq[k].index )->pszLabel(); - if (stricmp( s1, s2 ) == 0) + if (Q_stricmp( s1, s2 ) == 0) { break; } @@ -91,7 +91,7 @@ { char *s2 = m_group[ m_anim[k].group ].GetStudioHdr()->pLocalAnimdesc( m_anim[k].index )->pszName(); - if (stricmp( s1, s2 ) == 0) + if (Q_stricmp( s1, s2 ) == 0) { break; } @@ -141,7 +141,7 @@ { for (k = 0; k < pBaseStudioHdr->numbones; k++) { - if (stricmp( pStudioHdr->pBone( j )->pszName(), pBaseStudioHdr->pBone( k )->pszName() ) == 0) + if (Q_stricmp( pStudioHdr->pBone( j )->pszName(), pBaseStudioHdr->pBone( k )->pszName() ) == 0) { break; } @@ -202,7 +202,7 @@ { char *s2 = m_group[ m_attachment[k].group ].GetStudioHdr()->pLocalAttachment( m_attachment[k].index )->pszName(); - if (stricmp( s1, s2 ) == 0) + if (Q_stricmp( s1, s2 ) == 0) { break; } @@ -251,7 +251,7 @@ { char *s2 = m_group[ m_pose[k].group ].GetStudioHdr()->pLocalPoseParameter( m_pose[k].index )->pszName(); - if (stricmp( s1, s2 ) == 0) + if (Q_stricmp( s1, s2 ) == 0) { break; } @@ -289,7 +289,7 @@ { char *s2 = m_group[ m_node[k].group ].GetStudioHdr()->pszLocalNodeName( m_node[k].index ); - if (stricmp( s1, s2 ) == 0) + if (Q_stricmp( s1, s2 ) == 0) { break; } =================================================================== --- mod/src/public/tgawriter.cpp 2005/02/18 04:45:57 1.1.1.1 +++ mod/src/public/tgawriter.cpp 2005/10/01 03:03:21 @@ -120,7 +120,7 @@ buffer.PutChar( header.pixel_size ); buffer.PutChar( header.attributes ); - unsigned char *pbuf = (unsigned char *)_alloca( width * 4 ); + unsigned char *pbuf = (unsigned char *)stackalloc( width * 4 ); switch( dstFormat ) { case IMAGE_FORMAT_RGB888: =================================================================== --- mod/src/public/keyframe/keyframe.cpp 2005/02/18 04:45:57 1.1.1.1 +++ mod/src/public/keyframe/keyframe.cpp 2005/10/02 03:42:53 @@ -21,6 +21,10 @@ #include "mathlib.h" #include "rope_shared.h" +#ifdef _MSC_VER +#define strcasecmp _stricmp +#endif + // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" @@ -375,13 +379,13 @@ bool CPositionInterpolator_Rope::ProcessKey( char const *pName, char const *pValue ) { - if( stricmp( pName, "Slack" ) == 0 ) + if( strcasecmp( pName, "Slack" ) == 0 ) { m_flSlack = atof( pValue ) + ROPESLACK_FUDGEFACTOR; m_bChange = true; return true; } - else if( stricmp( pName, "Type" ) == 0 ) + else if( strcasecmp( pName, "Type" ) == 0 ) { int iType = atoi( pValue ); if( iType == 0 ) =================================================================== --- mod/src/public/tier0/platform.h 2005/09/29 03:52:40 1.3 +++ mod/src/public/tier0/platform.h 2005/10/01 03:03:20 @@ -19,7 +19,7 @@ #define NEW_SOFTWARE_LIGHTING -// need this for _alloca +// need this for alloca #include #include @@ -246,7 +246,7 @@ #ifdef _WIN32 // Alloca defined for this platform -#define stackalloc( _size ) _alloca( _size ) +#define stackalloc( _size ) alloca( _size ) #define stackfree( _p ) 0 #elif _LINUX // Alloca defined for this platform =================================================================== --- mod/src/public/tier0/wchartypes.h 2005/09/29 03:52:40 1.2 +++ mod/src/public/tier0/wchartypes.h 2005/10/03 05:12:08 @@ -60,6 +60,7 @@ #endif #ifdef _WIN32 +#define _WCTYPE_INLINE_DEFINED #include #else #define _tcsstr strstr @@ -72,9 +73,9 @@ #define _tfopen fopen #define _stprintf sprintf #define _ftprintf fprintf -#define _vsntprintf _vsnprintf +#define _vsntprintf vsnprintf #define _tprintf printf -#define _sntprintf _snprintf +#define _sntprintf snprintf #define _T(s) s #endif =================================================================== --- mod/src/public/tier1/tokenreader.h 2005/02/18 04:45:58 1.1.1.1 +++ mod/src/public/tier1/tokenreader.h 2005/10/02 03:10:07 @@ -40,7 +40,7 @@ } trtoken_t; -#define IsToken(s1, s2) !strcmpi(s1, s2) +#define IsToken(s1, s2) !Q_stricmp(s1, s2) #define MAX_TOKEN 128 + 1 #define MAX_IDENT 64 + 1 =================================================================== --- mod/src/public/tier1/utlrbtree.h 2005/06/11 22:14:37 1.2 +++ mod/src/public/tier1/utlrbtree.h 2005/10/02 03:01:58 @@ -28,8 +28,12 @@ //------------------------------------- +#ifdef _MSC_VER +#define strcasecmp _stricmp +#endif + inline bool StringLessThan( const char * const &lhs, const char * const &rhs) { return ( strcmp( lhs, rhs) < 0 ); } -inline bool CaselessStringLessThan( const char * const &lhs, const char * const &rhs ) { return ( stricmp( lhs, rhs) < 0 ); } +inline bool CaselessStringLessThan( const char * const &lhs, const char * const &rhs ) { return ( strcasecmp( lhs, rhs) < 0 ); } //------------------------------------- // inline these two templates to stop multiple definitions of the same code =================================================================== --- mod/src/public/vstdlib/strtools.h 2005/02/18 04:45:59 1.1.1.1 +++ mod/src/public/vstdlib/strtools.h 2005/10/01 05:52:47 @@ -81,6 +81,10 @@ #endif +#ifdef _MSC_VER +#define strcasecmp _stricmp +#endif + inline void Q_memset (void *dest, int fill, int count) { memset( dest, fill, count ); } inline void Q_memcpy (void *dest, const void *src, int count) { memcpy( dest, src, count ); } inline void Q_memmove (void *dest, const void *src, int count) { memmove( dest, src, count ); } @@ -89,7 +93,7 @@ inline void Q_strcpy (char *dest, const char *src) { strcpy( dest, src ); } inline char* Q_strrchr (const char *s, char c) { return strrchr( s, c ); } inline int Q_strcmp (const char *s1, const char *s2) { return strcmp( s1, s2 ); } -inline int Q_stricmp( const char *s1, const char *s2 ) { return stricmp( s1, s2 ); } +inline int Q_stricmp( const char *s1, const char *s2 ) { return strcasecmp( s1, s2 ); } inline char* Q_strstr( const char *s1, const char *search ) { return strstr( s1, search ); } inline char* Q_strupr (char *start) { return strupr( start ); } inline char* Q_strlower (char *start) { return strlwr( start ); } =================================================================== --- mod/src/sdkshaders/advanced/sdk_lightmappedgeneric.cpp 2005/06/09 07:08:31 1.1 +++ mod/src/sdkshaders/advanced/sdk_lightmappedgeneric.cpp 2005/10/01 05:49:14 @@ -72,7 +72,7 @@ if( IsUsingGraphics() && params[ENVMAP]->IsDefined() ) { - if( stricmp( params[ENVMAP]->GetStringValue(), "env_cubemap" ) == 0 ) + if( Q_stricmp( params[ENVMAP]->GetStringValue(), "env_cubemap" ) == 0 ) { Warning( "env_cubemap used on world geometry without rebuilding map. . ignoring: %s\n", pMaterialName ); params[ENVMAP]->SetUndefined(); =================================================================== --- mod/src/sdkshaders/advanced/sdk_lightmappedgeneric_dx8.cpp 2005/06/09 07:08:32 1.1 +++ mod/src/sdkshaders/advanced/sdk_lightmappedgeneric_dx8.cpp 2005/10/01 05:49:14 @@ -65,7 +65,7 @@ if( IsUsingGraphics() && params[ENVMAP]->IsDefined() ) { - if( stricmp( params[ENVMAP]->GetStringValue(), "env_cubemap" ) == 0 ) + if( Q_stricmp( params[ENVMAP]->GetStringValue(), "env_cubemap" ) == 0 ) { Warning( "env_cubemap used on world geometry without rebuilding map. . ignoring: %s\n", pMaterialName ); params[ENVMAP]->SetUndefined(); =================================================================== --- mod/src/tier1/KeyValues.cpp 2005/02/18 04:45:59 1.1.1.1 +++ mod/src/tier1/KeyValues.cpp 2005/10/03 01:34:56 @@ -31,6 +31,7 @@ #include "tier0/mem.h" #include "utlvector.h" #include "utlbuffer.h" +#include "minmax.h" // memdbgon must be the last include file in a .cpp file!!! #include @@ -623,7 +624,7 @@ // handle double quote chars within the string // the worst possible case is that the whole string is quotes int len = Q_strlen(pszString); - char *convertedString = (char *) _alloca ((len + 1) * sizeof(char) * 2); + char *convertedString = (char *) stackalloc ((len + 1) * sizeof(char) * 2); int j=0; for (int i=0; i <= len; i++) { =================================================================== --- mod/src/tier1/convar.cpp 2005/03/13 01:52:51 1.2 +++ mod/src/tier1/convar.cpp 2005/10/02 06:14:29 @@ -155,7 +155,7 @@ ConCommandBase const *cmd = GetCommands(); for ( ; cmd; cmd = cmd->GetNext() ) { - if ( !stricmp( name, cmd->GetName() ) ) + if ( !Q_stricmp( name, cmd->GetName() ) ) return cmd; } return NULL; =================================================================== --- mod/src/tier1/utlsymbol.cpp 2005/06/11 22:14:37 1.2 +++ mod/src/tier1/utlsymbol.cpp 2005/10/03 01:35:11 @@ -9,6 +9,8 @@ #pragma warning (disable:4514) #include "utlsymbol.h" +#include "minmax.h" + #include "tier0/memdbgon.h" #define INVALID_STRING_INDEX CStringPoolIndex( 0xFFFF, 0xFFFF ) @@ -132,7 +134,7 @@ char const* str2 = (i2 == INVALID_STRING_INDEX) ? pTable->m_pLessCtxUserString : pTable->StringFromIndex( i2 ); - return strcmpi( str1, str2 ) < 0; + return Q_stricmp( str1, str2 ) < 0; } //----------------------------------------------------------------------------- =================================================================== --- mod/src/utils/common/bsplib.cpp 2005/02/18 04:45:59 1.1.1.1 +++ mod/src/utils/common/bsplib.cpp 2005/10/01 05:49:14 @@ -983,7 +983,7 @@ // garymcthack: Make this use an RBTree! for( i = 0; i < g_nTexDataStringTable; i++ ) { - if( stricmp( pString, &g_TexDataStringData[g_TexDataStringTable[i]] ) == 0 ) + if( Q_stricmp( pString, &g_TexDataStringData[g_TexDataStringTable[i]] ) == 0 ) { return i; } =================================================================== --- mod/src/utils/common/map_shared.cpp 2005/02/18 04:45:59 1.1.1.1 +++ mod/src/utils/common/map_shared.cpp 2005/10/01 05:49:14 @@ -23,28 +23,28 @@ //----------------------------------------------------------------------------- ChunkFileResult_t LoadEntityKeyCallback(const char *szKey, const char *szValue, LoadEntity_t *pLoadEntity) { - if (!stricmp(szKey, "classname")) + if (!Q_stricmp(szKey, "classname")) { - if (!stricmp(szValue, "func_detail")) + if (!Q_stricmp(szValue, "func_detail")) { pLoadEntity->nBaseContents = CONTENTS_DETAIL; } - else if (!stricmp(szValue, "func_ladder")) + else if (!Q_stricmp(szValue, "func_ladder")) { pLoadEntity->nBaseContents = CONTENTS_LADDER; } - else if (!stricmp(szValue, "func_water")) + else if (!Q_stricmp(szValue, "func_water")) { pLoadEntity->nBaseContents = CONTENTS_WATER; } } - else if (!stricmp(szKey, "id")) + else if (!Q_stricmp(szKey, "id")) { // UNDONE: flag entity errors by ID instead of index //g_MapError.EntityState( atoi( szValue ) ); return(ChunkFile_Ok); } - else if( !stricmp( szKey, "mapversion" ) ) + else if( !Q_stricmp( szKey, "mapversion" ) ) { // .vmf map revision number g_MapRevision = atoi( szValue ); =================================================================== --- mod/src/utils/common/scriplib.cpp 2005/02/18 04:45:59 1.1.1.1 +++ mod/src/utils/common/scriplib.cpp 2005/10/02 03:10:08 @@ -186,7 +186,7 @@ int i; for (i = 0; i < nummacros; i++) { - if (strcmpi( macrolist[i]->filename, ¯oname[1] ) == 0) + if (Q_stricmp( macrolist[i]->filename, ¯oname[1] ) == 0) { break; } @@ -262,7 +262,7 @@ int index = 0; for (index = 0; index < script->nummacroparams; index++) { - if (stricmp( script->macroparam[index], tp ) == 0) + if (Q_stricmp( script->macroparam[index], tp ) == 0) break; } if (index >= script->nummacroparams) =================================================================== --- mod/src/utils/height2normal/height2normal.cpp 2005/02/18 04:45:59 1.1.1.1 +++ mod/src/utils/height2normal/height2normal.cpp 2005/10/01 05:49:15 @@ -137,15 +137,15 @@ char *val = NULL; while( GetKeyValueFromFP( fp, &key, &val ) ) { - if( stricmp( key, "bumpscale" ) == 0 ) + if( Q_stricmp( key, "bumpscale" ) == 0 ) { *bumpScale = atof( val ); } - if( stricmp( key, "startframe" ) == 0 ) + if( Q_stricmp( key, "startframe" ) == 0 ) { *startFrame = atoi( val ); } - else if( stricmp( key, "endframe" ) == 0 ) + else if( Q_stricmp( key, "endframe" ) == 0 ) { *endFrame = atoi( val ); } @@ -252,13 +252,13 @@ i = 1; while( i < argc ) { - if( stricmp( argv[i], "-quiet" ) == 0 ) + if( Q_stricmp( argv[i], "-quiet" ) == 0 ) { i++; g_Quiet = true; g_NoPause = true; // no point in pausing if we aren't going to print anything out. } - if( stricmp( argv[i], "-nopause" ) == 0 ) + if( Q_stricmp( argv[i], "-nopause" ) == 0 ) { i++; g_NoPause = true; =================================================================== --- mod/src/utils/hlmviewer/src/controlpanel.cpp 2005/02/18 04:45:59 1.1.1.1 +++ mod/src/utils/hlmviewer/src/controlpanel.cpp 2005/10/01 05:49:15 @@ -132,7 +132,7 @@ { for (int i = 0; i < physprop->SurfacePropCount(); ++i) { - if (!stricmp( physprop->GetPropName( i ), pSurfaceProp )) + if (!Q_stricmp( physprop->GetPropName( i ), pSurfaceProp )) return i; } return -1; @@ -926,7 +926,7 @@ // surface prop as the parent does if (pBone->parent >= 0) { - if (!stricmp( g_pStudioModel->m_SurfaceProps[i].String(), + if (!Q_stricmp( g_pStudioModel->m_SurfaceProps[i].String(), g_pStudioModel->m_SurfaceProps[pBone->parent].String() )) continue; } @@ -2967,7 +2967,7 @@ for ( int i = 0; i < pHdr->numbones; i++ ) { mstudiobone_t* pBone = pHdr->pBone(i); - if (!stricmp(pBone->pszName(), solid.name )) + if (!Q_stricmp(pBone->pszName(), solid.name )) { // Once found, set the surface property accordingly lPhysicsMaterial->setLabel( g_pStudioModel->m_SurfaceProps[i].String() ); =================================================================== --- mod/src/utils/hlmviewer/src/physmesh.cpp 2005/02/18 04:45:59 1.1.1.1 +++ mod/src/utils/hlmviewer/src/physmesh.cpp 2005/10/02 03:10:09 @@ -206,19 +206,19 @@ virtual void ParseKeyValue( void *pCustom, const char *pKey, const char *pValue ) { editparams_t *pEdit = (editparams_t *)pCustom; - if ( !strcmpi( pKey, "rootname" ) ) + if ( !Q_stricmp( pKey, "rootname" ) ) { strncpy( pEdit->rootName, pValue, sizeof(pEdit->rootName) ); } - else if ( !strcmpi( pKey, "totalmass" ) ) + else if ( !Q_stricmp( pKey, "totalmass" ) ) { pEdit->totalMass = atof( pValue ); } - else if ( !strcmpi( pKey, "concave" ) ) + else if ( !Q_stricmp( pKey, "concave" ) ) { pEdit->concave = atoi( pValue ); } - else if ( !strcmpi( pKey, "jointmerge" ) ) + else if ( !Q_stricmp( pKey, "jointmerge" ) ) { char tmp[1024]; char parentName[512], childName[512]; @@ -253,13 +253,13 @@ virtual void ParseKeyValue( void *pData, const char *pKey, const char *pValue ) { - if ( !strcmpi( pKey, "selfcollisions" ) ) + if ( !Q_stricmp( pKey, "selfcollisions" ) ) { // keys disabled by default Assert( atoi(pValue) == 0 ); m_pStudio->m_noselfCollisions = true; } - else if ( !strcmpi( pKey, "collisionpair" ) ) + else if ( !Q_stricmp( pKey, "collisionpair" ) ) { if ( !m_pStudio->m_noselfCollisions ) { @@ -289,7 +289,7 @@ virtual void ParseKeyValue( void *pCustom, const char *pKey, const char *pValue ) { hlmvsolid_t *pSolid = (hlmvsolid_t *)pCustom; - if ( !strcmpi( pKey, "massbias" ) ) + if ( !Q_stricmp( pKey, "massbias" ) ) { pSolid->massBias = atof( pValue ); } @@ -312,7 +312,7 @@ while ( !pParser->Finished() ) { const char *pBlock = pParser->GetCurrentBlockName(); - if ( !stricmp( pBlock, "solid" ) ) + if ( !Q_stricmp( pBlock, "solid" ) ) { hlmvsolid_t solid; CSolidParse solidParse; @@ -326,7 +326,7 @@ memcpy( &m_pList[solid.index].m_solid, &solid, sizeof(solid) ); } } - else if ( !stricmp( pBlock, "ragdollconstraint" ) ) + else if ( !Q_stricmp( pBlock, "ragdollconstraint" ) ) { constraint_ragdollparams_t constraint; pParser->ParseRagdollConstraint( &constraint, NULL ); @@ -339,13 +339,13 @@ m_pList[constraint.childIndex].m_constraint = constraint; } } - else if ( !stricmp( pBlock, "editparams" ) ) + else if ( !Q_stricmp( pBlock, "editparams" ) ) { CEditParse editParse; pParser->ParseCustom( &m_edit, &editParse ); m_mass = m_edit.totalMass; } - else if ( !strcmpi( pBlock, "collisionrules" ) ) + else if ( !Q_stricmp( pBlock, "collisionrules" ) ) { CRagdollCollisionRulesParse rules(this); pParser->ParseCustom( NULL, &rules ); @@ -366,7 +366,7 @@ int count = physprop->SurfacePropCount(); for ( int i = 0; i < count; i++ ) { - if ( !strcmpi( pPropname, physprop->GetPropName(i) ) ) + if ( !Q_stricmp( pPropname, physprop->GetPropName(i) ) ) return i; } } =================================================================== --- mod/src/utils/hlmviewer/src/studio_render.cpp 2005/02/18 04:45:59 1.1.1.1 +++ mod/src/utils/hlmviewer/src/studio_render.cpp 2005/10/02 03:10:09 @@ -665,7 +665,7 @@ { for (j = 0; j < g_pCacheHdr->numbones; j++) { - if (stricmp( m_pstudiohdr->pBone( i )->pszName(), g_pCacheHdr->pBone( j )->pszName() ) == 0) + if (Q_stricmp( m_pstudiohdr->pBone( i )->pszName(), g_pCacheHdr->pBone( j )->pszName() ) == 0) { break; } @@ -749,7 +749,7 @@ mstudiobone_t *pbones = pstudiohdr->pBone( 0 ); for (int i = 0; i < pstudiohdr->numbones; i++) { - if ( !strcmpi( pName, pbones[i].pszName() ) ) + if ( !Q_stricmp( pName, pbones[i].pszName() ) ) return i; } @@ -771,7 +771,7 @@ for (int i = 0; i < m_pPhysics->Count(); i++) { CPhysmesh *pmesh = m_pPhysics->GetMesh(i); - if ( !strcmpi( pName, pmesh[i].m_boneName ) ) + if ( !Q_stricmp( pName, pmesh[i].m_boneName ) ) return i; } =================================================================== --- mod/src/utils/hlmviewer/src/studio_utils.cpp 2005/02/18 04:45:59 1.1.1.1 +++ mod/src/utils/hlmviewer/src/studio_utils.cpp 2005/10/01 05:49:15 @@ -766,7 +766,7 @@ for (i = 0; i < m_pstudiohdr->GetNumSeq(); i++) { - if (!stricmp( szSequence, m_pstudiohdr->pSeqdesc( i ).pszLabel() )) + if (!Q_stricmp( szSequence, m_pstudiohdr->pSeqdesc( i ).pszLabel() )) { return i; } @@ -813,7 +813,7 @@ for (int iFlex = 0; iFlex < m_pstudiohdr->numflexcontrollers; iFlex++) { - if (stricmp( szName, m_pstudiohdr->pFlexcontroller( iFlex )->pszName() ) == 0) + if (Q_stricmp( szName, m_pstudiohdr->pFlexcontroller( iFlex )->pszName() ) == 0) { return iFlex; } @@ -1178,7 +1178,7 @@ for (int iParameter = 0; iParameter < m_pstudiohdr->GetNumPoseParameters(); iParameter++) { - if (stricmp( szName, m_pstudiohdr->pPoseParameter( iParameter ).pszName() ) == 0) + if (Q_stricmp( szName, m_pstudiohdr->pPoseParameter( iParameter ).pszName() ) == 0) { return iParameter; } @@ -1238,7 +1238,7 @@ for (int i = 0; i < m_pstudiohdr->GetNumAttachments(); i++) { - if (stricmp( m_pstudiohdr->pAttachment( i ).pszName(), szName ) == 0) + if (Q_stricmp( m_pstudiohdr->pAttachment( i ).pszName(), szName ) == 0) { return i; } =================================================================== --- mod/src/utils/motionmapper/motionmapper.cpp 2005/06/09 07:08:37 1.1 +++ mod/src/utils/motionmapper/motionmapper.cpp 2005/10/01 05:49:16 @@ -723,7 +723,7 @@ for (i = 0; i < g_numtextures; i++) { - if (stricmp( g_texture[i].name, texturename ) == 0) + if (Q_stricmp( g_texture[i].name, texturename ) == 0) { return i; } @@ -1276,7 +1276,7 @@ strcpy( texturename, defaulttexture[i] ); break; } - if (stricmp( texturename, sourcetexture[i]) == 0) + if (Q_stricmp( texturename, sourcetexture[i]) == 0) { strcpy( texturename, defaulttexture[i] ); break; @@ -1293,7 +1293,7 @@ continue; } - if (stricmp( texturename, "null.bmp") == 0 || stricmp( texturename, "null.tga") == 0) + if (Q_stricmp( texturename, "null.bmp") == 0 || Q_stricmp( texturename, "null.tga") == 0) { // skip all faces with the null texture on them. fgets( g_szLine, sizeof( g_szLine ), g_fpInput ); @@ -1399,7 +1399,7 @@ sprintf (g_szFilename, "%s%s.%s", cddir[numdirs], name, xext ); for (i = 0; i < g_numsources; i++) { - if (stricmp( g_szFilename, g_source[i]->filename ) == 0) + if (Q_stricmp( g_szFilename, g_source[i]->filename ) == 0) return g_source[i]; } } @@ -1409,20 +1409,20 @@ sprintf (g_szFilename, "%s%s.vrm", cddir[numdirs], name ); for (i = 0; i < g_numsources; i++) { - if (stricmp( g_szFilename, g_source[i]->filename ) == 0) + if (Q_stricmp( g_szFilename, g_source[i]->filename ) == 0) return g_source[i]; } sprintf (g_szFilename, "%s%s.smd", cddir[numdirs], name ); for (i = 0; i < g_numsources; i++) { - if (stricmp( g_szFilename, g_source[i]->filename ) == 0) + if (Q_stricmp( g_szFilename, g_source[i]->filename ) == 0) return g_source[i]; } /* sprintf (g_szFilename, "%s%s.vta", cddir[numdirs], name ); for (i = 0; i < g_numsources; i++) { - if (stricmp( g_szFilename, g_source[i]->filename ) == 0) + if (Q_stricmp( g_szFilename, g_source[i]->filename ) == 0) return g_source[i]; } */ @@ -1500,7 +1500,7 @@ } // more ext sanity check - if ( ( !result && xext[0] == '\0' ) || stricmp( xext, "smd" ) == 0) + if ( ( !result && xext[0] == '\0' ) || Q_stricmp( xext, "smd" ) == 0) { sprintf (g_szFilename, "%s%s.smd", cddir[numdirs], pTempName ); strcpyn( g_source[g_numsources]->filename, g_szFilename ); @@ -3134,32 +3134,32 @@ // Switches if (argv[i][0] == '-') { - if (!stricmp(argv[i], "-allowdebug")) + if (!Q_stricmp(argv[i], "-allowdebug")) { // Ignore, used by interface system to catch debug builds checked into release tree continue; } - if (!stricmp(argv[i], "-quiet")) + if (!Q_stricmp(argv[i], "-quiet")) { g_quiet = true; g_verbose = false; continue; } - if (!stricmp(argv[i], "-verbose")) + if (!Q_stricmp(argv[i], "-verbose")) { g_quiet = false; g_verbose = true; continue; } - if (!stricmp(argv[i], "-printTemplate")) + if (!Q_stricmp(argv[i], "-printTemplate")) { printf("%s\n", templates); exit(0); } - if (!stricmp(argv[i], "-templateFile")) + if (!Q_stricmp(argv[i], "-templateFile")) { if(i + 1 < argc) { =================================================================== --- mod/src/utils/mxtk/src/win32/mx.cpp 2005/02/18 04:46:00 1.1.1.1 +++ mod/src/utils/mxtk/src/win32/mx.cpp 2005/10/02 03:10:09 @@ -193,17 +193,17 @@ CHAR className[128]; GetClassName (hwndCtrl, className, 128); - if (!strcmpi (className, "edit")) + if (!Q_stricmp (className, "edit")) { if (wNotifyCode != EN_CHANGE) break; } - else if (!strcmpi (className, "combobox")) + else if (!Q_stricmp (className, "combobox")) { if (wNotifyCode != CBN_SELCHANGE) break; } - else if (!strcmpi (className, "listbox")) + else if (!Q_stricmp (className, "listbox")) { if (wNotifyCode != LBN_SELCHANGE) break; =================================================================== --- mod/src/utils/smdlexp/smdlexp.cpp 2005/02/18 04:46:00 1.1.1.1 +++ mod/src/utils/smdlexp/smdlexp.cpp 2005/10/01 05:49:17 @@ -767,7 +767,7 @@ /* const char *szExpectedExtension = ".bmp"; - if (stricmp(szBitmapName+strlen(szBitmapName)-strlen(szExpectedExtension), szExpectedExtension) != 0) + if (Q_stricmp(szBitmapName+strlen(szBitmapName)-strlen(szExpectedExtension), szExpectedExtension) != 0) { sprintf(st_szDBG, "Node %s uses %s, which is not a %s file", (char*)strNodeName, szBitmapName, szExpectedExtension); ASSERT_AND_ABORT(FALSE, st_szDBG); =================================================================== --- mod/src/utils/studiomdl/UnifyLODs.cpp 2005/02/18 04:46:00 1.1.1.1 +++ mod/src/utils/studiomdl/UnifyLODs.cpp 2005/10/01 05:49:18 @@ -217,7 +217,7 @@ // if (!pSlash) // pSlash = pTempBuf1; - if( !stricmp( pTempBuf, scriptLOD.modelReplacements[i].GetSrcName() ) ) + if( !Q_stricmp( pTempBuf, scriptLOD.modelReplacements[i].GetSrcName() ) ) { *pFound = true; return scriptLOD.modelReplacements[i].m_pSource; @@ -395,7 +395,7 @@ for( i = 0; i < g_numtextures; i++ ) { - if( stricmp( pBaseName, g_texture[i].name ) == 0 ) + if( Q_stricmp( pBaseName, g_texture[i].name ) == 0 ) { return i; } @@ -460,7 +460,7 @@ const char *pMeshRemovalName = g_ScriptLODs[nLodID].meshRemovals[i].GetSrcName(); Q_FileBase( pMeshRemovalName, baseRemovalName, sizeof(baseRemovalName)-1); - if (!stricmp( baseRemovalName, baseMeshName )) + if (!Q_stricmp( baseRemovalName, baseMeshName )) { // mesh has been marked for removal return NULL; @@ -1525,7 +1525,7 @@ int numLODs = g_ScriptLODs.Size(); lods.AddMultipleToTail( numLODs ); - if( stricmp( pSrcModel->name, "blank" ) == 0 ) + if( Q_stricmp( pSrcModel->name, "blank" ) == 0 ) { return; } =================================================================== --- mod/src/utils/studiomdl/collisionmodel.cpp 2005/02/18 04:46:00 1.1.1.1 +++ mod/src/utils/studiomdl/collisionmodel.cpp 2005/10/02 03:10:10 @@ -133,7 +133,7 @@ int i; for ( i = 0; i < pSource->numbones; i++ ) { - if ( !strcmpi( pName, pSource->localBone[i].name ) ) + if ( !Q_stricmp( pName, pSource->localBone[i].name ) ) return i; } @@ -141,7 +141,7 @@ for ( i = 0; i < pSource->numbones; i++ ) { - if ( !strcmpi( pName, pSource->localBone[i].name ) ) + if ( !Q_stricmp( pName, pSource->localBone[i].name ) ) return i; } } @@ -342,7 +342,7 @@ pName = RenameBone( pName ); for ( int boneIndex = 0; boneIndex < m_pModel->numbones; boneIndex++ ) { - if ( !strcmpi( m_pModel->localBone[boneIndex].name, pName ) ) + if ( !Q_stricmp( m_pModel->localBone[boneIndex].name, pName ) ) return boneIndex; } @@ -396,7 +396,7 @@ int index = 0; while ( pList ) { - if ( !strcmpi( pName, pList->m_name ) ) + if ( !Q_stricmp( pName, pList->m_name ) ) return index; pList = pList->m_pNext; @@ -450,7 +450,7 @@ if ( j == i ) continue; - if ( !strcmpi( pPhys->m_parent, pArray[j]->m_name ) ) + if ( !Q_stricmp( pPhys->m_parent, pArray[j]->m_name ) ) break; } @@ -524,7 +524,7 @@ CPhysCollisionModel *pList = m_pCollisionList; while ( pList ) { - if ( !strcmpi( pName, pList->m_name ) ) + if ( !Q_stricmp( pName, pList->m_name ) ) return pList; pList = pList->m_pNext; @@ -1054,7 +1054,7 @@ { while ( pHead ) { - if ( !strcmpi( pName, pHead->m_name ) ) + if ( !Q_stricmp( pName, pHead->m_name ) ) break; pHead = pHead->m_pNext; } @@ -1673,15 +1673,15 @@ } jointlimit_t jointType = JOINT_FREE; - if ( !stricmp( pJointType, "free" ) ) + if ( !Q_stricmp( pJointType, "free" ) ) { jointType = JOINT_FREE; } - else if ( !stricmp( pJointType, "fixed" ) ) + else if ( !Q_stricmp( pJointType, "fixed" ) ) { jointType = JOINT_FIXED; } - else if ( !stricmp( pJointType, "limit" ) ) + else if ( !Q_stricmp( pJointType, "limit" ) ) { jointType = JOINT_LIMIT; } @@ -1777,47 +1777,47 @@ strcpy( command, token ); - if ( !stricmp( command, "$mass" ) ) + if ( !Q_stricmp( command, "$mass" ) ) { argCount = ReadArgs( args, 1 ); CCmd_TotalMass( joints, args[0] ); } // default properties - else if ( !stricmp( command, "$automass" ) ) + else if ( !Q_stricmp( command, "$automass" ) ) { joints.SetAutoMass(); } - else if ( !stricmp( command, "$inertia" ) ) + else if ( !Q_stricmp( command, "$inertia" ) ) { argCount = ReadArgs( args, 1 ); joints.DefaultInertia( Safe_atof( args[0] ) ); } - else if ( !stricmp( command, "$damping" ) ) + else if ( !Q_stricmp( command, "$damping" ) ) { argCount = ReadArgs( args, 1 ); joints.DefaultDamping( Safe_atof( args[0] ) ); } - else if ( !stricmp( command, "$rotdamping" ) ) + else if ( !Q_stricmp( command, "$rotdamping" ) ) { argCount = ReadArgs( args, 1 ); joints.DefaultRotdamping( Safe_atof( args[0] ) ); } - else if ( !stricmp( command, "$drag" ) ) + else if ( !Q_stricmp( command, "$drag" ) ) { argCount = ReadArgs( args, 1 ); joints.DefaultDrag( Safe_atof( args[0] ) ); } - else if ( !stricmp( command, "$rollingDrag" ) ) + else if ( !Q_stricmp( command, "$rollingDrag" ) ) { argCount = ReadArgs( args, 1 ); // JAY: Removed this in favor of heuristic/tuning approach //joints.DefaultRollingDrag( Safe_atof( args[0] ) ); } - else if ( !stricmp( command, "$concave" ) ) + else if ( !Q_stricmp( command, "$concave" ) ) { joints.AllowConcave(); } - else if ( !stricmp( command, "$masscenter" ) ) + else if ( !Q_stricmp( command, "$masscenter" ) ) { argCount = ReadArgs( args, 3 ); Vector center; @@ -1830,17 +1830,17 @@ argCount = ReadArgs( args, 1 ); CCmd_JointSkip( joints, args[0] ); } - else if ( !stricmp( command, "$jointmerge" ) ) + else if ( !Q_stricmp( command, "$jointmerge" ) ) { argCount = ReadArgs( args, 2 ); CCmd_JointMerge( joints, args[0], args[1] ); } - else if ( !stricmp( command, "$rootbone" ) ) + else if ( !Q_stricmp( command, "$rootbone" ) ) { argCount = ReadArgs( args, 1 ); CCmd_JointRoot( joints, args[0] ); } - else if ( !stricmp( command, "$jointconstrain" ) ) + else if ( !Q_stricmp( command, "$jointconstrain" ) ) { argCount = ReadArgs( args, 6 ); char *pFriction = args[5]; @@ -1851,36 +1851,36 @@ CCmd_JointConstrain( joints, args[0], args[1], args[2], args[3], args[4], pFriction ); } // joint properties - else if ( !stricmp( command, "$jointinertia" ) ) + else if ( !Q_stricmp( command, "$jointinertia" ) ) { argCount = ReadArgs( args, 2 ); joints.JointInertia( args[0], Safe_atof( args[1] ) ); } - else if ( !stricmp( command, "$jointdamping" ) ) + else if ( !Q_stricmp( command, "$jointdamping" ) ) { argCount = ReadArgs( args, 2 ); joints.JointDamping( args[0], Safe_atof( args[1] ) ); } - else if ( !stricmp( command, "$jointrotdamping" ) ) + else if ( !Q_stricmp( command, "$jointrotdamping" ) ) { argCount = ReadArgs( args, 2 ); joints.JointRotdamping( args[0], Safe_atof( args[1] ) ); } - else if ( !stricmp( command, "$jointmassbias" ) ) + else if ( !Q_stricmp( command, "$jointmassbias" ) ) { argCount = ReadArgs( args, 2 ); joints.JointMassBias( args[0], Safe_atof( args[1] ) ); } - else if ( !stricmp( command, "$noselfcollisions" ) ) + else if ( !Q_stricmp( command, "$noselfcollisions" ) ) { joints.SetNoSelfCollisions(); } - else if ( !stricmp( command, "$jointcollide" ) ) + else if ( !Q_stricmp( command, "$jointcollide" ) ) { argCount = ReadArgs( args, 2 ); joints.AppendCollisionPair( args[0], args[1] ); } - else if ( !stricmp( command, "$animatedfriction" ) ) + else if ( !Q_stricmp( command, "$animatedfriction" ) ) { argCount = ReadArgs( args, 5 ); @@ -2240,7 +2240,7 @@ { MdlError("Rotation constraint on bone \"%s\" which does not appear in collision model!!!\n", pList->m_pJointName ); } - else if ( (!pListModel->m_parent || g_JointedModel.CollisionIndex(pListModel->m_parent) < 0) && strcmpi( pList->m_pJointName, g_JointedModel.m_rootName ) ) + else if ( (!pListModel->m_parent || g_JointedModel.CollisionIndex(pListModel->m_parent) < 0) && Q_stricmp( pList->m_pJointName, g_JointedModel.m_rootName ) ) { MdlError("Rotation constraint on bone \"%s\" which has no parent!!!\n", pList->m_pJointName ); } =================================================================== --- mod/src/utils/studiomdl/optimize.cpp 2005/02/18 04:46:00 1.1.1.1 +++ mod/src/utils/studiomdl/optimize.cpp 2005/10/01 05:49:17 @@ -152,7 +152,7 @@ int size = 0; for( i = 0; i < m_Strings.Size(); i++ ) { - if( stricmp( m_Strings[i].Base(), string ) == 0 ) + if( Q_stricmp( m_Strings[i].Base(), string ) == 0 ) { return size; } @@ -165,7 +165,7 @@ int i; for( i = 0; i < m_Strings.Size(); i++ ) { - if( stricmp( m_Strings[i].Base(), string ) == 0 ) + if( Q_stricmp( m_Strings[i].Base(), string ) == 0 ) { return true; } =================================================================== --- mod/src/utils/studiomdl/simplify.cpp 2005/06/11 22:14:37 1.2 +++ mod/src/utils/studiomdl/simplify.cpp 2005/10/01 05:49:18 @@ -2418,7 +2418,7 @@ for ( k = 0; k < g_numbones; k++ ) { - if ( stricmp( g_bonetable[k].name, name ) == 0 ) + if ( Q_stricmp( g_bonetable[k].name, name ) == 0 ) { return k; } @@ -2439,7 +2439,7 @@ { if (bonename[len2-len-1] == '.') { - if (stricmp( &bonename[len2-len], name ) == 0) + if (Q_stricmp( &bonename[len2-len], name ) == 0) { return true; } @@ -2931,7 +2931,7 @@ { for (int k = 0; k < g_numattachments; k++) { - if ( !stricmp( g_attachment[k].bonename, pname ) ) + if ( !Q_stricmp( g_attachment[k].bonename, pname ) ) { return true; } @@ -2945,7 +2945,7 @@ for (k = 0; k < g_numaxisinterpbones; k++) { - if (! stricmp( g_axisinterpbones[k].bonename, pname ) ) + if (! Q_stricmp( g_axisinterpbones[k].bonename, pname ) ) { return true; } @@ -2970,7 +2970,7 @@ // tag bones used by ikchains for (k = 0; k < g_numikchains; k++) { - if ( !stricmp( g_ikchain[k].bonename, pname ) ) + if ( !Q_stricmp( g_ikchain[k].bonename, pname ) ) { return true; } @@ -2985,7 +2985,7 @@ for (k = 0; k < g_numcollapse; k++) { - if (stricmp( g_collapse[k], pname ) == 0) + if (Q_stricmp( g_collapse[k], pname ) == 0) { return true; } @@ -3250,7 +3250,7 @@ { for (j = 0; j < psource->numbones; j++) { - if ( !stricmp( g_attachment[k].bonename, psource->localBone[j].name ) ) + if ( !Q_stricmp( g_attachment[k].bonename, psource->localBone[j].name ) ) { // this bone is a keeper with or without associated vertices // because an attachment point depends on it. @@ -3277,7 +3277,7 @@ { for (j = 0; j < psource->numbones; j++) { - if ( !stricmp( g_ikchain[k].bonename, psource->localBone[j].name ) ) + if ( !Q_stricmp( g_ikchain[k].bonename, psource->localBone[j].name ) ) { // this bone is a keeper with or without associated vertices // because a ikchain depends on it. @@ -3290,7 +3290,7 @@ { for (j = 0; j < psource->numbones; j++) { - if ( !stricmp( g_mouth[k].bonename, psource->localBone[j].name ) ) + if ( !Q_stricmp( g_mouth[k].bonename, psource->localBone[j].name ) ) { // this bone is a keeper with or without associated vertices // because a mouth shader depends on it. @@ -3305,7 +3305,7 @@ { for ( j = 0; j < psource->numbones; j++ ) { - if ( stricmp( g_BoneMerge[k].bonename, psource->localBone[j].name ) ) + if ( Q_stricmp( g_BoneMerge[k].bonename, psource->localBone[j].name ) ) continue; psource->boneflags[j] |= BONE_USED_BY_BONE_MERGE; @@ -3346,7 +3346,7 @@ { for (k = 0; k < g_numrenamedbones; k++) { - if (!stricmp( g_source[i]->localBone[j].name, g_renamedbone[k].from)) + if (!Q_stricmp( g_source[i]->localBone[j].name, g_renamedbone[k].from)) { strcpy( g_source[i]->localBone[j].name, g_renamedbone[k].to ); break; @@ -3362,7 +3362,7 @@ int k; for (k = 0; k < g_numrenamedbones; k++) { - if (!stricmp( pName, g_renamedbone[k].from)) + if (!Q_stricmp( pName, g_renamedbone[k].from)) { return g_renamedbone[k].to; } @@ -3386,7 +3386,7 @@ { for ( j = 0; j < g_numbones; j++ ) { - if ( stricmp( g_BoneMerge[k].bonename, g_bonetable[j].name ) ) + if ( Q_stricmp( g_BoneMerge[k].bonename, g_bonetable[j].name ) ) continue; g_bonetable[j].flags |= BONE_USED_BY_BONE_MERGE; @@ -3904,7 +3904,7 @@ // garymcthack - This gets tripped on the antlion if there are any lods at all. // I don't understand why. - if (stricmp(szAnim, szNode) && !(g_bonetable[k].flags & BONE_ALWAYS_PROCEDURAL)) + if (Q_stricmp(szAnim, szNode) && !(g_bonetable[k].flags & BONE_ALWAYS_PROCEDURAL)) { printf("illegal parent bone replacement in g_sequence \"%s\"\n\t\"%s\" has \"%s\", reference has \"%s\"\n", g_source[i]->filename, @@ -4875,7 +4875,7 @@ int j; for ( j = 0; j < g_sequence.Count(); j++) { - if (stricmp( g_sequence[i].autolayer[k].name, g_sequence[j].name) == 0) + if (Q_stricmp( g_sequence[i].autolayer[k].name, g_sequence[j].name) == 0) { g_sequence[i].autolayer[k].sequence = j; break; @@ -4947,7 +4947,7 @@ // search through known bones for (k = 0; k < g_numbones; k++) { - if ( !stricmp( g_attachment[i].bonename, g_bonetable[k].name )) + if ( !Q_stricmp( g_attachment[i].bonename, g_bonetable[k].name )) { g_attachment[i].bone = k; MatrixCopy( g_bonetable[k].boneToPose, boneToPose ); @@ -4965,7 +4965,7 @@ { for (k = 0; k < g_source[j]->numbones && !found; k++) { - if ( !stricmp( g_attachment[i].bonename, g_source[j]->localBone[k].name ) ) + if ( !Q_stricmp( g_attachment[i].bonename, g_source[j]->localBone[k].name ) ) { MatrixCopy( g_source[j]->boneToPose[k], boneToPose ); @@ -5031,7 +5031,7 @@ int j; for ( j = 0; j < g_numbones; j++) { - if (g_mouth[i].bonename[0] && stricmp( g_mouth[i].bonename, g_bonetable[j].name) == 0) + if (g_mouth[i].bonename[0] && Q_stricmp( g_mouth[i].bonename, g_bonetable[j].name) == 0) break; } if (j >= g_numbones) @@ -5271,7 +5271,7 @@ { for (j = 0; j < g_numikchains; j++) { - if (stricmp( g_ikchain[j].name, g_ikautoplaylock[i].name) == 0) + if (Q_stricmp( g_ikchain[j].name, g_ikautoplaylock[i].name) == 0) { break; } @@ -5292,7 +5292,7 @@ { for (j = 0; j < g_numikchains; j++) { - if (stricmp( g_ikchain[j].name, g_sequence[k].iklock[i].name) == 0) + if (Q_stricmp( g_ikchain[j].name, g_sequence[k].iklock[i].name) == 0) { break; } =================================================================== --- mod/src/utils/studiomdl/studiomdl.cpp 2005/06/11 22:14:37 1.3 +++ mod/src/utils/studiomdl/studiomdl.cpp 2005/10/02 06:14:29 @@ -358,22 +358,22 @@ int lookupControl( char *string ) { - if (stricmp(string,"X")==0) return STUDIO_X; - if (stricmp(string,"Y")==0) return STUDIO_Y; - if (stricmp(string,"Z")==0) return STUDIO_Z; - if (stricmp(string,"XR")==0) return STUDIO_XR; - if (stricmp(string,"YR")==0) return STUDIO_YR; - if (stricmp(string,"ZR")==0) return STUDIO_ZR; - - if (stricmp(string,"LX")==0) return STUDIO_LX; - if (stricmp(string,"LY")==0) return STUDIO_LY; - if (stricmp(string,"LZ")==0) return STUDIO_LZ; - if (stricmp(string,"LXR")==0) return STUDIO_LXR; - if (stricmp(string,"LYR")==0) return STUDIO_LYR; - if (stricmp(string,"LZR")==0) return STUDIO_LZR; + if (Q_stricmp(string,"X")==0) return STUDIO_X; + if (Q_stricmp(string,"Y")==0) return STUDIO_Y; + if (Q_stricmp(string,"Z")==0) return STUDIO_Z; + if (Q_stricmp(string,"XR")==0) return STUDIO_XR; + if (Q_stricmp(string,"YR")==0) return STUDIO_YR; + if (Q_stricmp(string,"ZR")==0) return STUDIO_ZR; + + if (Q_stricmp(string,"LX")==0) return STUDIO_LX; + if (Q_stricmp(string,"LY")==0) return STUDIO_LY; + if (Q_stricmp(string,"LZ")==0) return STUDIO_LZ; + if (Q_stricmp(string,"LXR")==0) return STUDIO_LXR; + if (Q_stricmp(string,"LYR")==0) return STUDIO_LYR; + if (Q_stricmp(string,"LZR")==0) return STUDIO_LZR; - if (stricmp(string,"LM")==0) return STUDIO_LINEAR; - if (stricmp(string,"LQ")==0) return STUDIO_QUADRATIC_MOTION; + if (Q_stricmp(string,"LM")==0) return STUDIO_LINEAR; + if (Q_stricmp(string,"LQ")==0) return STUDIO_QUADRATIC_MOTION; return -1; } @@ -390,7 +390,7 @@ int i; for ( i = 0; i < g_numposeparameters; i++) { - if (!stricmp( name, g_pose[i].name)) + if (!Q_stricmp( name, g_pose[i].name)) { return i; } @@ -437,12 +437,12 @@ { GetToken (false); - if (!stricmp( token, "wrap" )) + if (!Q_stricmp( token, "wrap" )) { g_pose[i].flags |= STUDIO_LOOPING; g_pose[i].loop = g_pose[i].max - g_pose[i].min; } - else if (!stricmp( token, "loop" )) + else if (!Q_stricmp( token, "loop" )) { g_pose[i].flags |= STUDIO_LOOPING; GetToken (false); @@ -467,7 +467,7 @@ while (string) { for (; *string && tolower( *string ) != c; string++); if (*string) { - if (strnicmp( string, string2, len ) == 0) { + if (Q_strnicmp( string, string2, len ) == 0) { break; } string++; @@ -493,7 +493,7 @@ for (i = 0; i < g_numtextures; i++) { - if (stricmp( g_texture[i].name, texturename ) == 0) + if (Q_stricmp( g_texture[i].name, texturename ) == 0) { return i; } @@ -533,7 +533,7 @@ int i; for (i = 0; i < g_numtextures; i++) { - if (stricmp( g_texture[i].name, from ) == 0) + if (Q_stricmp( g_texture[i].name, from ) == 0) { strcpy( g_texture[i].name, to ); return; @@ -589,7 +589,7 @@ // strip down till it finds "models" strcpyn( szName, fullpath ); - while (szName[0] != '\0' && strnicmp( "models", szName, 6 ) != 0) + while (szName[0] != '\0' && Q_strnicmp( "models", szName, 6 ) != 0) { strcpy( &szName[0], &szName[1] ); } @@ -667,7 +667,7 @@ int i; for ( i = 1; i <= g_numxnodes; i++) { - if (stricmp( name, g_xnodename[i] ) == 0) + if (Q_stricmp( name, g_xnodename[i] ) == 0) { return i; } @@ -894,25 +894,25 @@ while (TokenAvailable()) { GetToken(false); - if (stricmp( "reverse", token ) == 0) + if (Q_stricmp( "reverse", token ) == 0) { flip_triangles = 0; } - else if (stricmp( "scale", token ) == 0) + else if (Q_stricmp( "scale", token ) == 0) { GetToken(false); pmodel->scale = g_currentscale = verify_atof( token ); } - else if (stricmp( "faces", token ) == 0) + else if (Q_stricmp( "faces", token ) == 0) { GetToken( false ); GetToken( false ); } - else if (stricmp( "bias", token ) == 0) + else if (Q_stricmp( "bias", token ) == 0) { GetToken( false ); } - else if (stricmp("{", token ) == 0) + else if (Q_stricmp("{", token ) == 0) { UnGetToken( ); break; @@ -973,7 +973,7 @@ is_started = 1; else if (token[0] == '}') break; - else if (stricmp("studio", token ) == 0) + else if (Q_stricmp("studio", token ) == 0) { g_model[g_nummodels] = (s_model_t *)kalloc( 1, sizeof( s_model_t ) ); g_bodypart[g_numbodyparts].pmodel[g_bodypart[g_numbodyparts].nummodels] = g_model[g_nummodels]; @@ -982,7 +982,7 @@ Option_Studio( g_model[g_nummodels] ); g_nummodels++; } - else if (stricmp("blank", token ) == 0) + else if (Q_stricmp("blank", token ) == 0) Option_Blank( ); else { @@ -1188,7 +1188,7 @@ int i; for ( i = 0; i < g_numikchains; i++) { - if (stricmp( token, g_ikchain[i].name ) == 0) + if (Q_stricmp( token, g_ikchain[i].name ) == 0) { break; } @@ -1203,7 +1203,7 @@ // type GetToken( false ); - if (stricmp( token, "touch" ) == 0) + if (Q_stricmp( token, "touch" ) == 0) { pRule->type = IK_SELF; @@ -1211,7 +1211,7 @@ GetToken( false ); strcpyn( pRule->bonename, token ); } - else if (stricmp( token, "footstep" ) == 0) + else if (Q_stricmp( token, "footstep" ) == 0) { pRule->type = IK_GROUND; @@ -1219,7 +1219,7 @@ pRule->floor = g_ikchain[pRule->chain].floor; pRule->radius = g_ikchain[pRule->chain].radius; } - else if (stricmp( token, "attachment" ) == 0) + else if (Q_stricmp( token, "attachment" ) == 0) { pRule->type = IK_ATTACHMENT; @@ -1227,11 +1227,11 @@ GetToken( false ); strcpyn( pRule->attachment, token ); } - else if (stricmp( token, "release" ) == 0) + else if (Q_stricmp( token, "release" ) == 0) { pRule->type = IK_RELEASE; } - else if (stricmp( token, "unlatch" ) == 0) + else if (Q_stricmp( token, "unlatch" ) == 0) { pRule->type = IK_UNLATCH; } @@ -1241,18 +1241,18 @@ while (TokenAvailable()) { GetToken( false ); - if (stricmp( token, "height" ) == 0) + if (Q_stricmp( token, "height" ) == 0) { GetToken( false ); pRule->height = verify_atof( token ); } - else if (stricmp( token, "target" ) == 0) + else if (Q_stricmp( token, "target" ) == 0) { // slot GetToken( false ); pRule->slot = verify_atoi( token ); } - else if (stricmp( token, "range" ) == 0) + else if (Q_stricmp( token, "range" ) == 0) { // ramp GetToken( false ); @@ -1279,37 +1279,37 @@ else pRule->end = verify_atoi( token ); } - else if (stricmp( token, "floor" ) == 0) + else if (Q_stricmp( token, "floor" ) == 0) { GetToken( false ); pRule->floor = verify_atof( token ); } - else if (stricmp( token, "pad" ) == 0) + else if (Q_stricmp( token, "pad" ) == 0) { GetToken( false ); pRule->radius = verify_atof( token ) / 2.0f; } - else if (stricmp( token, "radius" ) == 0) + else if (Q_stricmp( token, "radius" ) == 0) { GetToken( false ); pRule->radius = verify_atof( token ); } - else if (stricmp( token, "contact" ) == 0) + else if (Q_stricmp( token, "contact" ) == 0) { GetToken( false ); pRule->contact = verify_atoi( token ); } - else if (stricmp( token, "usesequence" ) == 0) + else if (Q_stricmp( token, "usesequence" ) == 0) { pRule->usesequence = true; pRule->usesource = false; } - else if (stricmp( token, "usesource" ) == 0) + else if (Q_stricmp( token, "usesource" ) == 0) { pRule->usesequence = false; pRule->usesource = true; } - else if (stricmp( token, "fakeorigin" ) == 0) + else if (Q_stricmp( token, "fakeorigin" ) == 0) { GetToken( false ); pRule->pos.x = verify_atof( token ); @@ -1320,7 +1320,7 @@ pRule->bone = -1; } - else if (stricmp( token, "fakerotate" ) == 0) + else if (Q_stricmp( token, "fakerotate" ) == 0) { QAngle ang; @@ -1335,7 +1335,7 @@ pRule->bone = -1; } - else if (stricmp( token, "bone" ) == 0) + else if (Q_stricmp( token, "bone" ) == 0) { strcpy( pRule->bonename, token ); } @@ -1380,37 +1380,37 @@ // (specified by the up direction) to a z up space // Note: x, -x, -y are untested GetToken (false); - if (!stricmp( token, "x" )) + if (!Q_stricmp( token, "x" )) { // rotate 90 degrees around y to move x into z g_defaultrotation.x = 0.0f; g_defaultrotation.y = M_PI / 2.0f; } - else if (!stricmp( token, "-x" )) + else if (!Q_stricmp( token, "-x" )) { // untested g_defaultrotation.x = 0.0f; g_defaultrotation.y = -M_PI / 2.0f; } - else if (!stricmp( token, "y" )) + else if (!Q_stricmp( token, "y" )) { // rotate 90 degrees around x to move y into z g_defaultrotation.x = M_PI / 2.0f; g_defaultrotation.y = 0.0f; } - else if (!stricmp( token, "-y" )) + else if (!Q_stricmp( token, "-y" )) { // untested g_defaultrotation.x = -M_PI / 2.0f; g_defaultrotation.y = 0.0f; } - else if (!stricmp( token, "z" )) + else if (!Q_stricmp( token, "z" )) { // there's still a built in 90 degree Z rotation :( g_defaultrotation.x = 0.0f; g_defaultrotation.y = 0.0f; } - else if (!stricmp( token, "-z" )) + else if (!Q_stricmp( token, "-z" )) { // there's still a built in 90 degree Z rotation :( g_defaultrotation.x = 0.0f; @@ -1486,7 +1486,7 @@ sprintf (g_szFilename, "%s%s.%s", cddir[numdirs], name, xext ); for (i = 0; i < g_numsources; i++) { - if (stricmp( g_szFilename, g_source[i]->filename ) == 0) + if (Q_stricmp( g_szFilename, g_source[i]->filename ) == 0) return g_source[i]; } } @@ -1496,20 +1496,20 @@ sprintf (g_szFilename, "%s%s.vrm", cddir[numdirs], name ); for (i = 0; i < g_numsources; i++) { - if (stricmp( g_szFilename, g_source[i]->filename ) == 0) + if (Q_stricmp( g_szFilename, g_source[i]->filename ) == 0) return g_source[i]; } sprintf (g_szFilename, "%s%s.smd", cddir[numdirs], name ); for (i = 0; i < g_numsources; i++) { - if (stricmp( g_szFilename, g_source[i]->filename ) == 0) + if (Q_stricmp( g_szFilename, g_source[i]->filename ) == 0) return g_source[i]; } /* sprintf (g_szFilename, "%s%s.vta", cddir[numdirs], name ); for (i = 0; i < g_numsources; i++) { - if (stricmp( g_szFilename, g_source[i]->filename ) == 0) + if (Q_stricmp( g_szFilename, g_source[i]->filename ) == 0) return g_source[i]; } */ @@ -1564,25 +1564,25 @@ g_source[g_numsources]->isActiveModel = true; } - if ( xext[0] == '\0' || stricmp( xext, "vrm" ) == 0) + if ( xext[0] == '\0' || Q_stricmp( xext, "vrm" ) == 0) { sprintf (g_szFilename, "%s%s.vrm", cddir[numdirs], pTempName ); strcpyn( g_source[g_numsources]->filename, g_szFilename ); result = Load_VRM( g_source[g_numsources] ); } - if ( ( !result && xext[0] == '\0' ) || stricmp( xext, "smd" ) == 0) + if ( ( !result && xext[0] == '\0' ) || Q_stricmp( xext, "smd" ) == 0) { sprintf (g_szFilename, "%s%s.smd", cddir[numdirs], pTempName ); strcpyn( g_source[g_numsources]->filename, g_szFilename ); result = Load_SMD( g_source[g_numsources] ); } - if (( !result && xext[0] == '\0' ) || stricmp( xext, "vta" ) == 0) + if (( !result && xext[0] == '\0' ) || Q_stricmp( xext, "vta" ) == 0) { sprintf (g_szFilename, "%s%s.vta", cddir[numdirs], pTempName ); strcpyn( g_source[g_numsources]->filename, g_szFilename ); result = Load_VTA( g_source[g_numsources] ); } - if (( !result && xext[0] == '\0' ) || stricmp( xext, "obj" ) == 0) + if (( !result && xext[0] == '\0' ) || Q_stricmp( xext, "obj" ) == 0) { sprintf (g_szFilename, "%s%s.obj", cddir[numdirs], pTempName ); strcpyn( g_source[g_numsources]->filename, g_szFilename ); @@ -1614,7 +1614,7 @@ int i; for (i = 0; i < g_sequence.Count(); i++) { - if (stricmp( g_sequence[i].name, token ) == 0) + if (Q_stricmp( g_sequence[i].name, token ) == 0) { return &g_sequence[i]; } @@ -1628,7 +1628,7 @@ int i; for ( i = 0; i < g_numani; i++) { - if (stricmp( g_panimation[i]->name, token ) == 0) + if (Q_stricmp( g_panimation[i]->name, token ) == 0) { return g_panimation[i]; } @@ -1654,7 +1654,7 @@ return false; } s_animcmd_t *pcmd = &cmds[numcmds]; - if (stricmp("fixuploop", token ) == 0) + if (Q_stricmp("fixuploop", token ) == 0) { pcmd->cmd = CMD_FIXUP; @@ -1663,14 +1663,14 @@ GetToken( false ); pcmd->u.fixuploop.end = verify_atoi( token ); } - else if (strnicmp("weightlist", token, 6 ) == 0) + else if (Q_strnicmp("weightlist", token, 6 ) == 0) { GetToken( false ); int i; for ( i = 1; i < g_numweightlist; i++) { - if (stricmp( g_weightlist[i].name, token ) == 0) + if (Q_stricmp( g_weightlist[i].name, token ) == 0) { break; } @@ -1682,7 +1682,7 @@ pcmd->cmd = CMD_WEIGHTS; pcmd->u.weightlist.index = i; } - else if (stricmp("subtract", token ) == 0) + else if (Q_stricmp("subtract", token ) == 0) { pcmd->cmd = CMD_SUBTRACT; @@ -1701,7 +1701,7 @@ pcmd->u.subtract.flags |= STUDIO_POST; } - else if (stricmp("presubtract", token ) == 0) // FIXME: rename this to something better + else if (Q_stricmp("presubtract", token ) == 0) // FIXME: rename this to something better { pcmd->cmd = CMD_SUBTRACT; @@ -1718,7 +1718,7 @@ GetToken( false ); pcmd->u.subtract.frame = verify_atoi( token ); } - else if (stricmp( "alignto", token ) == 0) + else if (Q_stricmp( "alignto", token ) == 0) { pcmd->cmd = CMD_AO; @@ -1736,7 +1736,7 @@ pcmd->u.ao.srcframe = 0; pcmd->u.ao.destframe = 0; } - else if (stricmp( "align", token ) == 0) + else if (Q_stricmp( "align", token ) == 0) { pcmd->cmd = CMD_AO; @@ -1772,7 +1772,7 @@ GetToken( false ); pcmd->u.ao.destframe = verify_atoi( token ); } - else if (stricmp( "alignboneto", token ) == 0) + else if (Q_stricmp( "alignboneto", token ) == 0) { pcmd->cmd = CMD_AO; @@ -1791,7 +1791,7 @@ pcmd->u.ao.srcframe = 0; pcmd->u.ao.destframe = 0; } - else if (stricmp( "match", token ) == 0) + else if (Q_stricmp( "match", token ) == 0) { pcmd->cmd = CMD_MATCH; @@ -1805,7 +1805,7 @@ pcmd->u.match.ref = extanim; } - else if (stricmp( "worldspaceblend", token ) == 0) + else if (Q_stricmp( "worldspaceblend", token ) == 0) { pcmd->cmd = CMD_WORLDSPACEBLEND; @@ -1819,14 +1819,14 @@ pcmd->u.match.ref = extanim; } - else if (stricmp( "rotateto", token ) == 0) + else if (Q_stricmp( "rotateto", token ) == 0) { pcmd->cmd = CMD_ANGLE; GetToken( false ); pcmd->u.angle.angle = verify_atof( token ); } - else if (stricmp( "ikrule", token ) == 0) + else if (Q_stricmp( "ikrule", token ) == 0) { pcmd->cmd = CMD_IKRULE; @@ -1834,7 +1834,7 @@ Option_IKRule( pcmd->u.ikrule.pRule ); } - else if (stricmp( "ikfixup", token ) == 0) + else if (Q_stricmp( "ikfixup", token ) == 0) { pcmd->cmd = CMD_IKFIXUP; @@ -1842,7 +1842,7 @@ Option_IKRule( pcmd->u.ikrule.pRule ); } - else if (stricmp( "walkframe", token ) == 0) + else if (Q_stricmp( "walkframe", token ) == 0) { pcmd->cmd = CMD_MOTION; @@ -1878,7 +1878,7 @@ pcmd->u.motion.zr = verify_atof( token ); */ } - else if (stricmp( "walkalignto", token ) == 0) + else if (Q_stricmp( "walkalignto", token ) == 0) { pcmd->cmd = CMD_REFMOTION; @@ -1926,7 +1926,7 @@ pcmd->u.motion.zr = verify_atof( token ); */ } - else if (stricmp( "walkalign", token ) == 0) + else if (Q_stricmp( "walkalign", token ) == 0) { pcmd->cmd = CMD_REFMOTION; @@ -1970,7 +1970,7 @@ GetToken( false ); pcmd->u.motion.iSrcFrame = verify_atoi( token ); } - else if (stricmp("derivative", token ) == 0) + else if (Q_stricmp("derivative", token ) == 0) { pcmd->cmd = CMD_DERIVATIVE; @@ -1978,22 +1978,22 @@ GetToken( false ); pcmd->u.derivative.scale = verify_atof( token ); } - else if (stricmp("noanimation", token ) == 0) + else if (Q_stricmp("noanimation", token ) == 0) { pcmd->cmd = CMD_NOANIMATION; } - else if (stricmp("lineardelta", token ) == 0) + else if (Q_stricmp("lineardelta", token ) == 0) { pcmd->cmd = CMD_LINEARDELTA; pcmd->u.linear.flags |= STUDIO_POST; } - else if (stricmp("splinedelta", token ) == 0) + else if (Q_stricmp("splinedelta", token ) == 0) { pcmd->cmd = CMD_LINEARDELTA; pcmd->u.linear.flags |= STUDIO_POST; pcmd->u.linear.flags |= STUDIO_SPLINE; } - else if (stricmp("compress", token ) == 0) + else if (Q_stricmp("compress", token ) == 0) { pcmd->cmd = CMD_COMPRESS; @@ -2001,7 +2001,7 @@ GetToken( false ); pcmd->u.compress.frames = verify_atoi( token ); } - else if (stricmp("numframes", token ) == 0) + else if (Q_stricmp("numframes", token ) == 0) { pcmd->cmd = CMD_NUMFRAMES; @@ -2009,7 +2009,7 @@ GetToken( false ); pcmd->u.compress.frames = verify_atoi( token ); } - else if (stricmp("counterrotate", token ) == 0) + else if (Q_stricmp("counterrotate", token ) == 0) { pcmd->cmd = CMD_COUNTERROTATE; @@ -2017,7 +2017,7 @@ GetToken( false ); pcmd->u.counterrotate.pBonename = strdup( token ); } - else if (stricmp("counterrotateto", token ) == 0) + else if (Q_stricmp("counterrotateto", token ) == 0) { pcmd->cmd = CMD_COUNTERROTATE; @@ -2056,7 +2056,7 @@ int ParseAnimationToken( s_animation_t *panim ) { - if (stricmp("fps", token ) == 0) + if (Q_stricmp("fps", token ) == 0) { GetToken( false ); panim->fps = verify_atof( token ); @@ -2065,7 +2065,7 @@ MdlError( "ParseAnimationToken: fps (%f from '%s') <= 0.0\n", panim->fps, token ); } } - else if (stricmp("origin", token ) == 0) + else if (Q_stricmp("origin", token ) == 0) { GetToken (false); panim->adjust.x = verify_atof (token); @@ -2076,13 +2076,13 @@ GetToken (false); panim->adjust.z = verify_atof (token); } - else if (stricmp("rotate", token ) == 0) + else if (Q_stricmp("rotate", token ) == 0) { GetToken( false ); // FIXME: broken for Maya panim->rotation.z = DEG2RAD( verify_atof( token ) + 90 ); } - else if (stricmp("angles", token ) == 0) + else if (Q_stricmp("angles", token ) == 0) { GetToken( false ); panim->rotation.x = DEG2RAD( verify_atof( token ) ); @@ -2091,31 +2091,31 @@ GetToken( false ); panim->rotation.z = DEG2RAD( verify_atof( token ) + 90.0); } - else if (stricmp("scale", token ) == 0) + else if (Q_stricmp("scale", token ) == 0) { GetToken( false ); panim->scale = verify_atof( token ); } - else if (strnicmp("loop", token, 4 ) == 0) + else if (Q_strnicmp("loop", token, 4 ) == 0) { panim->flags |= STUDIO_LOOPING; } - else if (strnicmp("startloop", token, 5 ) == 0) + else if (Q_strnicmp("startloop", token, 5 ) == 0) { GetToken( false ); panim->looprestart = verify_atoi( token ); panim->flags |= STUDIO_LOOPING; } - else if (stricmp("fudgeloop", token ) == 0) + else if (Q_stricmp("fudgeloop", token ) == 0) { panim->fudgeloop = true; panim->flags |= STUDIO_LOOPING; } - else if (strnicmp("snap", token, 4 ) == 0) + else if (Q_strnicmp("snap", token, 4 ) == 0) { panim->flags |= STUDIO_SNAP; } - else if (strnicmp("frame", token, 5 ) == 0) + else if (Q_strnicmp("frame", token, 5 ) == 0) { GetToken( false ); panim->startframe = verify_atoi( token ); @@ -2133,15 +2133,15 @@ panim->numframes = panim->endframe - panim->startframe + 1; } - else if (stricmp("post", token) == 0) + else if (Q_stricmp("post", token) == 0) { panim->flags |= STUDIO_POST; } - else if (stricmp("noautoik", token) == 0) + else if (Q_stricmp("noautoik", token) == 0) { panim->noAutoIK = true; } - else if (stricmp("autoik", token) == 0) + else if (Q_stricmp("autoik", token) == 0) { panim->noAutoIK = false; } @@ -2149,14 +2149,14 @@ { } - else if (stricmp("cmdlist", token) == 0) + else if (Q_stricmp("cmdlist", token) == 0) { GetToken( false ); // A int i; for ( i = 0; i < g_numcmdlists; i++) { - if (stricmp( g_cmdlist[i].name, token) == 0) + if (Q_stricmp( g_cmdlist[i].name, token) == 0) { break; } @@ -2226,11 +2226,11 @@ } return; } - if (stricmp("{", token ) == 0) + if (Q_stricmp("{", token ) == 0) { depth++; } - else if (stricmp("}", token ) == 0) + else if (Q_stricmp("}", token ) == 0) { depth--; } @@ -2347,11 +2347,11 @@ } return 1; } - if (stricmp("{", token ) == 0) + if (Q_stricmp("{", token ) == 0) { depth++; } - else if (stricmp("}", token ) == 0) + else if (Q_stricmp("}", token ) == 0) { depth--; } @@ -2563,47 +2563,47 @@ } return 1; } - if (stricmp("{", token ) == 0) + if (Q_stricmp("{", token ) == 0) { depth++; } - else if (stricmp("}", token ) == 0) + else if (Q_stricmp("}", token ) == 0) { depth--; } /* - else if (stricmp("deform", token ) == 0) + else if (Q_stricmp("deform", token ) == 0) { Option_Deform( pseq ); } */ - else if (stricmp("event", token ) == 0) + else if (Q_stricmp("event", token ) == 0) { depth -= Option_Event( pseq ); } - else if (stricmp("activity", token ) == 0) + else if (Q_stricmp("activity", token ) == 0) { Option_Activity( pseq ); } - else if (strnicmp( token, "ACT_", 4 ) == 0) + else if (Q_strnicmp( token, "ACT_", 4 ) == 0) { UnGetToken( ); Option_Activity( pseq ); } - else if (stricmp("snap", token ) == 0) + else if (Q_stricmp("snap", token ) == 0) { pseq->flags |= STUDIO_SNAP; } - else if (stricmp("blendwidth", token ) == 0) + else if (Q_stricmp("blendwidth", token ) == 0) { GetToken( false ); pseq->groupsize[0] = verify_atoi( token ); } - else if (stricmp("blend", token ) == 0) + else if (Q_stricmp("blend", token ) == 0) { i = 0; if (pseq->paramindex[0] != -1) @@ -2625,7 +2625,7 @@ g_pose[j].max = max( g_pose[j].max, pseq->paramstart[i] ); g_pose[j].max = max( g_pose[j].max, pseq->paramend[i] ); } - else if (stricmp("calcblend", token ) == 0) + else if (Q_stricmp("calcblend", token ) == 0) { i = 0; if (pseq->paramindex[0] != -1) @@ -2647,7 +2647,7 @@ GetToken( false ); pseq->paramcontrol[i] = lookupControl( token ); } - else if (stricmp("blendref", token ) == 0) + else if (Q_stricmp("blendref", token ) == 0) { GetToken( false ); pseq->paramanim = LookupAnimation( token ); @@ -2656,7 +2656,7 @@ MdlError( "Unknown blendref animation \"%s\"\n", token ); } } - else if (stricmp("blendcomp", token ) == 0) + else if (Q_stricmp("blendcomp", token ) == 0) { GetToken( false ); pseq->paramcompanim = LookupAnimation( token ); @@ -2665,7 +2665,7 @@ MdlError( "Unknown blendcomp animation \"%s\"\n", token ); } } - else if (stricmp("blendcenter", token ) == 0) + else if (Q_stricmp("blendcenter", token ) == 0) { GetToken( false ); pseq->paramcenter = LookupAnimation( token ); @@ -2674,19 +2674,19 @@ MdlError( "Unknown blendcenter animation \"%s\"\n", token ); } } - else if (stricmp("node", token ) == 0) + else if (Q_stricmp("node", token ) == 0) { GetToken( false ); pseq->entrynode = pseq->exitnode = LookupXNode( token ); } - else if (stricmp("transition", token ) == 0) + else if (Q_stricmp("transition", token ) == 0) { GetToken( false ); pseq->entrynode = LookupXNode( token ); GetToken( false ); pseq->exitnode = LookupXNode( token ); } - else if (stricmp("rtransition", token ) == 0) + else if (Q_stricmp("rtransition", token ) == 0) { GetToken( false ); pseq->entrynode = LookupXNode( token ); @@ -2694,53 +2694,53 @@ pseq->exitnode = LookupXNode( token ); pseq->nodeflags |= 1; } - else if (stricmp("exitphase", token ) == 0) + else if (Q_stricmp("exitphase", token ) == 0) { GetToken( false ); pseq->exitphase = verify_atof( token ); } - else if (stricmp("delta", token) == 0) + else if (Q_stricmp("delta", token) == 0) { pseq->flags |= STUDIO_DELTA; pseq->flags |= STUDIO_POST; } - else if (stricmp("post", token) == 0) // remove + else if (Q_stricmp("post", token) == 0) // remove { pseq->flags |= STUDIO_POST; } - else if (stricmp("predelta", token) == 0) + else if (Q_stricmp("predelta", token) == 0) { pseq->flags |= STUDIO_DELTA; } - else if (stricmp("autoplay", token) == 0) + else if (Q_stricmp("autoplay", token) == 0) { pseq->flags |= STUDIO_AUTOPLAY; } - else if (stricmp( "fadein", token ) == 0) + else if (Q_stricmp( "fadein", token ) == 0) { GetToken( false ); pseq->fadeintime = verify_atof( token ); } - else if (stricmp( "fadeout", token ) == 0) + else if (Q_stricmp( "fadeout", token ) == 0) { GetToken( false ); pseq->fadeouttime = verify_atof( token ); } - else if (stricmp( "realtime", token ) == 0) + else if (Q_stricmp( "realtime", token ) == 0) { pseq->flags |= STUDIO_REALTIME; } - else if (stricmp( "hidden", token ) == 0) + else if (Q_stricmp( "hidden", token ) == 0) { pseq->flags |= STUDIO_HIDDEN; } - else if (stricmp( "addlayer", token ) == 0) + else if (Q_stricmp( "addlayer", token ) == 0) { GetToken( false ); strcpyn( pseq->autolayer[pseq->numautolayers].name, token ); pseq->numautolayers++; } - else if (stricmp( "iklock", token ) == 0) + else if (Q_stricmp( "iklock", token ) == 0) { GetToken(false); strcpyn( pseq->iklock[pseq->numiklocks].name, token ); @@ -2753,11 +2753,11 @@ pseq->numiklocks++; } - else if (stricmp( "keyvalues", token ) == 0) + else if (Q_stricmp( "keyvalues", token ) == 0) { Option_KeyValues( &pseq->KeyValue ); } - else if (stricmp( "blendlayer", token ) == 0) + else if (Q_stricmp( "blendlayer", token ) == 0) { pseq->autolayer[pseq->numautolayers].flags = 0; @@ -2779,15 +2779,15 @@ while (TokenAvailable( )) { GetToken( false ); - if (stricmp( "xfade", token ) == 0) + if (Q_stricmp( "xfade", token ) == 0) { pseq->autolayer[pseq->numautolayers].flags |= STUDIO_XFADE; } - else if (stricmp( "spline", token ) == 0) + else if (Q_stricmp( "spline", token ) == 0) { pseq->autolayer[pseq->numautolayers].flags |= STUDIO_SPLINE; } - else if (stricmp( "noblend", token ) == 0) + else if (Q_stricmp( "noblend", token ) == 0) { pseq->autolayer[pseq->numautolayers].flags |= STUDIO_NOBLEND; } @@ -2810,7 +2810,7 @@ // first look up an existing animation for (n = 0; n < g_numani; n++) { - if (stricmp( token, g_panimation[n]->name ) == 0) + if (Q_stricmp( token, g_panimation[n]->name ) == 0) { animations[numblends++] = g_panimation[n]; break; @@ -2934,11 +2934,11 @@ } return 1; } - if (stricmp("{", token ) == 0) + if (Q_stricmp("{", token ) == 0) { depth++; } - else if (stricmp("}", token ) == 0) + else if (Q_stricmp("}", token ) == 0) { depth--; } @@ -3147,11 +3147,11 @@ } return; } - if (stricmp("{", token ) == 0) + if (Q_stricmp("{", token ) == 0) { depth++; } - else if (stricmp("}", token ) == 0) + else if (Q_stricmp("}", token ) == 0) { depth--; } @@ -3198,7 +3198,7 @@ GetToken (false); for (i = 0; i < pmodel->source->numbones; i++) { - if (stricmp( pmodel->source->localBone[i].name, token ) == 0) + if (Q_stricmp( pmodel->source->localBone[i].name, token ) == 0) { eyeball->bone = i; break; @@ -3352,7 +3352,7 @@ int flexdesc; for ( flexdesc = 0; flexdesc < g_numflexdesc; flexdesc++) { - if (stricmp( name, g_flexdesc[flexdesc].FACS ) == 0) + if (Q_stricmp( name, g_flexdesc[flexdesc].FACS ) == 0) { break; } @@ -3414,18 +3414,18 @@ { GetToken(false); - if (stricmp( token, "frame") == 0) + if (Q_stricmp( token, "frame") == 0) { GetToken (false); g_flexkey[g_numflexkeys].frame = verify_atoi( token ); } - else if (stricmp( token, "position") == 0) + else if (Q_stricmp( token, "position") == 0) { GetToken (false); g_flexkey[g_numflexkeys].target1 = verify_atof( token ); } - else if (stricmp( token, "split") == 0) + else if (Q_stricmp( token, "split") == 0) { GetToken (false); g_flexkey[g_numflexkeys].split = verify_atof( token ); @@ -3489,7 +3489,7 @@ strcat( localdesc, "_" ); strcat( localdesc, token ); - if (stricmp( token, "lowerer") == 0) + if (Q_stricmp( token, "lowerer") == 0) { GetToken (false); lowererframe = verify_atoi( token ); @@ -3498,7 +3498,7 @@ lowererdesc = g_numflexdesc; strcpyn( g_flexdesc[g_numflexdesc++].FACS, localdesc ); } - else if (stricmp( token, "neutral") == 0) + else if (Q_stricmp( token, "neutral") == 0) { GetToken (false); neutralframe = verify_atoi( token ); @@ -3507,7 +3507,7 @@ neutraldesc = g_numflexdesc; strcpyn( g_flexdesc[g_numflexdesc++].FACS, localdesc ); } - else if (stricmp( token, "raiser") == 0) + else if (Q_stricmp( token, "raiser") == 0) { GetToken (false); raiserframe = verify_atoi( token ); @@ -3516,12 +3516,12 @@ raiserdesc = g_numflexdesc; strcpyn( g_flexdesc[g_numflexdesc++].FACS, localdesc ); } - else if (stricmp( token, "split") == 0) + else if (Q_stricmp( token, "split") == 0) { GetToken (false); split = verify_atof( token ); } - else if (stricmp( token, "eyeball") == 0) + else if (Q_stricmp( token, "eyeball") == 0) { GetToken (false); strcpy( szEyeball, token ); @@ -3572,7 +3572,7 @@ if (szEyeball[0] != '\0') { - if (stricmp( peyeball->name, szEyeball ) != 0) + if (Q_stricmp( peyeball->name, szEyeball ) != 0) continue; } @@ -3659,7 +3659,7 @@ { GetToken(false); - if (stricmp( token, "range") == 0) + if (Q_stricmp( token, "range") == 0) { GetToken(false); range_min = verify_atof( token ); @@ -3717,7 +3717,7 @@ int flexdesc; for ( flexdesc = 0; flexdesc < g_numflexdesc; flexdesc++) { - if (stricmp( name, g_flexdesc[flexdesc].FACS ) == 0) + if (Q_stricmp( name, g_flexdesc[flexdesc].FACS ) == 0) { break; } @@ -3777,7 +3777,7 @@ for (k = 0; k < g_numflexdesc; k++) { - if (stricmp( token, g_flexdesc[k].FACS ) == 0) + if (Q_stricmp( token, g_flexdesc[k].FACS ) == 0) { stream[i].op = STUDIO_FETCH2; stream[i].d.index = k; @@ -3793,7 +3793,7 @@ { for (k = 0; k < g_numflexcontrollers; k++) { - if (stricmp( token, g_flexcontroller[k].name ) == 0) + if (Q_stricmp( token, g_flexcontroller[k].name ) == 0) { stream[i].op = STUDIO_FETCH1; stream[i].d.index = k; @@ -3936,23 +3936,23 @@ } return; } - if (stricmp("{", token ) == 0) + if (Q_stricmp("{", token ) == 0) { depth++; } - else if (stricmp("}", token ) == 0) + else if (Q_stricmp("}", token ) == 0) { depth--; } - else if (stricmp("eyeball", token ) == 0) + else if (Q_stricmp("eyeball", token ) == 0) { Option_Eyeball( g_model[g_nummodels] ); } - else if (stricmp("eyelid", token ) == 0) + else if (Q_stricmp("eyelid", token ) == 0) { Option_Eyelid( g_nummodels ); } - else if (stricmp("flex", token ) == 0) + else if (Q_stricmp("flex", token ) == 0) { // g_flex GetToken (false); @@ -3965,7 +3965,7 @@ } Option_Flex( FAC, vtafile, g_nummodels, 0.0 ); // FIXME: this needs to point to a model used, not loaded!!! } - else if (stricmp("flexpair", token ) == 0) + else if (Q_stricmp("flexpair", token ) == 0) { // g_flex GetToken (false); @@ -3982,7 +3982,7 @@ } Option_Flex( FAC, vtafile, g_nummodels, split ); // FIXME: this needs to point to a model used, not loaded!!! } - else if (stricmp("defaultflex", token ) == 0) + else if (Q_stricmp("defaultflex", token ) == 0) { if (depth == 0) { @@ -3995,13 +3995,13 @@ Option_Flex( "default", vtafile, g_nummodels, 0.0 ); // FIXME: this needs to point to a model used, not loaded!!! g_defaultflexkey = &g_flexkey[g_numflexkeys-1]; } - else if (stricmp("flexfile", token ) == 0) + else if (Q_stricmp("flexfile", token ) == 0) { // file GetToken (false); strcpy( vtafile, token ); } - else if (stricmp("localvar", token ) == 0) + else if (Q_stricmp("localvar", token ) == 0) { while (TokenAvailable()) { @@ -4009,11 +4009,11 @@ Add_Flexdesc( token ); } } - else if (stricmp("mouth", token ) == 0) + else if (Q_stricmp("mouth", token ) == 0) { Option_Mouth( g_model[g_nummodels] ); } - else if (stricmp("flexcontroller", token ) == 0) + else if (Q_stricmp("flexcontroller", token ) == 0) { Option_Flexcontroller( g_model[g_nummodels] ); } @@ -4021,11 +4021,11 @@ { Option_Flexrule( g_model[g_nummodels], &token[1] ); } - else if (stricmp("attachment", token ) == 0) + else if (Q_stricmp("attachment", token ) == 0) { // Option_Attachment( g_model[g_nummodels] ); } - else if (stricmp( token, "spherenormals") == 0) + else if (Q_stricmp( token, "spherenormals") == 0) { Option_Spherenormals( g_model[g_nummodels]->source ); } @@ -4084,15 +4084,15 @@ } return; } - if (stricmp("{", token ) == 0) + if (Q_stricmp("{", token ) == 0) { depth++; } - else if (stricmp("}", token ) == 0) + else if (Q_stricmp("}", token ) == 0) { depth--; } - else if (stricmp("appendvta", token ) == 0) + else if (Q_stricmp("appendvta", token ) == 0) { char filename[256]; // file @@ -4120,7 +4120,7 @@ int i; for ( i = 0; i < g_numikchains; i++) { - if (stricmp( token, g_ikchain[i].name ) == 0) + if (Q_stricmp( token, g_ikchain[i].name ) == 0) { break; } @@ -4159,22 +4159,22 @@ GetToken(false); g_ikchain[g_numikchains].value = verify_atof( token ); } - else if (stricmp( "height", token ) == 0) + else if (Q_stricmp( "height", token ) == 0) { GetToken(false); g_ikchain[g_numikchains].height = verify_atof( token ); } - else if (stricmp( "pad", token ) == 0) + else if (Q_stricmp( "pad", token ) == 0) { GetToken(false); g_ikchain[g_numikchains].radius = verify_atof( token ) / 2.0; } - else if (stricmp( "floor", token ) == 0) + else if (Q_stricmp( "floor", token ) == 0) { GetToken(false); g_ikchain[g_numikchains].floor = verify_atof( token ); } - else if (stricmp( "knee", token ) == 0) + else if (Q_stricmp( "knee", token ) == 0) { GetToken(false); g_ikchain[g_numikchains].link[0].kneeDir.x = verify_atof( token ); @@ -4183,7 +4183,7 @@ GetToken(false); g_ikchain[g_numikchains].link[0].kneeDir.z = verify_atof( token ); } - else if (stricmp( "center", token ) == 0) + else if (Q_stricmp( "center", token ) == 0) { GetToken(false); g_ikchain[g_numikchains].center.x = verify_atof( token ); @@ -4238,7 +4238,7 @@ { if (GetToken (false)) { - if (!stricmp("mouth",token)) + if (!Q_stricmp("mouth",token)) { g_bonecontroller[g_numbonecontrollers].inputfield = 4; } @@ -4304,11 +4304,11 @@ if( GetToken( false ) ) { - if( !strcmpi( "sphere", token ) ) + if( !Q_stricmp( "sphere", token ) ) { g_screenalignedbone[g_numscreenalignedbones].flags = BONE_SCREEN_ALIGN_SPHERE; } - else if( !strcmpi( "cylinder", token ) ) + else if( !Q_stricmp( "cylinder", token ) ) { g_screenalignedbone[g_numscreenalignedbones].flags = BONE_SCREEN_ALIGN_CYLINDER; } @@ -4579,7 +4579,7 @@ int i; for ( i = s_JointSurfaceProp.Count(); --i >= 0; ) { - if (!stricmp(s_JointSurfaceProp[i].m_pJointName, token)) + if (!Q_stricmp(s_JointSurfaceProp[i].m_pJointName, token)) { break; } @@ -4614,7 +4614,7 @@ { for ( int i = s_JointSurfaceProp.Count(); --i >= 0; ) { - if (!stricmp(s_JointSurfaceProp[i].m_pJointName, pJointName)) + if (!Q_stricmp(s_JointSurfaceProp[i].m_pJointName, pJointName)) { return s_JointSurfaceProp[i].m_pSurfaceProp; } @@ -4699,24 +4699,24 @@ { GetToken (false); - if ( !stricmp( token, "grate" ) ) + if ( !Q_stricmp( token, "grate" ) ) { *pAddFlags |= CONTENTS_GRATE; *pRemoveFlags |= CONTENTS_SOLID; } - else if ( !stricmp( token, "ladder" ) ) + else if ( !Q_stricmp( token, "ladder" ) ) { *pAddFlags |= CONTENTS_LADDER; } - else if ( !stricmp( token, "solid" ) ) + else if ( !Q_stricmp( token, "solid" ) ) { *pAddFlags |= CONTENTS_SOLID; } - else if ( !stricmp( token, "monster" ) ) + else if ( !Q_stricmp( token, "monster" ) ) { *pAddFlags |= CONTENTS_MONSTER; } - else if ( !stricmp( token, "notsolid" ) ) + else if ( !Q_stricmp( token, "notsolid" ) ) { *pRemoveFlags |= CONTENTS_SOLID; } @@ -4748,7 +4748,7 @@ int i; for ( i = s_JointContents.Count(); --i >= 0; ) { - if (!stricmp(s_JointContents[i].m_pJointName, token)) + if (!Q_stricmp(s_JointContents[i].m_pJointName, token)) { break; } @@ -4785,7 +4785,7 @@ { for ( int i = s_JointContents.Count(); --i >= 0; ) { - if (!stricmp(s_JointContents[i].m_pJointName, pJointName)) + if (!Q_stricmp(s_JointContents[i].m_pJointName, pJointName)) { return s_JointContents[i].m_nContents; } @@ -4896,21 +4896,21 @@ { GetToken (false); - if (stricmp(token,"absolute") == 0) + if (Q_stricmp(token,"absolute") == 0) { g_attachment[g_numattachments].type |= IS_ABSOLUTE; AngleIMatrix( g_defaultrotation, g_attachment[g_numattachments].local ); // AngleIMatrix( Vector( 0, 0, 0 ), g_attachment[g_numattachments].local ); } - else if (stricmp(token,"rigid") == 0) + else if (Q_stricmp(token,"rigid") == 0) { g_attachment[g_numattachments].type |= IS_RIGID; } - else if (stricmp(token,"world_align") == 0) + else if (Q_stricmp(token,"world_align") == 0) { g_attachment[g_numattachments].flags |= ATTACHMENT_FLAG_WORLD_ALIGN; } - else if (stricmp(token,"rotate") == 0) + else if (Q_stricmp(token,"rotate") == 0) { QAngle angles; for (int i = 0; i < 3; ++i) @@ -4923,7 +4923,7 @@ } AngleMatrix( angles, g_attachment[g_numattachments].local ); } - else if (stricmp(token,"x_and_z_axes") == 0) + else if (Q_stricmp(token,"x_and_z_axes") == 0) { int i; Vector xaxis, yaxis, zaxis; @@ -4974,7 +4974,7 @@ int i; for (i = 0; i < g_numattachments; i++) { - if (stricmp( g_attachment[i].name, name ) == 0) + if (Q_stricmp( g_attachment[i].name, name ) == 0) { return i; } @@ -5069,7 +5069,7 @@ bool reverse = false; if( TokenAvailable() && GetToken( false ) ) { - if( stricmp( "reverse", token ) == 0 ) + if( Q_stricmp( "reverse", token ) == 0 ) { reverse = true; } @@ -5081,7 +5081,7 @@ // If the LOD system tells us to replace "blank", let's forget // we ever read this. Have to do it here so parsing works - if( !stricmp( newReplacement.GetSrcName(), "blank" ) ) + if( !Q_stricmp( newReplacement.GetSrcName(), "blank" ) ) { lodData.modelReplacements.FastRemove( i ); return; @@ -5116,7 +5116,7 @@ // If the LOD system tells us to replace "blank", let's forget // we ever read this. Have to do it here so parsing works - if( !stricmp( newReplacement.GetSrcName(), "blank" ) ) + if( !Q_stricmp( newReplacement.GetSrcName(), "blank" ) ) { lodData.modelReplacements.FastRemove( i ); } @@ -5206,7 +5206,7 @@ // which uniquely identifies a shadow lod newLOD.switchValue = -1.0f; - bool isShadowCall = ( !stricmp( cmdname, "$shadowlod" ) ) ? true : false; + bool isShadowCall = ( !Q_stricmp( cmdname, "$shadowlod" ) ) ? true : false; if ( isShadowCall ) { @@ -5245,35 +5245,35 @@ while( 1 ) { GetToken( true ); - if( stricmp( "replacemodel", token ) == 0 ) + if( Q_stricmp( "replacemodel", token ) == 0 ) { Cmd_ReplaceModel(newLOD); } - else if( stricmp( "removemodel", token ) == 0 ) + else if( Q_stricmp( "removemodel", token ) == 0 ) { Cmd_RemoveModel(newLOD); } - else if( stricmp( "replacebone", token ) == 0 ) + else if( Q_stricmp( "replacebone", token ) == 0 ) { Cmd_ReplaceBone( newLOD ); } - else if( stricmp( "bonetreecollapse", token ) == 0 ) + else if( Q_stricmp( "bonetreecollapse", token ) == 0 ) { Cmd_BoneTreeCollapse( newLOD ); } - else if( stricmp( "replacematerial", token ) == 0 ) + else if( Q_stricmp( "replacematerial", token ) == 0 ) { Cmd_ReplaceMaterial( newLOD ); } - else if( stricmp( "removemesh", token ) == 0 ) + else if( Q_stricmp( "removemesh", token ) == 0 ) { Cmd_RemoveMesh( newLOD ); } - else if( stricmp( "nofacial", token ) == 0 ) + else if( Q_stricmp( "nofacial", token ) == 0 ) { newLOD.EnableFacialAnimation( false ); } - else if( stricmp( "facial", token ) == 0 ) + else if( Q_stricmp( "facial", token ) == 0 ) { if (isShadowCall) { @@ -5283,7 +5283,7 @@ newLOD.EnableFacialAnimation( true ); } - else if ( stricmp( "use_shadowlod_materials", token ) == 0 ) + else if ( Q_stricmp( "use_shadowlod_materials", token ) == 0 ) { if (isShadowCall) { @@ -5833,7 +5833,7 @@ return; } int i = sscanf( g_szLine, "%1023s \"%[^\"]\" \"%[^\"]\" \"%[^\"]\" \"%[^\"]\" %d", cmd, pBone->bonename, tmp, pBone->controlname, tmp, &pBone->axis ); - if (i == 6 && stricmp( cmd, "bone") == 0) + if (i == 6 && Q_stricmp( cmd, "bone") == 0) { // printf( "\"%s\" \"%s\" \"%s\" \"%s\"\n", cmd, pBone->bonename, tmp, pBone->controlname ); pAxis = pBone; @@ -5841,20 +5841,20 @@ g_numaxisinterpbones++; pBone = &g_axisinterpbones[g_numaxisinterpbones]; } - else if (stricmp( cmd, "display" ) == 0) + else if (Q_stricmp( cmd, "display" ) == 0) { // skip all display info } - else if (stricmp( cmd, "type" ) == 0) + else if (Q_stricmp( cmd, "type" ) == 0) { // skip all type info } - else if (stricmp( cmd, "basepos" ) == 0) + else if (Q_stricmp( cmd, "basepos" ) == 0) { i = sscanf( g_szLine, "basepos %f %f %f", &basepos.x, &basepos.y, &basepos.z ); // skip all type info } - else if (stricmp( cmd, "axis" ) == 0) + else if (Q_stricmp( cmd, "axis" ) == 0) { Vector pos; QAngle rot; @@ -5886,14 +5886,14 @@ return; } int i = sscanf( g_szLine, "%s %s %s %s %s", cmd, pBone->bonename, pBone->parentname, pBone->controlparentname, pBone->controlname ); - if (i == 5 && stricmp( cmd, "") == 0) + if (i == 5 && Q_stricmp( cmd, "") == 0) { // printf( "\"%s\" \"%s\" \"%s\" \"%s\"\n", cmd, pBone->bonename, tmp, pBone->controlname ); pAxis = pBone; g_numquatinterpbones++; pBone = &g_quatinterpbones[g_numquatinterpbones]; } - else if (stricmp( cmd, "" ) == 0) + else if (Q_stricmp( cmd, "" ) == 0) { // skip all display info Vector size; @@ -5913,12 +5913,12 @@ MdlError("unable to parse procedual bones\n"); } } - else if (stricmp( cmd, "" ) == 0) + else if (Q_stricmp( cmd, "" ) == 0) { i = sscanf( g_szLine, " %f %f %f", &basepos.x, &basepos.y, &basepos.z ); // skip all type info } - else if (stricmp( cmd, "" ) == 0) + else if (Q_stricmp( cmd, "" ) == 0) { float tolerance; RadianEuler trigger; @@ -5978,7 +5978,7 @@ char ext[32]; Q_ExtractFileExtension( filename, ext, sizeof( ext ) ); - if (stricmp( ext, "vrd") == 0) + if (Q_stricmp( ext, "vrd") == 0) { Grab_QuatInterpBones( ); } @@ -6227,7 +6227,7 @@ int i; for ( i=0; i < ARRAYSIZE( g_Commands ); i++ ) { - if ( !stricmp( g_Commands[i].m_pName, token ) ) + if ( !Q_stricmp( g_Commands[i].m_pName, token ) ) { g_Commands[i].m_pCmd(); break; @@ -6367,77 +6367,77 @@ { if (argv[i][0] == '-') { - if (!stricmp(argv[i], "-allowdebug")) + if (!Q_stricmp(argv[i], "-allowdebug")) { // Ignore, used by interface system to catch debug builds checked into release tree continue; } - if (!stricmp(argv[i], "-ihvtest")) + if (!Q_stricmp(argv[i], "-ihvtest")) { ++i; g_IHVTest = true; continue; } - if (!stricmp(argv[i], "-quiet")) + if (!Q_stricmp(argv[i], "-quiet")) { g_quiet = true; g_verbose = false; continue; } - if (!stricmp(argv[i], "-verbose")) + if (!Q_stricmp(argv[i], "-verbose")) { g_quiet = false; g_verbose = true; continue; } - if (!stricmp(argv[i], "-fullcollide")) + if (!Q_stricmp(argv[i], "-fullcollide")) { g_badCollide = true; continue; } - if (!stricmp(argv[i], "-checklengths")) + if (!Q_stricmp(argv[i], "-checklengths")) { g_bCheckLengths = true; continue; } - if (!stricmp(argv[i], "-printbones")) + if (!Q_stricmp(argv[i], "-printbones")) { g_bPrintBones = true; continue; } - if (!stricmp(argv[i], "-perf")) + if (!Q_stricmp(argv[i], "-perf")) { g_bPerf = true; continue; } - if (!stricmp(argv[i], "-printgraph")) + if (!Q_stricmp(argv[i], "-printgraph")) { g_bDumpGraph = true; continue; } - if (!stricmp(argv[i], "-definebones")) + if (!Q_stricmp(argv[i], "-definebones")) { g_definebones = true; continue; } - if (!stricmp(argv[i], "-makefile")) + if (!Q_stricmp(argv[i], "-makefile")) { g_bCreateMakefile = true; g_quiet = true; continue; } - if (!stricmp(argv[i], "-verify")) + if (!Q_stricmp(argv[i], "-verify")) { g_bVerifyOnly = true; continue; =================================================================== --- mod/src/utils/studiomdl/v1support.cpp 2005/02/18 04:46:00 1.1.1.1 +++ mod/src/utils/studiomdl/v1support.cpp 2005/10/01 05:49:18 @@ -248,7 +248,7 @@ strcpy( texturename, defaulttexture[i] ); break; } - if (stricmp( texturename, sourcetexture[i]) == 0) + if (Q_stricmp( texturename, sourcetexture[i]) == 0) { strcpy( texturename, defaulttexture[i] ); break; @@ -265,7 +265,7 @@ continue; } - if (stricmp( texturename, "null.bmp") == 0 || stricmp( texturename, "null.tga") == 0) + if (Q_stricmp( texturename, "null.bmp") == 0 || Q_stricmp( texturename, "null.tga") == 0) { // skip all faces with the null texture on them. fgets( g_szLine, sizeof( g_szLine ), g_fpInput ); =================================================================== --- mod/src/utils/studiomdl/write.cpp 2005/03/26 17:44:33 1.2 +++ mod/src/utils/studiomdl/write.cpp 2005/10/02 03:10:11 @@ -161,7 +161,7 @@ int index2 = *(byte *)elem2; // compare bones by name - return strcmpi( g_bonetable[index1].name, g_bonetable[index2].name ); + return Q_stricmp( g_bonetable[index1].name, g_bonetable[index2].name ); } @@ -1771,7 +1771,7 @@ IMaterialVar *clientShaderVar = pMaterial->FindVar( "$clientShader", &found, false ); if( found ) { - if (stricmp( clientShaderVar->GetStringValue(), "MouthShader") == 0) + if (Q_stricmp( clientShaderVar->GetStringValue(), "MouthShader") == 0) { phdr->pTexture( i )->flags = 1; } =================================================================== --- mod/src/utils/vbsp/map.cpp 2005/02/18 04:46:00 1.1.1.1 +++ mod/src/utils/vbsp/map.cpp 2005/10/02 06:11:14 @@ -739,7 +739,7 @@ //----------------------------------------------------------------------------- ChunkFileResult_t LoadDispDistancesKeyCallback(const char *szKey, const char *szValue, mapdispinfo_t *pMapDispInfo) { - if (!strnicmp(szKey, "row", 3)) + if (!Q_strnicmp(szKey, "row", 3)) { char szBuf[MAX_KEYVALUE_LEN]; strcpy(szBuf, szValue); @@ -817,33 +817,33 @@ //----------------------------------------------------------------------------- ChunkFileResult_t LoadDispInfoKeyCallback(const char *szKey, const char *szValue, mapdispinfo_t *pMapDispInfo) { - if (!stricmp(szKey, "power")) + if (!Q_stricmp(szKey, "power")) { CChunkFile::ReadKeyValueInt(szValue, pMapDispInfo->power); } - else if (!stricmp(szKey, "uaxis")) + else if (!Q_stricmp(szKey, "uaxis")) { CChunkFile::ReadKeyValueVector3(szValue, pMapDispInfo->uAxis); } - else if (!stricmp(szKey, "vaxis")) + else if (!Q_stricmp(szKey, "vaxis")) { CChunkFile::ReadKeyValueVector3(szValue, pMapDispInfo->vAxis); } - else if( !stricmp( szKey, "startposition" ) ) + else if( !Q_stricmp( szKey, "startposition" ) ) { CChunkFile::ReadKeyValueVector3( szValue, pMapDispInfo->startPosition ); } #if 0 // old data - else if (!stricmp( szKey, "alpha" ) ) + else if (!Q_stricmp( szKey, "alpha" ) ) { CChunkFile::ReadKeyValueVector4( szValue, pMapDispInfo->alphaValues ); } #endif - else if (!stricmp(szKey, "mintess")) + else if (!Q_stricmp(szKey, "mintess")) { CChunkFile::ReadKeyValueInt(szValue, pMapDispInfo->minTess); } - else if (!stricmp(szKey, "smooth")) + else if (!Q_stricmp(szKey, "smooth")) { CChunkFile::ReadKeyValueFloat(szValue, pMapDispInfo->smoothingAngle); } @@ -873,7 +873,7 @@ //----------------------------------------------------------------------------- ChunkFileResult_t LoadDispNormalsKeyCallback(const char *szKey, const char *szValue, mapdispinfo_t *pMapDispInfo) { - if (!strnicmp(szKey, "row", 3)) + if (!Q_strnicmp(szKey, "row", 3)) { char szBuf[MAX_KEYVALUE_LEN]; strcpy(szBuf, szValue); @@ -927,7 +927,7 @@ //----------------------------------------------------------------------------- ChunkFileResult_t LoadDispOffsetsKeyCallback(const char *szKey, const char *szValue, mapdispinfo_t *pMapDispInfo) { - if (!strnicmp(szKey, "row", 3)) + if (!Q_strnicmp(szKey, "row", 3)) { char szBuf[MAX_KEYVALUE_LEN]; strcpy(szBuf, szValue); @@ -981,7 +981,7 @@ //----------------------------------------------------------------------------- ChunkFileResult_t LoadDispAlphasKeyCallback(const char *szKey, const char *szValue, mapdispinfo_t *pMapDispInfo) { - if (!strnicmp(szKey, "row", 3)) + if (!Q_strnicmp(szKey, "row", 3)) { char szBuf[MAX_KEYVALUE_LEN]; strcpy(szBuf, szValue); @@ -1015,7 +1015,7 @@ //----------------------------------------------------------------------------- ChunkFileResult_t LoadDispTriangleTagsKeyCallback(const char *szKey, const char *szValue, mapdispinfo_t *pMapDispInfo) { - if ( !strnicmp( szKey, "row", 3 ) ) + if ( !Q_strnicmp( szKey, "row", 3 ) ) { char szBuf[MAX_KEYVALUE_LEN]; strcpy( szBuf, szValue ); @@ -1422,7 +1422,7 @@ entity_t *e = &entities[i]; const char *pName = ValueForKey( e, "targetname" ); - if( stricmp( pName, pTestName ) == 0 ) + if( Q_stricmp( pName, pTestName ) == 0 ) return e; } @@ -1724,7 +1724,7 @@ //----------------------------------------------------------------------------- ChunkFileResult_t LoadSideKeyCallback(const char *szKey, const char *szValue, LoadSide_t *pSideInfo) { - if (!stricmp(szKey, "plane")) + if (!Q_stricmp(szKey, "plane")) { int nRead = sscanf(szValue, "(%f %f %f) (%f %f %f) (%f %f %f)", &pSideInfo->planepts[0][0], &pSideInfo->planepts[0][1], &pSideInfo->planepts[0][2], @@ -1736,7 +1736,7 @@ g_MapError.ReportError("parsing plane definition"); } } - else if (!stricmp(szKey, "material")) + else if (!Q_stricmp(szKey, "material")) { // Get the material name. strcpy(pSideInfo->td.name, szValue); @@ -1750,7 +1750,7 @@ pSideInfo->pSide->contents = textureref[mt].contents; pSideInfo->pSide->surf = pSideInfo->td.flags; } - else if (!stricmp(szKey, "uaxis")) + else if (!Q_stricmp(szKey, "uaxis")) { int nRead = sscanf(szValue, "[%f %f %f %f] %f", &pSideInfo->td.UAxis[0], &pSideInfo->td.UAxis[1], &pSideInfo->td.UAxis[2], &pSideInfo->td.shift[0], &pSideInfo->td.textureWorldUnitsPerTexel[0]); if (nRead != 5) @@ -1758,7 +1758,7 @@ g_MapError.ReportError("parsing U axis definition"); } } - else if (!stricmp(szKey, "vaxis")) + else if (!Q_stricmp(szKey, "vaxis")) { int nRead = sscanf(szValue, "[%f %f %f %f] %f", &pSideInfo->td.VAxis[0], &pSideInfo->td.VAxis[1], &pSideInfo->td.VAxis[2], &pSideInfo->td.shift[1], &pSideInfo->td.textureWorldUnitsPerTexel[1]); if (nRead != 5) @@ -1766,7 +1766,7 @@ g_MapError.ReportError("parsing V axis definition"); } } - else if (!stricmp(szKey, "lightmapscale")) + else if (!Q_stricmp(szKey, "lightmapscale")) { pSideInfo->td.lightmapWorldUnitsPerLuxel = atoi(szValue); if (pSideInfo->td.lightmapWorldUnitsPerLuxel == 0.0f) @@ -1776,20 +1776,20 @@ } pSideInfo->td.lightmapWorldUnitsPerLuxel *= g_luxelScale; } - else if (!stricmp(szKey, "contents")) + else if (!Q_stricmp(szKey, "contents")) { pSideInfo->pSide->contents |= atoi(szValue); } - else if (!stricmp(szKey, "flags")) + else if (!Q_stricmp(szKey, "flags")) { pSideInfo->td.flags |= atoi(szValue); pSideInfo->pSide->surf = pSideInfo->td.flags; } - else if (!stricmp(szKey, "id")) + else if (!Q_stricmp(szKey, "id")) { pSideInfo->pSide->id = atoi( szValue ); } - else if (!stricmp(szKey, "smoothing_groups")) + else if (!Q_stricmp(szKey, "smoothing_groups")) { pSideInfo->pSide->smoothingGroups = atoi( szValue ); } @@ -1997,7 +1997,7 @@ //----------------------------------------------------------------------------- ChunkFileResult_t LoadSolidKeyCallback(const char *szKey, const char *szValue, mapbrush_t *pLoadBrush) { - if (!stricmp(szKey, "id")) + if (!Q_stricmp(szKey, "id")) { pLoadBrush->id = atoi(szValue); g_MapError.BrushState(pLoadBrush->id); =================================================================== --- mod/src/utils/vbsp/materialpatch.cpp 2005/02/18 04:46:00 1.1.1.1 +++ mod/src/utils/vbsp/materialpatch.cpp 2005/10/01 05:49:19 @@ -327,7 +327,7 @@ static void ExpandPatchFile( KeyValues& keyValues ) { int nCount = 0; - while( nCount < 10 && stricmp( keyValues.GetName(), "patch" ) == 0 ) + while( nCount < 10 && Q_stricmp( keyValues.GetName(), "patch" ) == 0 ) { // WriteKeyValuesToFile( "patch.txt", keyValues ); const char *pIncludeFileName = keyValues.GetString( "include" ); =================================================================== --- mod/src/utils/vbsp/vbsp.cpp 2005/02/18 04:46:00 1.1.1.1 +++ mod/src/utils/vbsp/vbsp.cpp 2005/10/01 05:49:19 @@ -857,132 +857,132 @@ for (i=1 ; iGetName(), controlKeys->GetName())) + if (!Q_stricmp(panel->GetName(), controlKeys->GetName())) { // apply the settings panel->ApplySettings(controlKeys); @@ -1060,7 +1060,7 @@ for ( int i = 0; i < _panelDar.Count(); i++ ) { Panel *panel = _panelDar[i].Get(); - if (!stricmp(panel->GetName(), fieldName) ) + if (!Q_stricmp(panel->GetName(), fieldName) ) { return panel; } @@ -1100,7 +1100,7 @@ } // Don't save the setting of the buildmodedialog - if (!stricmp(panel->GetName(), "BuildDialog")) + if (!Q_stricmp(panel->GetName(), "BuildDialog")) continue; // get the keys section from the data file =================================================================== --- mod/src/vgui2/controls/BuildModeDialog.cpp 2005/02/18 04:46:01 1.1.1.1 +++ mod/src/vgui2/controls/BuildModeDialog.cpp 2005/10/01 05:49:21 @@ -150,7 +150,7 @@ virtual void OnCommand(const char *command) { - if (!stricmp(command, "OK")) + if (!Q_stricmp(command, "OK")) { //!! apply changes } @@ -464,23 +464,23 @@ // default the data type to a string int datat = TYPE_STRING; - if (!stricmp(dataType, "int")) + if (!Q_stricmp(dataType, "int")) { datat = TYPE_STRING; //!! just for now } - else if (!stricmp(dataType, "alignment")) + else if (!Q_stricmp(dataType, "alignment")) { datat = TYPE_ALIGNMENT; } - else if (!stricmp(dataType, "autoresize")) + else if (!Q_stricmp(dataType, "autoresize")) { datat = TYPE_AUTORESIZE; } - else if (!stricmp(dataType, "corner")) + else if (!Q_stricmp(dataType, "corner")) { datat = TYPE_CORNER; } - else if (!stricmp(dataType, "localize")) + else if (!Q_stricmp(dataType, "localize")) { datat = TYPE_LOCALIZEDSTRING; } @@ -657,7 +657,7 @@ //----------------------------------------------------------------------------- void BuildModeDialog::OnCommand(const char *command) { - if (!stricmp(command, "Save")) + if (!Q_stricmp(command, "Save")) { // apply the current data and save it to disk ApplyDataToControls(); @@ -667,25 +667,25 @@ m_pSaveButton->SetEnabled(false); } } - else if (!stricmp(command, "Exit")) + else if (!Q_stricmp(command, "Exit")) { // exit build mode ExitBuildMode(); } - else if (!stricmp(command, "Apply")) + else if (!Q_stricmp(command, "Apply")) { // apply data to controls ApplyDataToControls(); } - else if (!stricmp(command, "DeletePanel")) + else if (!Q_stricmp(command, "DeletePanel")) { OnDeletePanel(); } - else if (!stricmp(command, "RevertToSaved")) + else if (!Q_stricmp(command, "RevertToSaved")) { RevertToSaved(); } - else if (!stricmp(command, "ShowHelp")) + else if (!Q_stricmp(command, "ShowHelp")) { ShowHelp(); } @@ -936,7 +936,7 @@ char newFile[512]; m_pFileSelectionCombo->GetText(newFile, sizeof(newFile)); - if (stricmp(newFile, m_pBuildGroup->GetResourceName()) != 0) + if (Q_stricmp(newFile, m_pBuildGroup->GetResourceName()) != 0) { // file has changed, reload SetActiveControl(NULL); @@ -949,7 +949,7 @@ { char buf[40]; m_pAddNewControlCombo->GetText(buf, 40); - if (stricmp(buf, "None") != 0) + if (Q_stricmp(buf, "None") != 0) { OnNewControl(buf); // reset box back to None =================================================================== --- mod/src/vgui2/controls/Button.cpp 2005/02/18 04:46:01 1.1.1.1 +++ mod/src/vgui2/controls/Button.cpp 2005/10/02 06:11:19 @@ -619,8 +619,8 @@ if (_actionMessage) { // see if it's a url - if (!stricmp(_actionMessage->GetName(), "command") - && !strnicmp(_actionMessage->GetString("command", ""), "url ", strlen("url ")) + if (!Q_stricmp(_actionMessage->GetName(), "command") + && !Q_strnicmp(_actionMessage->GetString("command", ""), "url ", strlen("url ")) && strstr(_actionMessage->GetString("command", ""), "://")) { // it's a command to launch a url, run it @@ -635,17 +635,17 @@ //----------------------------------------------------------------------------- bool Button::RequestInfo(KeyValues *outputData) { - if (!stricmp(outputData->GetName(), "CanBeDefaultButton")) + if (!Q_stricmp(outputData->GetName(), "CanBeDefaultButton")) { outputData->SetInt("result", CanBeDefaultButton() ? 1 : 0); return true; } - else if (!stricmp(outputData->GetName(), "GetState")) + else if (!Q_stricmp(outputData->GetName(), "GetState")) { outputData->SetInt("state", IsSelected()); return true; } - else if ( !stricmp( outputData->GetName(), "GetCommand" )) + else if ( !Q_stricmp( outputData->GetName(), "GetCommand" )) { if ( _actionMessage ) { =================================================================== --- mod/src/vgui2/controls/ComboBox.cpp 2005/02/18 04:46:01 1.1.1.1 +++ mod/src/vgui2/controls/ComboBox.cpp 2005/10/01 05:49:21 @@ -471,7 +471,7 @@ //----------------------------------------------------------------------------- void ComboBox::OnCommand( const char *command ) { - if (!stricmp(command, "ButtonClicked")) + if (!Q_stricmp(command, "ButtonClicked")) { // hide / show the menu underneath DoClick(); =================================================================== --- mod/src/vgui2/controls/DirectorySelectDialog.cpp 2005/09/12 00:30:36 1.2 +++ mod/src/vgui2/controls/DirectorySelectDialog.cpp 2005/10/01 05:49:21 @@ -98,7 +98,7 @@ virtual void OnCommand(const char *command) { - if (!stricmp(command, "OK")) + if (!Q_stricmp(command, "OK")) { PostActionSignal(new KeyValues("CreateDirectory", "dir", GetControlString("NameEntry"))); Close(); @@ -236,7 +236,7 @@ { kv->SetString("drive", pBuf); int itemID = m_pDriveCombo->AddItem(pBuf, kv); - if (!stricmp(pBuf, m_szCurrentDrive)) + if (!Q_stricmp(pBuf, m_szCurrentDrive)) { m_pDriveCombo->ActivateItem(itemID); } @@ -379,7 +379,7 @@ if (!kv) return; const char *newDrive = kv->GetString("drive"); - if (stricmp(newDrive, m_szCurrentDrive)) + if (Q_stricmp(newDrive, m_szCurrentDrive)) { // drive changed, reset SetStartDirectory(newDrive); @@ -435,11 +435,11 @@ //----------------------------------------------------------------------------- void DirectorySelectDialog::OnCommand(const char *command) { - if (!stricmp(command, "Cancel")) + if (!Q_stricmp(command, "Cancel")) { Close(); } - else if (!stricmp(command, "Select")) + else if (!Q_stricmp(command, "Select")) { // path selected int selectedIndex = m_pDirTree->GetSelectedItem(); @@ -451,7 +451,7 @@ Close(); } } - else if (!stricmp(command, "Create")) + else if (!Q_stricmp(command, "Create")) { int selectedIndex = m_pDirTree->GetSelectedItem(); if (m_pDirTree->IsItemIDValid(selectedIndex)) =================================================================== --- mod/src/vgui2/controls/EditablePanel.cpp 2005/02/18 04:46:01 1.1.1.1 +++ mod/src/vgui2/controls/EditablePanel.cpp 2005/10/01 05:49:21 @@ -611,14 +611,14 @@ //----------------------------------------------------------------------------- bool EditablePanel::RequestInfo(KeyValues *data) { - if (!stricmp(data->GetName(), "BuildDialog")) + if (!Q_stricmp(data->GetName(), "BuildDialog")) { // a build dialog is being requested, give it one // a bit hacky, but this is a case where vgui.dll needs to reach out data->SetPtr("PanelPtr", new BuildModeDialog((BuildGroup *)data->GetPtr("BuildGroupPtr"))); return true; } - else if (!stricmp(data->GetName(), "ControlFactory")) + else if (!Q_stricmp(data->GetName(), "ControlFactory")) { Panel *newPanel = CreateControlByName(data->GetString("ControlName")); if (newPanel) @@ -966,83 +966,83 @@ //----------------------------------------------------------------------------- Panel *EditablePanel::CreateControlByName(const char *controlName) { - if (!stricmp(controlName, "Label")) + if (!Q_stricmp(controlName, "Label")) { return new Label(NULL, NULL, "Label"); } - else if (!stricmp(controlName, "Button")) + else if (!Q_stricmp(controlName, "Button")) { return new Button(NULL, NULL, "Button"); } - else if (!stricmp(controlName, "CheckButton")) + else if (!Q_stricmp(controlName, "CheckButton")) { return new CheckButton(NULL, NULL, "CheckButton"); } - else if (!stricmp(controlName, "ComboBox")) + else if (!Q_stricmp(controlName, "ComboBox")) { return new ComboBox(NULL, NULL, 5, true); } - else if (!stricmp(controlName, "Menu")) + else if (!Q_stricmp(controlName, "Menu")) { return new Menu(NULL, "Menu"); } - else if (!stricmp(controlName, "MenuItem")) + else if (!Q_stricmp(controlName, "MenuItem")) { return new MenuItem(NULL, NULL, "MenuItem"); } - else if (!stricmp(controlName, "MessageBox")) + else if (!Q_stricmp(controlName, "MessageBox")) { return new MessageBox("MessageBox", "MessageBoxText"); } - else if (!stricmp(controlName, "ProgressBar")) + else if (!Q_stricmp(controlName, "ProgressBar")) { return new ProgressBar(NULL, NULL); } - else if (!stricmp(controlName, "RadioButton")) + else if (!Q_stricmp(controlName, "RadioButton")) { return new RadioButton(NULL, NULL, "RadioButton"); } - else if (!stricmp(controlName, "ScrollBar")) + else if (!Q_stricmp(controlName, "ScrollBar")) { return new ScrollBar(NULL, NULL, false); } - else if (!stricmp(controlName, "TextEntry")) + else if (!Q_stricmp(controlName, "TextEntry")) { return new TextEntry(NULL, NULL); } - else if (!stricmp(controlName, "RichText")) + else if (!Q_stricmp(controlName, "RichText")) { return new RichText(NULL, NULL); } - else if (!stricmp(controlName, "ToggleButton")) + else if (!Q_stricmp(controlName, "ToggleButton")) { return new ToggleButton(NULL, NULL, "ToggleButton"); } - else if (!stricmp(controlName, "ImagePanel")) + else if (!Q_stricmp(controlName, "ImagePanel")) { return new ImagePanel(NULL, "ResourceImagePanel"); } - else if (!stricmp(controlName, "AnimatingImagePanel")) + else if (!Q_stricmp(controlName, "AnimatingImagePanel")) { return new AnimatingImagePanel(NULL, NULL); } - else if (!stricmp(controlName, "Panel")) + else if (!Q_stricmp(controlName, "Panel")) { return new Panel(NULL, NULL); } - else if (!stricmp(controlName, "Divider")) + else if (!Q_stricmp(controlName, "Divider")) { return new Divider(NULL, "Divider"); } - else if (!stricmp(controlName, "URLLabel")) + else if (!Q_stricmp(controlName, "URLLabel")) { return new URLLabel(NULL, NULL, "URLLabel", NULL); } - else if (!stricmp(controlName, "EditablePanel")) + else if (!Q_stricmp(controlName, "EditablePanel")) { return new EditablePanel(NULL, NULL); } - else if (!stricmp(controlName, "BitmapImagePanel")) + else if (!Q_stricmp(controlName, "BitmapImagePanel")) { return new CBitmapImagePanel(NULL, "BitmapImagePanel"); } =================================================================== --- mod/src/vgui2/controls/FileOpenDialog.cpp 2005/02/18 04:46:01 1.1.1.1 +++ mod/src/vgui2/controls/FileOpenDialog.cpp 2005/10/02 06:14:29 @@ -53,7 +53,7 @@ const char *string1 = kv1->GetString("text"); const char *string2 = kv2->GetString("text"); - return stricmp(string1, string2) < 0; + return Q_stricmp(string1, string2) < 0; } namespace vgui @@ -428,7 +428,7 @@ m_pFullPathEdit->AddItem(pBuf, NULL); // is this our drive - add all subdirectories - if (!_strnicmp(pBuf, fullpath, 2)) + if (!Q_strnicmp(pBuf, fullpath, 2)) { int indent = 0; char *pData = fullpath; @@ -469,11 +469,11 @@ //----------------------------------------------------------------------------- void FileOpenDialog::OnCommand(const char *command) { - if (!stricmp(command, "Open")) + if (!Q_stricmp(command, "Open")) { OnOpen(); } - else if (!stricmp(command, "FolderUp")) + else if (!Q_stricmp(command, "FolderUp")) { MoveUpFolder(); OnOpen(); @@ -745,7 +745,7 @@ GetCurrentDirectory(fullpath, sizeof(fullpath) - MAX_PATH); strcat(fullpath, filename); - if (!stricmp(filename, "..")) + if (!Q_stricmp(filename, "..")) { MoveUpFolder(); =================================================================== --- mod/src/vgui2/controls/Frame.cpp 2005/02/18 04:46:01 1.1.1.1 +++ mod/src/vgui2/controls/Frame.cpp 2005/10/01 05:49:21 @@ -1477,15 +1477,15 @@ //----------------------------------------------------------------------------- void Frame::OnCommand(const char *command) { - if (!stricmp(command, "Close")) + if (!Q_stricmp(command, "Close")) { Close(); } - else if (!stricmp(command, "Minimize")) + else if (!Q_stricmp(command, "Minimize")) { OnMinimize(); } - else if (!stricmp(command, "MinimizeToSysTray")) + else if (!Q_stricmp(command, "MinimizeToSysTray")) { OnMinimizeToSysTray(); } =================================================================== --- mod/src/vgui2/controls/HTML.cpp 2005/06/11 22:14:38 1.2 +++ mod/src/vgui2/controls/HTML.cpp 2005/10/02 06:11:20 @@ -548,7 +548,7 @@ bool bURLHandled = false; for (int i = 0; i < m_CustomURLHandlers.Count(); i++) { - if (!strnicmp(m_CustomURLHandlers[i].url, url, strlen(m_CustomURLHandlers[i].url))) + if (!Q_strnicmp(m_CustomURLHandlers[i].url, url, strlen(m_CustomURLHandlers[i].url))) { // we have a custom handler Panel *target = m_CustomURLHandlers[i].hPanel; @@ -566,7 +566,7 @@ if ( m_bNewWindowsOnly ) { - if ( target && ( !stricmp( target, "_blank" ) || !stricmp( target, "_new" ) ) ) // only allow NEW windows (_blank ones) + if ( target && ( !Q_stricmp( target, "_blank" ) || !Q_stricmp( target, "_new" ) ) ) // only allow NEW windows (_blank ones) { return true; } =================================================================== --- mod/src/vgui2/controls/Label.cpp 2005/06/11 22:14:38 1.2 +++ mod/src/vgui2/controls/Label.cpp 2005/10/02 06:11:20 @@ -730,7 +730,7 @@ //----------------------------------------------------------------------------- bool Label::RequestInfo(KeyValues *outputData) { - if (!stricmp(outputData->GetName(), "GetText")) + if (!Q_stricmp(outputData->GetName(), "GetText")) { wchar_t wbuf[256]; _textImage->GetText(wbuf, 255); @@ -1000,7 +1000,7 @@ // label settings char buf[256]; _textImage->GetUnlocalizedText( buf, 255 ); - if (!strnicmp(buf, "#var_", 5)) + if (!Q_strnicmp(buf, "#var_", 5)) { // strip off the variable prepender on save outResourceData->SetString( "labelText", buf + 5 ); @@ -1075,39 +1075,39 @@ const char *alignmentString = inResourceData->GetString( "textAlignment", "" ); int align = -1; - if ( !stricmp(alignmentString, "north-west") ) + if ( !Q_stricmp(alignmentString, "north-west") ) { align = a_northwest; } - else if ( !stricmp(alignmentString, "north") ) + else if ( !Q_stricmp(alignmentString, "north") ) { align = a_north; } - else if ( !stricmp(alignmentString, "north-east") ) + else if ( !Q_stricmp(alignmentString, "north-east") ) { align = a_northeast; } - else if ( !stricmp(alignmentString, "west") ) + else if ( !Q_stricmp(alignmentString, "west") ) { align = a_west; } - else if ( !stricmp(alignmentString, "center") ) + else if ( !Q_stricmp(alignmentString, "center") ) { align = a_center; } - else if ( !stricmp(alignmentString, "east") ) + else if ( !Q_stricmp(alignmentString, "east") ) { align = a_east; } - else if ( !stricmp(alignmentString, "south-west") ) + else if ( !Q_stricmp(alignmentString, "south-west") ) { align = a_southwest; } - else if ( !stricmp(alignmentString, "south") ) + else if ( !Q_stricmp(alignmentString, "south") ) { align = a_south; } - else if ( !stricmp(alignmentString, "south-east") ) + else if ( !Q_stricmp(alignmentString, "south-east") ) { align = a_southeast; } =================================================================== --- mod/src/vgui2/controls/ListPanel.cpp 2005/02/18 04:46:01 1.1.1.1 +++ mod/src/vgui2/controls/ListPanel.cpp 2005/10/01 05:49:22 @@ -801,7 +801,7 @@ { for (int i = 0; i < m_CurrentColumns.Count(); i++) { - if (!stricmp(columnName, m_ColumnsData[m_CurrentColumns[i]].m_pHeader->GetName())) + if (!Q_stricmp(columnName, m_ColumnsData[m_CurrentColumns[i]].m_pHeader->GetName())) { return i; } @@ -882,7 +882,7 @@ { FOR_EACH_LL( m_DataItems, i ) { - if (!stricmp(m_DataItems[i]->kv->GetName(), itemName)) + if (!Q_stricmp(m_DataItems[i]->kv->GetName(), itemName)) { return i; } =================================================================== --- mod/src/vgui2/controls/ListViewPanel.cpp 2005/02/18 04:46:01 1.1.1.1 +++ mod/src/vgui2/controls/ListViewPanel.cpp 2005/10/02 06:11:20 @@ -1022,7 +1022,7 @@ { KeyValues *kv = m_DataItems[ m_SortedItems[i] ]->GetData(); const char *pszText = kv->GetString("text"); - if (!strnicmp(pszText, buf, 1)) + if (!Q_strnicmp(pszText, buf, 1)) { // select the next of this letter SetSingleSelectedItem(m_SortedItems[i]); @@ -1041,7 +1041,7 @@ KeyValues *kv = m_DataItems[ m_SortedItems[i] ]->GetData(); const char *pszText = kv->GetString("text"); - if (!strnicmp(pszText, buf, 1)) + if (!Q_strnicmp(pszText, buf, 1)) { SetSingleSelectedItem(m_SortedItems[i]); ScrollToItem(m_SortedItems[i]); =================================================================== --- mod/src/vgui2/controls/Panel.cpp 2005/02/18 04:46:01 1.1.1.1 +++ mod/src/vgui2/controls/Panel.cpp 2005/10/02 06:11:21 @@ -745,7 +745,7 @@ if (!pChild) continue; - if (!stricmp(pChild->GetName(), childName)) + if (!Q_stricmp(pChild->GetName(), childName)) { return pChild; } @@ -773,7 +773,7 @@ { VPANEL sibling = ipanel()->GetChild(GetVParent(), i); Panel *panel = ipanel()->GetPanel(sibling, GetControlsModuleName()); - if (!stricmp(panel->GetName(), siblingName)) + if (!Q_stricmp(panel->GetName(), siblingName)) { return panel; } @@ -3045,7 +3045,7 @@ { void *data = ( void * )( (*entry->m_pfnLookup)( panel ) ); bool b = false; - if ( !stricmp( entry->defaultvalue(), "true" )|| + if ( !Q_stricmp( entry->defaultvalue(), "true" )|| atoi( entry->defaultvalue() )!= 0 ) { b = true; @@ -3298,7 +3298,7 @@ { PanelAnimationMapEntry *e = &map->entries[ i ]; - if ( !stricmp( e->name(), scriptname ) ) + if ( !Q_stricmp( e->name(), scriptname ) ) { return e; } @@ -3444,7 +3444,7 @@ char const *CPanelMessageMapDictionary::StripNamespace( char const *className ) { - if ( !strnicmp( className, "vgui::", 6 ) ) + if ( !Q_strnicmp( className, "vgui::", 6 ) ) { return className + 6; } =================================================================== --- mod/src/vgui2/controls/ProgressBox.cpp 2005/02/18 04:46:02 1.1.1.1 +++ mod/src/vgui2/controls/ProgressBox.cpp 2005/10/01 05:49:22 @@ -289,7 +289,7 @@ //----------------------------------------------------------------------------- void ProgressBox::OnCommand(const char *command) { - if (!stricmp(command, "Cancel")) + if (!Q_stricmp(command, "Cancel")) { OnCancel(); } =================================================================== --- mod/src/vgui2/controls/PropertyDialog.cpp 2005/02/18 04:46:02 1.1.1.1 +++ mod/src/vgui2/controls/PropertyDialog.cpp 2005/10/01 05:49:22 @@ -137,7 +137,7 @@ //----------------------------------------------------------------------------- void PropertyDialog::OnCommand(const char *command) { - if (!stricmp(command, "OK")) + if (!Q_stricmp(command, "OK")) { if ( OnOK(false) ) { @@ -145,12 +145,12 @@ } _applyButton->SetEnabled(false); } - else if (!stricmp(command, "Cancel")) + else if (!Q_stricmp(command, "Cancel")) { OnCancel(); Close(); } - else if (!stricmp(command, "Apply")) + else if (!Q_stricmp(command, "Apply")) { OnOK(true); _applyButton->SetEnabled(false); =================================================================== --- mod/src/vgui2/controls/PropertySheet.cpp 2005/02/18 04:46:02 1.1.1.1 +++ mod/src/vgui2/controls/PropertySheet.cpp 2005/10/02 06:11:21 @@ -588,7 +588,7 @@ { char tmp[50]; m_PageTabs[i]->GetText(tmp,50); - if (!strnicmp(title,tmp,strlen(tmp))) + if (!Q_strnicmp(title,tmp,strlen(tmp))) { m_PageTabs[i]->SetEnabled(state); } @@ -823,7 +823,7 @@ void PropertySheet::OnCommand(const char *command) { // propogate the close command to our parent - if (!stricmp(command, "Close") && GetVParent()) + if (!Q_stricmp(command, "Close") && GetVParent()) { CallParentFunction(new KeyValues("Command", "command", command)); } =================================================================== --- mod/src/vgui2/controls/QueryBox.cpp 2005/02/18 04:46:02 1.1.1.1 +++ mod/src/vgui2/controls/QueryBox.cpp 2005/10/01 05:49:22 @@ -111,7 +111,7 @@ //----------------------------------------------------------------------------- void QueryBox::OnCommand(const char *command) { - if (!stricmp(command, "OK")) + if (!Q_stricmp(command, "OK")) { OnCommand("Close"); @@ -120,7 +120,7 @@ PostActionSignal(m_pOkCommand->MakeCopy()); } } - else if (!stricmp(command, "Cancel")) + else if (!Q_stricmp(command, "Cancel")) { OnCommand("Close"); =================================================================== --- mod/src/vgui2/controls/RichText.cpp 2005/06/11 22:14:38 1.2 +++ mod/src/vgui2/controls/RichText.cpp 2005/10/02 06:14:29 @@ -1873,7 +1873,7 @@ //----------------------------------------------------------------------------- bool RichText::RequestInfo(KeyValues *outputData) { - if (!stricmp(outputData->GetName(), "GetText")) + if (!Q_stricmp(outputData->GetName(), "GetText")) { wchar_t wbuf[512]; GetText(0, wbuf, sizeof(wbuf)); @@ -2091,7 +2091,7 @@ { bool bURLFound = false; - if (!_strnicmp(text + i, "www.", 4)) + if (!Q_strnicmp(text + i, "www.", 4)) { // scan ahead for another '.' bool bPeriodFound = false; @@ -2110,19 +2110,19 @@ bURLFound = true; } } - else if (!_strnicmp(text + i, "http://", 7)) + else if (!Q_strnicmp(text + i, "http://", 7)) { bURLFound = true; } - else if (!_strnicmp(text + i, "ftp://", 6)) + else if (!Q_strnicmp(text + i, "ftp://", 6)) { bURLFound = true; } - else if (!_strnicmp(text + i, "mailto:", 7)) + else if (!Q_strnicmp(text + i, "mailto:", 7)) { bURLFound = true; } - else if (!_strnicmp(text + i, "\\\\", 2)) + else if (!Q_strnicmp(text + i, "\\\\", 2)) { bURLFound = true; } =================================================================== --- mod/src/vgui2/controls/SectionedListPanel.cpp 2005/02/18 04:46:02 1.1.1.1 +++ mod/src/vgui2/controls/SectionedListPanel.cpp 2005/10/01 05:49:22 @@ -1010,7 +1010,7 @@ int columnIndex; for (columnIndex = 0; columnIndex < section.m_Columns.Count(); columnIndex++) { - if (!stricmp(section.m_Columns[columnIndex].m_szColumnName, columnName)) + if (!Q_stricmp(section.m_Columns[columnIndex].m_szColumnName, columnName)) break; } if (!section.m_Columns.IsValidIndex(columnIndex)) =================================================================== --- mod/src/vgui2/controls/TextEntry.cpp 2005/09/12 00:30:36 1.2 +++ mod/src/vgui2/controls/TextEntry.cpp 2005/10/01 05:49:22 @@ -3387,14 +3387,14 @@ //----------------------------------------------------------------------------- bool TextEntry::RequestInfo(KeyValues *outputData) { - if (!stricmp(outputData->GetName(), "GetText")) + if (!Q_stricmp(outputData->GetName(), "GetText")) { wchar_t wbuf[256]; GetText(wbuf, 255); outputData->SetWString("text", wbuf); return true; } - else if (!stricmp(outputData->GetName(), "GetState")) + else if (!Q_stricmp(outputData->GetName(), "GetState")) { wchar_t wbuf[64]; GetText(wbuf, sizeof(wbuf)); =================================================================== --- mod/src/vgui2/controls/WizardPanel.cpp 2005/02/18 04:46:02 1.1.1.1 +++ mod/src/vgui2/controls/WizardPanel.cpp 2005/10/01 05:49:22 @@ -647,7 +647,7 @@ //----------------------------------------------------------------------------- void WizardPanel::OnCommand(const char *command) { - if (!stricmp(command, "Cancel")) + if (!Q_stricmp(command, "Cancel")) { if (_cancelButton->IsEnabled()) {