1
0
Fork 0

Added an fov to hud display.

This commit is contained in:
curt 1998-05-13 18:27:53 +00:00
parent 37df3de51d
commit 17cfc04cef
3 changed files with 43 additions and 7 deletions

View file

@ -40,6 +40,7 @@
#include <Debug/fg_debug.h> #include <Debug/fg_debug.h>
#include <Include/fg_constants.h> #include <Include/fg_constants.h>
#include <Include/general.h> #include <Include/general.h>
#include <Main/options.hxx>
#include <Math/fg_random.h> #include <Math/fg_random.h>
#include <Math/mat3.h> #include <Math/mat3.h>
#include <Math/polar3d.h> #include <Math/polar3d.h>
@ -170,6 +171,15 @@ double get_frame_rate( void )
return g->frame_rate; return g->frame_rate;
} }
double get_fov( void )
{
fgOPTIONS *o;
o = &current_options;
return o->fov;
}
bool fgCockpitInit( fgAIRCRAFT *cur_aircraft ) bool fgCockpitInit( fgAIRCRAFT *cur_aircraft )
{ {
fgPrintf( FG_COCKPIT, FG_INFO, "Initializing cockpit subsystem\n"); fgPrintf( FG_COCKPIT, FG_INFO, "Initializing cockpit subsystem\n");
@ -207,9 +217,12 @@ void fgCockpitUpdate( void )
} }
/* $Log$ /* $Log$
/* Revision 1.5 1998/05/11 18:13:10 curt /* Revision 1.6 1998/05/13 18:27:53 curt
/* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss. /* Added an fov to hud display.
/* /*
* Revision 1.5 1998/05/11 18:13:10 curt
* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss.
*
* Revision 1.4 1998/05/03 00:46:45 curt * Revision 1.4 1998/05/03 00:46:45 curt
* polar.h -> polar3d.h * polar.h -> polar3d.h
* *

View file

@ -1473,7 +1473,7 @@ void HudLadder :: draw( void )
// mustange and the engine readouts of a B36! // mustange and the engine readouts of a B36!
// //
#define INSTRDEFS 15 #define INSTRDEFS 16
int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ ) int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
{ {
@ -1762,6 +1762,22 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
TRUE ); TRUE );
break; break;
case 16:
loc.left = 10;
loc.top = 100; // Ignore
loc.right = 500; // Ignore
loc.bottom = 25;
HIptr = (instr_item *) new instr_label( loc, get_fov,
"%.1f",
"FOV = ",
NULL,
ReadTOP,
RIGHT_JUST,
SMALL,
0,
TRUE );
break;
// fgHUDAddControlSurfaces( hud, 10, 10, NULL ); // fgHUDAddControlSurfaces( hud, 10, 10, NULL );
// loc.left = 250; // loc.left = 250;
// loc.top = 190; // loc.top = 190;
@ -1883,9 +1899,12 @@ void fgUpdateHUD( void ) {
} }
/* $Log$ /* $Log$
/* Revision 1.7 1998/05/11 18:13:11 curt /* Revision 1.8 1998/05/13 18:27:54 curt
/* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss. /* Added an fov to hud display.
/* /*
* Revision 1.7 1998/05/11 18:13:11 curt
* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss.
*
* Revision 1.22 1998/04/18 04:14:02 curt * Revision 1.22 1998/04/18 04:14:02 curt
* Moved fg_debug.c to it's own library. * Moved fg_debug.c to it's own library.
* *

View file

@ -144,6 +144,7 @@ extern double get_heading ( void );
extern double get_altitude ( void ); extern double get_altitude ( void );
extern double get_sideslip ( void ); extern double get_sideslip ( void );
extern double get_frame_rate ( void ); extern double get_frame_rate ( void );
extern double get_fov ( void );
enum hudinstype{ HUDno_instr, enum hudinstype{ HUDno_instr,
HUDscale, HUDscale,
@ -439,9 +440,12 @@ void fgHUDSetTimeMode( Hptr hud, int time_of_day );
#endif // _HUD_H #endif // _HUD_H
/* $Log$ /* $Log$
/* Revision 1.2 1998/05/11 18:13:12 curt /* Revision 1.3 1998/05/13 18:27:55 curt
/* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss. /* Added an fov to hud display.
/* /*
* Revision 1.2 1998/05/11 18:13:12 curt
* Complete C++ rewrite of all cockpit code by Charlie Hotchkiss.
*
* Revision 1.15 1998/02/23 19:07:57 curt * Revision 1.15 1998/02/23 19:07:57 curt
* Incorporated Durk's Astro/ tweaks. Includes unifying the sun position * Incorporated Durk's Astro/ tweaks. Includes unifying the sun position
* calculation code between sun display, and other FG sections that use this * calculation code between sun display, and other FG sections that use this