]> git.mxchange.org Git - flightgear.git/commitdiff
Incorporated some HUD tweaks from Michelle America.
authorcurt <curt>
Thu, 19 Feb 1998 13:05:43 +0000 (13:05 +0000)
committercurt <curt>
Thu, 19 Feb 1998 13:05:43 +0000 (13:05 +0000)
Tweaked the sky's sunset/rise colors.
Other misc. tweaks.

Astro/sky.c
Cockpit/hud.c
Cockpit/hud.h
Main/fg_init.c
Scenery/tilemgr.c
Simulator/Makefile
Simulator/commondefs
Simulator/setup_env [deleted file]

index 0244236aa267964a4b6da2a383cf118b01cc5d9f..815c4a18d7f3dc8501a884f65864bed9c626c6d7 100644 (file)
@@ -130,11 +130,11 @@ void fgSkyColorsInit( void ) {
     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;
@@ -353,10 +353,15 @@ void fgSkyRender( void ) {
 
 
 /* $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.
index fcae83f7832a4348590d03e278fe1341b802ff66..41abbc20bdddfaf8946cfb66e8cb17272ede74bf 100644 (file)
@@ -856,19 +856,39 @@ Hptr fgHUDInit( fgAIRCRAFT *current_aircraft )
   // 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 );
 
@@ -879,7 +899,6 @@ Hptr fgHUDInit( fgAIRCRAFT *current_aircraft )
   return( hud );
 }
 
-
 // add_instrument
 //
 // This is a stand in for linked list code that will get replaced later
@@ -1254,7 +1273,31 @@ void fgUpdateHUD( Hptr hud ) {
     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 );
@@ -1302,11 +1345,29 @@ void fgUpdateHUD( Hptr hud ) {
   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>
index 08cf5225dd9fa65e70ee2e5f5fa42f1d5e8b7470..a0a34c1c43f6df046000f3d06172954446ee2a6a 100644 (file)
 
 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
@@ -240,10 +249,16 @@ typedef struct  {
        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,
@@ -335,13 +350,17 @@ Hptr fgHUDAddNumDisp( Hptr hud,
 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>
index 6b6619d907364bdc01934997bd52473df2a886be..49c234001bfff0805ed41dfc75694de0b5df8780 100644 (file)
@@ -138,17 +138,17 @@ int fgInitSubsystems( void ) {
     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; */
@@ -192,11 +192,11 @@ int fgInitSubsystems( void ) {
     /* 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;
@@ -205,10 +205,10 @@ int fgInitSubsystems( void ) {
     // 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;
@@ -380,10 +380,15 @@ int fgInitSubsystems( void ) {
 
 
 /* $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.
index 96e4de6eeb94869a6e4ec544403aa85f9dbc1b02..aeaf541b21d933dc85afb810fee895ceb75156e2 100644 (file)
@@ -42,9 +42,9 @@
 #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.
@@ -225,10 +225,15 @@ void fgTileMgrRender( void ) {
 
 
 /* $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>
index 9f27e9cd5aa5614c3185fff54f74c3de2bef6c7f..072b4b05010ff4158c23abe288a8065842d7de7a 100644 (file)
@@ -53,14 +53,14 @@ Makefile-os2:
 
 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
@@ -104,19 +104,24 @@ bin-zip:
        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.)
index 469f9bff25ea4b1015c07f916ba76ca8e7c5d2b9..e94fa2f692ef328c38088769930f539a886c08be 100644 (file)
@@ -85,12 +85,12 @@ GLOBAL_CFLAGS = -Wall -DVERSION=\"$(FG_VERSION)\"
 #---------------------------------------------------------------------------
 # 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 =
 #---------------------------------------------------------------------------
 
 #---------------------------------------------------------------------------
@@ -121,16 +121,16 @@ GLOBAL_CFLAGS = -Wall -DVERSION=\"$(FG_VERSION)\"
 #
 #   -*- 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
 #---------------------------------------------------------------------------
 
 #---------------------------------------------------------------------------
diff --git a/Simulator/setup_env b/Simulator/setup_env
deleted file mode 100644 (file)
index 6ec4e36..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-export FG_ROOT=~/projects/FlightGear
-export FG_ROOT_SRC=~/projects/FlightGear/Src
-export FG_ROOT_LIB=~/projects/FlightGear/Lib