#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 = ¤t_options;
// 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");
// $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!
//
// 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;
// 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 {
// 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!
//
#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
/* $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.
// 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 */
// $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.
//
// 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;
// $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.
//