#include <simgear/math/SGMath.hxx>
#include <simgear/math/sg_random.h>
-#include <Aircraft/controls.hxx>
#include <Model/panelnode.hxx>
#include <Scenery/scenery.hxx>
#include <Scenery/tilemgr.hxx>
// is initialized.
extern int _bootstrap_OSInit;
-
-static void fgLoadInitialScenery()
-{
- static SGPropertyNode_ptr scenery_loaded
- = fgGetNode("sim/sceneryloaded", true);
- static SGPropertyNode_ptr scenery_override
- = fgGetNode("/sim/sceneryloaded-override", true);
-
- if (!scenery_loaded->getBoolValue())
- {
- if (scenery_override->getBoolValue() ||
- (globals->get_tile_mgr()->isSceneryLoaded()
- && fgGetBool("sim/fdm-initialized"))) {
- fgSetBool("sim/sceneryloaded",true);
- fgSplashProgress("");
- }
- else
- {
- fgSplashProgress("loading-scenery");
- // be nice to loader threads while waiting for initial scenery, reduce to 20fps
- SGTimeStamp::sleepForMSec(50);
- }
- }
-}
-
// What should we do when we have nothing else to do? Let's get ready
// for the next move and update the display?
static void fgMainLoop( void )
// update all subsystems
globals->get_subsystem_mgr()->update(sim_dt);
- // END Tile Manager updates
- fgLoadInitialScenery();
-
simgear::AtomicChangeListener::fireChangeListeners();
SG_LOG( SG_GENERAL, SG_DEBUG, "" );
// seed the random number generator
sg_srandom_time();
- FGControls *controls = new FGControls;
- globals->set_controls( controls );
-
string_list *col = new string_list;
globals->set_channel_options_list( col );