Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2005, 4:30:38 PM (18 years ago)
Author:
bottac
Message:

Further changes in height_map.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/height_map/src/lib/graphics/importer/height_map.cc

    r5967 r5970  
    6161  if(heightMap != NULL /* && heightMap->format->BitsPerPixel == 8 */)
    6262        {
    63                 for(int i = 0; i < heightMap->h; i += 8)
     63                for(int i = 0; i < heightMap->h; i += 2)
    6464                        {
    65                         for(int j = 0; j < heightMap->w;  j += 8)
     65                        for(int j = 0; j < heightMap->w;  j += 2)
    6666                        {
    6767
     
    7373                                        //height = heightMap->format->palette->colors[offset];
    7474                                SDL_UnlockSurface(heightMap);   
    75                                 this->addVertex(heightMap->h - i , height ,heightMap->w - j);
     75                                this->addVertex(heightMap->h - i , ((long)( height)  / 10) - 15 ,heightMap->w - j);
    7676                        }       
    7777                        }
    7878
    79                 for(int i = 0; i < (heightMap->h * heightMap->w) / 64 - heightMap->w /8  ; i ++)
     79                for(int i = 0; i < (heightMap->h * heightMap->w) / 4 - heightMap->w /2 -1  ; i ++)
    8080                        {
    81                                   this->addFace (3, VERTEX_ONLY, i,i+1 ,i + (heightMap->w / 8) );
     81                                  this->addFace (3, VERTEX_ONLY, i,i+1 ,i + (heightMap->w / 2) );
    8282                               
    83                                   this->addFace (3, VERTEX_ONLY, i+1,i + (heightMap->w / 8)  ,i + (heightMap->w / 8) +1 );
     83                                  this->addFace (3, VERTEX_ONLY, i+1,i + (heightMap->w / 2)  ,i + (heightMap->w / 2) +1 );
    8484                        }
    8585               
Note: See TracChangeset for help on using the changeset viewer.