X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fglobals.cxx;h=af4e693459bce2da14c45ce1e1ebd9342388142d;hb=38226af24ec01e8f0a20d7fd73ef838a69f6ef25;hp=aa34a9660959819bc7b4309266ac4b346cb02828;hpb=2ea50c63bbb95e143662de2f136c79898236e38d;p=flightgear.git diff --git a/src/Main/globals.cxx b/src/Main/globals.cxx index aa34a9660..af4e69345 100644 --- a/src/Main/globals.cxx +++ b/src/Main/globals.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -82,7 +83,7 @@ public: } if (r.exists()) { - SG_LOG(SG_IO, SG_INFO, "found path:" << aResource << " via /sim/aircraft-dir: " << r.str()); + SG_LOG(SG_IO, SG_DEBUG, "found path:" << aResource << " via /sim/aircraft-dir: " << r.str()); return r; } } @@ -94,7 +95,7 @@ public: for (; it != dirs.end(); ++it) { SGPath p(*it, res); if (p.exists()) { - SG_LOG(SG_IO, SG_INFO, "found path:" << aResource << " in aircraft dir: " << *it); + SG_LOG(SG_IO, SG_DEBUG, "found path:" << aResource << " in aircraft dir: " << *it); return p; } } // of aircraft path iteration @@ -122,8 +123,6 @@ FGGlobals::FGGlobals() : soundmgr( new SGSoundMgr ), sim_time_sec( 0.0 ), fg_root( "" ), - warp( 0 ), - warp_delta( 0 ), time_params( NULL ), ephem( NULL ), mag( NULL ), @@ -150,6 +149,7 @@ FGGlobals::FGGlobals() : channellist( NULL ) { simgear::ResourceManager::instance()->addProvider(new AircraftResourceProvider()); + simgear::PropertyObjectBase::setDefaultRoot(props); } @@ -182,6 +182,7 @@ FGGlobals::~FGGlobals() delete current_panel; delete ATC_mgr; + controls->unbind(); delete controls; delete channel_options_list; @@ -401,4 +402,24 @@ FGGlobals::get_current_view () const return viewmgr->get_current_view(); } +long int FGGlobals::get_warp() const +{ + return fgGetInt("/sim/time/warp"); +} + +void FGGlobals::set_warp( long int w ) +{ + fgSetInt("/sim/time/warp", w); +} + +long int FGGlobals::get_warp_delta() const +{ + return fgGetInt("/sim/time/warp-delta"); +} + +void FGGlobals::set_warp_delta( long int d ) +{ + fgSetInt("/sim/time/warp-delta", d); +} + // end of globals.cxx