From: curt Date: Thu, 19 Feb 1998 13:05:43 +0000 (+0000) Subject: Incorporated some HUD tweaks from Michelle America. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e5a447ece954840717bef0cad435e56be646015b;p=flightgear.git Incorporated some HUD tweaks from Michelle America. Tweaked the sky's sunset/rise colors. Other misc. tweaks. --- diff --git a/Astro/sky.c b/Astro/sky.c index 0244236aa..815c4a18d 100644 --- a/Astro/sky.c +++ b/Astro/sky.c @@ -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 -/* +/* 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 + * + * * Revision 1.5 1998/01/27 00:47:48 curt * Incorporated Paul Bleisch's new debug message * system and commandline/config file processing code. diff --git a/Cockpit/hud.c b/Cockpit/hud.c index fcae83f78..41abbc20b 100644 --- a/Cockpit/hud.c +++ b/Cockpit/hud.c @@ -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 * diff --git a/Cockpit/hud.h b/Cockpit/hud.h index 08cf5225d..a0a34c1c4 100644 --- a/Cockpit/hud.h +++ b/Cockpit/hud.h @@ -36,6 +36,15 @@ 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 * diff --git a/Main/fg_init.c b/Main/fg_init.c index 6b6619d90..49c234001 100644 --- a/Main/fg_init.c +++ b/Main/fg_init.c @@ -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. diff --git a/Scenery/tilemgr.c b/Scenery/tilemgr.c index 96e4de6ee..aeaf541b2 100644 --- a/Scenery/tilemgr.c +++ b/Scenery/tilemgr.c @@ -42,9 +42,9 @@ #include
-#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 * diff --git a/Simulator/Makefile b/Simulator/Makefile index 9f27e9cd5..072b4b050 100644 --- a/Simulator/Makefile +++ b/Simulator/Makefile @@ -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.) diff --git a/Simulator/commondefs b/Simulator/commondefs index 469f9bff2..e94fa2f69 100644 --- a/Simulator/commondefs +++ b/Simulator/commondefs @@ -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 index 6ec4e369b..000000000 --- a/Simulator/setup_env +++ /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