Changeset 5970 in orxonox.OLD for branches/height_map/src/lib
- Timestamp:
- Dec 7, 2005, 4:30:38 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/height_map/src/lib/graphics/importer/height_map.cc
r5967 r5970 61 61 if(heightMap != NULL /* && heightMap->format->BitsPerPixel == 8 */) 62 62 { 63 for(int i = 0; i < heightMap->h; i += 8)63 for(int i = 0; i < heightMap->h; i += 2) 64 64 { 65 for(int j = 0; j < heightMap->w; j += 8)65 for(int j = 0; j < heightMap->w; j += 2) 66 66 { 67 67 … … 73 73 //height = heightMap->format->palette->colors[offset]; 74 74 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); 76 76 } 77 77 } 78 78 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 ++) 80 80 { 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) ); 82 82 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 ); 84 84 } 85 85
Note: See TracChangeset
for help on using the changeset viewer.