1
0
Fork 0

Incorporated some HUD tweaks from Michelle America.

Tweaked the sky's sunset/rise colors.
Other misc. tweaks.
This commit is contained in:
curt 1998-02-19 13:05:43 +00:00
parent c0954417a7
commit e5a447ece9
8 changed files with 166 additions and 69 deletions

View file

@ -130,11 +130,11 @@ void fgSkyColorsInit( void ) {
if ( (sun_angle > 80.0) && (sun_angle < 100.0) ) { if ( (sun_angle > 80.0) && (sun_angle < 100.0) ) {
/* 0.0 - 0.4 */ /* 0.0 - 0.4 */
outer_param[0] = (10.0 - fabs(90.0 - sun_angle)) / 25.0; 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; outer_param[2] = 0.0;
middle_param[0] = (10.0 - fabs(90.0 - sun_angle)) / 40.0; middle_param[0] = (10.0 - fabs(90.0 - sun_angle)) / 20.0;
middle_param[1] = (10.0 - fabs(90.0 - sun_angle)) / 60.0; middle_param[1] = (10.0 - fabs(90.0 - sun_angle)) / 40.0;
middle_param[2] = 0.0; middle_param[2] = 0.0;
outer_diff[0] = outer_param[0] / 6.0; outer_diff[0] = outer_param[0] / 6.0;
@ -353,10 +353,15 @@ void fgSkyRender( void ) {
/* $Log$ /* $Log$
/* Revision 1.6 1998/02/07 15:29:32 curt /* Revision 1.7 1998/02/19 13:05:49 curt
/* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss /* Incorporated some HUD tweaks from Michelle America.
/* <chotchkiss@namg.us.anritsu.com> /* 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 * Revision 1.5 1998/01/27 00:47:48 curt
* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message * Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
* system and commandline/config file processing code. * system and commandline/config file processing code.

View file

@ -856,19 +856,39 @@ Hptr fgHUDInit( fgAIRCRAFT *current_aircraft )
// For now lets just hardcode the hud here. // For now lets just hardcode the hud here.
// In the future, hud information has to come from the same place // In the future, hud information has to come from the same place
// aircraft information came from. // 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 ); 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 ); 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 ); 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 ); 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 ); 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 ); 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 ); RIGHT_JUST, NULL, " m", "%5.0f", get_altitude );
fgHUDAddControlSurfaces( hud, 10, 10, NULL ); fgHUDAddControlSurfaces( hud, 10, 10, NULL );
@ -879,7 +899,6 @@ Hptr fgHUDInit( fgAIRCRAFT *current_aircraft )
return( hud ); return( hud );
} }
// add_instrument // add_instrument
// //
// This is a stand in for linked list code that will get replaced later // 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); glDisable(GL_LIGHTING);
glLineWidth(1); 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", fgPrintf( FG_COCKPIT, FG_DEBUG, "HUD Code %d Status %d\n",
hud->code, hud->status ); hud->code, hud->status );
@ -1302,11 +1345,29 @@ void fgUpdateHUD( Hptr hud ) {
glPopMatrix(); 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$ /* $Log$
/* Revision 1.15 1998/02/16 13:38:39 curt /* Revision 1.16 1998/02/19 13:05:49 curt
/* Integrated changes from Charlie Hotchkiss. /* 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 * Revision 1.14 1998/02/12 21:59:41 curt
* Incorporated code changes contributed by Charlie Hotchkiss * Incorporated code changes contributed by Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com> * <chotchkiss@namg.us.anritsu.com>

View file

@ -36,6 +36,15 @@
enum VIEW_MODES { HUD_VIEW, PANEL_VIEW, CHASE_VIEW, TOWER_VIEW }; 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 // Instrument types
#define ARTIFICIAL_HORIZON 1 #define ARTIFICIAL_HORIZON 1
#define SCALE 2 #define SCALE 2
@ -240,10 +249,16 @@ typedef struct {
int code; int code;
HIptr instruments; HIptr instruments;
int status; int status;
int time_of_day;
int brightness;
int size; // possibly another name for this ? (michele)
}HUD, *Hptr; }HUD, *Hptr;
Hptr fgHUDInit ( fgAIRCRAFT *cur_aircraft ); Hptr fgHUDInit ( fgAIRCRAFT *cur_aircraft );
void fgHUDSetTimeMode( Hptr hud, int time_of_day );
void fgHUDSetBrightness( Hptr hud, int brightness );
Hptr fgHUDAddHorizon( Hptr hud, Hptr fgHUDAddHorizon( Hptr hud,
int x_pos, int x_pos,
int y_pos, int y_pos,
@ -335,13 +350,17 @@ Hptr fgHUDAddNumDisp( Hptr hud,
void fgUpdateHUD ( Hptr hud ); void fgUpdateHUD ( Hptr hud );
void fgUpdateHUD2( Hptr hud ); // Future use? void fgUpdateHUD2( Hptr hud ); // Future use?
#endif // _HUD_H #endif // _HUD_H
/* $Log$ /* $Log$
/* Revision 1.11 1998/02/16 13:38:42 curt /* Revision 1.12 1998/02/19 13:05:52 curt
/* Integrated changes from Charlie Hotchkiss. /* 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 * Revision 1.10 1998/02/12 21:59:42 curt
* Incorporated code changes contributed by Charlie Hotchkiss * Incorporated code changes contributed by Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com> * <chotchkiss@namg.us.anritsu.com>

View file

@ -138,17 +138,17 @@ int fgInitSubsystems( void ) {
FG_Runway_altitude = (3234.5 + 300); FG_Runway_altitude = (3234.5 + 300);
FG_Altitude = FG_Runway_altitude + 3.758099; FG_Altitude = FG_Runway_altitude + 3.758099;
/* Initial Position at (E81) Superior, AZ */ // Initial Position at (E81) Superior, AZ
/* FG_Longitude = ( -111.1270650 ) * DEG_TO_RAD; */ // FG_Longitude = ( -111.1270650 ) * DEG_TO_RAD;
/* FG_Latitude = ( 33.2778339 ) * DEG_TO_RAD; */ // FG_Latitude = ( 33.2778339 ) * DEG_TO_RAD;
/* FG_Runway_altitude = (2646 + 1000); */ // FG_Runway_altitude = (2646 + 1000);
/* FG_Altitude = FG_Runway_altitude + 3.758099; */ // FG_Altitude = FG_Runway_altitude + 3.758099;
// Initial Position at (TUS) Tucson, AZ // Initial Position at (TUS) Tucson, AZ
FG_Longitude = ( -110.9412597 ) * DEG_TO_RAD; // FG_Longitude = ( -110.9412597 ) * DEG_TO_RAD;
FG_Latitude = ( 32.1162439 ) * DEG_TO_RAD; // FG_Latitude = ( 32.1162439 ) * DEG_TO_RAD;
FG_Runway_altitude = (2641 + 0); // FG_Runway_altitude = (2641 + 0);
FG_Altitude = FG_Runway_altitude + 3.758099; // FG_Altitude = FG_Runway_altitude + 3.758099;
/* Initial Position at near Anchoraze, AK */ /* Initial Position at near Anchoraze, AK */
/* FG_Longitude = ( -150.00 ) * DEG_TO_RAD; */ /* FG_Longitude = ( -150.00 ) * DEG_TO_RAD; */
@ -192,11 +192,11 @@ int fgInitSubsystems( void ) {
/* FG_Latitude = ( 45.15 ) * DEG_TO_RAD; */ /* FG_Latitude = ( 45.15 ) * DEG_TO_RAD; */
/* FG_Altitude = FG_Runway_altitude + 3.758099; */ /* FG_Altitude = FG_Runway_altitude + 3.758099; */
/* Initial Position: Somewhere near the Grand Canyon */ // Initial Position: Somewhere near the Grand Canyon
/* FG_Longitude = ( -112.5 ) * DEG_TO_RAD; */ FG_Longitude = ( -112.5 ) * DEG_TO_RAD;
/* FG_Latitude = ( 36.5 ) * DEG_TO_RAD; */ FG_Latitude = ( 36.5 ) * DEG_TO_RAD;
/* FG_Runway_altitude = 5000.0; */ FG_Runway_altitude = 5000.0;
/* FG_Altitude = FG_Runway_altitude + 3.758099; */ FG_Altitude = FG_Runway_altitude + 3.758099;
// Initial Position: (GCN) Grand Canyon Airport, AZ // Initial Position: (GCN) Grand Canyon Airport, AZ
// FG_Longitude = ( -112.1469647 ) * DEG_TO_RAD; // FG_Longitude = ( -112.1469647 ) * DEG_TO_RAD;
@ -205,10 +205,10 @@ int fgInitSubsystems( void ) {
// FG_Altitude = FG_Runway_altitude + 3.758099; // FG_Altitude = FG_Runway_altitude + 3.758099;
// Initial Position: Jim Brennon's Kingmont Observatory // Initial Position: Jim Brennon's Kingmont Observatory
FG_Longitude = ( -121.1131666 ) * DEG_TO_RAD; // FG_Longitude = ( -121.1131666 ) * DEG_TO_RAD;
FG_Latitude = ( 38.8293916 ) * DEG_TO_RAD; // FG_Latitude = ( 38.8293916 ) * DEG_TO_RAD;
FG_Runway_altitude = 920.0 + 100; // FG_Runway_altitude = 920.0 + 100;
FG_Altitude = FG_Runway_altitude + 3.758099; // FG_Altitude = FG_Runway_altitude + 3.758099;
// Test Position // Test Position
// FG_Longitude = ( -111.18 ) * DEG_TO_RAD; // FG_Longitude = ( -111.18 ) * DEG_TO_RAD;
@ -380,10 +380,15 @@ int fgInitSubsystems( void ) {
/* $Log$ /* $Log$
/* Revision 1.46 1998/02/18 15:07:06 curt /* Revision 1.47 1998/02/19 13:05:53 curt
/* Tweaks to build with SGI OpenGL (and therefor hopefully other accelerated /* Incorporated some HUD tweaks from Michelle America.
/* drivers will work.) /* 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 * Revision 1.45 1998/02/16 13:39:43 curt
* Miscellaneous weekend tweaks. Fixed? a cache problem that caused whole * Miscellaneous weekend tweaks. Fixed? a cache problem that caused whole
* tiles to occasionally be missing. * tiles to occasionally be missing.

View file

@ -42,9 +42,9 @@
#include <Main/fg_debug.h> #include <Main/fg_debug.h>
#define FG_LOCAL_X 5 /* should be odd */ #define FG_LOCAL_X 7 /* should be odd */
#define FG_LOCAL_Y 5 /* should be odd */ #define FG_LOCAL_Y 7 /* should be odd */
#define FG_LOCAL_X_Y 25 /* At least FG_LOCAL_X times FG_LOCAL_Y */ #define FG_LOCAL_X_Y 49 /* At least FG_LOCAL_X times FG_LOCAL_Y */
/* closest (potentially viewable) tiles, centered on current tile. /* closest (potentially viewable) tiles, centered on current tile.
@ -225,10 +225,15 @@ void fgTileMgrRender( void ) {
/* $Log$ /* $Log$
/* Revision 1.17 1998/02/16 13:39:46 curt /* Revision 1.18 1998/02/19 13:05:54 curt
/* Miscellaneous weekend tweaks. Fixed? a cache problem that caused whole /* Incorporated some HUD tweaks from Michelle America.
/* tiles to occasionally be missing. /* 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 * Revision 1.16 1998/02/12 21:59:53 curt
* Incorporated code changes contributed by Charlie Hotchkiss * Incorporated code changes contributed by Charlie Hotchkiss
* <chotchkiss@namg.us.anritsu.com> * <chotchkiss@namg.us.anritsu.com>

View file

@ -53,14 +53,14 @@ Makefile-os2:
clean: clean:
-rm -f *.os2 *~ -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 \ for dir in $(ORDEREDDIRS); do \
(cd $$dir; $(MAKE) clean) ; \ (cd $$dir; $(MAKE) clean) ; \
done done
clobber: clobber:
-rm -f *.os2 *~ -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 \ for dir in $(ORDEREDDIRS); do \
(cd $$dir; $(MAKE) clobber) ; \ (cd $$dir; $(MAKE) clobber) ; \
done done
@ -104,19 +104,24 @@ bin-zip:
FlightGear/cygwin.dll FlightGear/COPYING FlightGear/Docs \ FlightGear/cygwin.dll FlightGear/COPYING FlightGear/Docs \
FlightGear/README FlightGear/Thanks) FlightGear/README FlightGear/Thanks)
new-bin-zip: bin-exp-zip:
cp Main/fg$(FG_VERSION_MAJOR).exe Main/cygwin.dll README Thanks \ cp Main/fg$(FG_VERSION_MAJOR).exe Main/cygwin.dll README Thanks \
runfg.bat ../Win32/*.dll .. runfg.bat ../Win32/*.dll ..
(cd ../..; \ (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/fg$(FG_VERSION_MAJOR).exe FlightGear/runfg.bat \
FlightGear/cygwin.dll FlightGear/COPYING FlightGear/Docs \ FlightGear/cygwin.dll FlightGear/COPYING FlightGear/Docs \
FlightGear/README FlightGear/Thanks FlightGear/glu.dll \ FlightGear/README FlightGear/Thanks FlightGear/glu.dll \
FlightGear/glut.dll FlightGear/opengl.dll) FlightGear/glut.dll FlightGear/msvcrt.dll FlightGear/opengl.dll)
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# $Log$ # $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 # Revision 1.42 1998/02/18 15:07:02 curt
# Tweaks to build with SGI OpenGL (and therefor hopefully other accelerated # Tweaks to build with SGI OpenGL (and therefor hopefully other accelerated
# drivers will work.) # drivers will work.)

View file

@ -85,12 +85,12 @@ GLOBAL_CFLAGS = -Wall -DVERSION=\"$(FG_VERSION)\"
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# Linux/Mesa # Linux/Mesa
# #
# INTERFACE_LIBS = -lglut INTERFACE_LIBS = -lglut
# MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
# X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
# GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS) GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
# FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS) FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS)
# EXT = EXT =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
@ -121,16 +121,16 @@ GLOBAL_CFLAGS = -Wall -DVERSION=\"$(FG_VERSION)\"
# #
# -*- Experimental -*- # -*- 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 # INTERFACE_LIBS = -lglut
GRAPHICS_LIBS = -lglu -lopengl -luser32 -lgdi32 # GRAPHICS_LIBS = -lglu -lopengl -luser32 -lgdi32
FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS) \ # FG_CFLAGS = $(GLOBAL_CFLAGS) $(FG_DEBUG_FLAGS) -I$(FG_ROOT)/Win32/include \
-I$(FG_ROOT)/Win32/include \ # -DWIN32 -DUSE_RAND
-DWIN32 -DUSE_RAND # LLDFLAGS = -L$(FG_ROOT)/Win32/lib
LLDFLAGS = -L$(FG_ROOT)/Win32/lib # EXT = .exe
EXT = .exe # LN = cp
LN = cp
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------

View file

@ -1,3 +0,0 @@
export FG_ROOT=~/projects/FlightGear
export FG_ROOT_SRC=~/projects/FlightGear/Src
export FG_ROOT_LIB=~/projects/FlightGear/Lib