More fg -> sg namespace changes in simgear.
This commit is contained in:
parent
9fac7682e3
commit
f1b1077d93
38 changed files with 117 additions and 117 deletions
|
@ -31,7 +31,7 @@
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
|
|
||||||
#include STL_STRING
|
#include STL_STRING
|
||||||
#include STL_FUNCTIONAL
|
#include STL_FUNCTIONAL
|
||||||
|
@ -173,7 +173,7 @@ int FGRunwaysUtil::load( const string& file ) {
|
||||||
|
|
||||||
runways.erase( runways.begin(), runways.end() );
|
runways.erase( runways.begin(), runways.end() );
|
||||||
|
|
||||||
fg_gzifstream in( file );
|
sg_gzifstream in( file );
|
||||||
if ( !in.is_open() ) {
|
if ( !in.is_open() ) {
|
||||||
SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << file );
|
SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << file );
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
|
|
||||||
#include STL_STRING
|
#include STL_STRING
|
||||||
#include STL_FUNCTIONAL
|
#include STL_FUNCTIONAL
|
||||||
|
@ -117,7 +117,7 @@ int FGAirportsUtil::load( const string& file ) {
|
||||||
|
|
||||||
airports.erase( airports.begin(), airports.end() );
|
airports.erase( airports.begin(), airports.end() );
|
||||||
|
|
||||||
fg_gzifstream in( file );
|
sg_gzifstream in( file );
|
||||||
if ( !in.is_open() ) {
|
if ( !in.is_open() ) {
|
||||||
SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << file );
|
SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << file );
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include <simgear/constants.h>
|
#include <simgear/constants.h>
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/math/sg_geodesy.hxx>
|
#include <simgear/math/sg_geodesy.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <Airports/simple.hxx>
|
#include <Airports/simple.hxx>
|
||||||
#include <GUI/gui.h>
|
#include <GUI/gui.h>
|
||||||
|
|
|
@ -684,7 +684,7 @@ int readHud( istream &input )
|
||||||
|
|
||||||
const SGPropertyNode * node = instrument_group->getChild(i);
|
const SGPropertyNode * node = instrument_group->getChild(i);
|
||||||
|
|
||||||
FGPath path( globals->get_fg_root() );
|
SGPath path( globals->get_fg_root() );
|
||||||
path.append(node->getStringValue("path"));
|
path.append(node->getStringValue("path"));
|
||||||
|
|
||||||
SG_LOG(SG_INPUT, SG_INFO, "Reading Instrument "
|
SG_LOG(SG_INPUT, SG_INFO, "Reading Instrument "
|
||||||
|
@ -714,7 +714,7 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
|
||||||
|
|
||||||
string hud_path =
|
string hud_path =
|
||||||
fgGetString("/sim/hud/path", "Huds/Default/default.xml");
|
fgGetString("/sim/hud/path", "Huds/Default/default.xml");
|
||||||
FGPath path(globals->get_fg_root());
|
SGPath path(globals->get_fg_root());
|
||||||
path.append(hud_path);
|
path.append(hud_path);
|
||||||
|
|
||||||
ifstream input(path.c_str());
|
ifstream input(path.c_str());
|
||||||
|
@ -743,7 +743,7 @@ int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ )
|
||||||
|
|
||||||
SG_LOG( SG_COCKPIT, SG_INFO, "Initializing current aircraft HUD" );
|
SG_LOG( SG_COCKPIT, SG_INFO, "Initializing current aircraft HUD" );
|
||||||
|
|
||||||
FGPath path(globals->get_fg_root());
|
SGPath path(globals->get_fg_root());
|
||||||
path.append("Huds/Minimal/default.xml");
|
path.append("Huds/Minimal/default.xml");
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <plib/fnt.h>
|
#include <plib/fnt.h>
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <Main/globals.hxx>
|
#include <Main/globals.hxx>
|
||||||
#include <Main/fg_props.hxx>
|
#include <Main/fg_props.hxx>
|
||||||
|
@ -66,7 +66,7 @@ FGTextureManager::createTexture (const string &relativePath)
|
||||||
ssgTexture * texture = _textureMap[relativePath];
|
ssgTexture * texture = _textureMap[relativePath];
|
||||||
if (texture == 0) {
|
if (texture == 0) {
|
||||||
cerr << "Texture " << relativePath << " does not yet exist" << endl;
|
cerr << "Texture " << relativePath << " does not yet exist" << endl;
|
||||||
FGPath tpath(globals->get_fg_root());
|
SGPath tpath(globals->get_fg_root());
|
||||||
tpath.append(relativePath);
|
tpath.append(relativePath);
|
||||||
texture = new ssgTexture((char *)tpath.c_str(), false, false);
|
texture = new ssgTexture((char *)tpath.c_str(), false, false);
|
||||||
_textureMap[relativePath] = texture;
|
_textureMap[relativePath] = texture;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/props.hxx>
|
#include <simgear/misc/props.hxx>
|
||||||
|
|
||||||
|
@ -760,7 +760,7 @@ fgReadPanel (istream &input)
|
||||||
for (int i = 0; i < nInstruments; i++) {
|
for (int i = 0; i < nInstruments; i++) {
|
||||||
const SGPropertyNode * node = instrument_group->getChild(i);
|
const SGPropertyNode * node = instrument_group->getChild(i);
|
||||||
|
|
||||||
FGPath path( globals->get_fg_root() );
|
SGPath path( globals->get_fg_root() );
|
||||||
path.append(node->getStringValue("path"));
|
path.append(node->getStringValue("path"));
|
||||||
|
|
||||||
SG_LOG(SG_INPUT, SG_INFO, "Reading instrument "
|
SG_LOG(SG_INPUT, SG_INFO, "Reading instrument "
|
||||||
|
@ -815,7 +815,7 @@ FGPanel *
|
||||||
fgReadPanel (const string &relative_path)
|
fgReadPanel (const string &relative_path)
|
||||||
{
|
{
|
||||||
FGPanel * panel = 0;
|
FGPanel * panel = 0;
|
||||||
FGPath path(globals->get_fg_root());
|
SGPath path(globals->get_fg_root());
|
||||||
path.append(relative_path);
|
path.append(relative_path);
|
||||||
ifstream input(path.c_str());
|
ifstream input(path.c_str());
|
||||||
if (!input.good()) {
|
if (!input.good()) {
|
||||||
|
|
|
@ -106,12 +106,12 @@ FGRadioStack::init ()
|
||||||
search();
|
search();
|
||||||
update();
|
update();
|
||||||
|
|
||||||
FGPath path( globals->get_fg_root() );
|
SGPath path( globals->get_fg_root() );
|
||||||
FGPath term = path;
|
SGPath term = path;
|
||||||
term.append( "Navaids/range.term" );
|
term.append( "Navaids/range.term" );
|
||||||
FGPath low = path;
|
SGPath low = path;
|
||||||
low.append( "Navaids/range.low" );
|
low.append( "Navaids/range.low" );
|
||||||
FGPath high = path;
|
SGPath high = path;
|
||||||
high.append( "Navaids/range.high" );
|
high.append( "Navaids/range.high" );
|
||||||
|
|
||||||
term_tbl = new SGInterpTable( term.str() );
|
term_tbl = new SGInterpTable( term.str() );
|
||||||
|
|
|
@ -48,7 +48,7 @@ HISTORY
|
||||||
#include <simgear/constants.h>
|
#include <simgear/constants.h>
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/math/sg_geodesy.hxx>
|
#include <simgear/math/sg_geodesy.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <Aircraft/aircraft.hxx>
|
#include <Aircraft/aircraft.hxx>
|
||||||
#include <Controls/controls.hxx>
|
#include <Controls/controls.hxx>
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <simgear/constants.h>
|
#include <simgear/constants.h>
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/math/sg_geodesy.hxx>
|
#include <simgear/math/sg_geodesy.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <Scenery/scenery.hxx>
|
#include <Scenery/scenery.hxx>
|
||||||
|
|
||||||
|
@ -65,10 +65,10 @@ FGJSBsim::FGJSBsim( double dt ) {
|
||||||
fgic=new FGInitialCondition(fdmex);
|
fgic=new FGInitialCondition(fdmex);
|
||||||
needTrim=true;
|
needTrim=true;
|
||||||
|
|
||||||
FGPath aircraft_path( globals->get_fg_root() );
|
SGPath aircraft_path( globals->get_fg_root() );
|
||||||
aircraft_path.append( "Aircraft" );
|
aircraft_path.append( "Aircraft" );
|
||||||
|
|
||||||
FGPath engine_path( globals->get_fg_root() );
|
SGPath engine_path( globals->get_fg_root() );
|
||||||
engine_path.append( "Engine" );
|
engine_path.append( "Engine" );
|
||||||
set_delta_t( dt );
|
set_delta_t( dt );
|
||||||
fdmex->GetState()->Setdt( dt );
|
fdmex->GetState()->Setdt( dt );
|
||||||
|
@ -104,10 +104,10 @@ void FGJSBsim::init() {
|
||||||
SG_LOG( SG_FLIGHT, SG_INFO, "Starting and initializing JSBsim" );
|
SG_LOG( SG_FLIGHT, SG_INFO, "Starting and initializing JSBsim" );
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
FGPath aircraft_path( globals->get_fg_root() );
|
SGPath aircraft_path( globals->get_fg_root() );
|
||||||
aircraft_path.append( "Aircraft" );
|
aircraft_path.append( "Aircraft" );
|
||||||
|
|
||||||
FGPath engine_path( globals->get_fg_root() );
|
SGPath engine_path( globals->get_fg_root() );
|
||||||
engine_path.append( "Engine" );
|
engine_path.append( "Engine" );
|
||||||
|
|
||||||
fdmex->GetState()->Setdt( get_delta_t() );
|
fdmex->GetState()->Setdt( get_delta_t() );
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#include <simgear/constants.h>
|
#include <simgear/constants.h>
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <Include/general.hxx>
|
#include <Include/general.hxx>
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ void AptDialog_Cancel(puObject *)
|
||||||
|
|
||||||
void AptDialog_OK (puObject *)
|
void AptDialog_OK (puObject *)
|
||||||
{
|
{
|
||||||
FGPath path( globals->get_fg_root() );
|
SGPath path( globals->get_fg_root() );
|
||||||
path.append( "Airports" );
|
path.append( "Airports" );
|
||||||
path.append( "simple.mk4" );
|
path.append( "simple.mk4" );
|
||||||
FGAirports airports( path.c_str() );
|
FGAirports airports( path.c_str() );
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
#include <simgear/constants.h>
|
#include <simgear/constants.h>
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
#include <simgear/screen/screen-dump.hxx>
|
#include <simgear/screen/screen-dump.hxx>
|
||||||
|
|
||||||
#include <Include/general.hxx>
|
#include <Include/general.hxx>
|
||||||
|
@ -724,7 +724,7 @@ void guiInit()
|
||||||
gui_msg_RESET = msg_RESET; // "RESET"
|
gui_msg_RESET = msg_RESET; // "RESET"
|
||||||
|
|
||||||
// Next check home directory
|
// Next check home directory
|
||||||
FGPath fntpath;
|
SGPath fntpath;
|
||||||
char* envp = ::getenv( "FG_FONTS" );
|
char* envp = ::getenv( "FG_FONTS" );
|
||||||
if ( envp != NULL ) {
|
if ( envp != NULL ) {
|
||||||
fntpath.set( envp );
|
fntpath.set( envp );
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
#include <simgear/constants.h>
|
#include <simgear/constants.h>
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
#include <simgear/screen/screen-dump.hxx>
|
#include <simgear/screen/screen-dump.hxx>
|
||||||
|
|
||||||
#include <Include/general.hxx>
|
#include <Include/general.hxx>
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
#include <simgear/constants.h>
|
#include <simgear/constants.h>
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <Include/general.hxx>
|
#include <Include/general.hxx>
|
||||||
#include <simgear/xgl/xgl.h>
|
#include <simgear/xgl/xgl.h>
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
#include <simgear/math/point3d.hxx>
|
#include <simgear/math/point3d.hxx>
|
||||||
#include <simgear/math/polar3d.hxx>
|
#include <simgear/math/polar3d.hxx>
|
||||||
#include <simgear/math/sg_geodesy.hxx>
|
#include <simgear/math/sg_geodesy.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
#include <simgear/timing/sg_time.hxx>
|
#include <simgear/timing/sg_time.hxx>
|
||||||
|
|
||||||
#include <Aircraft/aircraft.hxx>
|
#include <Aircraft/aircraft.hxx>
|
||||||
|
@ -126,7 +126,7 @@ bool fgInitFGRoot ( int argc, char **argv ) {
|
||||||
if ( root == "" ) {
|
if ( root == "" ) {
|
||||||
envp = ::getenv( "HOME" );
|
envp = ::getenv( "HOME" );
|
||||||
if ( envp != NULL ) {
|
if ( envp != NULL ) {
|
||||||
FGPath config( envp );
|
SGPath config( envp );
|
||||||
config.append( ".fgfsrc" );
|
config.append( ".fgfsrc" );
|
||||||
char name[256];
|
char name[256];
|
||||||
gethostname( name, 256 );
|
gethostname( name, 256 );
|
||||||
|
@ -141,7 +141,7 @@ bool fgInitFGRoot ( int argc, char **argv ) {
|
||||||
if ( root == "" ) {
|
if ( root == "" ) {
|
||||||
envp = ::getenv( "HOME" );
|
envp = ::getenv( "HOME" );
|
||||||
if ( envp != NULL ) {
|
if ( envp != NULL ) {
|
||||||
FGPath config( envp );
|
SGPath config( envp );
|
||||||
config.append( ".fgfsrc" );
|
config.append( ".fgfsrc" );
|
||||||
root = fgScanForRoot(config.str());
|
root = fgScanForRoot(config.str());
|
||||||
}
|
}
|
||||||
|
@ -181,7 +181,7 @@ bool fgInitConfig ( int argc, char **argv ) {
|
||||||
fgSetDefaults();
|
fgSetDefaults();
|
||||||
|
|
||||||
// Read global preferences from $FG_ROOT/preferences.xml
|
// Read global preferences from $FG_ROOT/preferences.xml
|
||||||
FGPath props_path(globals->get_fg_root());
|
SGPath props_path(globals->get_fg_root());
|
||||||
props_path.append("preferences.xml");
|
props_path.append("preferences.xml");
|
||||||
SG_LOG(SG_INPUT, SG_INFO, "Reading global preferences");
|
SG_LOG(SG_INPUT, SG_INFO, "Reading global preferences");
|
||||||
if (!readProperties(props_path.str(), globals->get_props())) {
|
if (!readProperties(props_path.str(), globals->get_props())) {
|
||||||
|
@ -195,7 +195,7 @@ bool fgInitConfig ( int argc, char **argv ) {
|
||||||
// from least precidence to greatest precidence
|
// from least precidence to greatest precidence
|
||||||
|
|
||||||
// Check for $fg_root/system.fgfsrc
|
// Check for $fg_root/system.fgfsrc
|
||||||
FGPath config( globals->get_fg_root() );
|
SGPath config( globals->get_fg_root() );
|
||||||
config.append( "system.fgfsrc" );
|
config.append( "system.fgfsrc" );
|
||||||
fgParseOptions(config.str());
|
fgParseOptions(config.str());
|
||||||
|
|
||||||
|
@ -235,7 +235,7 @@ bool fgInitConfig ( int argc, char **argv ) {
|
||||||
// find basic airport location info from airport database
|
// find basic airport location info from airport database
|
||||||
bool fgFindAirportID( const string& id, FGAirport *a ) {
|
bool fgFindAirportID( const string& id, FGAirport *a ) {
|
||||||
if ( id.length() ) {
|
if ( id.length() ) {
|
||||||
FGPath path( globals->get_fg_root() );
|
SGPath path( globals->get_fg_root() );
|
||||||
path.append( "Airports" );
|
path.append( "Airports" );
|
||||||
path.append( "simple.mk4" );
|
path.append( "simple.mk4" );
|
||||||
FGAirports airports( path.c_str() );
|
FGAirports airports( path.c_str() );
|
||||||
|
@ -293,7 +293,7 @@ bool fgSetPosFromAirportIDandHdg( const string& id, double tgt_hdg ) {
|
||||||
if ( id.length() ) {
|
if ( id.length() ) {
|
||||||
// set initial position from runway and heading
|
// set initial position from runway and heading
|
||||||
|
|
||||||
FGPath path( globals->get_fg_root() );
|
SGPath path( globals->get_fg_root() );
|
||||||
path.append( "Airports" );
|
path.append( "Airports" );
|
||||||
path.append( "runways.mk4" );
|
path.append( "runways.mk4" );
|
||||||
FGRunways runways( path.c_str() );
|
FGRunways runways( path.c_str() );
|
||||||
|
@ -302,12 +302,12 @@ bool fgSetPosFromAirportIDandHdg( const string& id, double tgt_hdg ) {
|
||||||
"Attempting to set starting position from runway code "
|
"Attempting to set starting position from runway code "
|
||||||
<< id << " heading " << tgt_hdg );
|
<< id << " heading " << tgt_hdg );
|
||||||
|
|
||||||
// FGPath inpath( globals->get_fg_root() );
|
// SGPath inpath( globals->get_fg_root() );
|
||||||
// inpath.append( "Airports" );
|
// inpath.append( "Airports" );
|
||||||
// inpath.append( "apt_simple" );
|
// inpath.append( "apt_simple" );
|
||||||
// airports.load( inpath.c_str() );
|
// airports.load( inpath.c_str() );
|
||||||
|
|
||||||
// FGPath outpath( globals->get_fg_root() );
|
// SGPath outpath( globals->get_fg_root() );
|
||||||
// outpath.append( "Airports" );
|
// outpath.append( "Airports" );
|
||||||
// outpath.append( "simple.gdbm" );
|
// outpath.append( "simple.gdbm" );
|
||||||
// airports.dump_gdbm( outpath.c_str() );
|
// airports.dump_gdbm( outpath.c_str() );
|
||||||
|
@ -531,7 +531,7 @@ bool fgInitSubsystems( void ) {
|
||||||
SG_LOG( SG_GENERAL, SG_INFO, "========== ==========");
|
SG_LOG( SG_GENERAL, SG_INFO, "========== ==========");
|
||||||
|
|
||||||
// Initialize the material property lib
|
// Initialize the material property lib
|
||||||
FGPath mpath( globals->get_fg_root() );
|
SGPath mpath( globals->get_fg_root() );
|
||||||
mpath.append( "materials" );
|
mpath.append( "materials" );
|
||||||
if ( material_lib.load( mpath.str() ) ) {
|
if ( material_lib.load( mpath.str() ) ) {
|
||||||
} else {
|
} else {
|
||||||
|
@ -738,7 +738,7 @@ bool fgInitSubsystems( void ) {
|
||||||
|
|
||||||
SG_LOG(SG_GENERAL, SG_INFO, " VOR/NDB");
|
SG_LOG(SG_GENERAL, SG_INFO, " VOR/NDB");
|
||||||
current_navlist = new FGNavList;
|
current_navlist = new FGNavList;
|
||||||
FGPath p_nav( globals->get_fg_root() );
|
SGPath p_nav( globals->get_fg_root() );
|
||||||
p_nav.append( "Navaids/default.nav" );
|
p_nav.append( "Navaids/default.nav" );
|
||||||
current_navlist->init( p_nav );
|
current_navlist->init( p_nav );
|
||||||
|
|
||||||
|
@ -746,13 +746,13 @@ bool fgInitSubsystems( void ) {
|
||||||
current_beacons = new FGMarkerBeacons;
|
current_beacons = new FGMarkerBeacons;
|
||||||
current_beacons->init();
|
current_beacons->init();
|
||||||
current_ilslist = new FGILSList;
|
current_ilslist = new FGILSList;
|
||||||
FGPath p_ils( globals->get_fg_root() );
|
SGPath p_ils( globals->get_fg_root() );
|
||||||
p_ils.append( "Navaids/default.ils" );
|
p_ils.append( "Navaids/default.ils" );
|
||||||
current_ilslist->init( p_ils );
|
current_ilslist->init( p_ils );
|
||||||
|
|
||||||
SG_LOG(SG_GENERAL, SG_INFO, " Fixes");
|
SG_LOG(SG_GENERAL, SG_INFO, " Fixes");
|
||||||
current_fixlist = new FGFixList;
|
current_fixlist = new FGFixList;
|
||||||
FGPath p_fix( globals->get_fg_root() );
|
SGPath p_fix( globals->get_fg_root() );
|
||||||
p_fix.append( "Navaids/default.fix" );
|
p_fix.append( "Navaids/default.fix" );
|
||||||
current_fixlist->init( p_fix );
|
current_fixlist->init( p_fix );
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
#include <simgear/constants.h>
|
#include <simgear/constants.h>
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <Aircraft/aircraft.hxx>
|
#include <Aircraft/aircraft.hxx>
|
||||||
#include <Autopilot/auto_gui.hxx>
|
#include <Autopilot/auto_gui.hxx>
|
||||||
|
@ -350,7 +350,7 @@ void GLUTkey(unsigned char k, int x, int y) {
|
||||||
{
|
{
|
||||||
SGBucket p( f->get_Longitude() * SGD_RADIANS_TO_DEGREES,
|
SGBucket p( f->get_Longitude() * SGD_RADIANS_TO_DEGREES,
|
||||||
f->get_Latitude() * SGD_RADIANS_TO_DEGREES );
|
f->get_Latitude() * SGD_RADIANS_TO_DEGREES );
|
||||||
FGPath tile_path( globals->get_fg_root() );
|
SGPath tile_path( globals->get_fg_root() );
|
||||||
tile_path.append( "Scenery" );
|
tile_path.append( "Scenery" );
|
||||||
tile_path.append( p.gen_base_path() );
|
tile_path.append( p.gen_base_path() );
|
||||||
tile_path.append( p.gen_index_str() );
|
tile_path.append( p.gen_index_str() );
|
||||||
|
@ -464,7 +464,7 @@ void GLUTspecialkey(int k, int x, int y) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case GLUT_KEY_F4: {
|
case GLUT_KEY_F4: {
|
||||||
FGPath props_path(globals->get_fg_root());
|
SGPath props_path(globals->get_fg_root());
|
||||||
props_path.append("preferences.xml");
|
props_path.append("preferences.xml");
|
||||||
SG_LOG(SG_INPUT, SG_INFO, "Rereading global preferences");
|
SG_LOG(SG_INPUT, SG_INFO, "Rereading global preferences");
|
||||||
if (!readProperties(props_path.str(), globals->get_props())) {
|
if (!readProperties(props_path.str(), globals->get_props())) {
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/math/polar3d.hxx>
|
#include <simgear/math/polar3d.hxx>
|
||||||
#include <simgear/math/sg_random.h>
|
#include <simgear/math/sg_random.h>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
#include <simgear/sky/sky.hxx>
|
#include <simgear/sky/sky.hxx>
|
||||||
#include <simgear/timing/sg_time.hxx>
|
#include <simgear/timing/sg_time.hxx>
|
||||||
#include <simgear/timing/lowleveltime.h>
|
#include <simgear/timing/lowleveltime.h>
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
|
|
||||||
// begin - added Venky
|
// begin - added Venky
|
||||||
// $$$ begin - added VS Renganathan
|
// $$$ begin - added VS Renganathan
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
#include <FDM/flight.hxx>
|
#include <FDM/flight.hxx>
|
||||||
#include <FDM/ADA.hxx>
|
#include <FDM/ADA.hxx>
|
||||||
void fgLoadDCS (void);
|
void fgLoadDCS (void);
|
||||||
|
@ -1115,7 +1115,7 @@ static void fgIdleFunction ( void ) {
|
||||||
#if !defined(WIN32)
|
#if !defined(WIN32)
|
||||||
if ( fgGetBool("/sim/startup/intro-music") ) {
|
if ( fgGetBool("/sim/startup/intro-music") ) {
|
||||||
string lockfile = "/tmp/mpg123.running";
|
string lockfile = "/tmp/mpg123.running";
|
||||||
FGPath mp3file( globals->get_fg_root() );
|
SGPath mp3file( globals->get_fg_root() );
|
||||||
mp3file.append( "Sounds/intro.mp3" );
|
mp3file.append( "Sounds/intro.mp3" );
|
||||||
|
|
||||||
string command = "(touch " + lockfile + "; mpg123 "
|
string command = "(touch " + lockfile + "; mpg123 "
|
||||||
|
@ -1447,7 +1447,7 @@ int main( int argc, char **argv ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize time
|
// Initialize time
|
||||||
FGPath zone( globals->get_fg_root() );
|
SGPath zone( globals->get_fg_root() );
|
||||||
zone.append( "Timezone" );
|
zone.append( "Timezone" );
|
||||||
SGTime *t = new SGTime( fgGetDouble("/position/longitude") * SGD_DEGREES_TO_RADIANS,
|
SGTime *t = new SGTime( fgGetDouble("/position/longitude") * SGD_DEGREES_TO_RADIANS,
|
||||||
fgGetDouble("/position/latitude") * SGD_DEGREES_TO_RADIANS,
|
fgGetDouble("/position/latitude") * SGD_DEGREES_TO_RADIANS,
|
||||||
|
@ -1498,7 +1498,7 @@ int main( int argc, char **argv ) {
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
FGPath modelpath( globals->get_fg_root() );
|
SGPath modelpath( globals->get_fg_root() );
|
||||||
ssgModelPath( (char *)modelpath.c_str() );
|
ssgModelPath( (char *)modelpath.c_str() );
|
||||||
|
|
||||||
// Scene graph root
|
// Scene graph root
|
||||||
|
@ -1509,7 +1509,7 @@ int main( int argc, char **argv ) {
|
||||||
lighting->setName( "Lighting" );
|
lighting->setName( "Lighting" );
|
||||||
|
|
||||||
// Initialize the sky
|
// Initialize the sky
|
||||||
FGPath ephem_data_path( globals->get_fg_root() );
|
SGPath ephem_data_path( globals->get_fg_root() );
|
||||||
ephem_data_path.append( "Astro" );
|
ephem_data_path.append( "Astro" );
|
||||||
SGEphemeris *ephem = new SGEphemeris( ephem_data_path.c_str() );
|
SGEphemeris *ephem = new SGEphemeris( ephem_data_path.c_str() );
|
||||||
ephem->update( globals->get_time_params()->getMjd(),
|
ephem->update( globals->get_time_params()->getMjd(),
|
||||||
|
@ -1517,7 +1517,7 @@ int main( int argc, char **argv ) {
|
||||||
0.0 );
|
0.0 );
|
||||||
globals->set_ephem( ephem );
|
globals->set_ephem( ephem );
|
||||||
|
|
||||||
FGPath sky_tex_path( globals->get_fg_root() );
|
SGPath sky_tex_path( globals->get_fg_root() );
|
||||||
sky_tex_path.append( "Textures" );
|
sky_tex_path.append( "Textures" );
|
||||||
sky_tex_path.append( "Sky" );
|
sky_tex_path.append( "Sky" );
|
||||||
thesky = new SGSky;
|
thesky = new SGSky;
|
||||||
|
@ -1569,7 +1569,7 @@ int main( int argc, char **argv ) {
|
||||||
+ acmodel_path;
|
+ acmodel_path;
|
||||||
int pos = full_model.rfind("/");
|
int pos = full_model.rfind("/");
|
||||||
|
|
||||||
FGPath texturepath( full_model.substr(0, pos) );
|
SGPath texturepath( full_model.substr(0, pos) );
|
||||||
cout << "Texture path = " << texturepath.str() << endl;
|
cout << "Texture path = " << texturepath.str() << endl;
|
||||||
ssgTexturePath( (char *)texturepath.c_str() );
|
ssgTexturePath( (char *)texturepath.c_str() );
|
||||||
|
|
||||||
|
@ -1660,19 +1660,19 @@ void fgLoadDCS(void) {
|
||||||
ship_pos[k]=NULL;
|
ship_pos[k]=NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
FGPath tile_path( globals->get_fg_root());
|
SGPath tile_path( globals->get_fg_root());
|
||||||
tile_path.append( "Scenery" );
|
tile_path.append( "Scenery" );
|
||||||
tile_path.append( "Objects.txt" );
|
tile_path.append( "Objects.txt" );
|
||||||
fg_gzifstream in( tile_path.str() );
|
sg_gzifstream in( tile_path.str() );
|
||||||
if ( ! in.is_open() ) {
|
if ( ! in.is_open() ) {
|
||||||
SG_LOG( SG_TERRAIN, SG_ALERT, "Cannot open file: " << tile_path.str() );
|
SG_LOG( SG_TERRAIN, SG_ALERT, "Cannot open file: " << tile_path.str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
FGPath modelpath( globals->get_fg_root() );
|
SGPath modelpath( globals->get_fg_root() );
|
||||||
modelpath.append( "Models" );
|
modelpath.append( "Models" );
|
||||||
modelpath.append( "Geometry" );
|
modelpath.append( "Geometry" );
|
||||||
|
|
||||||
FGPath texturepath( globals->get_fg_root() );
|
SGPath texturepath( globals->get_fg_root() );
|
||||||
texturepath.append( "Models" );
|
texturepath.append( "Models" );
|
||||||
texturepath.append( "Textures" );
|
texturepath.append( "Textures" );
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ bool global_fullscreen = true;
|
||||||
|
|
||||||
#include STL_STRING
|
#include STL_STRING
|
||||||
|
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
|
|
||||||
// #include <Include/general.hxx>
|
// #include <Include/general.hxx>
|
||||||
// #include <Airports/simple.hxx>
|
// #include <Airports/simple.hxx>
|
||||||
|
@ -492,7 +492,7 @@ parse_wp( const string& arg ) {
|
||||||
static bool
|
static bool
|
||||||
parse_flightplan(const string& arg)
|
parse_flightplan(const string& arg)
|
||||||
{
|
{
|
||||||
fg_gzifstream infile(arg.c_str());
|
sg_gzifstream infile(arg.c_str());
|
||||||
if ( !infile.is_open() ) {
|
if ( !infile.is_open() ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -908,7 +908,7 @@ fgScanForRoot (int argc, char **argv)
|
||||||
string
|
string
|
||||||
fgScanForRoot (const string& path)
|
fgScanForRoot (const string& path)
|
||||||
{
|
{
|
||||||
fg_gzifstream in( path );
|
sg_gzifstream in( path );
|
||||||
if ( !in.is_open() )
|
if ( !in.is_open() )
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
|
@ -968,7 +968,7 @@ fgParseOptions (int argc, char **argv) {
|
||||||
// Parse config file options
|
// Parse config file options
|
||||||
void
|
void
|
||||||
fgParseOptions (const string& path) {
|
fgParseOptions (const string& path) {
|
||||||
fg_gzifstream in( path );
|
sg_gzifstream in( path );
|
||||||
if ( !in.is_open() )
|
if ( !in.is_open() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/math/sg_random.h>
|
#include <simgear/math/sg_random.h>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <Objects/texload.h>
|
#include <Objects/texload.h>
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ void fgSplashInit ( void ) {
|
||||||
char num_str[256];
|
char num_str[256];
|
||||||
sprintf(num_str, "%d", num);
|
sprintf(num_str, "%d", num);
|
||||||
|
|
||||||
FGPath tpath( globals->get_fg_root() );
|
SGPath tpath( globals->get_fg_root() );
|
||||||
tpath.append( "Textures/Splash" );
|
tpath.append( "Textures/Splash" );
|
||||||
tpath.concat( num_str );
|
tpath.concat( num_str );
|
||||||
tpath.concat( ".rgb" );
|
tpath.concat( ".rgb" );
|
||||||
|
@ -88,7 +88,7 @@ void fgSplashInit ( void ) {
|
||||||
read_rgb_texture(tpath.c_str(), &width, &height)) == NULL )
|
read_rgb_texture(tpath.c_str(), &width, &height)) == NULL )
|
||||||
{
|
{
|
||||||
// Try compressed
|
// Try compressed
|
||||||
FGPath fg_tpath = tpath;
|
SGPath fg_tpath = tpath;
|
||||||
fg_tpath.concat( ".gz" );
|
fg_tpath.concat( ".gz" );
|
||||||
if ( (splash_texbuf =
|
if ( (splash_texbuf =
|
||||||
read_rgb_texture(fg_tpath.c_str(), &width, &height)) == NULL )
|
read_rgb_texture(fg_tpath.c_str(), &width, &height)) == NULL )
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
|
|
||||||
#ifdef SG_HAVE_STD_INCLUDES
|
#ifdef SG_HAVE_STD_INCLUDES
|
||||||
# include <istream>
|
# include <istream>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
#include <simgear/math/sg_geodesy.hxx>
|
#include <simgear/math/sg_geodesy.hxx>
|
||||||
|
|
||||||
#include "fixlist.hxx"
|
#include "fixlist.hxx"
|
||||||
|
@ -42,12 +42,12 @@ FGFixList::~FGFixList( void ) {
|
||||||
|
|
||||||
|
|
||||||
// load the navaids and build the map
|
// load the navaids and build the map
|
||||||
bool FGFixList::init( FGPath path ) {
|
bool FGFixList::init( SGPath path ) {
|
||||||
FGFix fix;
|
FGFix fix;
|
||||||
|
|
||||||
fixlist.erase( fixlist.begin(), fixlist.end() );
|
fixlist.erase( fixlist.begin(), fixlist.end() );
|
||||||
|
|
||||||
fg_gzifstream in( path.str() );
|
sg_gzifstream in( path.str() );
|
||||||
if ( !in.is_open() ) {
|
if ( !in.is_open() ) {
|
||||||
SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << path.str() );
|
SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << path.str() );
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -54,7 +54,7 @@ public:
|
||||||
~FGFixList();
|
~FGFixList();
|
||||||
|
|
||||||
// load the navaids and build the map
|
// load the navaids and build the map
|
||||||
bool init( FGPath path );
|
bool init( SGPath path );
|
||||||
|
|
||||||
// query the database for the specified frequency, lon and lat are
|
// query the database for the specified frequency, lon and lat are
|
||||||
// in degrees, elev is in meters
|
// in degrees, elev is in meters
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
#include <simgear/math/sg_geodesy.hxx>
|
#include <simgear/math/sg_geodesy.hxx>
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
|
|
||||||
#ifdef SG_HAVE_STD_INCLUDES
|
#ifdef SG_HAVE_STD_INCLUDES
|
||||||
# include <istream>
|
# include <istream>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
#include <simgear/math/sg_geodesy.hxx>
|
#include <simgear/math/sg_geodesy.hxx>
|
||||||
|
|
||||||
#include "mkrbeacons.hxx"
|
#include "mkrbeacons.hxx"
|
||||||
|
@ -43,12 +43,12 @@ FGILSList::~FGILSList( void ) {
|
||||||
|
|
||||||
|
|
||||||
// load the navaids and build the map
|
// load the navaids and build the map
|
||||||
bool FGILSList::init( FGPath path ) {
|
bool FGILSList::init( SGPath path ) {
|
||||||
FGILS ils;
|
FGILS ils;
|
||||||
|
|
||||||
ilslist.erase( ilslist.begin(), ilslist.end() );
|
ilslist.erase( ilslist.begin(), ilslist.end() );
|
||||||
|
|
||||||
fg_gzifstream in( path.str() );
|
sg_gzifstream in( path.str() );
|
||||||
if ( !in.is_open() ) {
|
if ( !in.is_open() ) {
|
||||||
SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << path.str() );
|
SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << path.str() );
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -57,7 +57,7 @@ public:
|
||||||
~FGILSList();
|
~FGILSList();
|
||||||
|
|
||||||
// load the navaids and build the map
|
// load the navaids and build the map
|
||||||
bool init( FGPath path );
|
bool init( SGPath path );
|
||||||
|
|
||||||
// query the database for the specified frequency, lon and lat are
|
// query the database for the specified frequency, lon and lat are
|
||||||
// in degrees, elev is in meters
|
// in degrees, elev is in meters
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
#include <simgear/math/sg_geodesy.hxx>
|
#include <simgear/math/sg_geodesy.hxx>
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
#include <simgear/magvar/magvar.hxx>
|
#include <simgear/magvar/magvar.hxx>
|
||||||
#include <simgear/timing/sg_time.hxx>
|
#include <simgear/timing/sg_time.hxx>
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
#include <simgear/math/sg_geodesy.hxx>
|
#include <simgear/math/sg_geodesy.hxx>
|
||||||
|
|
||||||
#include "navlist.hxx"
|
#include "navlist.hxx"
|
||||||
|
@ -42,12 +42,12 @@ FGNavList::~FGNavList( void ) {
|
||||||
|
|
||||||
|
|
||||||
// load the navaids and build the map
|
// load the navaids and build the map
|
||||||
bool FGNavList::init( FGPath path ) {
|
bool FGNavList::init( SGPath path ) {
|
||||||
FGNav n;
|
FGNav n;
|
||||||
|
|
||||||
navaids.erase( navaids.begin(), navaids.end() );
|
navaids.erase( navaids.begin(), navaids.end() );
|
||||||
|
|
||||||
fg_gzifstream in( path.str() );
|
sg_gzifstream in( path.str() );
|
||||||
if ( !in.is_open() ) {
|
if ( !in.is_open() ) {
|
||||||
SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << path.str() );
|
SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << path.str() );
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -57,7 +57,7 @@ public:
|
||||||
~FGNavList();
|
~FGNavList();
|
||||||
|
|
||||||
// load the navaids and build the map
|
// load the navaids and build the map
|
||||||
bool init( FGPath path );
|
bool init( SGPath path );
|
||||||
|
|
||||||
// query the database for the specified frequency, lon and lat are
|
// query the database for the specified frequency, lon and lat are
|
||||||
// in degrees, elev is in meters
|
// in degrees, elev is in meters
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include "fixlist.hxx"
|
#include "fixlist.hxx"
|
||||||
#include "ilslist.hxx"
|
#include "ilslist.hxx"
|
||||||
|
@ -8,7 +8,7 @@ int main() {
|
||||||
double heading, dist;
|
double heading, dist;
|
||||||
|
|
||||||
current_navlist = new FGNavList;
|
current_navlist = new FGNavList;
|
||||||
FGPath p_nav( "/home/curt/FlightGear/Navaids/default.nav" );
|
SGPath p_nav( "/home/curt/FlightGear/Navaids/default.nav" );
|
||||||
current_navlist->init( p_nav );
|
current_navlist->init( p_nav );
|
||||||
FGNav n;
|
FGNav n;
|
||||||
if ( current_navlist->query( -93.2, 45.14, 3000, 117.30, &n) ) {
|
if ( current_navlist->query( -93.2, 45.14, 3000, 117.30, &n) ) {
|
||||||
|
@ -19,7 +19,7 @@ int main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
current_ilslist = new FGILSList;
|
current_ilslist = new FGILSList;
|
||||||
FGPath p_ils( "/home/curt/FlightGear/Navaids/default.ils" );
|
SGPath p_ils( "/home/curt/FlightGear/Navaids/default.ils" );
|
||||||
current_ilslist->init( p_ils );
|
current_ilslist->init( p_ils );
|
||||||
FGILS i;
|
FGILS i;
|
||||||
if ( current_ilslist->query( -93.1, 45.24, 3000, 110.30, &i) ) {
|
if ( current_ilslist->query( -93.1, 45.24, 3000, 110.30, &i) ) {
|
||||||
|
@ -31,7 +31,7 @@ int main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
current_fixlist = new FGFixList;
|
current_fixlist = new FGFixList;
|
||||||
FGPath p_fix( "/home/curt/FlightGear/Navaids/default.fix" );
|
SGPath p_fix( "/home/curt/FlightGear/Navaids/default.fix" );
|
||||||
current_fixlist->init( p_fix );
|
current_fixlist->init( p_fix );
|
||||||
FGFix fix;
|
FGFix fix;
|
||||||
if ( current_fixlist->query( "SHELL", -82, 41, 3000,
|
if ( current_fixlist->query( "SHELL", -82, 41, 3000,
|
||||||
|
|
|
@ -42,8 +42,8 @@
|
||||||
#include STL_STRING
|
#include STL_STRING
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
|
|
||||||
#include <Include/general.hxx>
|
#include <Include/general.hxx>
|
||||||
#include <Main/globals.hxx>
|
#include <Main/globals.hxx>
|
||||||
|
@ -65,7 +65,7 @@ FGMaterialLib::FGMaterialLib ( void ) {
|
||||||
|
|
||||||
|
|
||||||
static bool local_file_exists( const string& path ) {
|
static bool local_file_exists( const string& path ) {
|
||||||
fg_gzifstream in( path );
|
sg_gzifstream in( path );
|
||||||
if ( ! in.is_open() ) {
|
if ( ! in.is_open() ) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -90,7 +90,7 @@ static bool local_file_exists( const string& path ) {
|
||||||
bool FGMaterialLib::load( const string& mpath ) {
|
bool FGMaterialLib::load( const string& mpath ) {
|
||||||
string material_name;
|
string material_name;
|
||||||
|
|
||||||
fg_gzifstream in( mpath );
|
sg_gzifstream in( mpath );
|
||||||
if ( ! in.is_open() ) {
|
if ( ! in.is_open() ) {
|
||||||
SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << mpath );
|
SG_LOG( SG_GENERAL, SG_ALERT, "Cannot open file: " << mpath );
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
@ -129,14 +129,14 @@ bool FGMaterialLib::load( const string& mpath ) {
|
||||||
in >> m;
|
in >> m;
|
||||||
|
|
||||||
// build the ssgSimpleState
|
// build the ssgSimpleState
|
||||||
FGPath tex_path( globals->get_fg_root() );
|
SGPath tex_path( globals->get_fg_root() );
|
||||||
tex_path.append( "Textures.high" );
|
tex_path.append( "Textures.high" );
|
||||||
|
|
||||||
FGPath tmp_path = tex_path;
|
SGPath tmp_path = tex_path;
|
||||||
tmp_path.append( m.get_texture_name() );
|
tmp_path.append( m.get_texture_name() );
|
||||||
if ( ! local_file_exists(tmp_path.str())
|
if ( ! local_file_exists(tmp_path.str())
|
||||||
|| general.get_glMaxTexSize() < 512 ) {
|
|| general.get_glMaxTexSize() < 512 ) {
|
||||||
tex_path = FGPath( globals->get_fg_root() );
|
tex_path = SGPath( globals->get_fg_root() );
|
||||||
tex_path.append( "Textures" );
|
tex_path.append( "Textures" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
|
|
||||||
#include "newmat.hxx"
|
#include "newmat.hxx"
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ FGNewMat::FGNewMat ( const string &mat_name, const string &tex_name )
|
||||||
void FGNewMat::build_ssg_state( const string& path,
|
void FGNewMat::build_ssg_state( const string& path,
|
||||||
GLenum shade_model, bool texture_default )
|
GLenum shade_model, bool texture_default )
|
||||||
{
|
{
|
||||||
FGPath tex_file( path );
|
SGPath tex_file( path );
|
||||||
tex_file.append( texture_name );
|
tex_file.append( texture_name );
|
||||||
|
|
||||||
state = new ssgStateSelector(2);
|
state = new ssgStateSelector(2);
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
#include <simgear/math/polar3d.hxx>
|
#include <simgear/math/polar3d.hxx>
|
||||||
#include <simgear/math/sg_geodesy.hxx>
|
#include <simgear/math/sg_geodesy.hxx>
|
||||||
#include <simgear/math/sg_random.h>
|
#include <simgear/math/sg_random.h>
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
#include <simgear/misc/stopwatch.hxx>
|
#include <simgear/misc/stopwatch.hxx>
|
||||||
#include <simgear/misc/texcoord.hxx>
|
#include <simgear/misc/texcoord.hxx>
|
||||||
|
|
||||||
|
@ -375,7 +375,7 @@ static ssgBranch *fgAsciiObjLoad( const string& path, FGTileEntry *t,
|
||||||
tile -> setName ( (char *)path.c_str() ) ;
|
tile -> setName ( (char *)path.c_str() ) ;
|
||||||
|
|
||||||
// Attempt to open "path.gz" or "path"
|
// Attempt to open "path.gz" or "path"
|
||||||
fg_gzifstream in( path );
|
sg_gzifstream in( path );
|
||||||
if ( ! in.is_open() ) {
|
if ( ! in.is_open() ) {
|
||||||
SG_LOG( SG_TERRAIN, SG_DEBUG, "Cannot open file: " << path );
|
SG_LOG( SG_TERRAIN, SG_DEBUG, "Cannot open file: " << path );
|
||||||
SG_LOG( SG_TERRAIN, SG_DEBUG, "default to ocean tile: " << path );
|
SG_LOG( SG_TERRAIN, SG_DEBUG, "default to ocean tile: " << path );
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/math/sg_geodesy.hxx>
|
#include <simgear/math/sg_geodesy.hxx>
|
||||||
#include <simgear/math/sg_random.h>
|
#include <simgear/math/sg_random.h>
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <Main/globals.hxx>
|
#include <Main/globals.hxx>
|
||||||
#include <Objects/matlib.hxx>
|
#include <Objects/matlib.hxx>
|
||||||
|
@ -217,7 +217,7 @@ void FGNewCache::fill_in( const SGBucket& b ) {
|
||||||
e->terra_range = new ssgRangeSelector;
|
e->terra_range = new ssgRangeSelector;
|
||||||
e->tile_bucket = b;
|
e->tile_bucket = b;
|
||||||
|
|
||||||
FGPath tile_path;
|
SGPath tile_path;
|
||||||
if ( globals->get_fg_scenery() != "" ) {
|
if ( globals->get_fg_scenery() != "" ) {
|
||||||
tile_path.set( globals->get_fg_scenery() );
|
tile_path.set( globals->get_fg_scenery() );
|
||||||
} else {
|
} else {
|
||||||
|
@ -230,7 +230,7 @@ void FGNewCache::fill_in( const SGBucket& b ) {
|
||||||
ssgVertexArray *light_pts = new ssgVertexArray( 100 );
|
ssgVertexArray *light_pts = new ssgVertexArray( 100 );
|
||||||
|
|
||||||
// Load the appropriate data file
|
// Load the appropriate data file
|
||||||
FGPath tile_base = tile_path;
|
SGPath tile_base = tile_path;
|
||||||
tile_base.append( b.gen_index_str() );
|
tile_base.append( b.gen_index_str() );
|
||||||
ssgBranch *new_tile = fgObjLoad( tile_base.str(), e, light_pts, true );
|
ssgBranch *new_tile = fgObjLoad( tile_base.str(), e, light_pts, true );
|
||||||
|
|
||||||
|
@ -241,13 +241,13 @@ void FGNewCache::fill_in( const SGBucket& b ) {
|
||||||
// load custom objects
|
// load custom objects
|
||||||
SG_LOG( SG_TERRAIN, SG_DEBUG, "CUSTOM OBJECTS" );
|
SG_LOG( SG_TERRAIN, SG_DEBUG, "CUSTOM OBJECTS" );
|
||||||
|
|
||||||
FGPath index_path = tile_path;
|
SGPath index_path = tile_path;
|
||||||
index_path.append( b.gen_index_str() );
|
index_path.append( b.gen_index_str() );
|
||||||
index_path.concat( ".ind" );
|
index_path.concat( ".ind" );
|
||||||
|
|
||||||
SG_LOG( SG_TERRAIN, SG_DEBUG, "Looking in " << index_path.str() );
|
SG_LOG( SG_TERRAIN, SG_DEBUG, "Looking in " << index_path.str() );
|
||||||
|
|
||||||
fg_gzifstream in( index_path.str() );
|
sg_gzifstream in( index_path.str() );
|
||||||
|
|
||||||
if ( in.is_open() ) {
|
if ( in.is_open() ) {
|
||||||
string token, name;
|
string token, name;
|
||||||
|
@ -263,7 +263,7 @@ void FGNewCache::fill_in( const SGBucket& b ) {
|
||||||
SG_LOG( SG_TERRAIN, SG_DEBUG, "token = " << token
|
SG_LOG( SG_TERRAIN, SG_DEBUG, "token = " << token
|
||||||
<< " name = " << name );
|
<< " name = " << name );
|
||||||
|
|
||||||
FGPath custom_path = tile_path;
|
SGPath custom_path = tile_path;
|
||||||
custom_path.append( name );
|
custom_path.append( name );
|
||||||
ssgBranch *custom_obj =
|
ssgBranch *custom_obj =
|
||||||
fgObjLoad( custom_path.str(), e, NULL, false );
|
fgObjLoad( custom_path.str(), e, NULL, false );
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <Main/globals.hxx>
|
#include <Main/globals.hxx>
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
// constructor
|
// constructor
|
||||||
FGSimpleSound::FGSimpleSound( string file ) {
|
FGSimpleSound::FGSimpleSound( string file ) {
|
||||||
FGPath slfile( globals->get_fg_root() );
|
SGPath slfile( globals->get_fg_root() );
|
||||||
slfile.append( file );
|
slfile.append( file );
|
||||||
sample = new slSample ( (char *)slfile.c_str() );
|
sample = new slSample ( (char *)slfile.c_str() );
|
||||||
pitch_envelope = new slEnvelope( 1, SL_SAMPLE_ONE_SHOT );
|
pitch_envelope = new slEnvelope( 1, SL_SAMPLE_ONE_SHOT );
|
||||||
|
|
|
@ -52,7 +52,7 @@ SG_USING_STD(string);
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
#include <simgear/math/interpolater.hxx>
|
#include <simgear/math/interpolater.hxx>
|
||||||
#include <simgear/math/polar3d.hxx>
|
#include <simgear/math/polar3d.hxx>
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
|
|
||||||
#include <Aircraft/aircraft.hxx>
|
#include <Aircraft/aircraft.hxx>
|
||||||
#include <Main/globals.hxx>
|
#include <Main/globals.hxx>
|
||||||
|
@ -75,12 +75,12 @@ void fgLIGHT::Init( void ) {
|
||||||
"Initializing Lighting interpolation tables." );
|
"Initializing Lighting interpolation tables." );
|
||||||
|
|
||||||
// build the path name to the ambient lookup table
|
// build the path name to the ambient lookup table
|
||||||
FGPath path( globals->get_fg_root() );
|
SGPath path( globals->get_fg_root() );
|
||||||
FGPath ambient = path;
|
SGPath ambient = path;
|
||||||
ambient.append( "Lighting/ambient" );
|
ambient.append( "Lighting/ambient" );
|
||||||
FGPath diffuse = path;
|
SGPath diffuse = path;
|
||||||
diffuse.append( "Lighting/diffuse" );
|
diffuse.append( "Lighting/diffuse" );
|
||||||
FGPath sky = path;
|
SGPath sky = path;
|
||||||
sky.append( "Lighting/sky" );
|
sky.append( "Lighting/sky" );
|
||||||
|
|
||||||
// initialize ambient table
|
// initialize ambient table
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <simgear/misc/fgpath.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
#include <simgear/magvar/magvar.hxx>
|
#include <simgear/magvar/magvar.hxx>
|
||||||
|
|
||||||
#include <FDM/flight.hxx>
|
#include <FDM/flight.hxx>
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
// periodic time updater wrapper
|
// periodic time updater wrapper
|
||||||
void fgUpdateLocalTime() {
|
void fgUpdateLocalTime() {
|
||||||
FGPath zone( globals->get_fg_root() );
|
SGPath zone( globals->get_fg_root() );
|
||||||
zone.append( "Timezone" );
|
zone.append( "Timezone" );
|
||||||
|
|
||||||
globals->get_time_params()->updateLocal( cur_fdm_state->get_Longitude(),
|
globals->get_time_params()->updateLocal( cur_fdm_state->get_Longitude(),
|
||||||
|
|
|
@ -77,7 +77,7 @@ void FGWeatherParse::input(const char *file)
|
||||||
{
|
{
|
||||||
unsigned int nr = 0;
|
unsigned int nr = 0;
|
||||||
|
|
||||||
fg_gzifstream in;
|
sg_gzifstream in;
|
||||||
|
|
||||||
cerr << "Parsing \"" << file << "\" for weather datas:\n";
|
cerr << "Parsing \"" << file << "\" for weather datas:\n";
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ HISTORY
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <simgear/misc/fgstream.hxx>
|
#include <simgear/misc/sgstream.hxx>
|
||||||
|
|
||||||
#include "FGPhysicalProperties.h"
|
#include "FGPhysicalProperties.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue