diff --git a/src/plugins/Shared/GameMaterial.cpp b/src/plugins/Shared/GameMaterial.cpp index 399f0f6a003..2cd0f175432 100644 --- a/src/plugins/Shared/GameMaterial.cpp +++ b/src/plugins/Shared/GameMaterial.cpp @@ -1239,7 +1239,7 @@ XRayMtl::XRayMtl(BOOL loading) : mReshadeRQ(RR_None), mInRQ(RR_None) // mjm - 06 for ( int i = 0; i < 12; ++i ) stdIDToChannel[i] = -1; - for ( i = 0; i < STD2_NMAX_TEXMAPS; ++i ) + for (int i = 0; i < STD2_NMAX_TEXMAPS; ++i ) channelTypes[i] = UNSUPPORTED_CHANNEL; ivalid.SetEmpty(); @@ -1312,7 +1312,7 @@ RefTargetHandle XRayMtl::Clone(RemapDir &remap) { for ( int i = 0; i < 12; ++i ) mnew->stdIDToChannel[i] = stdIDToChannel[i]; - for ( i = 0; i < STD2_NMAX_TEXMAPS; ++i ) + for (int i = 0; i < STD2_NMAX_TEXMAPS; ++i ) mnew->channelTypes[i] = channelTypes[i]; macroRecorder->Enable(); BaseClone(this, mnew, remap); @@ -1952,7 +1952,7 @@ void XRayMtl::UpdateTexmaps() } // last do the Channel Ids from stdMat - for ( i = 0; i < N_ID_CHANNELS; ++i ){ + for (long i = 0; i < N_ID_CHANNELS; ++i ){ int chan = pShader->StdIDToChannel(i); if ( chan >= 0 ) { stdIDToChannel[i] = chan; @@ -2232,7 +2232,8 @@ void XRayMtl::ShuffleTexMaps( Shader* newShader, Shader* oldShader ) int nNewShadeMaps = newShader->nTexChannelsSupported(); // for each new shader map - for( int oldChan, newChan = 0; newChan < nNewShadeMaps; ++newChan ){ + int oldChan, newChan = 0; + for(; newChan < nNewShadeMaps; ++newChan ){ TSTR newName = newShader->GetTexChannelInternalName(newChan); @@ -3762,7 +3763,7 @@ IllumParams* CloneIp( IllumParams& ip ) pClone->refractAmt = ip.refractAmt; pClone->reflectAmt = ip.reflectAmt; - for( i=0; i < STD2_NMAX_TEXMAPS; ++i ) + for(int i=0; i < STD2_NMAX_TEXMAPS; ++i ) pClone->channels[ i ] = ip.channels[ i ]; return pClone; @@ -4156,7 +4157,7 @@ void XRayMtl::SetupGfxMultiMaps(TimeValue t, Material *mtl, MtlMakerCallback &cb mtl->texture.SetCount(nmaps); if (nmaps==0) return; - for (i=0; itexture[i].textHandle = NULL; texHandleValid.SetInfinite(); Interval valid; diff --git a/src/plugins/Shared/TexMaps.cpp b/src/plugins/Shared/TexMaps.cpp index 8d41d71f7f0..d57e10801bb 100644 --- a/src/plugins/Shared/TexMaps.cpp +++ b/src/plugins/Shared/TexMaps.cpp @@ -217,7 +217,7 @@ IOResult Texmaps::Save(ISave *isave) { isave->Write(&f,sizeof(f),&nb); isave->EndChunk(); - for ( i=0; iBeginChunk(TEX_AMT0+i); isave->Write(&txmap[i].amount,sizeof(float),&nb);