"Cannot open data file: '%s'\n", path);
return;
}
+ /* printf(" reading datafile %s\n", path); */
fgPrintf( FG_ASTRO, FG_INFO, " reading datafile %s\n", path);
/* for all the objects... */
/* $Log$
-/* Revision 1.5 1998/02/02 20:53:22 curt
-/* To version 0.29
+/* Revision 1.6 1998/02/03 23:20:11 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.5 1998/02/02 20:53:22 curt
+ * To version 0.29
+ *
* Revision 1.4 1998/01/27 00:47:47 curt
* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
* system and commandline/config file processing code.
Nr = 2.9585076 + 6.6672E-7*actTime;
B = asin ( sin (result.Declination) * cos(ir) - cos(result.Declination) * sin (ir) * sin (result.RightAscension - Nr));
- ring_magn = -2.6 * sin (abs(B)) + 1.2 * pow(sin(B),2);
+ ring_magn = -2.6 * sin (fabs(B)) + 1.2 * pow(sin(B),2);
result.magnitude = -9.0 + 5*log10( r*R ) + 0.044 * FV + ring_magn;
break;
case 7: /* Uranus */
/* $Log$
-/* Revision 1.4 1998/02/02 20:53:23 curt
-/* To version 0.29
+/* Revision 1.5 1998/02/03 23:20:12 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.4 1998/02/02 20:53:23 curt
+ * To version 0.29
+ *
* Revision 1.3 1998/01/27 00:47:47 curt
* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
* system and commandline/config file processing code.
if( cockpit == NULL )
return( NULL );
- cockpit->code = 1234;
+ cockpit->code = 1; /* It will be aircraft dependent */
cockpit->status = 0;
/* If aircraft has HUD */
/* $Log$
-/* Revision 1.8 1998/01/31 00:43:03 curt
-/* Added MetroWorks patches from Carmen Volpe.
+/* 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.
+ *
* Revision 1.7 1998/01/27 00:47:51 curt
* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
* system and commandline/config file processing code.
**************************************************************************/
+#ifdef WIN32
+# include <windows.h>
+#endif
+
#include <GL/glut.h>
#include <stdlib.h>
+#include <string.h>
+
#ifndef WIN32
# include <values.h> /* for MAXINT */
#endif /* not WIN32 */
-#include "hud.h"
-#include <Include/fg_constants.h>
+#include "hud.h"
#include <Aircraft/aircraft.h>
-/* #include <Scenery/mesh.h> */
-#include <Scenery/scenery.h>
+#include <Include/fg_constants.h>
+#include <Main/fg_debug.h>
+#include <Math/fg_random.h>
#include <Math/mat3.h>
#include <Math/polar.h>
+#include <Scenery/scenery.h>
#include <Time/fg_timer.h>
-#include <Math/fg_random.h>
#include <Weather/weather.h>
// #define DEBUG
new_x_ini = ladder.x_pos+(x_ini-ladder.x_pos)*cos(roll_value)-\
(y_ini-ladder.y_pos)*sin(roll_value);
new_y_ini = ladder.y_pos+(x_ini-ladder.x_pos)*sin(roll_value)+\
- (y_ini-ladder.y_pos)*cos(roll_value);
+ (y_ini-ladder.y_pos)*cos(roll_value);
new_x_end = ladder.x_pos+(x_end-ladder.x_pos)*cos(roll_value)-\
(y_end-ladder.y_pos)*sin(roll_value);
new_y_end = ladder.y_pos+(x_end-ladder.x_pos)*sin(roll_value)+\
}
}
+/*
+
+ Draws a representation of the control surfaces in their current state
+ anywhere in the HUD
+
+ Needs: struct HUD_control_surfaces
+
+*/
+static void drawcontrolsurfaces( struct HUD_control_surfaces ctrl_surf )
+{
+ int x_ini, y_ini;
+ int x_end, y_end;
+ /* int x_1, y_1; */
+ /* int x_2, y_2; */
+ struct fgCONTROLS *c;
+
+ x_ini = ctrl_surf.x_pos;
+ y_ini = ctrl_surf.y_pos;
+ x_end = x_ini+150;
+ y_end = y_ini+60;
+
+ drawOneLine( x_ini, y_ini, x_end, y_ini );
+ drawOneLine( x_ini, y_ini, x_ini, y_end );
+ drawOneLine( x_ini, y_end, x_end, y_end );
+ drawOneLine( x_end, y_end, x_end, y_ini );
+ drawOneLine( x_ini+30, y_ini, x_ini+30, y_end );
+ drawOneLine( x_ini+30, y_ini+30, x_ini+90, y_ini+30 );
+ drawOneLine( x_ini+90, y_ini, x_ini+90, y_end );
+ drawOneLine( x_ini+120, y_ini, x_ini+120, y_end );
+
+ c = ¤t_aircraft.controls;
+
+ /* Draw elevator diagram */
+ textString( x_ini+1, y_end-11, "E", GLUT_BITMAP_8_BY_13 );
+ drawOneLine( x_ini+15, y_ini+5, x_ini+15, y_ini+55 );
+ drawOneLine( x_ini+14, y_ini+30, x_ini+16, y_ini+30 );
+ if( FG_Elevator <= -0.01 || FG_Elevator >= 0.01 )
+ {
+ drawOneLine( x_ini+10, y_ini+5+(int)(((FG_Elevator+1.0)/2)*50.0), \
+ x_ini+20, y_ini+5+(int)(((FG_Elevator+1.0)/2)*50.0) );
+ }
+ else
+ {
+ drawOneLine( x_ini+7, y_ini+5+(int)(((FG_Elevator+1.0)/2)*50.0), \
+ x_ini+23, y_ini+5+(int)(((FG_Elevator+1.0)/2)*50.0) );
+ }
+
+ /* Draw aileron diagram */
+ textString( x_ini+30+1, y_end-11, "A", GLUT_BITMAP_8_BY_13 );
+ drawOneLine( x_ini+35, y_end-15, x_ini+85, y_end-15 );
+ drawOneLine( x_ini+60, y_end-14, x_ini+60, y_end-16 );
+ if( FG_Aileron <= -0.01 || FG_Aileron >= 0.01 )
+ {
+ drawOneLine( x_ini+35+(int)(((FG_Aileron+1.0)/2)*50.0), y_end-20, \
+ x_ini+35+(int)(((FG_Aileron+1.0)/2)*50.0), y_end-10 );
+ }
+ else
+ {
+ drawOneLine( x_ini+35+(int)(((FG_Aileron+1.0)/2)*50.0), y_end-25, \
+ x_ini+35+(int)(((FG_Aileron+1.0)/2)*50.0), y_end-5 );
+ }
+
+ /* Draw rudder diagram */
+ textString( x_ini+30+1, y_ini+21, "R", GLUT_BITMAP_8_BY_13 );
+ drawOneLine( x_ini+35, y_ini+15, x_ini+85, y_ini+15 );
+ drawOneLine( x_ini+60, y_ini+14, x_ini+60, y_ini+16 );
+ if( FG_Rudder <= -0.01 || FG_Rudder >= 0.01 )
+ {
+ drawOneLine( x_ini+35+(int)(((FG_Rudder+1.0)/2)*50.0), y_ini+20, \
+ x_ini+35+(int)(((FG_Rudder+1.0)/2)*50.0), y_ini+10 );
+ }
+ else
+ {
+ drawOneLine( x_ini+35+(int)(((FG_Rudder+1.0)/2)*50.0), y_ini+25, \
+ x_ini+35+(int)(((FG_Rudder+1.0)/2)*50.0), y_ini+5 );
+ }
+
+
+ /* Draw throttle diagram */
+ textString( x_ini+90+1, y_end-11, "T", GLUT_BITMAP_8_BY_13 );
+ textString( x_ini+90+1, y_end-21, "r", GLUT_BITMAP_8_BY_13 );
+ drawOneLine( x_ini+105, y_ini+5, x_ini+105, y_ini+55 );
+ drawOneLine( x_ini+100, y_ini+5+(int)(FG_Throttle[0]*50.0), \
+ x_ini+110, y_ini+5+(int)(FG_Throttle[0]*50.0) );
+
+
+ /* Draw elevator trim diagram */
+ textString( x_ini+121, y_end-11, "T", GLUT_BITMAP_8_BY_13 );
+ textString( x_ini+121, y_end-22, "m", GLUT_BITMAP_8_BY_13 );
+ drawOneLine( x_ini+135, y_ini+5, x_ini+135, y_ini+55 );
+ drawOneLine( x_ini+134, y_ini+30, x_ini+136, y_ini+30 );
+ if( FG_Elev_Trim <= -0.01 || FG_Elev_Trim >= 0.01 )
+ {
+ drawOneLine( x_ini+130, y_ini+5+(int)(((FG_Elev_Trim+1)/2)*50.0), \
+ x_ini+140, y_ini+5+(int)(((FG_Elev_Trim+1.0)/2)*50.0) );
+ }
+ else
+ {
+ drawOneLine( x_ini+127, y_ini+5+(int)(((FG_Elev_Trim+1.0)/2)*50.0), \
+ x_ini+143, y_ini+5+(int)(((FG_Elev_Trim+1.0)/2)*50.0) );
+ }
+
+}
+
/*
Draws a label anywhere in the HUD
sprintf( string, buffer, (*label.load_value)() );
-#ifdef DEBUG
fgPrintf( FG_COCKPIT, FG_DEBUG, buffer );
fgPrintf( FG_COCKPIT, FG_DEBUG, "\n" );
fgPrintf( FG_COCKPIT, FG_DEBUG, string );
fgPrintf( FG_COCKPIT, FG_DEBUG, "\n" );
-#endif
lenstr = strlen( string );
if( label.justify == LEFT_JUST )
struct fgFLIGHT *f;
f = ¤t_aircraft.flight;
- return( FG_Psi*RAD_TO_DEG );
+ return( FG_Psi*RAD_TO_DEG );
}
double get_altitude( void )
/* rough_elev = mesh_altitude(FG_Longitude * RAD_TO_ARCSEC,
FG_Latitude * RAD_TO_ARCSEC); */
- return( FG_Altitude * FEET_TO_METER /* - rough_elev */ );
+ return( FG_Altitude * FEET_TO_METER /* -rough_elev */ );
}
void add_instrument( Hptr hud, HIptr instrument )
if( hud == NULL )
return( NULL );
- hud->code = 123;
+ hud->code = 1; /* It will be aircraft dependent */
hud->status = 0;
// For now lets just hardcode a hud here .
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 );
fgHUDAddLadder( hud, 330, 190, 90, 180, 70, 10, NONE, 45, get_roll, get_pitch );
+ fgHUDAddControlSurfaces( hud, 10, 10, get_heading );
return( hud );
}
return( hud );
}
+Hptr fgHUDAddControlSurfaces( Hptr hud, int x_pos, int y_pos, double (*load_value)() )
+{
+ struct HUD_control_surfaces *ctrl_surf;
+ struct HUD_instr *instrument;
+ HIptr tmp_first, tmp_next;
+
+ tmp_first = hud->instruments;
+ if( tmp_first != NULL )
+ tmp_next = tmp_first->next;
+ else
+ tmp_next = NULL;
+
+ instrument = (HIptr)calloc(sizeof(struct HUD_instr),1);
+ if( instrument == NULL )
+ return( NULL );
+
+ ctrl_surf = (struct HUD_control_surfaces *)calloc(sizeof(struct HUD_control_surfaces),1);
+ if( ctrl_surf == NULL )
+ return( NULL );
+
+ instrument->type = CONTROL_SURFACES;
+ instrument->instr.control_surfaces = *ctrl_surf;
+ instrument->instr.control_surfaces.x_pos = x_pos;
+ instrument->instr.control_surfaces.y_pos = y_pos;
+ instrument->instr.horizon.load_value = load_value;
+ instrument->next = tmp_first;
+
+ hud->instruments = instrument;
+
+ return( hud );
+}
+
/*
Hptr fgHUDAddMovingHorizon( Hptr hud, int x_pos, int y_pos, int length, int hole_len, \
int color )
glLineWidth(1);
glColor3f (0.1, 0.9, 0.1);
-#ifdef DEBUG
fgPrintf( FG_COCKPIT, FG_DEBUG, "HUD Code %d Status %d\n",
hud->code, hud->status );
-#endif
hud_instr = hud->instruments;
while( hud_instr != NULL )
{
instr_data = hud_instr->instr;
-#ifdef DEBUG
fgPrintf( FG_COCKPIT, FG_DEBUG,
"Instr Type %d SubType %d Orient %d\n",
hud_instr->type, hud_instr->sub_type, hud_instr->orientation );
-#endif
if( hud_instr->type == ARTIFICIAL_HORIZON )
{
drawhorizon( instr_data.horizon );
instr_data.scale.div_min, instr_data.scale.div_max, \
(*instr_data.scale.load_value)() );
}
+ else if( hud_instr->type == CONTROL_SURFACES )
+ {
+ drawcontrolsurfaces( instr_data.control_surfaces );
+ }
else if( hud_instr->type == LABEL )
{
drawlabel( instr_data.label );
/* $Log$
-/* Revision 1.9 1998/01/31 00:43:04 curt
-/* Added MetroWorks patches from Carmen Volpe.
+/* Revision 1.10 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.9 1998/01/31 00:43:04 curt
+ * Added MetroWorks patches from Carmen Volpe.
+ *
* Revision 1.8 1998/01/27 00:47:51 curt
* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
* system and commandline/config file processing code.
#define SCALE 2
#define LADDER 3
#define LABEL 4
+#define CONTROL_SURFACES 5
/* Scale constants */
#define HORIZONTAL 1
double (*load_value)( void );
};
+struct HUD_control_surfaces {
+ int type;
+ int x_pos;
+ int y_pos;
+ double (*load_value)();
+};
+
#define LABEL_COUNTER 1
#define LABEL_WARNING 2
struct HUD_circular_ladder circ_ladder;
struct HUD_horizon horizon;
struct HUD_label label;
+ struct HUD_control_surfaces control_surfaces;
};
typedef struct HUD_instr *HIptr;
Hptr fgHUDAddLadder( Hptr hud, int x_pos, int y_pos, int scr_width, int scr_height, \
int hole_len, int div_units, int label_pos, int max_value, \
double (*load_roll)( void ), double (*load_pitch)( void ) );
-
+Hptr fgHUDAddControlSurfaces( Hptr hud, int x_pos, int y_pos, double (*get_heading)() );
/* struct HUD *fgHUDAddLadder( Hptr hud, int scr_min, int scr_max, int div_min, int div_max, \
/* $Log$
-/* Revision 1.6 1998/01/22 02:59:30 curt
-/* Changed #ifdef FILE_H to #ifdef _FILE_H
+/* Revision 1.7 1998/02/03 23:20:15 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.6 1998/01/22 02:59:30 curt
+ * Changed #ifdef FILE_H to #ifdef _FILE_H
+ *
* Revision 1.5 1998/01/19 19:27:01 curt
* Merged in make system changes from Bob Kuehne <rpk@sgi.com>
* This should simplify things tremendously.
if( js.y < joy_y_dead_min )
joy_y_dead_min = js.y;
- // printf( "Xmin %d Xmax %d Ymin %d Ymax %d", joy_x_dead_min, joy_x_dead_max, \
- // joy_y_dead_min, joy_y_dead_max );
+ /* printf( "Xmin %d Xmax %d Ymin %d Ymax %d",
+ joy_x_dead_min, joy_x_dead_max,
+ joy_y_dead_min, joy_y_dead_max ); */
}
status = read(joystick_fd, &js, JS_RETURN);
if (status != JS_RETURN) {
// printf("Joystick calibration: X_ctr = %d, Y_ctr = %d\n", joy_x_ctr, joy_y_ctr );
return( joystick_fd );
+#else
+ return( 0 );
#endif
}
*joy_b1 = js.buttons & 1;
*joy_b2 = js.buttons & 2;
- return( 0 );
#endif
+ return( 0 );
}
/* $Log$
-/* Revision 1.3 1998/01/27 00:47:54 curt
-/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
-/* system and commandline/config file processing code.
+/* Revision 1.4 1998/02/03 23:20:20 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.3 1998/01/27 00:47:54 curt
+ * Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+ * system and commandline/config file processing code.
+ *
* Revision 1.2 1997/12/30 20:47:40 curt
* Integrated new event manager with subsystem initializations.
*
#include <Flight/flight.h>
+#include "ls_types.h"
/* reset flight params to a specific position */
/* Convert from the LaRCsim generic_ struct to the fgFLIGHT struct */
int fgLaRCsim_2_Flight (struct fgFLIGHT *f);
+void ls_loop( SCALAR dt, int initialize );
+
#endif /* _LS_INTERFACE_H */
/* $Log$
-/* Revision 1.5 1998/01/19 19:27:05 curt
-/* Merged in make system changes from Bob Kuehne <rpk@sgi.com>
-/* This should simplify things tremendously.
+/* Revision 1.6 1998/02/03 23:20:17 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.5 1998/01/19 19:27:05 curt
+ * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+ * This should simplify things tremendously.
+ *
* Revision 1.4 1998/01/19 18:40:27 curt
* Tons of little changes to clean up the code and to remove fatal errors
* when building with the c++ compiler.
$Header$
$Log$
+Revision 1.3 1998/02/03 23:20:18 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.2 1998/01/19 18:40:29 curt
Tons of little changes to clean up the code and to remove fatal errors
when building with the c++ compiler.
#include "ls_cockpit.h"
-sub3( DATA v1[], DATA v2[], DATA result[] )
+void sub3( DATA v1[], DATA v2[], DATA result[] )
{
result[0] = v1[0] - v2[0];
result[1] = v1[1] - v2[1];
result[2] = v1[2] - v2[2];
}
-add3( DATA v1[], DATA v2[], DATA result[] )
+void add3( DATA v1[], DATA v2[], DATA result[] )
{
result[0] = v1[0] + v2[0];
result[1] = v1[1] + v2[1];
result[2] = v1[2] + v2[2];
}
-cross3( DATA v1[], DATA v2[], DATA result[] )
+void cross3( DATA v1[], DATA v2[], DATA result[] )
{
result[0] = v1[1]*v2[2] - v1[2]*v2[1];
result[1] = v1[2]*v2[0] - v1[0]*v2[2];
result[2] = v1[0]*v2[1] - v1[1]*v2[0];
}
-multtrans3x3by3( DATA m[][3], DATA v[], DATA result[] )
+void multtrans3x3by3( DATA m[][3], DATA v[], DATA result[] )
{
result[0] = m[0][0]*v[0] + m[1][0]*v[1] + m[2][0]*v[2];
result[1] = m[0][1]*v[0] + m[1][1]*v[1] + m[2][1]*v[2];
result[2] = m[0][2]*v[0] + m[1][2]*v[1] + m[2][2]*v[2];
}
-mult3x3by3( DATA m[][3], DATA v[], DATA result[] )
+void mult3x3by3( DATA m[][3], DATA v[], DATA result[] )
{
result[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2];
result[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]*v[2];
result[2] = m[2][0]*v[0] + m[2][1]*v[1] + m[2][2]*v[2];
}
-clear3( DATA v[] )
+void clear3( DATA v[] )
{
v[0] = 0.; v[1] = 0.; v[2] = 0.;
}
#include <GL/glut.h>
#include <XGL/xgl.h>
#include <stdio.h>
+#include <stdlib.h>
#include <Main/GLUTkey.h>
#include <Main/fg_debug.h>
/* $Log$
-/* Revision 1.27 1998/01/27 00:47:55 curt
-/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
-/* system and commandline/config file processing code.
+/* Revision 1.28 1998/02/03 23:20:23 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.27 1998/01/27 00:47:55 curt
+ * Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+ * system and commandline/config file processing code.
+ *
* Revision 1.26 1998/01/19 19:27:07 curt
* Merged in make system changes from Bob Kuehne <rpk@sgi.com>
* This should simplify things tremendously.
}
+#ifdef __SUNPRO_CC
+ extern "C" {
+ void __eprintf( void ) {
+ }
+ }
+#endif
+
/* $Log$
-/* Revision 1.55 1998/02/02 20:53:58 curt
-/* Incorporated Durk's changes.
+/* Revision 1.56 1998/02/03 23:20:23 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.55 1998/02/02 20:53:58 curt
+ * Incorporated Durk's changes.
+ *
* Revision 1.54 1998/01/31 00:43:10 curt
* Added MetroWorks patches from Carmen Volpe.
*
$(TARGET)$(EXT): $(OBJECTS) $(FG_ROOT_LIB)/stamp_libs
$(CC) -o $(TARGET)$(EXT) $(OBJECTS) $(LDFLAGS) $(LDLIBS)
+ $(RM) fg$(FG_VERSION_MAJOR)$(EXT)
$(LN) $(TARGET)$(EXT) fg$(FG_VERSION_MAJOR)$(EXT)
include $(COMMONRULES)
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.46 1998/02/03 23:20:24 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.45 1998/01/27 00:47:57 curt
# Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
# system and commandline/config file processing code.
* (Log is kept at end of this file)
**************************************************************************/
+#include <string.h>
#include <Main/fg_debug.h>
-#include <varargs.h>
#include <stdio.h>
+#include <stdarg.h>
#include <stdlib.h>
-#include <strings.h> /* probably not portable */
static int fg_DebugSem = 1;
static fgDebugClass fg_DebugClass = FG_ALL;
int fgPrintf( fgDebugClass dbg_class, fgDebugPriority prio, char *fmt, ... )
{
char szOut[1024+1];
+ va_list ap;
int ret = 0;
FG_GRABDEBUGSEM;
FG_RELEASEDEBUGSEM;
return 0;
}
- ret = vsprintf( szOut, fmt, (&fmt+1));
+
+ /* ret = vsprintf( szOut, fmt, (&fmt+1)); (but it didn't work, thus ... */
+ va_start (ap, fmt);
+ ret = vsprintf( szOut, fmt, ap);
+ va_end (ap);
if( fg_DebugCallback!=NULL && fg_DebugCallback(dbg_class, prio, szOut) ) {
FG_RELEASEDEBUGSEM;
/* FG_Altitude = FG_Runway_altitude + 3.758099; */
/* Initial Position north of the city of Globe */
- /* FGto do the install_Longitude = ( -398673.28 / 3600.0 ) * DEG_TO_RAD; */
+ /* FG_Longitude = ( -398673.28 / 3600.0 ) * DEG_TO_RAD; */
/* FG_Latitude = ( 120625.64 / 3600.0 ) * DEG_TO_RAD; */
/* FG_Longitude = ( -397867.44 / 3600.0 ) * DEG_TO_RAD; */
/* FG_Latitude = ( 119548.21 / 3600.0 ) * DEG_TO_RAD; */
/* 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;
+
/* A random test position */
/* FG_Longitude = ( 88128.00 / 3600.0 ) * DEG_TO_RAD; */
/* FG_Latitude = ( 93312.00 / 3600.0 ) * DEG_TO_RAD; */
/* $Log$
-/* Revision 1.38 1998/02/02 20:53:58 curt
-/* Incorporated Durk's changes.
+/* Revision 1.39 1998/02/03 23:20:25 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.38 1998/02/02 20:53:58 curt
+ * Incorporated Durk's changes.
+ *
* Revision 1.37 1998/02/01 03:39:54 curt
* Minor tweaks.
*
ARLIBRARY = libScenery.a
TARGETS = $(ARLIBRARY)
-CFILES = bucketutils.c common.c obj.c scenery.c texload.c tilecache.c tilemgr.c
+CFILES = bucketutils.c obj.c scenery.c texload.c tilecache.c tilemgr.c
CXXFILES =
LDIRT = $(FG_ROOT_LIB)/$(ARLIBRARY)
credit everyone who has contributed to this project.
+Michele America <nomimarketing@mail.telepac.pt>
+ Contributed the HUD code.
+
+
Steve Baker <sbaker@link.com>
Steve has provided an immense amount of coaching and tutelage, both
on the subjects of flight simulation and OpenGL. It has been his
Provided geographic data used by this project
+Durk Talsma <pn_talsma@macmail.psy.uva.nl>
+ Accurate Sun, Moon, and Planets. Sun changes color based on
+ position in sky. Moon has correct phase and blends well into the
+ sky. Planets are correctly positioned and have proper magnitude.
+
+
Carmelo Volpe <carmelo.volpe@csb.ki.se>
Porting Flight Gear to the Metro Works development environment (PC/Mac)
#---------------------------------------------------------------------------
FG_VERSION_MAJOR = 0
-FG_VERSION_MINOR = 29
+FG_VERSION_MINOR = 31
FG_VERSION = $(FG_VERSION_MAJOR).$(FG_VERSION_MINOR)
#
#---------------------------------------------------------------------------
-GLOBAL_CFLAGS = -Wall -DVERSION=\"$(FG_VERSION)\"
+GLOBAL_CFLAGS = -g -Wall -DVERSION=\"$(FG_VERSION)\"
#---------------------------------------------------------------------------