]> git.mxchange.org Git - flightgear.git/blobdiff - Weather/weather.cxx
Renamed class fgFLIGHT to class FGState as per request by JSB.
[flightgear.git] / Weather / weather.cxx
index 14593ceab31ffb4cddcaaa5502022c52d465539f..21d702c5cf74a0e4fb12e77e3ffc7ace875868a1 100644 (file)
 #include <XGL/xgl.h>
 
 #include <math.h>
-#include <stdio.h>
-
-#include "weather.hxx"
 
 #include <Aircraft/aircraft.hxx>
-#include <Debug/fg_debug.h>
+#include <Debug/logstream.hxx>
 #include <Math/fg_random.h>
+#include <Weather/weather.hxx>
 
 
 // This is a record containing current weather info
@@ -53,7 +51,7 @@ void fgWeatherInit( void ) {
 
     w = &current_weather;
 
-    printf("Initializing weather subsystem\n");
+    FG_LOG( FG_GENERAL, FG_INFO, "Initializing weather subsystem");
 
     // Configure some wind
     // FG_V_north_airmass = 15; // ft/s =~ 10mph
@@ -69,10 +67,10 @@ void fgWeatherUpdate( void ) {
     // temporarily remove the code of this do-nothing routine
 
 // #ifdef FG_WEATHER_UPDATE
-    fgFLIGHT *f;
+    FGState *f;
     struct fgWEATHER *w;
 
-    f = current_aircraft.flight;
+    f = current_aircraft.fdm_state;
     w = &current_weather;
 
     // Add some random turbulence
@@ -101,12 +99,22 @@ void fgWeatherSetVisibility( float visibility ) {
     // w->fog_density = -log(0.01 / w->visibility;        // for GL_FOG_EXP
     w->fog_density = sqrt( -log(0.01) ) / w->visibility;  // for GL_FOG_EXP2
     xglFogf (GL_FOG_DENSITY, w->fog_density);
-    fgPrintf( FG_INPUT, FG_DEBUG, 
-             "Fog density = %.4f\n", w->fog_density);
+    FG_LOG( FG_INPUT, FG_DEBUG, "Fog density = " << w->fog_density );
 }
 
 
 // $Log$
+// Revision 1.4  1998/12/05 15:54:31  curt
+// Renamed class fgFLIGHT to class FGState as per request by JSB.
+//
+// Revision 1.3  1998/11/23 21:49:11  curt
+// Borland portability tweaks.
+//
+// Revision 1.2  1998/11/06 21:18:29  curt
+// Converted to new logstream debugging facility.  This allows release
+// builds with no messages at all (and no performance impact) by using
+// the -DFG_NDEBUG flag.
+//
 // Revision 1.1  1998/10/17 01:34:36  curt
 // C++ ifying ...
 //