]> git.mxchange.org Git - flightgear.git/commitdiff
Oops, remove some extra code.
authorehofman <ehofman>
Fri, 14 Jan 2005 14:29:46 +0000 (14:29 +0000)
committerehofman <ehofman>
Fri, 14 Jan 2005 14:29:46 +0000 (14:29 +0000)
utils/Modeller/normalmap.cxx

index deb341eb628fc23e77d9a547c44dfa84e0c69b15..80d1fe4d6fdb44c460c21ee93669b62f97239fa9 100644 (file)
@@ -59,29 +59,6 @@ int parse_option(char **args, int n) {
    return 1;
 }
 
-GLubyte *make_map( GLubyte *data, int width, int height, int colors )
-{
-   GLubyte *map = (GLubyte *)malloc (width * height * 3);
-   
-   for (int y=0; y<height; y++)
-      for (int x=0; x<width; x++)
-      {
-         int mpos = (x + y*width)*3;
-         int dpos = (x + y*width)*colors;
-
-         int xp1 = (x < (width-1)) ? x+1 : 0;
-         int yp1 = (y < (height-1)) ? y+1 : 0;
-         int posxp1 = (xp1 + y*width)*colors;
-         int posyp1 = (x + yp1*width)*colors;
-         
-         map[mpos+0] = (128+(data[posxp1]-data[dpos])/2);
-         map[mpos+1] = (128+(data[posyp1]-data[dpos])/2);
-         map[mpos+2] = 128 + GLubyte(128*brightness);
-      }
-
-   return map;
-}
-
 int main (int argc, char **argv)
 {
    int i;
@@ -115,7 +92,6 @@ int main (int argc, char **argv)
       memcpy(normalmap_file+i, "_n.rgb\0", 7);
    }
 
-   // texture.make_grayscale();
    texture.make_normalmap();
    texture.write_texture(normalmap_file);