X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=Cockpit%2Fcockpit.c;h=8b4b21f76ef9c1084bb29226078b5c4b3479f823;hb=50c0f6c9e628b9e1ff6bfecfa4ce04084beaccb7;hp=8a22819cb006788a66ffa96ebd4c4e875d2be88a;hpb=0bb3c2969a80b026b33b5852386c489a05773b3b;p=flightgear.git diff --git a/Cockpit/cockpit.c b/Cockpit/cockpit.c index 8a22819cb..8b4b21f76 100644 --- a/Cockpit/cockpit.c +++ b/Cockpit/cockpit.c @@ -22,7 +22,7 @@ * $Id$ * (Log is kept at end of this file) **************************************************************************/ - + #include @@ -41,41 +41,42 @@ #include
-// #define DEBUG +// This is a structure that contains all data related to +// cockpit/panel/hud system -/* This is a structure that contains all data related to cockpit/panel/hud system */ -static struct fgCOCKPIT *aircraft_cockpit; +static fgCOCKPIT *aircraft_cockpit; -struct fgCOCKPIT *fgCockpitInit( struct fgAIRCRAFT cur_aircraft ) +fgCOCKPIT *fgCockpitInit( fgAIRCRAFT *cur_aircraft ) { - struct fgCOCKPIT *cockpit; + fgCOCKPIT *cockpit; Hptr hud; - + fgPrintf( FG_COCKPIT, FG_INFO, "Initializing cockpit subsystem\n"); - cockpit = (struct fgCOCKPIT *)calloc(sizeof(struct fgCOCKPIT),1); + cockpit = (fgCOCKPIT *)calloc(sizeof(fgCOCKPIT),1); if( cockpit == NULL ) return( NULL ); - + cockpit->code = 1; /* It will be aircraft dependent */ cockpit->status = 0; - - /* If aircraft has HUD */ - hud = fgHUDInit( cur_aircraft, 3 ); + + // If aircraft has HUD + hud = fgHUDInit( cur_aircraft ); // Color no longer in parameter list if( hud == NULL ) return( NULL ); - + cockpit->hud = hud; - + aircraft_cockpit = cockpit; - + fgPrintf( FG_COCKPIT, FG_INFO, - " Code %d Status %d\n", cockpit->hud->code, cockpit->hud->status ); - + " Code %d Status %d\n", + cockpit->hud->code, cockpit->hud->status ); + return( cockpit ); } -struct fgCOCKPIT *fgCockpitAddHUD( struct fgCOCKPIT *cockpit, struct HUD *hud ) +fgCOCKPIT *fgCockpitAddHUD( fgCOCKPIT *cockpit, HUD *hud ) { cockpit->hud = hud; return(cockpit); @@ -94,12 +95,16 @@ void fgCockpitUpdate( void ) /* $Log$ -/* Revision 1.9 1998/02/03 23:20:14 curt -/* Lots of little tweaks to fix various consistency problems discovered by -/* Solaris' CC. Fixed a bug in fg_debug.c with how the fgPrintf() wrapper -/* passed arguments along to the real printf(). Also incorporated HUD changes -/* by Michele America. +/* Revision 1.10 1998/02/07 15:29:33 curt +/* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss +/* /* + * Revision 1.9 1998/02/03 23:20:14 curt + * Lots of little tweaks to fix various consistency problems discovered by + * Solaris' CC. Fixed a bug in fg_debug.c with how the fgPrintf() wrapper + * passed arguments along to the real printf(). Also incorporated HUD changes + * by Michele America. + * * Revision 1.8 1998/01/31 00:43:03 curt * Added MetroWorks patches from Carmen Volpe. *