Christian's new weather subsystem is causing problems with some compilers
so I am allowing it to be #ifdef'd out until the compile problems can be resolved.
This commit is contained in:
parent
7397860323
commit
e945d2b761
6 changed files with 57 additions and 25 deletions
|
@ -61,6 +61,9 @@
|
|||
/* Define to include Oliver's networking support */
|
||||
#undef FG_NETWORK_OLK
|
||||
|
||||
/* Define to include Oliver's networking support */
|
||||
#undef FG_NEW_WEATHER
|
||||
|
||||
/* Define if we are building FGFS (should always be defined) */
|
||||
#undef FGFS
|
||||
|
||||
|
|
|
@ -4,6 +4,14 @@ else
|
|||
SERIAL_LIBS =
|
||||
endif
|
||||
|
||||
if ENABLE_NEW_WEATHER
|
||||
WEATHER_LIBS = $(top_builddir)/Simulator/WeatherCM/libWeatherCM.a \
|
||||
$(top_builddir)/Lib/Voronoi/libVoronoi.a
|
||||
else
|
||||
WEATHER_LIBS = $(top_builddir)/Simulator/Weather/libWeather.a
|
||||
endif
|
||||
|
||||
|
||||
CPPFLAGS += -DPKGLIBDIR=\"$(pkglibdir)\"
|
||||
|
||||
EXTRA_DIST = 3dfx.sh runfgfs.in runfgfs.bat.in
|
||||
|
@ -38,8 +46,7 @@ fgfs_LDADD = \
|
|||
$(top_builddir)/Simulator/Network/libNetwork.a \
|
||||
$(top_builddir)/Simulator/Objects/libObjects.a \
|
||||
$(top_builddir)/Simulator/Time/libTime.a \
|
||||
$(top_builddir)/Simulator/Weather/libWeather.a \
|
||||
$(top_builddir)/Simulator/WeatherCM/libWeatherCM.a \
|
||||
$(WEATHER_LIBS) \
|
||||
$(top_builddir)/Simulator/Joystick/libJoystick.a \
|
||||
$(SERIAL_LIBS) \
|
||||
$(top_builddir)/Lib/Math/libMath.a \
|
||||
|
|
|
@ -70,8 +70,12 @@
|
|||
#include <Time/light.hxx>
|
||||
#include <Time/sunpos.hxx>
|
||||
#include <Time/moonpos.hxx>
|
||||
// #include <Weather/weather.hxx>
|
||||
#include <WeatherCM/FGLocalWeatherDatabase.h>
|
||||
|
||||
#ifdef FG_NEW_WEATHER
|
||||
# include <WeatherCM/FGLocalWeatherDatabase.h>
|
||||
#else
|
||||
# include <Weather/weather.hxx>
|
||||
#endif
|
||||
|
||||
#include "fg_init.hxx"
|
||||
#include "options.hxx"
|
||||
|
@ -406,7 +410,7 @@ bool fgInitSubsystems( void ) {
|
|||
fgEVENT::FG_EVENT_READY, 30000 );
|
||||
|
||||
// Initialize the weather modeling subsystem
|
||||
// current_weather.Init();
|
||||
#ifdef FG_NEW_WEATHER
|
||||
// Initialize the WeatherDatabase
|
||||
FG_LOG(FG_GENERAL, FG_INFO, "Creating LocalWeatherDatabase");
|
||||
FGLocalWeatherDatabase::theFGLocalWeatherDatabase =
|
||||
|
@ -421,6 +425,9 @@ bool fgInitSubsystems( void ) {
|
|||
// register the periodic update of the weather
|
||||
global_events.Register( "weather update", fgUpdateWeatherDatabase,
|
||||
fgEVENT::FG_EVENT_READY, 30000);
|
||||
#else
|
||||
current_weather.Init();
|
||||
#endif
|
||||
|
||||
// Initialize the Cockpit subsystem
|
||||
if( fgCockpitInit( ¤t_aircraft )) {
|
||||
|
|
|
@ -53,8 +53,12 @@
|
|||
#include <Objects/materialmgr.hxx>
|
||||
#include <Time/fg_time.hxx>
|
||||
#include <Time/light.hxx>
|
||||
// #include <Weather/weather.hxx>
|
||||
#include <WeatherCM/FGLocalWeatherDatabase.h>
|
||||
|
||||
#ifdef FG_NEW_WEATHER
|
||||
# include <WeatherCM/FGLocalWeatherDatabase.h>
|
||||
#else
|
||||
# include <Weather/weather.hxx>
|
||||
#endif
|
||||
|
||||
#include "keyboard.hxx"
|
||||
#include "options.hxx"
|
||||
|
@ -77,7 +81,6 @@ void GLUTkey(unsigned char k, int x, int y) {
|
|||
FGInterface *f;
|
||||
FGTime *t;
|
||||
FGView *v;
|
||||
// FGWeather *w;
|
||||
float fov, tmp;
|
||||
static bool winding_ccw = true;
|
||||
int speed;
|
||||
|
@ -85,7 +88,6 @@ void GLUTkey(unsigned char k, int x, int y) {
|
|||
f = current_aircraft.fdm_state;
|
||||
t = FGTime::cur_time_params;
|
||||
v = ¤t_view;
|
||||
// w = ¤t_weather;
|
||||
|
||||
FG_LOG( FG_INPUT, FG_DEBUG, "Key hit = " << k );
|
||||
if ( puKeyboard(k, PU_DOWN) ) {
|
||||
|
@ -187,12 +189,15 @@ void GLUTkey(unsigned char k, int x, int y) {
|
|||
v->force_update_fov_math();
|
||||
return;
|
||||
case 90: // Z key
|
||||
// tmp = w->get_visibility(); // in meters
|
||||
// tmp /= 1.10;
|
||||
// w->set_visibility( tmp );
|
||||
#ifdef FG_NEW_WEATHER
|
||||
tmp = WeatherDatabase->getWeatherVisibility();
|
||||
tmp /= 1.10;
|
||||
WeatherDatabase->setWeatherVisibility( tmp );
|
||||
#else
|
||||
tmp = current_weather.get_visibility(); // in meters
|
||||
tmp /= 1.10;
|
||||
current_weather.set_visibility( tmp );
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
@ -308,12 +313,15 @@ void GLUTkey(unsigned char k, int x, int y) {
|
|||
v->force_update_fov_math();
|
||||
return;
|
||||
case 122: // z key
|
||||
// tmp = w->get_visibility(); // in meters
|
||||
// tmp *= 1.10;
|
||||
// w->set_visibility( tmp );
|
||||
#ifdef FG_NEW_WEATHER
|
||||
tmp = WeatherDatabase->getWeatherVisibility();
|
||||
tmp *= 1.10;
|
||||
WeatherDatabase->setWeatherVisibility( tmp );
|
||||
#else
|
||||
tmp = current_weather.get_visibility(); // in meters
|
||||
tmp *= 1.10;
|
||||
current_weather.set_visibility( tmp );
|
||||
#endif
|
||||
return;
|
||||
case 27: // ESC
|
||||
// if( fg_DebugOutput ) {
|
||||
|
|
|
@ -91,8 +91,10 @@
|
|||
#include <Time/fg_time.hxx>
|
||||
#include <Time/fg_timer.hxx>
|
||||
#include <Time/sunpos.hxx>
|
||||
// #include <Weather/weather.hxx>
|
||||
// #include <WeatherCM/FGLocalWeatherDatabase.h>
|
||||
|
||||
#ifndef FG_NEW_WEATHER
|
||||
# include <Weather/weather.hxx>
|
||||
#endif
|
||||
|
||||
#include "fg_init.hxx"
|
||||
#include "keyboard.hxx"
|
||||
|
@ -371,10 +373,8 @@ static void fgRenderFrame( void ) {
|
|||
// << current_weather.get_visibility() );
|
||||
|
||||
if ( agl > 10.0 ) {
|
||||
// ssgSetNearFar( 10.0f, current_weather.get_visibility() );
|
||||
ssgSetNearFar( 10.0f, 100000.0f );
|
||||
} else {
|
||||
// ssgSetNearFar( 0.5f, current_weather.get_visibility() );
|
||||
ssgSetNearFar( 0.5f, 100000.0f );
|
||||
}
|
||||
|
||||
|
@ -568,7 +568,9 @@ static void fgMainLoop( void ) {
|
|||
// init routine and we don't have to worry about it again.
|
||||
#endif
|
||||
|
||||
// current_weather.Update();
|
||||
#ifndef FG_NEW_WEATHER
|
||||
current_weather.Update();
|
||||
#endif
|
||||
|
||||
// Fix elevation. I'm just sticking this here for now, it should
|
||||
// probably move eventually
|
||||
|
|
|
@ -46,8 +46,12 @@
|
|||
#include <Math/vector.hxx>
|
||||
#include <Objects/materialmgr.hxx>
|
||||
#include <Objects/obj.hxx>
|
||||
// #include <Weather/weather.hxx>
|
||||
#include <WeatherCM/FGLocalWeatherDatabase.h>
|
||||
|
||||
#ifdef FG_NEW_WEATHER
|
||||
# include <WeatherCM/FGLocalWeatherDatabase.h>
|
||||
#else
|
||||
# include <Weather/weather.hxx>
|
||||
#endif
|
||||
|
||||
#include "scenery.hxx"
|
||||
#include "tilecache.hxx"
|
||||
|
@ -689,11 +693,12 @@ void FGTileMgr::prep_ssg_nodes( void ) {
|
|||
if ( t->is_loaded() ) {
|
||||
// set range selector (LOD trick) to be distance to center
|
||||
// of tile + bounding radius
|
||||
/*
|
||||
* ranges[1] = current_weather.get_visibility()+t->bounding_radius;
|
||||
*/
|
||||
#ifdef FG_NEW_WEATHER
|
||||
ranges[1] = WeatherDatabase->getWeatherVisibility()
|
||||
+ t->bounding_radius;
|
||||
#else
|
||||
ranges[1] = current_weather.get_visibility()+t->bounding_radius;
|
||||
#endif
|
||||
t->range_ptr->setRanges( ranges, 2 );
|
||||
|
||||
// calculate tile offset
|
||||
|
|
Loading…
Reference in a new issue