Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8748 in orxonox.OLD


Ignore:
Timestamp:
Jun 23, 2006, 5:07:04 PM (18 years ago)
Author:
ponder
Message:

Small changes to help debug

Location:
branches/terrain
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/terrain/acinclude.m4

    r8747 r8748  
    303303      if test -e ${_lua_lib_directory}/liblua.a  || test -e ${_lua_lib_directory}/liblua.dylib ; then
    304304        LUA_LIB_DIRECTORY=${_lua_lib_directory}
    305         LDFLAGS="${LDFLAGS} -L${LUA_LIB_DIRECTORY} -llualib"
     305        LDFLAGS="${LDFLAGS} -L${LUA_LIB_DIRECTORY} -llualib -ldl"
    306306        break
    307307      fi
  • branches/terrain/src/lib/collision_detection/cd_engine.cc

    r8741 r8748  
    124124      for( entityIterator = list1.begin(); entityIterator != list1.end(); entityIterator++ )
    125125                {
    126                                 Vector pos( (*entityIterator)->getAbsCoor() );
     126                                /*Vector pos( (*entityIterator)->getAbsCoor() );
    127127                                Vector normal;
    128128                                float height = pos.y;
     
    131131                                        ( *entityIterator )->registerCollision(
    132132                                                *entityIterator, terrain, pos, normal );
    133                                 }
     133                                }*/
    134134      }
    135135        }
  • branches/terrain/src/lib/graphics/importer/terrain/terrain.cc

    r8745 r8748  
    2626        heightfield.pitch = tmpData->pitch;
    2727        int dataSize = heightfield.pitch*heightfield.height;
    28         heightfield.data = new UByte[dataSize];
    29         memcpy( heightfield.data, tmpData->pixels, sizeof(UByte)*dataSize );
     28        heightfield.data = new Uint8[dataSize];
     29        memcpy( heightfield.data, tmpData->pixels, sizeof(Uint8)*dataSize );
    3030        SDL_FreeSurface( tmpData );
    3131        //TODO: Perform some checks... size, bits and so on
     
    323323inline Uint8 getAlpha( const SDL_Surface *_s, int _x, int _y )
    324324{
    325         printf( "getalpha: %d, %d\n", _x, _y );
    326325    int bpp = _s->format->BytesPerPixel;
    327326    Uint8 *p = (Uint8 *)_s->pixels + _y*_s->pitch + _x * bpp;
  • branches/terrain/src/lib/graphics/importer/terrain/terrain.h

    r8747 r8748  
    165165                 * Creates the quad tree structure for fast culling of the terrain pages.
    166166                 */             
    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 );
    168169               
    169170                /**
     
    206207inline float Terrain::getAltitude( int _x, int _z ) const
    207208{
    208         if ( _x < 0 || _x > heightfield.width || _z < 0 || _z > heightfield.height )
     209        if ( _x < 0 || _x >= heightfield.width || _z < 0 || _z >= heightfield.height ) {
    209210                return 0.0f;
     211                printf( "outside!\n" );
     212        }       
    210213        return heightfield.data[heightfield.pitch*_z+_x]/255.0f;       
    211214}
  • branches/terrain/src/lib/graphics/importer/terrain/terrain_page.cc

    r8745 r8748  
    783783                        hasfull = true;
    784784        }       
    785         printf( "setting layer %d vis to %d\n", _lv ); 
    786785        layerVisibility[_layer] = _lv; 
    787786}
  • branches/terrain/src/world_entities/terrain_entity.cc

    r8744 r8748  
    176176        if ( lightmap )
    177177                terrain->setLightmap( lightmap );
    178         else
     178        else {
    179179                PRINTF(0)("no lightmap %s\n", _lightFile.c_str() );
     180               
     181        }       
    180182}
    181183
Note: See TracChangeset for help on using the changeset viewer.