X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FMain%2Fglobals.cxx;h=796b18cd8f66d1ef35085ca9f8b738efd2534056;hb=6fc24034495c8a9932600e366615d500f1a5a66a;hp=ff86ee15bd9779626fc94876bb830327b3afdad4;hpb=ba56c42eb43de0c0de69f2fcd1abff379eed819d;p=flightgear.git diff --git a/src/Main/globals.cxx b/src/Main/globals.cxx index ff86ee15b..796b18cd8 100644 --- a/src/Main/globals.cxx +++ b/src/Main/globals.cxx @@ -48,14 +48,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include "globals.hxx" #include "locale.hxx" @@ -160,10 +158,8 @@ FGGlobals::FGGlobals() : commands( SGCommandMgr::instance() ), channel_options_list( NULL ), initial_waypoints( NULL ), - fontcache ( new FGFontCache ), channellist( NULL ), - haveUserSettings(false), - _chatter_queue(NULL) + haveUserSettings(false) { SGPropertyNode* root = new SGPropertyNode; props = SGPropertyNode_ptr(root); @@ -226,7 +222,6 @@ FGGlobals::~FGGlobals() // renderer touches subsystems during its destruction set_renderer(NULL); - _chatter_queue.clear(); delete subsystem_mgr; subsystem_mgr = NULL; // important so ::get_subsystem returns NULL @@ -237,7 +232,6 @@ FGGlobals::~FGGlobals() delete channel_options_list; delete initial_waypoints; - delete fontcache; delete channellist; simgear::PropertyObjectBase::setDefaultRoot(NULL); @@ -359,6 +353,11 @@ void FGGlobals::append_fg_scenery (const std::string &paths, bool secure) continue; } + // tell the ResouceManager about the scenery path + // needed to load Models from this scenery path + simgear::ResourceManager::instance()->addBasePath(abspath.str(), + simgear::ResourceManager::PRIORITY_DEFAULT); + simgear::Dir dir(abspath); SGPath terrainDir(dir.file("Terrain")); SGPath objectsDir(dir.file("Objects")); @@ -508,12 +507,6 @@ FGGlobals::add_subsystem (const char * name, subsystem_mgr->add(name, subsystem, type, min_time_sec); } -SGSoundMgr * -FGGlobals::get_soundmgr () const -{ - return get_subsystem(); -} - SGEventMgr * FGGlobals::get_event_mgr () const { @@ -713,7 +706,7 @@ FGViewMgr *FGGlobals::get_viewmgr() const return get_subsystem(); } -FGViewer* FGGlobals::get_current_view () const +flightgear::View* FGGlobals::get_current_view () const { FGViewMgr* vm = get_viewmgr(); return vm ? vm->get_current_view() : 0; @@ -729,16 +722,6 @@ FGControls *FGGlobals::get_controls() const return get_subsystem(); } -FGSampleQueue* FGGlobals::get_chatter_queue() const -{ - return _chatter_queue; -} - -void FGGlobals::set_chatter_queue(FGSampleQueue* queue) -{ - _chatter_queue = queue; -} - void FGGlobals::addListenerToCleanup(SGPropertyChangeListener* l) { _listeners_to_cleanup.push_back(l);