From 64ee4a54f4730cdf777d75694ab48280f543ac88 Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Thu, 8 Dec 2011 18:12:44 +0000 Subject: More scoping fixes --- Stars45/TerrainPatch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Stars45/TerrainPatch.cpp') diff --git a/Stars45/TerrainPatch.cpp b/Stars45/TerrainPatch.cpp index bb8718a..463ee9b 100644 --- a/Stars45/TerrainPatch.cpp +++ b/Stars45/TerrainPatch.cpp @@ -723,7 +723,7 @@ TerrainPatch::CalcLayer(Poly* poly) if (y <= terrain->GetLayers().first()->GetMinHeight()) return 0; - for (i = 0; i < terrain->GetLayers().size(); i++) { + for (int i = 0; i < terrain->GetLayers().size(); i++) { TerrainLayer* layer = terrain->GetLayers().at(i); if (y >= layer->GetMinHeight() && y < layer->GetMaxHeight()) { @@ -847,7 +847,7 @@ TerrainPatch::Illuminate(Color ambient, List& lights) Vec3 vl = light->Location(); vl.Normalize(); - for (i = 0; i < nverts; i++) { + for (int i = 0; i < nverts; i++) { Vec3& nrm = vset->nrm[i]; double val = 0; double gain = vl * nrm; @@ -867,7 +867,7 @@ TerrainPatch::Illuminate(Color ambient, List& lights) // combine blend weights: if (ndetail >= 2) { - for (i = 0; i < nverts; i++) { + for (int i = 0; i < nverts; i++) { vset->diffuse[i] = vset->specular[i] | (vset->diffuse[i] & 0x00ffffff); } } -- cgit v1.1