Hptr fgHUDAddHorizon( Hptr hud, int x_pos, int y_pos, int length, \
int hole_len, double (*load_value)() )
{
+#ifndef WIN32
struct HUD_horizon *horizon;
struct HUD_instr *instrument;
HIptr tmp_first, tmp_next;
hud->instruments = instrument;
return( hud );
+#endif
}
Hptr fgHUDAddScale( Hptr hud, int type, int scr_pos, int scr_min, int scr_max, int div_min, int div_max, \
int orientation, int with_min, int min_value, int width_units, double (*load_value)() )
{
+#ifndef WIN32
struct HUD_scale *scale;
struct HUD_instr *instrument;
HIptr tmp_first, tmp_next;
hud->instruments = instrument;
return( hud );
+#endif
}
Hptr fgHUDAddLabel( Hptr hud, int x_pos, int y_pos, int size, int blink, int justify, \
char *pre_str, char *post_str, char *format, double (*load_value)() )
{
+#ifndef WIN32
struct HUD_label *label;
struct HUD_instr *instrument;
HIptr tmp_first, tmp_next;
hud->instruments = instrument;
return( hud );
+#endif
}
Hptr fgHUDAddLadder( Hptr hud, int x_pos, int y_pos, int scr_width, int scr_height, \
int hole_len, int div_units, int label_pos, int width_units, \
double (*load_roll)(), double (*load_pitch)() )
{
+#ifndef WIN32
struct HUD_ladder *ladder;
struct HUD_instr *instrument;
HIptr tmp_first, tmp_next;
hud->instruments = instrument;
return( hud );
+#endif
}
/*
/* $Log$
-/* Revision 1.3 1997/09/05 14:17:26 curt
-/* More tweaking with stars.
+/* Revision 1.4 1997/09/23 00:29:32 curt
+/* Tweaks to get things to compile with gcc-win32.
/*
+ * Revision 1.3 1997/09/05 14:17:26 curt
+ * More tweaking with stars.
+ *
* Revision 1.2 1997/09/04 02:17:30 curt
* Shufflin' stuff.
*
sky = 0.85 * pow(1.2, -x_8 / 20.0) + 0.15;
- sky = 0.15; /* force a dark sky (for testing) */
+ /* sky = 0.15; */ /* to force a dark sky (for testing) */
if ( ambient < 0.1 ) { ambient = 0.1; }
if ( diffuse < 0.0 ) { diffuse = 0.0; }
/* $Log$
-/* Revision 1.20 1997/09/22 14:44:19 curt
-/* Continuing to try to align stars correctly.
+/* Revision 1.21 1997/09/23 00:29:38 curt
+/* Tweaks to get things to compile with gcc-win32.
/*
+ * Revision 1.20 1997/09/22 14:44:19 curt
+ * Continuing to try to align stars correctly.
+ *
* Revision 1.19 1997/09/18 16:20:08 curt
* At dusk/dawn add/remove stars in stages.
*
/* FG_Latitude = ( 45.15 ) * DEG_TO_RAD; */
/* FG_Altitude = FG_Runway_altitude + 3.758099; */
- FG_Longitude = ( -583200.00 / 3600.0 ) * DEG_TO_RAD;
- FG_Latitude = ( 110808.41 / 3600.0 ) * DEG_TO_RAD;
+ /* A random test position */
+ /* FG_Longitude = ( 88128.00 / 3600.0 ) * DEG_TO_RAD; */
+ /* FG_Latitude = ( 93312.00 / 3600.0 ) * DEG_TO_RAD; */
printf("Initial position is: (%.4f, %.4f, %.2f)\n",
FG_Longitude * RAD_TO_DEG, FG_Latitude * RAD_TO_DEG,
/* $Log$
-/* Revision 1.8 1997/09/22 14:44:20 curt
-/* Continuing to try to align stars correctly.
+/* Revision 1.9 1997/09/23 00:29:39 curt
+/* Tweaks to get things to compile with gcc-win32.
/*
+ * Revision 1.8 1997/09/22 14:44:20 curt
+ * Continuing to try to align stars correctly.
+ *
* Revision 1.7 1997/09/16 15:50:30 curt
* Working on star alignment and time issues.
*
/* FG_PI_2 + 0.1 is about 6 degrees after sundown and before sunrise */
- t->sun_angle = 3.0; /* force stars (for testing) */
+ /* t->sun_angle = 3.0; */ /* to force stars to be drawn (for testing) */
if ( t->sun_angle > (FG_PI_2 + 5 * DEG_TO_RAD ) ) {
/* determine which star structure to draw */
/* $Log$
-/* Revision 1.11 1997/09/22 14:44:21 curt
-/* Continuing to try to align stars correctly.
+/* Revision 1.12 1997/09/23 00:29:43 curt
+/* Tweaks to get things to compile with gcc-win32.
/*
+ * Revision 1.11 1997/09/22 14:44:21 curt
+ * Continuing to try to align stars correctly.
+ *
* Revision 1.10 1997/09/20 03:34:32 curt
* Still trying to get those durned stars aligned properly.
*
tar cvzf bin-$(VERSION).tar.gz FlightGear/fgtop FlightGear/fg0 \
FlightGear/runfg FlightGear/COPYING FlightGear/Docs FlightGear/Thanks)
-bin-zip: all
+bin-zip:
cp GLUT/fg0.exe GLUT/runfg.bat GLUT/cygwin.dll ..
(cd ../..; \
zip -r bin-$(VERSION).zip FlightGear/fgtop FlightGear/fg0.exe \
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.27 1997/09/23 00:29:27 curt
+# Tweaks to get things to compile with gcc-win32.
+#
# Revision 1.26 1997/09/04 02:17:18 curt
# Shufflin' stuff.
#
#---------------------------------------------------------------------------
# Linux/Mesa with the GLUT toolkit
#
-INTERFACE_FLAGS = -DGLUT
-INTERFACE_LIBS = -lglut
-INTERFACE_FILES = GLUTmain.c GLUTkey.c
-MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
-X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
-GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
-FG_CFLAGS = $(GLOBAL_CFLAGS)
+# INTERFACE_FLAGS = -DGLUT
+# INTERFACE_LIBS = -lglut
+# INTERFACE_FILES = GLUTmain.c GLUTkey.c
+# MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
+# X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
+# GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
+# FG_CFLAGS = $(GLOBAL_CFLAGS)
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# Cygnus Win32 (gcc based) with a static version of the GLUT toolkit
#
-# INTERFACE_FLAGS = -DGLUT
-# INTERFACE_LIBS = ../Win32/libglut.a
-# INTERFACE_FILES = GLUTmain.c GLUTkey.c
-# GRAPHICS_LIBS = -lglu32 -lopengl32 -luser32 -lgdi32
-# FG_CFLAGS = $(GLOBAL_CFLAGS) -DWIN32 -DUSE_RAND
+INTERFACE_FLAGS = -DGLUT
+INTERFACE_LIBS = ../Win32/libglut.a
+INTERFACE_FILES = GLUTmain.c GLUTkey.c
+GRAPHICS_LIBS = -lglu32 -lopengl32 -luser32 -lgdi32
+FG_CFLAGS = $(GLOBAL_CFLAGS) -DWIN32 -DUSE_RAND
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.15 1997/09/23 00:29:27 curt
+# Tweaks to get things to compile with gcc-win32.
+#
# Revision 1.14 1997/09/16 22:14:47 curt
# Tweaked time of day lighting equations. Don't draw stars during the day.
#
#include <stdlib.h>
#include <time.h>
+#ifdef WIN32
+#include <sys/time.h> /* for gettimeofday() */
+#include <unistd.h> /* for gettimeofday() */
+#endif
+
#include "fg_time.h"
#include "../constants.h"
#include "../Flight/flight.h"
long int offset;
double diff, part, days, hours, lst;
+#ifdef WIN32
+ int daylight;
+ long int timezone;
+
+ struct timeval tv;
+ struct timezone tz;
+#endif
+
printf("COURSE: GMT = %d/%d/%2d %d:%02d:%02d\n",
gmt->tm_mon, gmt->tm_mday, gmt->tm_year,
gmt->tm_hour, gmt->tm_min, gmt->tm_sec);
start = mktime(&mt);
+#ifdef WIN32
+ daylight = mt.tm_isdst;
+ gettimeofday(&tv, &tz);
+ timezone = tz.tz_minuteswest * 60;
+#endif
+
+ if ( daylight > 0 ) {
+ daylight = 1;
+ } else if ( daylight < 0 ) {
+ printf("OOOPS, big time problem in fg_time.c, no daylight savings info.\n");
+ }
+
offset = -(timezone / 3600 - daylight);
printf("Raw time zone offset = %ld\n", timezone);
/* $Log$
-/* Revision 1.6 1997/09/20 03:34:34 curt
-/* Still trying to get those durned stars aligned properly.
+/* Revision 1.7 1997/09/23 00:29:50 curt
+/* Tweaks to get things to compile with gcc-win32.
/*
+ * Revision 1.6 1997/09/20 03:34:34 curt
+ * Still trying to get those durned stars aligned properly.
+ *
* Revision 1.5 1997/09/16 22:14:52 curt
* Tweaked time of day lighting equations. Don't draw stars during the day.
*