diff --git a/src/Main/globals.cxx b/src/Main/globals.cxx index 2b3c970c2..fe526872e 100644 --- a/src/Main/globals.cxx +++ b/src/Main/globals.cxx @@ -69,7 +69,7 @@ FGGlobals::FGGlobals() : initial_state( NULL ), locale( NULL ), commands( new SGCommandMgr ), - model_loader( NULL ), + model_lib( NULL ), acmodel( NULL ), model_mgr( NULL ), channel_options_list( NULL ), diff --git a/src/Main/globals.hxx b/src/Main/globals.hxx index 905752c6d..38fb0f4c5 100644 --- a/src/Main/globals.hxx +++ b/src/Main/globals.hxx @@ -53,7 +53,7 @@ class SGEphemeris; class SGCommandMgr; class SGMagVar; class SGMaterialLib; -class SGModelLoader; +class SGModelLib; class SGPropertyNode; class SGRoute; class SGTime; @@ -163,7 +163,7 @@ private: SGCommandMgr *commands; - SGModelLoader * model_loader; + SGModelLib *model_lib; FGAircraftModel *acmodel; @@ -282,10 +282,10 @@ public: inline SGCommandMgr *get_commands () { return commands; } - inline SGModelLoader * get_model_loader () { return model_loader; } + inline SGModelLib * get_model_lib () { return model_lib; } - inline void set_model_loader (SGModelLoader * loader) { - model_loader = loader; + inline void set_model_lib (SGModelLib *m) { + model_lib = m; } inline FGAircraftModel *get_aircraft_model () { return acmodel; } diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 24f294a6e..93e2f43dc 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -79,9 +79,9 @@ SG_USING_STD(endl); #include #include #include -#include #include #include +#include #ifdef FG_USE_CLOUDS_3D # include # include @@ -1698,7 +1698,7 @@ static bool fgMainInit( int argc, char **argv ) { // Initialize the general model subsystem. //////////////////////////////////////////////////////////////////// - globals->set_model_loader(new SGModelLoader); + globals->set_model_lib(new SGModelLib); globals->set_model_mgr(new FGModelMgr); globals->get_model_mgr()->init(); globals->get_model_mgr()->bind(); @@ -1934,7 +1934,7 @@ void fgLoadDCS(void) { if ( strcmp(obj_filename,"repeat") != 0) { ship_obj = - globals->get_model_loader()->load_model( globals->get_fg_root(), obj_filename, globals->get_props(), globals->get_sim_time_sec() ); + globals->get_model_lib()->load_model( globals->get_fg_root(), obj_filename, globals->get_props(), globals->get_sim_time_sec() ); } if ( ship_obj != NULL ) { diff --git a/src/MultiPlayer/mpplayer.cxx b/src/MultiPlayer/mpplayer.cxx index a57103f29..783ddce9e 100644 --- a/src/MultiPlayer/mpplayer.cxx +++ b/src/MultiPlayer/mpplayer.cxx @@ -52,7 +52,7 @@ #include #include -#include +#include #include
#include @@ -141,7 +141,7 @@ void MPPlayer::Close(void) { // Flush the model loader so that it erases the model from its list of // models. - globals->get_model_loader()->flush(); + globals->get_model_lib()->flush1(); // Assume that plib/ssg deletes the model and transform as their // refcounts should be zero. @@ -247,10 +247,10 @@ void MPPlayer::LoadModel(void) { m_ModelTrans = new ssgTransform; // Load the model - m_Model = globals->get_model_loader()->load_model( globals->get_fg_root(), - m_sModelName, - globals->get_props(), - globals->get_sim_time_sec() ); + m_Model = globals->get_model_lib()->load_model( globals->get_fg_root(), + m_sModelName, + globals->get_props(), + globals->get_sim_time_sec() ); m_Model->clrTraversalMaskBits( SSGTRAV_HOT ); // Add model to transform diff --git a/src/Objects/userdata.cxx b/src/Objects/userdata.cxx index a018c8cbe..781edb479 100644 --- a/src/Objects/userdata.cxx +++ b/src/Objects/userdata.cxx @@ -102,7 +102,7 @@ void TriUserData::add_object_to_triangle (SGMatModel * object) ssgTransform * pos = new ssgTransform; pos->setTransform(mat); - pos->addKid( object->get_random_model( globals->get_model_loader(), + pos->addKid( object->get_random_model( globals->get_model_lib(), globals->get_fg_root(), globals->get_props(), globals->get_sim_time_sec() ) ); diff --git a/src/Scenery/tilemgr.cxx b/src/Scenery/tilemgr.cxx index 47e72427e..84f415269 100644 --- a/src/Scenery/tilemgr.cxx +++ b/src/Scenery/tilemgr.cxx @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include
#include
@@ -281,10 +281,10 @@ void FGTileMgr::update_queues() try { ssgEntity *obj_model = - globals->get_model_loader()->load_model( globals->get_fg_root(), - dm->get_model_path(), - globals->get_props(), - globals->get_sim_time_sec() ); + globals->get_model_lib()->load_model( globals->get_fg_root(), + dm->get_model_path(), + globals->get_props(), + globals->get_sim_time_sec() ); if ( obj_model != NULL ) { dm->get_obj_trans()->addKid( obj_model ); }