From 34e100aeb6784840d704d9878456b8a74bcd0993 Mon Sep 17 00:00:00 2001 From: Armin Burgmeier Date: Mon, 17 Nov 2014 17:49:24 -0500 Subject: [PATCH] ambient: fix some debug code --- src/landscape/fow/C4FoWAmbient.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/landscape/fow/C4FoWAmbient.cpp b/src/landscape/fow/C4FoWAmbient.cpp index 9f4729d1a..cf492cd61 100644 --- a/src/landscape/fow/C4FoWAmbient.cpp +++ b/src/landscape/fow/C4FoWAmbient.cpp @@ -119,12 +119,13 @@ void C4FoWAmbient::CreateFromLandscape(const C4Landscape& landscape, double reso for(unsigned int x = 0; x < SizeX; ++x) { debug.SetPix(x, y, int(ambient[y * SizeX + x] * 255. + 0.5)); - CStdPalette pal; - for(int i = 0; i < 256; ++i) - pal.Colors[i] = i + (i << 8) + (i << 16); - debug.Save("Ambient.bmp", &pal); } } + + CStdPalette pal; + for(int i = 0; i < 256; ++i) + pal.Colors[i] = i + (i << 8) + (i << 16); + debug.Save("Ambient.bmp", &pal); #endif // Store it in a GL texture