Changeset 8748 in orxonox.OLD for branches/terrain/src
- Timestamp:
- Jun 23, 2006, 5:07:04 PM (18 years ago)
- Location:
- branches/terrain/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/terrain/src/lib/collision_detection/cd_engine.cc
r8741 r8748 124 124 for( entityIterator = list1.begin(); entityIterator != list1.end(); entityIterator++ ) 125 125 { 126 Vector pos( (*entityIterator)->getAbsCoor() );126 /*Vector pos( (*entityIterator)->getAbsCoor() ); 127 127 Vector normal; 128 128 float height = pos.y; … … 131 131 ( *entityIterator )->registerCollision( 132 132 *entityIterator, terrain, pos, normal ); 133 } 133 }*/ 134 134 } 135 135 } -
branches/terrain/src/lib/graphics/importer/terrain/terrain.cc
r8745 r8748 26 26 heightfield.pitch = tmpData->pitch; 27 27 int dataSize = heightfield.pitch*heightfield.height; 28 heightfield.data = new U Byte[dataSize];29 memcpy( heightfield.data, tmpData->pixels, sizeof(U Byte)*dataSize );28 heightfield.data = new Uint8[dataSize]; 29 memcpy( heightfield.data, tmpData->pixels, sizeof(Uint8)*dataSize ); 30 30 SDL_FreeSurface( tmpData ); 31 31 //TODO: Perform some checks... size, bits and so on … … 323 323 inline Uint8 getAlpha( const SDL_Surface *_s, int _x, int _y ) 324 324 { 325 printf( "getalpha: %d, %d\n", _x, _y );326 325 int bpp = _s->format->BytesPerPixel; 327 326 Uint8 *p = (Uint8 *)_s->pixels + _y*_s->pitch + _x * bpp; -
branches/terrain/src/lib/graphics/importer/terrain/terrain.h
r8747 r8748 165 165 * Creates the quad tree structure for fast culling of the terrain pages. 166 166 */ 167 pTerrainQuad createQuadTree( int _x0, int _z0, int _x1, int _z1, int _depth = 0 ); 167 pTerrainQuad createQuadTree( int _x0, int _z0, 168 int _x1, int _z1, int _depth = 0 ); 168 169 169 170 /** … … 206 207 inline float Terrain::getAltitude( int _x, int _z ) const 207 208 { 208 if ( _x < 0 || _x > heightfield.width || _z < 0 || _z > heightfield.height )209 if ( _x < 0 || _x >= heightfield.width || _z < 0 || _z >= heightfield.height ) { 209 210 return 0.0f; 211 printf( "outside!\n" ); 212 } 210 213 return heightfield.data[heightfield.pitch*_z+_x]/255.0f; 211 214 } -
branches/terrain/src/lib/graphics/importer/terrain/terrain_page.cc
r8745 r8748 783 783 hasfull = true; 784 784 } 785 printf( "setting layer %d vis to %d\n", _lv );786 785 layerVisibility[_layer] = _lv; 787 786 } -
branches/terrain/src/world_entities/terrain_entity.cc
r8744 r8748 176 176 if ( lightmap ) 177 177 terrain->setLightmap( lightmap ); 178 else 178 else { 179 179 PRINTF(0)("no lightmap %s\n", _lightFile.c_str() ); 180 181 } 180 182 } 181 183
Note: See TracChangeset
for help on using the changeset viewer.