Tweaked the sky's sunset/rise colors.
Other misc. tweaks.
if ( (sun_angle > 80.0) && (sun_angle < 100.0) ) {
/* 0.0 - 0.4 */
outer_param[0] = (10.0 - fabs(90.0 - sun_angle)) / 25.0;
- outer_param[1] = (10.0 - fabs(90.0 - sun_angle)) / 45.0;
+ outer_param[1] = (10.0 - fabs(90.0 - sun_angle)) / 35.0;
outer_param[2] = 0.0;
- middle_param[0] = (10.0 - fabs(90.0 - sun_angle)) / 40.0;
- middle_param[1] = (10.0 - fabs(90.0 - sun_angle)) / 60.0;
+ middle_param[0] = (10.0 - fabs(90.0 - sun_angle)) / 20.0;
+ middle_param[1] = (10.0 - fabs(90.0 - sun_angle)) / 40.0;
middle_param[2] = 0.0;
outer_diff[0] = outer_param[0] / 6.0;
/* $Log$
-/* Revision 1.6 1998/02/07 15:29:32 curt
-/* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
-/* <chotchkiss@namg.us.anritsu.com>
+/* Revision 1.7 1998/02/19 13:05:49 curt
+/* Incorporated some HUD tweaks from Michelle America.
+/* Tweaked the sky's sunset/rise colors.
+/* Other misc. tweaks.
/*
+ * Revision 1.6 1998/02/07 15:29:32 curt
+ * Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
+ * <chotchkiss@namg.us.anritsu.com>
+ *
* Revision 1.5 1998/01/27 00:47:48 curt
* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
* system and commandline/config file processing code.
// For now lets just hardcode the hud here.
// In the future, hud information has to come from the same place
// aircraft information came from.
-
+
+ fgHUDSetTimeMode( hud, NIGHT );
+ fgHUDSetBrightness( hud, BRT_LIGHT );
+
+ // Small, original HUD configuration
+ // fgHUDAddHorizon( hud, 590, 50, 40, 20, get_roll );
+ // fgHUDAddLadder ( hud, 330, 190, 90, 180, 70, 10,
+ // NONE, 45, get_roll, get_pitch );
+ // fgHUDAddScale ( hud, VERTICAL, LIMIT, 220, 100, 280, 5, 10,
+ // LEFT, 0, 100, 50, get_speed );
+ // fgHUDAddScale ( hud, VERTICAL, NOLIMIT, 440, 100, 280, 1, 5, RIGHT,
+ // -40, 50, 25, get_aoa );
+ // fgHUDAddScale ( hud, HORIZONTAL, NOLIMIT, 280, 220, 440, 5, 10,
+ // TOP, 0, 50, 50, get_heading );
+ // fgHUDAddLabel ( hud, 180, 85, SMALL, NOBLINK,
+ // RIGHT_JUST, NULL, " Kts", "%5.0f", get_speed );
+ // fgHUDAddLabel ( hud, 180, 73, SMALL, NOBLINK,
+ // RIGHT_JUST, NULL, " m", "%5.0f", get_altitude );
+ // fgHUDAddControlSurfaces( hud, 10, 10, NULL );
+
+ // Bigger and placed a bit higher HUD configuration
fgHUDAddHorizon( hud, 590, 50, 40, 20, get_roll );
- fgHUDAddLadder ( hud, 330, 190, 90, 180, 70, 10,
+ fgHUDAddLadder ( hud, 330, 270, 120, 180, 70, 10,
NONE, 45, get_roll, get_pitch );
- fgHUDAddScale ( hud, VERTICAL, LIMIT, 220, 100, 280, 5, 10,
+ fgHUDAddScale ( hud, VERTICAL, LIMIT, 200, 180, 380, 5, 10,
LEFT, 0, 100, 50, get_speed );
- fgHUDAddScale ( hud, VERTICAL, NOLIMIT, 440, 100, 280, 1, 5,
+ fgHUDAddScale ( hud, VERTICAL, NOLIMIT, 460, 180, 380, 1, 5,
RIGHT, -40, 50, 25, get_aoa );
- fgHUDAddScale ( hud, HORIZONTAL, NOLIMIT, 280, 220, 440, 5, 10,
+ fgHUDAddScale ( hud, HORIZONTAL, NOLIMIT, 380, 200, 460, 5, 10,
TOP, 0, 50, 50, get_heading );
- fgHUDAddLabel ( hud, 180, 85, SMALL, NOBLINK,
+ fgHUDAddLabel ( hud, 160, 165, SMALL, NOBLINK,
RIGHT_JUST, NULL, " Kts", "%5.0f", get_speed );
- fgHUDAddLabel ( hud, 180, 73, SMALL, NOBLINK,
+ fgHUDAddLabel ( hud, 160, 153, SMALL, NOBLINK,
RIGHT_JUST, NULL, " m", "%5.0f", get_altitude );
fgHUDAddControlSurfaces( hud, 10, 10, NULL );
return( hud );
}
-
// add_instrument
//
// This is a stand in for linked list code that will get replaced later
glDisable(GL_LIGHTING);
glLineWidth(1);
- glColor3f (0.1, 0.9, 0.1);
+
+ if( hud->time_of_day==DAY) {
+ switch (hud->brightness) {
+ case BRT_LIGHT:
+ glColor3f (0.1, 0.9, 0.1);
+ break;
+ case BRT_MEDIUM:
+ glColor3f (0.1, 0.7, 0.0);
+ break;
+ case BRT_DARK:
+ glColor3f (0.0, 0.5, 0.0);
+ }
+ }
+ else if( hud->time_of_day==NIGHT) {
+ switch (hud->brightness) {
+ case BRT_LIGHT:
+ glColor3f (0.9, 0.1, 0.1);
+ break;
+ case BRT_MEDIUM:
+ glColor3f (0.7, 0.0, 0.1);
+ break;
+ case BRT_DARK:
+ glColor3f (0.5, 0.0, 0.0);
+ }
+ }
fgPrintf( FG_COCKPIT, FG_DEBUG, "HUD Code %d Status %d\n",
hud->code, hud->status );
glPopMatrix();
}
+void fgHUDSetTimeMode( Hptr hud, int time_of_day )
+{
+
+ hud->time_of_day = time_of_day;
+
+}
+
+void fgHUDSetBrightness( Hptr hud, int brightness )
+{
+
+ hud->brightness = brightness;
+
+}
/* $Log$
-/* Revision 1.15 1998/02/16 13:38:39 curt
-/* Integrated changes from Charlie Hotchkiss.
+/* Revision 1.16 1998/02/19 13:05:49 curt
+/* Incorporated some HUD tweaks from Michelle America.
+/* Tweaked the sky's sunset/rise colors.
+/* Other misc. tweaks.
/*
+ * Revision 1.15 1998/02/16 13:38:39 curt
+ * Integrated changes from Charlie Hotchkiss.
+ *
* Revision 1.14 1998/02/12 21:59:41 curt
* Incorporated code changes contributed by Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>
enum VIEW_MODES { HUD_VIEW, PANEL_VIEW, CHASE_VIEW, TOWER_VIEW };
+// Hud general constants
+#define DAY 1
+#define NIGHT 2
+#define BRT_DARK 3
+#define BRT_MEDIUM 4
+#define BRT_LIGHT 5
+#define SIZE_SMALL 6
+#define SIZE_LARGE 7
+
// Instrument types
#define ARTIFICIAL_HORIZON 1
#define SCALE 2
int code;
HIptr instruments;
int status;
+ int time_of_day;
+ int brightness;
+ int size; // possibly another name for this ? (michele)
}HUD, *Hptr;
Hptr fgHUDInit ( fgAIRCRAFT *cur_aircraft );
+void fgHUDSetTimeMode( Hptr hud, int time_of_day );
+void fgHUDSetBrightness( Hptr hud, int brightness );
+
Hptr fgHUDAddHorizon( Hptr hud,
int x_pos,
int y_pos,
void fgUpdateHUD ( Hptr hud );
void fgUpdateHUD2( Hptr hud ); // Future use?
-
#endif // _HUD_H
/* $Log$
-/* Revision 1.11 1998/02/16 13:38:42 curt
-/* Integrated changes from Charlie Hotchkiss.
+/* Revision 1.12 1998/02/19 13:05:52 curt
+/* Incorporated some HUD tweaks from Michelle America.
+/* Tweaked the sky's sunset/rise colors.
+/* Other misc. tweaks.
/*
+ * Revision 1.11 1998/02/16 13:38:42 curt
+ * Integrated changes from Charlie Hotchkiss.
+ *
* Revision 1.10 1998/02/12 21:59:42 curt
* Incorporated code changes contributed by Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>
FG_Runway_altitude = (3234.5 + 300);
FG_Altitude = FG_Runway_altitude + 3.758099;
- /* Initial Position at (E81) Superior, AZ */
- /* FG_Longitude = ( -111.1270650 ) * DEG_TO_RAD; */
- /* FG_Latitude = ( 33.2778339 ) * DEG_TO_RAD; */
- /* FG_Runway_altitude = (2646 + 1000); */
- /* FG_Altitude = FG_Runway_altitude + 3.758099; */
+ // Initial Position at (E81) Superior, AZ
+ // FG_Longitude = ( -111.1270650 ) * DEG_TO_RAD;
+ // FG_Latitude = ( 33.2778339 ) * DEG_TO_RAD;
+ // FG_Runway_altitude = (2646 + 1000);
+ // FG_Altitude = FG_Runway_altitude + 3.758099;
// Initial Position at (TUS) Tucson, AZ
- FG_Longitude = ( -110.9412597 ) * DEG_TO_RAD;
- FG_Latitude = ( 32.1162439 ) * DEG_TO_RAD;
- FG_Runway_altitude = (2641 + 0);
- FG_Altitude = FG_Runway_altitude + 3.758099;
+ // FG_Longitude = ( -110.9412597 ) * DEG_TO_RAD;
+ // FG_Latitude = ( 32.1162439 ) * DEG_TO_RAD;
+ // FG_Runway_altitude = (2641 + 0);
+ // FG_Altitude = FG_Runway_altitude + 3.758099;
/* Initial Position at near Anchoraze, AK */
/* FG_Longitude = ( -150.00 ) * DEG_TO_RAD; */
/* FG_Latitude = ( 45.15 ) * DEG_TO_RAD; */
/* FG_Altitude = FG_Runway_altitude + 3.758099; */
- /* Initial Position: Somewhere near the Grand Canyon */
- /* FG_Longitude = ( -112.5 ) * DEG_TO_RAD; */
- /* FG_Latitude = ( 36.5 ) * DEG_TO_RAD; */
- /* FG_Runway_altitude = 5000.0; */
- /* FG_Altitude = FG_Runway_altitude + 3.758099; */
+ // Initial Position: Somewhere near the Grand Canyon
+ FG_Longitude = ( -112.5 ) * DEG_TO_RAD;
+ FG_Latitude = ( 36.5 ) * DEG_TO_RAD;
+ FG_Runway_altitude = 5000.0;
+ FG_Altitude = FG_Runway_altitude + 3.758099;
// Initial Position: (GCN) Grand Canyon Airport, AZ
// FG_Longitude = ( -112.1469647 ) * DEG_TO_RAD;
// FG_Altitude = FG_Runway_altitude + 3.758099;
// Initial Position: Jim Brennon's Kingmont Observatory
- FG_Longitude = ( -121.1131666 ) * DEG_TO_RAD;
- FG_Latitude = ( 38.8293916 ) * DEG_TO_RAD;
- FG_Runway_altitude = 920.0 + 100;
- FG_Altitude = FG_Runway_altitude + 3.758099;
+ // FG_Longitude = ( -121.1131666 ) * DEG_TO_RAD;
+ // FG_Latitude = ( 38.8293916 ) * DEG_TO_RAD;
+ // FG_Runway_altitude = 920.0 + 100;
+ // FG_Altitude = FG_Runway_altitude + 3.758099;
// Test Position
// FG_Longitude = ( -111.18 ) * DEG_TO_RAD;
/* $Log$
-/* Revision 1.46 1998/02/18 15:07:06 curt
-/* Tweaks to build with SGI OpenGL (and therefor hopefully other accelerated
-/* drivers will work.)
+/* Revision 1.47 1998/02/19 13:05:53 curt
+/* Incorporated some HUD tweaks from Michelle America.
+/* Tweaked the sky's sunset/rise colors.
+/* Other misc. tweaks.
/*
+ * Revision 1.46 1998/02/18 15:07:06 curt
+ * Tweaks to build with SGI OpenGL (and therefor hopefully other accelerated
+ * drivers will work.)
+ *
* Revision 1.45 1998/02/16 13:39:43 curt
* Miscellaneous weekend tweaks. Fixed? a cache problem that caused whole
* tiles to occasionally be missing.
#include <Main/fg_debug.h>
-#define FG_LOCAL_X 5 /* should be odd */
-#define FG_LOCAL_Y 5 /* should be odd */
-#define FG_LOCAL_X_Y 25 /* At least FG_LOCAL_X times FG_LOCAL_Y */
+#define FG_LOCAL_X 7 /* should be odd */
+#define FG_LOCAL_Y 7 /* should be odd */
+#define FG_LOCAL_X_Y 49 /* At least FG_LOCAL_X times FG_LOCAL_Y */
/* closest (potentially viewable) tiles, centered on current tile.
/* $Log$
-/* Revision 1.17 1998/02/16 13:39:46 curt
-/* Miscellaneous weekend tweaks. Fixed? a cache problem that caused whole
-/* tiles to occasionally be missing.
+/* Revision 1.18 1998/02/19 13:05:54 curt
+/* Incorporated some HUD tweaks from Michelle America.
+/* Tweaked the sky's sunset/rise colors.
+/* Other misc. tweaks.
/*
+ * Revision 1.17 1998/02/16 13:39:46 curt
+ * Miscellaneous weekend tweaks. Fixed? a cache problem that caused whole
+ * tiles to occasionally be missing.
+ *
* Revision 1.16 1998/02/12 21:59:53 curt
* Incorporated code changes contributed by Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com>
clean:
-rm -f *.os2 *~
- -rm -f $(FG_ROOT_LIB)/stamp_libs
+ -rm -f $(FG_ROOT_LIB)/*.a $(FG_ROOT_LIB)/stamp_libs
for dir in $(ORDEREDDIRS); do \
(cd $$dir; $(MAKE) clean) ; \
done
clobber:
-rm -f *.os2 *~
- -rm -f $(FG_ROOT_LIB)/stamp_libs
+ -rm -f $(FG_ROOT_LIB)/*.a $(FG_ROOT_LIB)/stamp_libs
for dir in $(ORDEREDDIRS); do \
(cd $$dir; $(MAKE) clobber) ; \
done
FlightGear/cygwin.dll FlightGear/COPYING FlightGear/Docs \
FlightGear/README FlightGear/Thanks)
-new-bin-zip:
+bin-exp-zip:
cp Main/fg$(FG_VERSION_MAJOR).exe Main/cygwin.dll README Thanks \
runfg.bat ../Win32/*.dll ..
(cd ../..; \
- zip -r bin-$(FG_VERSION).zip FlightGear/fgtop \
+ zip -r bin-exp-$(FG_VERSION).zip FlightGear/fgtop \
FlightGear/fg$(FG_VERSION_MAJOR).exe FlightGear/runfg.bat \
FlightGear/cygwin.dll FlightGear/COPYING FlightGear/Docs \
FlightGear/README FlightGear/Thanks FlightGear/glu.dll \
- FlightGear/glut.dll FlightGear/opengl.dll)
+ FlightGear/glut.dll FlightGear/msvcrt.dll FlightGear/opengl.dll)
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.43 1998/02/19 13:05:43 curt
+# Incorporated some HUD tweaks from Michelle America.
+# Tweaked the sky's sunset/rise colors.
+# Other misc. tweaks.
+#
# Revision 1.42 1998/02/18 15:07:02 curt
# Tweaks to build with SGI OpenGL (and therefor hopefully other accelerated
# drivers will work.)
#---------------------------------------------------------------------------
# Linux/Mesa
#
-# INTERFACE_LIBS = -lglut
-# 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) $(FG_DEBUG_FLAGS)
-# EXT =
+INTERFACE_LIBS = -lglut
+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) $(FG_DEBUG_FLAGS)
+EXT =
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
#
# -*- Experimental -*-
#
-# May also work for compiling against IHV OpenGL drivers
+# Currently builds without fatal error, but can't seem to run correctly.
+# Eventually may also work for compiling against IHV OpenGL drivers
#
-INTERFACE_LIBS = -lglut
-GRAPHICS_LIBS = -lglu -lopengl -luser32 -lgdi32
-FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS) \
- -I$(FG_ROOT)/Win32/include \
- -DWIN32 -DUSE_RAND
-LLDFLAGS = -L$(FG_ROOT)/Win32/lib
-EXT = .exe
-LN = cp
+# INTERFACE_LIBS = -lglut
+# GRAPHICS_LIBS = -lglu -lopengl -luser32 -lgdi32
+# FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS) -I$(FG_ROOT)/Win32/include \
+# -DWIN32 -DUSE_RAND
+# LLDFLAGS = -L$(FG_ROOT)/Win32/lib
+# EXT = .exe
+# LN = cp
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
+++ /dev/null
-export FG_ROOT=~/projects/FlightGear
-export FG_ROOT_SRC=~/projects/FlightGear/Src
-export FG_ROOT_LIB=~/projects/FlightGear/Lib