From 365b26d0933a4b9407e9a00b195f0e366d7a6b38 Mon Sep 17 00:00:00 2001 From: curt Date: Sat, 13 May 2000 00:02:43 +0000 Subject: [PATCH] HUD updates/cleanups from Norman Vine. --- src/Cockpit/cockpit.cxx | 25 ++---- src/Cockpit/hud.cxx | 173 +++++++++++++++++++++++---------------- src/Cockpit/hud.hxx | 37 ++++----- src/Cockpit/hud_card.cxx | 18 ---- src/Cockpit/hud_dnst.cxx | 18 ---- src/Cockpit/hud_guag.cxx | 29 ++----- src/Cockpit/hud_inst.cxx | 20 ----- src/Cockpit/hud_labl.cxx | 19 ----- src/Cockpit/hud_ladr.cxx | 19 ----- src/Cockpit/hud_lat.cxx | 34 ++------ src/Cockpit/hud_lon.cxx | 23 +----- src/Cockpit/hud_scal.cxx | 18 ---- src/Cockpit/hud_tbi.cxx | 18 ---- src/Main/main.cxx | 19 +++-- src/Main/options.cxx | 19 ++++- src/Main/options.hxx | 5 ++ 16 files changed, 173 insertions(+), 321 deletions(-) diff --git a/src/Cockpit/cockpit.cxx b/src/Cockpit/cockpit.cxx index 4b381f371..674b6744a 100644 --- a/src/Cockpit/cockpit.cxx +++ b/src/Cockpit/cockpit.cxx @@ -57,11 +57,6 @@ // cockpit/panel/hud system static pCockpit ac_cockpit; -fntRenderer *HUDtext = 0; -float HUD_TextSize = 0; -int HUD_style = 0; - -float HUD_matrix[16]; // The following routines obtain information concerntin the aircraft's // current state and return it to calling instrument display routines. // They should eventually be member functions of the aircraft. @@ -466,28 +461,20 @@ bool fgCockpitInit( fgAIRCRAFT *cur_aircraft ) " Code " << ac_cockpit->code() << " Status " << ac_cockpit->status() ); -// HUD_TextSize = (current_options.get_xsize() > 1000) ? 10 : 8; - HUD_TextSize = 10; - HUDtext = new fntRenderer(); - HUDtext -> setFont ( guiFntHandle ) ; - HUDtext -> setPointSize ( HUD_TextSize ) ; - HUD_TextList.setFont( HUDtext ); - - return true; + return true; } - void fgCockpitUpdate( void ) { - int iwidth = current_view.get_winWidth(); - int iheight = current_view.get_winHeight(); - float width = iwidth; - float height = iheight; - FG_LOG( FG_COCKPIT, FG_DEBUG, "Cockpit: code " << ac_cockpit->code() << " status " << ac_cockpit->status() ); + int iwidth = current_view.get_winWidth(); + int iheight = current_view.get_winHeight(); + float width = iwidth; + float height = iheight; + if ( current_options.get_hud_status() ) { // This will check the global hud linked list pointer. // If these is anything to draw it will. diff --git a/src/Cockpit/hud.cxx b/src/Cockpit/hud.cxx index f13b5f459..803a0905d 100644 --- a/src/Cockpit/hud.cxx +++ b/src/Cockpit/hud.cxx @@ -38,14 +38,10 @@ #include #include -#ifdef HAVE_VALUES_H -# include // for MAXINT -#endif - #include #include -#include -#include +//#include +//#include #include #include @@ -55,7 +51,7 @@ #include #endif #include -#include