Reverted recent changes -- the dependencies are badly (and
unnecessarily) tangled.
This commit is contained in:
parent
721e9f469d
commit
d535c7c6b1
2 changed files with 38 additions and 32 deletions
|
@ -97,7 +97,6 @@
|
|||
#include <Input/input.hxx>
|
||||
#include <Instrumentation/instrument_mgr.hxx>
|
||||
#include <Model/acmodel.hxx>
|
||||
#include <Model/modelmgr.hxx>
|
||||
#include <AIModel/AIManager.hxx>
|
||||
#include <Navaids/fixlist.hxx>
|
||||
#include <Navaids/ilslist.hxx>
|
||||
|
@ -1482,37 +1481,6 @@ bool fgInitSubsystems() {
|
|||
// Initialize the scenery management subsystem.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Initialize the TG scenery subsystem.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
FGScenery * scenery = new FGScenery;
|
||||
globals->set_scenery(scenery);
|
||||
globals->add_subsystem("scenery", scenery);
|
||||
|
||||
globals->set_tile_mgr( new FGTileMgr );
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Initialize the general model subsystem.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
FGModelMgr * manager = new FGModelMgr;
|
||||
globals->set_model_mgr(manager);
|
||||
globals->add_subsystem("model-manager", manager);
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Initialize the 3D aircraft model subsystem (has a dependency on
|
||||
// the scenery subsystem.)
|
||||
////////////////////////////////////////////////////////////////////
|
||||
FGAircraftModel * aircraft = new FGAircraftModel;
|
||||
globals->set_aircraft_model(aircraft);
|
||||
globals->add_subsystem("aircraft-model", aircraft);
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Initialize the view manager subsystem.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
FGViewMgr *viewmgr = new FGViewMgr;
|
||||
globals->set_viewmgr( viewmgr );
|
||||
globals->add_subsystem("view-manager", viewmgr);
|
||||
|
||||
if ( globals->get_tile_mgr()->init() ) {
|
||||
// Load the local scenery data
|
||||
double visibility_meters = fgGetDouble("/environment/visibility-m");
|
||||
|
|
|
@ -892,6 +892,12 @@ void fgUpdateTimeDepCalcs() {
|
|||
// do nothing, fdm isn't inited yet
|
||||
}
|
||||
|
||||
globals->get_model_mgr()->update(delta_time_sec);
|
||||
globals->get_aircraft_model()->update(delta_time_sec);
|
||||
|
||||
// update the view angle
|
||||
globals->get_viewmgr()->update(delta_time_sec);
|
||||
|
||||
// Update solar system
|
||||
globals->get_ephem()->update( globals->get_time_params()->getMjd(),
|
||||
globals->get_time_params()->getLst(),
|
||||
|
@ -1602,6 +1608,38 @@ bool fgMainInit( int argc, char **argv ) {
|
|||
|
||||
globals->set_model_lib(new SGModelLib);
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Initialize the TG scenery subsystem.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
globals->set_scenery( new FGScenery );
|
||||
globals->get_scenery()->init();
|
||||
globals->get_scenery()->bind();
|
||||
globals->set_tile_mgr( new FGTileMgr );
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Initialize the general model subsystem.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
globals->set_model_mgr(new FGModelMgr);
|
||||
globals->get_model_mgr()->init();
|
||||
globals->get_model_mgr()->bind();
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Initialize the 3D aircraft model subsystem (has a dependency on
|
||||
// the scenery subsystem.)
|
||||
////////////////////////////////////////////////////////////////////
|
||||
globals->set_aircraft_model(new FGAircraftModel);
|
||||
globals->get_aircraft_model()->init();
|
||||
globals->get_aircraft_model()->bind();
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Initialize the view manager subsystem.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
FGViewMgr *viewmgr = new FGViewMgr;
|
||||
globals->set_viewmgr( viewmgr );
|
||||
viewmgr->init();
|
||||
viewmgr->bind();
|
||||
|
||||
|
||||
// Initialize the sky
|
||||
SGPath ephem_data_path( globals->get_fg_root() );
|
||||
ephem_data_path.append( "Astro" );
|
||||
|
|
Loading…
Add table
Reference in a new issue