]> git.mxchange.org Git - flightgear.git/commitdiff
Type-ified fgTIME and fgVIEW.
authorcurt <curt>
Tue, 28 Apr 1998 01:22:16 +0000 (01:22 +0000)
committercurt <curt>
Tue, 28 Apr 1998 01:22:16 +0000 (01:22 +0000)
Time/fg_time.cxx
Time/fg_time.hxx
Time/fg_timer.cxx
Time/light.cxx
Time/sunpos.cxx

index cb3eca09158763e96a46f70bf0c373684427e3c3..c281f5b79d1762ce2918bd6b1281f6d25bd9c115 100644 (file)
 #define RADHR(x)        DEGHR(x*RAD_TO_DEG)
 
 
-struct fgTIME cur_time_params;
+fgTIME cur_time_params;
 
 
 // Initialize the time dependent variables
 
-void fgTimeInit(struct fgTIME *t) {
+void fgTimeInit(fgTIME *t) {
     fgOPTIONS *o;
 
     o = &current_options;
@@ -312,7 +312,7 @@ double sidereal_course(struct tm *gmt, time_t now, double lng) {
 
 
 // Update time variables such as gmt, julian date, and sidereal time
-void fgTimeUpdate(fgFLIGHT *f, struct fgTIME *t) {
+void fgTimeUpdate(fgFLIGHT *f, fgTIME *t) {
     double gst_precise, gst_course;
 
     fgPrintf( FG_EVENT, FG_BULK, "Updating time\n");
@@ -375,6 +375,9 @@ void fgTimeUpdate(fgFLIGHT *f, struct fgTIME *t) {
 
 
 // $Log$
+// Revision 1.4  1998/04/28 01:22:16  curt
+// Type-ified fgTIME and fgVIEW.
+//
 // Revision 1.3  1998/04/25 22:06:33  curt
 // Edited cvs log messages in source files ... bad bad bad!
 //
index b0a31c3c756049a2353d1006c7c830ac64d1e42b..8e5c01913ee7d2c4204cb650d248df47d02d5fd4 100644 (file)
@@ -48,7 +48,7 @@
 
 
 // Define a structure containing global time parameters
-struct fgTIME {
+typedef struct {
     // the date/time in various forms
     // Unix "calendar" time in seconds
     time_t cur_time;
@@ -80,9 +80,9 @@ struct fgTIME {
     // How much to change the value of warp each iteration.  Allows us
     // to make time progress faster than normal.
     long int warp_delta; 
-};
+} fgTIME;
 
-extern struct fgTIME cur_time_params;
+extern fgTIME cur_time_params;
 
 
 typedef struct fg_timestamp_t {
@@ -104,17 +104,20 @@ void timesum(fg_timestamp *res, fg_timestamp *start, long millis);
 
 
 // Update time variables such as gmt, julian date, and sidereal time
-void fgTimeInit(struct fgTIME *t);
+void fgTimeInit(fgTIME *t);
 
 
 // Update the time dependent variables
-void fgTimeUpdate(fgFLIGHT *f, struct fgTIME *t);
+void fgTimeUpdate(fgFLIGHT *f, fgTIME *t);
 
 
 #endif // _FG_TIME_HXX
 
 
 // $Log$
+// Revision 1.4  1998/04/28 01:22:17  curt
+// Type-ified fgTIME and fgVIEW.
+//
 // Revision 1.3  1998/04/25 22:06:34  curt
 // Edited cvs log messages in source files ... bad bad bad!
 //
index ebd397cbffc51c303efb839cabc6083580b2f70e..bb1fc3f13d9392b8bc4c7bc51d87c81c698e4fc5 100644 (file)
 #include <signal.h>    /* for timer routines */
 #include <stdio.h>     /* for printf() */
 
+#ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+#endif
+
 #ifdef HAVE_SYS_TIME_H
 #  include <sys/time.h>  /* for get/setitimer, gettimeofday, struct timeval */
 #endif
@@ -117,11 +121,14 @@ int fgGetTimeInterval( void ) {
 
 
 /* $Log$
-/* Revision 1.2  1998/04/25 20:24:03  curt
-/* Cleaned up initialization sequence to eliminate interdependencies
-/* between sun position, lighting, and view position.  This creates a
-/* valid single pass initialization path.
+/* Revision 1.3  1998/04/28 01:22:18  curt
+/* Type-ified fgTIME and fgVIEW.
 /*
+ * Revision 1.2  1998/04/25 20:24:03  curt
+ * Cleaned up initialization sequence to eliminate interdependencies
+ * between sun position, lighting, and view position.  This creates a
+ * valid single pass initialization path.
+ *
  * Revision 1.1  1998/04/24 00:52:29  curt
  * Wrapped "#include <config.h>" in "#ifdef HAVE_CONFIG_H"
  * Fog color fixes.
index 5177645ea6db76ca9f1842804d0feaa8283a1eb8..4d67b4d0f8ac1a5faaed7fe34db3e9946d2a9229 100644 (file)
@@ -95,8 +95,8 @@ void fgLightInit( void ) {
 // update lighting parameters based on current sun position
 void fgLightUpdate( void ) {
     fgLIGHT *l;
-    struct fgTIME *t;
-    struct fgVIEW *v;
+    fgTIME *t;
+    fgVIEW *v;
     /* if the 4th field is 0.0, this specifies a direction ... */
     GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 };
     /* base sky color */
@@ -158,6 +158,9 @@ void fgLightUpdate( void ) {
 
 
 // $Log$
+// Revision 1.4  1998/04/28 01:22:18  curt
+// Type-ified fgTIME and fgVIEW.
+//
 // Revision 1.3  1998/04/26 05:10:04  curt
 // "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
 //
index 99676422498532eb6a7e2141c35ec917c59591d0..2c0c22ef06f660299ac342b1be784e8e4964d478 100644 (file)
@@ -273,8 +273,8 @@ void fgSunPosition(time_t ssue, double *lon, double *lat) {
 // update the cur_time_params structure with the current sun position
 void fgUpdateSunPos( void ) {
     fgLIGHT *l;
-    struct fgTIME *t;
-    struct fgVIEW *v;
+    fgTIME *t;
+    fgVIEW *v;
     MAT3vec nup, nsun, v0;
     double sun_gd_lat, sl_radius;
     double ntmp;
@@ -346,6 +346,9 @@ void fgUpdateSunPos( void ) {
 
 
 // $Log$
+// Revision 1.6  1998/04/28 01:22:18  curt
+// Type-ified fgTIME and fgVIEW.
+//
 // Revision 1.5  1998/04/26 05:10:05  curt
 // "struct fgLIGHT" -> "fgLIGHT" because fgLIGHT is typedef'd.
 //