SGPropertyNode *locale = fgInitLocale(language);
if (!locale) {
- cerr << "No internationalization settings specified in preferences.xml"
- << endl;
+ SG_LOG(SG_GENERAL, SG_ALERT,
+ "No internationalization settings specified in preferences.xml" );
return false;
}
SG_LOG( SG_GENERAL, SG_INFO,
"Attempting to set starting position for "
- << id << ":" << runway );
+ << id << ":" << rwy );
if ( ! runways.search( id, rwy, &r ) ) {
SG_LOG( SG_GENERAL, SG_ALERT,
static void printMat(const sgVec4 *mat, char *name="")
{
int i;
- cout << name << endl;
+ SG_LOG(SG_GENERAL, SG_BULK, name );
for(i=0; i<4; i++) {
- cout <<" "<<mat[i][0]<<" "<<mat[i][1]<<" "<<mat[i][2]<<" "<<mat[i][3]<<endl;
+ SG_LOG(SG_GENERAL, SG_BULK, " " << mat[i][0] << " " << mat[i][1]
+ << " " << mat[i][2] << " " << mat[i][3] );
}
- cout << endl;
}
// Initialize view parameters
// Initialise the AI Manager
////////////////////////////////////////////////////////////////////
- if (fgGetBool("/sim/ai-traffic/enabled")) {
- SG_LOG(SG_GENERAL, SG_INFO, " AI Manager");
- globals->set_AI_mgr(new FGAIMgr);
- globals->get_AI_mgr()->init();
- }
+ SG_LOG(SG_GENERAL, SG_INFO, " AI Manager");
+ globals->set_AI_mgr(new FGAIMgr);
+ globals->get_AI_mgr()->init();
+
#ifdef ENABLE_AUDIO_SUPPORT
////////////////////////////////////////////////////////////////////
globals->get_io()->init();
globals->get_io()->bind();
- // Initialize the 2D panel.
+
+ ////////////////////////////////////////////////////////////////////
+ // Add a new 2D panel.
+ ////////////////////////////////////////////////////////////////////
+
string panel_path = fgGetString("/sim/panel/path",
"Panels/Default/default.xml");
- current_panel = fgReadPanel(panel_path);
- if (current_panel == 0) {
+
+ globals->set_current_panel( fgReadPanel(panel_path) );
+ if (globals->get_current_panel() == 0) {
SG_LOG( SG_INPUT, SG_ALERT,
"Error reading new panel from " << panel_path );
} else {
SG_LOG( SG_INPUT, SG_INFO, "Loaded new panel from " << panel_path );
- current_panel->init();
- current_panel->bind();
+ globals->get_current_panel()->init();
+ globals->get_current_panel()->bind();
}