From 3e38180c8bb01ecc0ca23c3197fdf81b4af65827 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 6 May 1998 03:15:08 +0000 Subject: [PATCH] Durk Talsma contributed a graphical frame rate counter which is displayed as part of the HUD. --- Cockpit/hud.cxx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Cockpit/hud.cxx b/Cockpit/hud.cxx index 18418bfab..340e997a3 100644 --- a/Cockpit/hud.cxx +++ b/Cockpit/hud.cxx @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -63,6 +64,14 @@ // They should eventually be member functions of the aircraft. // +double get_frame_rate(void) { + fgGENERAL *g; + + g = &general; + + return g->frame_rate; +} + double get_throttleval( void ) { fgCONTROLS *pcontrols; @@ -1093,6 +1102,8 @@ Hptr fgHUDInit( fgAIRCRAFT *current_aircraft ) RIGHT_JUST, "Lon ", "d", "%04.0f", get_longitude ); fgHUDAddLabel ( hud, 440, 90, SMALL, NOBLINK, RIGHT_JUST, NULL, " m", "%05.2f", get_long_min ); + fgHUDAddLabel ( hud, 10,470, SMALL, NOBLINK, + RIGHT_JUST, "Frame rate =", NULL, "%2.2f ", get_frame_rate); fgHUDAddControlSurfaces( hud, 10, 10, NULL ); @@ -1605,9 +1616,13 @@ void fgHUDSetBrightness( Hptr hud, int brightness ) } /* $Log$ -/* Revision 1.4 1998/05/03 00:46:46 curt -/* polar.h -> polar3d.h +/* Revision 1.5 1998/05/06 03:15:08 curt +/* Durk Talsma contributed a graphical frame rate counter which is displayed +/* as part of the HUD. /* + * Revision 1.4 1998/05/03 00:46:46 curt + * polar.h -> polar3d.h + * * Revision 1.3 1998/04/30 12:36:02 curt * C++-ifying a couple source files. * -- 2.39.2