Minor tweaks.
This commit is contained in:
parent
82da518255
commit
58a8b0d103
3 changed files with 10 additions and 6 deletions
|
@ -103,6 +103,10 @@ FGTileCache::init( void )
|
||||||
tile_cache[i].mark_unused();
|
tile_cache[i].mark_unused();
|
||||||
tile_cache[i].tile_bucket.make_bad();
|
tile_cache[i].tile_bucket.make_bad();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// and ... just in case we missed something ...
|
||||||
|
terrain->removeAllKids();
|
||||||
|
|
||||||
FG_LOG( FG_TERRAIN, FG_DEBUG, " done with init()" );
|
FG_LOG( FG_TERRAIN, FG_DEBUG, " done with init()" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,19 +133,19 @@ FGTileEntry::free_tile()
|
||||||
// selector to disable it from ever being drawn.
|
// selector to disable it from ever being drawn.
|
||||||
void
|
void
|
||||||
FGTileEntry::ssg_disable() {
|
FGTileEntry::ssg_disable() {
|
||||||
cout << "TILE STATE = " << state << endl;
|
// cout << "TILE STATE = " << state << endl;
|
||||||
if ( state == Scheduled_for_use ) {
|
if ( state == Scheduled_for_use ) {
|
||||||
state = Scheduled_for_cache;
|
state = Scheduled_for_cache;
|
||||||
} else if ( state == Scheduled_for_cache ) {
|
} else if ( state == Scheduled_for_cache ) {
|
||||||
// do nothing
|
// do nothing
|
||||||
} else if ( (state == Loaded) || (state == Cached) ) {
|
} else if ( (state == Loaded) || (state == Cached) ) {
|
||||||
state = Cached;
|
state = Cached;
|
||||||
cout << "DISABLING SSG NODE" << endl;
|
// cout << "DISABLING SSG NODE" << endl;
|
||||||
select_ptr->select(0);
|
select_ptr->select(0);
|
||||||
} else {
|
} else {
|
||||||
FG_LOG( FG_TERRAIN, FG_ALERT,
|
FG_LOG( FG_TERRAIN, FG_ALERT,
|
||||||
"Trying to disable an unused tile! Dying" );
|
"Trying to disable an unused tile! Dying" );
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
cout << "TILE STATE = " << state << endl;
|
// cout << "TILE STATE = " << state << endl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ int FGTileMgr::init( void ) {
|
||||||
// schedule a tile for loading
|
// schedule a tile for loading
|
||||||
static void disable_tile( int cache_index ) {
|
static void disable_tile( int cache_index ) {
|
||||||
// see if tile already exists in the cache
|
// see if tile already exists in the cache
|
||||||
cout << "DISABLING CACHE ENTRY = " << cache_index << endl;
|
// cout << "DISABLING CACHE ENTRY = " << cache_index << endl;
|
||||||
FGTileEntry *t = global_tile_cache.get_tile( cache_index );
|
FGTileEntry *t = global_tile_cache.get_tile( cache_index );
|
||||||
t->ssg_disable();
|
t->ssg_disable();
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ int FGTileMgr::sched_tile( const FGBucket& b ) {
|
||||||
|
|
||||||
if ( cache_index >= 0 ) {
|
if ( cache_index >= 0 ) {
|
||||||
// tile exists in cache, reenable it.
|
// tile exists in cache, reenable it.
|
||||||
cout << "REENABLING DISABLED TILE" << endl;
|
// cout << "REENABLING DISABLED TILE" << endl;
|
||||||
FGTileEntry *t = global_tile_cache.get_tile( cache_index );
|
FGTileEntry *t = global_tile_cache.get_tile( cache_index );
|
||||||
t->select_ptr->select( 1 );
|
t->select_ptr->select( 1 );
|
||||||
t->mark_loaded();
|
t->mark_loaded();
|
||||||
|
@ -391,7 +391,7 @@ FGTileMgr::current_elev_ssg( const Point3D& abs_view_pos,
|
||||||
|
|
||||||
for ( int i = 0 ; i < num_hits ; i++ ) {
|
for ( int i = 0 ; i < num_hits ; i++ ) {
|
||||||
ssgHit *h = &(results [ i ]) ;
|
ssgHit *h = &(results [ i ]) ;
|
||||||
cout << "got a hit!" << endl;
|
// cout << "got a hit!" << endl;
|
||||||
/* Do something with 'h' */
|
/* Do something with 'h' */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue