= fgGetNode("/position/longitude-deg");
static const SGPropertyNode *latitude
= fgGetNode("/position/latitude-deg");
+ static const SGPropertyNode *master_freeze
+ = fgGetNode("/sim/freeze/master");
SGPath path( globals->get_fg_root() );
path.append( "Airports" );
FGAirport a;
- int freeze = globals->get_freeze();
- if(!freeze)
- globals->set_freeze( true );
+ bool freeze = master_freeze->getBoolValue();
+ if ( !freeze ) {
+ fgSetBool("/sim/freeze/master", true);
+ }
char *s;
AptDialogInput->getValue(&s);
fgSetPosFromAirportIDandHdg( AptId,
cur_fdm_state->get_Psi() *
SGD_RADIANS_TO_DEGREES);
- BusyCursor(0);
+ fgSetTowerPosFromAirportID( AptId,
+ cur_fdm_state->get_Psi() *
+ SGD_RADIANS_TO_DEGREES);
+ // BusyCursor(0);
fgReInitSubsystems();
- // if ( global_tile_mgr.init() ) {
- // Load the local scenery data
+ double visibility_meters =
+ fgGetDouble("/environment/visibility-m");
global_tile_mgr.update( longitude->getDoubleValue(),
- latitude->getDoubleValue() );
- // } else {
- // SG_LOG( SG_GENERAL, SG_ALERT,
- // "Error in Tile Manager initialization!" );
- // exit(-1);
- // }
- BusyCursor(1);
+ latitude->getDoubleValue(),visibility_meters );
+ // BusyCursor(1);
} else {
AptId += " not in database.";
mkDialog(AptId.c_str());
}
}
if ( !freeze ) {
- globals->set_freeze( false );
+ fgSetBool("/sim/freeze/master", false);
}
}
void AptDialog_Reset(puObject *)
{
// strncpy( NewAirportId, fgGetString("/sim/startup/airport-id").c_str(), 16 );
- sprintf( NewAirportId, "%s", fgGetString("/sim/startup/airport-id").c_str() );
+ sprintf( NewAirportId, "%s", fgGetString("/sim/startup/airport-id") );
AptDialogInput->setValue ( NewAirportId );
AptDialogInput->setCursor( 0 ) ;
}
void NewAirport(puObject *cb)
{
// strncpy( NewAirportId, fgGetString("/sim/startup/airport-id").c_str(), 16 );
- sprintf( NewAirportId, "%s", fgGetString("/sim/startup/airport-id").c_str() );
+ sprintf( NewAirportId, "%s", fgGetString("/sim/startup/airport-id") );
// cout << "NewAirport " << NewAirportId << endl;
AptDialogInput->setValue( NewAirportId );
void NewAirportInit(void)
{
- sprintf( NewAirportId, "%s", fgGetString("/sim/startup/airport-id").c_str() );
+ sprintf( NewAirportId, "%s", fgGetString("/sim/startup/airport-id") );
int len = 150
- puGetDefaultLabelFont().getStringWidth( NewAirportLabel ) / 2;