From 10cf14540dca960cbf1629f2deec0a4191942df9 Mon Sep 17 00:00:00 2001 From: codeimp Date: Sun, 28 Sep 2008 22:34:09 +0000 Subject: [PATCH] moo, pointers are cool --- Source/Rendering/ColorCollection.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Rendering/ColorCollection.cs b/Source/Rendering/ColorCollection.cs index aba463d5..1f8aa6a7 100644 --- a/Source/Rendering/ColorCollection.cs +++ b/Source/Rendering/ColorCollection.cs @@ -211,11 +211,11 @@ namespace CodeImp.DoomBuilder.Rendering // This applies color-correction over a block of pixel data internal unsafe void ApplColorCorrection(PixelColor* pixels, int numpixels) { - for(int i = 0; i < numpixels; i++) + for(PixelColor* cp = pixels + numpixels - 1; cp >= pixels; cp--) { - pixels[i].r = correctiontable[pixels[i].r]; - pixels[i].g = correctiontable[pixels[i].g]; - pixels[i].b = correctiontable[pixels[i].b]; + cp->r = correctiontable[cp->r]; + cp->g = correctiontable[cp->g]; + cp->b = correctiontable[cp->b]; } }