From: James Turner Date: Tue, 13 Jul 2010 20:50:44 +0000 (+0100) Subject: Create TimeManager subsystem, and collect the time related code out of main.cxx and... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7f36caede6a600f3c4e346f7898587d81975ef02;p=flightgear.git Create TimeManager subsystem, and collect the time related code out of main.cxx and fg_init.cxx into it. Remove the unfortunately named 'tmp.[cxx|hxx]', pushing the remaining code in FGLight. (second try, with init bug fixed) --- diff --git a/projects/VC90/FlightGear/FlightGear.vcproj b/projects/VC90/FlightGear/FlightGear.vcproj index 9bf22509d..eacb7a081 100644 --- a/projects/VC90/FlightGear/FlightGear.vcproj +++ b/projects/VC90/FlightGear/FlightGear.vcproj @@ -4512,11 +4512,11 @@ > diff --git a/src/Environment/ephemeris.cxx b/src/Environment/ephemeris.cxx index 68c0bedf8..874617fd2 100644 --- a/src/Environment/ephemeris.cxx +++ b/src/Environment/ephemeris.cxx @@ -49,11 +49,14 @@ void Ephemeris::init() ephem_data_path.append("Astro"); _impl = new SGEphemeris(ephem_data_path.c_str()); globals->set_ephem(_impl); + + _latProp = fgGetNode("/position/latitude-deg", true); + update(0.0); } void Ephemeris::postinit() { - update(0.0); + } static void tieStar(const char* prop, Star* s, double (Star::*getter)() const) @@ -63,8 +66,6 @@ static void tieStar(const char* prop, Star* s, double (Star::*getter)() const) void Ephemeris::bind() { - _latProp = fgGetNode("/position/latitude-deg", true); - tieStar("/ephemeris/sun/xs", _impl->get_sun(), &Star::getxs); tieStar("/ephemeris/sun/ys", _impl->get_sun(), &Star::getys); tieStar("/ephemeris/sun/ze", _impl->get_sun(), &Star::getze); diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 1dd37d387..c277b6b73 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -37,7 +37,6 @@ #include #include #include