Skip to content

Commit

Permalink
Max_Material_60: Fix conformance in For loop scope (#104).
Browse files Browse the repository at this point in the history
  • Loading branch information
nitrocaster committed Jan 16, 2016
1 parent 4fff282 commit 2b9d931
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions src/plugins/Shared/GameMaterial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -4156,7 +4157,7 @@ void XRayMtl::SetupGfxMultiMaps(TimeValue t, Material *mtl, MtlMakerCallback &cb
mtl->texture.SetCount(nmaps);
if (nmaps==0)
return;
for (i=0; i<nmaps; i++)
for (int i=0; i<nmaps; i++)
mtl->texture[i].textHandle = NULL;
texHandleValid.SetInfinite();
Interval valid;
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/Shared/TexMaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ IOResult Texmaps::Save(ISave *isave) {
isave->Write(&f,sizeof(f),&nb);
isave->EndChunk();

for ( i=0; i<STD2_NMAX_TEXMAPS; i++) {
for (int i=0; i<STD2_NMAX_TEXMAPS; i++) {
if (txmap[i].amount!=1.0f) {
isave->BeginChunk(TEX_AMT0+i);
isave->Write(&txmap[i].amount,sizeof(float),&nb);
Expand Down

0 comments on commit 2b9d931

Please sign in to comment.