From 37220833ed5c2c3621b7ea482cf4b0f63431cd9a Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 22 Oct 1999 00:27:49 +0000 Subject: [PATCH] Added Durk's first stab at clouds. Added Simulator/Clouds/ Durk fixed a problem in gui.cxx with cursor type. Durk updated his time zone / time-offset command line parameters Curt added a cheezy fade in/out as we transition through the cloud layer. We really need to fog the sky dome, sun, moon, stars as well. Curt added --enable/disable-clouds and --clouds-asl= to control clouds. --- src/GUI/gui.cxx | 4 ++-- src/Main/Makefile.am | 1 + src/Main/fg_init.cxx | 5 +++++ src/Main/main.cxx | 45 ++++++++++++++++++++++++++++++++++++++++---- src/Main/options.cxx | 40 ++++++++++++++++++++++++++------------- src/Main/options.hxx | 6 ++++++ src/Objects/obj.cxx | 10 +++++++++- src/Time/fg_time.cxx | 23 +++++++++++++++++++++- src/Time/fg_time.hxx | 6 +++++- 9 files changed, 118 insertions(+), 22 deletions(-) diff --git a/src/GUI/gui.cxx b/src/GUI/gui.cxx index 42589cdf0..a084813c3 100644 --- a/src/GUI/gui.cxx +++ b/src/GUI/gui.cxx @@ -332,11 +332,11 @@ void maybeToggleMouse( void ) // Call with FALSE to init and TRUE to restore void BusyCursor( int restore ) { - static int cursor = 0; + static GLenum cursor = (GLenum) 0; if( restore ) { glutSetCursor(cursor); } else { - cursor = glutGet( GLUT_WINDOW_CURSOR ); + cursor = (GLenum) glutGet( (GLenum) GLUT_WINDOW_CURSOR ); #if defined(WIN32_CURSOR_TWEAKS) TurnCursorOn(); #endif diff --git a/src/Main/Makefile.am b/src/Main/Makefile.am index 4dd37291f..76c06e8c7 100644 --- a/src/Main/Makefile.am +++ b/src/Main/Makefile.am @@ -45,6 +45,7 @@ fgfs_LDADD = \ $(top_builddir)/Simulator/Airports/libAirports.a \ $(top_builddir)/Simulator/Network/libNetwork.a \ $(top_builddir)/Simulator/Objects/libObjects.a \ + $(top_builddir)/Simulator/Clouds/libClouds.a \ $(top_builddir)/Simulator/Time/libTime.a \ $(WEATHER_LIBS) \ $(top_builddir)/Simulator/Joystick/libJoystick.a \ diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index ac3916ed3..a865a0abc 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -427,6 +427,11 @@ bool fgInitSubsystems( void ) { fgMethodCallback( &cur_light_params, &fgLIGHT::Update), fgEVENT::FG_EVENT_READY, 30000 ); + // update the current timezone each 30 minutes + global_events.Register( "fgTIME::updateLocal()", + fgMethodCallback(FGTime::cur_time_params, + &FGTime::updateLocal), + fgEVENT::FG_EVENT_READY, 1800000); // Initialize the weather modeling subsystem #ifndef FG_OLD_WEATHER diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 93964355d..6945772e0 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -92,7 +92,9 @@ #include