1
0
Fork 0

Various odds and ends tweaks.

This commit is contained in:
curt 2000-06-30 21:46:41 +00:00
parent 4c72f1df98
commit db6da3a896
5 changed files with 13 additions and 11 deletions

View file

@ -293,7 +293,8 @@ bool fgInitSubsystems( void ) {
if( global_tile_mgr.init() ) { if( global_tile_mgr.init() ) {
// Load the local scenery data // Load the local scenery data
global_tile_mgr.update(); global_tile_mgr.update( cur_fdm_state->get_Longitude(),
cur_fdm_state->get_Latitude() );
} else { } else {
FG_LOG( FG_GENERAL, FG_ALERT, "Error in Tile Manager initialization!" ); FG_LOG( FG_GENERAL, FG_ALERT, "Error in Tile Manager initialization!" );
exit(-1); exit(-1);
@ -599,7 +600,8 @@ void fgReInitSubsystems( void )
fgInitPosition(); fgInitPosition();
if( global_tile_mgr.init() ) { if( global_tile_mgr.init() ) {
// Load the local scenery data // Load the local scenery data
global_tile_mgr.update(); global_tile_mgr.update( cur_fdm_state->get_Longitude(),
cur_fdm_state->get_Latitude() );
} else { } else {
FG_LOG( FG_GENERAL, FG_ALERT, "Error in Tile Manager initialization!" ); FG_LOG( FG_GENERAL, FG_ALERT, "Error in Tile Manager initialization!" );
exit(-1); exit(-1);

View file

@ -486,7 +486,8 @@ void GLUTspecialkey(int k, int x, int y) {
BusyCursor(0); BusyCursor(0);
if( global_tile_mgr.init() ) { if( global_tile_mgr.init() ) {
// Load the local scenery data // Load the local scenery data
global_tile_mgr.update(); global_tile_mgr.update( cur_fdm_state->get_Longitude(),
cur_fdm_state->get_Latitude() );
} else { } else {
FG_LOG( FG_GENERAL, FG_ALERT, FG_LOG( FG_GENERAL, FG_ALERT,
"Error in Tile Manager initialization!" ); "Error in Tile Manager initialization!" );

View file

@ -368,8 +368,7 @@ void fgRenderFrame( void ) {
thesky->set_visibility( current_weather.get_visibility() ); thesky->set_visibility( current_weather.get_visibility() );
#endif #endif
thesky->modify_vis( cur_fdm_state->get_Altitude() thesky->modify_vis( cur_fdm_state->get_Altitude() * FEET_TO_METER,
* FEET_TO_METER,
( global_multi_loop * ( global_multi_loop *
current_options.get_speed_up() ) / current_options.get_speed_up() ) /
@ -873,7 +872,8 @@ static void fgMainLoop( void ) {
#endif #endif
// see if we need to load any new scenery tiles // see if we need to load any new scenery tiles
global_tile_mgr.update(); global_tile_mgr.update( cur_fdm_state->get_Longitude(),
cur_fdm_state->get_Latitude() );
// Process/manage pending events // Process/manage pending events
global_events.Process(); global_events.Process();
@ -1355,9 +1355,8 @@ int main( int argc, char **argv ) {
ephem->getPlanets(), 60000.0, ephem->getPlanets(), 60000.0,
ephem->getNumStars(), ephem->getNumStars(),
ephem->getStars(), 60000.0 ); ephem->getStars(), 60000.0 );
thesky->add_cloud_layer( 1000.0, 200.0, 50.0, SG_CLOUD_MOSTLY_SUNNY ); thesky->add_cloud_layer( 2600.0, 200.0, 50.0, SG_CLOUD_MOSTLY_SUNNY );
thesky->add_cloud_layer( 1800.0, 400.0, 100.0, SG_CLOUD_OVERCAST ); thesky->add_cloud_layer( 6000.0, 20.0, 10.0, SG_CLOUD_CIRRUS );
thesky->add_cloud_layer( 5000.0, 20.0, 10.0, SG_CLOUD_CIRRUS );
// Terrain branch // Terrain branch
terrain = new ssgBranch; terrain = new ssgBranch;

View file

@ -366,7 +366,7 @@ void FGTileMgr::initialize_queue( void )
// given the current lon/lat, fill in the array of local chunks. If // given the current lon/lat, fill in the array of local chunks. If
// the chunk isn't already in the cache, then read it from disk. // the chunk isn't already in the cache, then read it from disk.
int FGTileMgr::update( void ) { int FGTileMgr::update( double junk1, double junk2 ) {
// FG_LOG( FG_TERRAIN, FG_DEBUG, "FGTileMgr::update()" ); // FG_LOG( FG_TERRAIN, FG_DEBUG, "FGTileMgr::update()" );
FGInterface *f = current_aircraft.fdm_state; FGInterface *f = current_aircraft.fdm_state;

View file

@ -146,7 +146,7 @@ public:
// given the current lon/lat, fill in the array of local chunks. // given the current lon/lat, fill in the array of local chunks.
// If the chunk isn't already in the cache, then read it from // If the chunk isn't already in the cache, then read it from
// disk. // disk.
int update( void ); int update( double junk1, double junk2 );
// Determine scenery altitude. Normally this just happens when we // Determine scenery altitude. Normally this just happens when we
// render the scene, but we'd also like to be able to do this // render the scene, but we'd also like to be able to do this