#include <Aircraft/aircraft.h>
#include <Astro/moon.h>
+#include <Astro/planets.h>
#include <Astro/sky.h>
#include <Astro/stars.h>
#include <Astro/sun.h>
#include <Math/fg_geodesy.h>
#include <Math/mat3.h>
#include <Math/polar.h>
-#include <Scenery/mesh.h>
#include <Scenery/scenery.h>
#include <Scenery/tilemgr.h>
#include <Time/event.h>
**************************************************************************/
static void fgUpdateViewParams( void ) {
- struct fgFLIGHT *f;
+ fgFLIGHT *f;
struct fgLIGHT *l;
struct fgTIME *t;
struct fgVIEW *v;
- f = ¤t_aircraft.flight;
+ f = current_aircraft.flight;
l = &cur_light_params;
t = &cur_time_params;
v = ¤t_view;
xglPushMatrix();
/* Translate to view position */
xglTranslatef( v->view_pos.x, v->view_pos.y, v->view_pos.z );
- /* Rotate based on gst (side real time) */
+ /* Rotate based on gst (sidereal time) */
angle = t->gst * 15.041085; /* should be 15.041085, Curt thought it was 15*/
/* printf("Rotating astro objects by %.2f degrees\n",angle); */
xglRotatef( angle, 0.0, 0.0, -1.0 );
/* draw stars and planets */
fgStarsRender();
+ fgPlanetsRender();
/* draw the sun */
fgSunRender();
xglLightfv(GL_LIGHT0, GL_AMBIENT, white );
xglLightfv(GL_LIGHT0, GL_DIFFUSE, white );
xglEnable( GL_CULL_FACE );
+
+ /* Let's try some blending technique's (Durk)*/
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_ONE, GL_ONE);
fgMoonRender();
+ glDisable(GL_BLEND);
xglPopMatrix();
**************************************************************************/
void fgUpdateTimeDepCalcs(int multi_loop) {
- struct fgFLIGHT *f;
+ fgFLIGHT *f;
struct fgTIME *t;
struct fgVIEW *v;
int i;
- f = ¤t_aircraft.flight;
+ f = current_aircraft.flight;
t = &cur_time_params;
v = ¤t_view;
static int remainder = 0;
int elapsed, multi_loop;
double cur_elev;
- double joy_x, joy_y;
- int joy_b1, joy_b2;
- struct fgAIRCRAFT *a;
- struct fgFLIGHT *f;
+ /* double joy_x, joy_y; */
+ /* int joy_b1, joy_b2; */
+ fgAIRCRAFT *a;
+ fgFLIGHT *f;
struct fgTIME *t;
fgPrintf( FG_ALL, FG_DEBUG, "Running Main Loop\n");
fgPrintf( FG_ALL, FG_DEBUG, "======= ==== ====\n");
a = ¤t_aircraft;
- f = &a->flight;
+ f = a->flight;
t = &cur_time_params;
/* update "time" */
/* I'm just sticking this here for now, it should probably move
* eventually */
- cur_elev = mesh_altitude(FG_Longitude * RAD_TO_ARCSEC,
- FG_Latitude * RAD_TO_ARCSEC);
+ /* cur_elev = mesh_altitude(FG_Longitude * RAD_TO_ARCSEC,
+ FG_Latitude * RAD_TO_ARCSEC); */
+ /* there is no ground collision detection really, so for now I
+ * just hard code the ground elevation to be 0 */
+ cur_elev = 0;
+
/* printf("Ground elevation is %.2f meters here.\n", cur_elev); */
/* FG_Runway_altitude = cur_elev * METER_TO_FEET; */
**************************************************************************/
int main( int argc, char *argv[] ) {
- struct fgFLIGHT *f;
+ fgFLIGHT *f;
- f = ¤t_aircraft.flight;
+ f = current_aircraft.flight;
printf("Flight Gear: Version %s\n\n", VERSION);
}
-#ifdef NO_PRINTF
- #include <stdarg.h>
- int printf (const char *format, ...) {}
+#ifdef __SUNPRO_CC
+ extern "C" {
+ void __eprintf( void ) {
+ }
+ }
#endif
-
/* $Log$
-/* Revision 1.52 1998/01/27 00:47:56 curt
-/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
-/* system and commandline/config file processing code.
+/* Revision 1.57 1998/02/07 15:29:40 curt
+/* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
+/* <chotchkiss@namg.us.anritsu.com>
/*
+ * 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.
+ *
+ * Revision 1.53 1998/01/27 18:35:54 curt
+ * Minor tweaks.
+ *
+ * Revision 1.52 1998/01/27 00:47:56 curt
+ * Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+ * system and commandline/config file processing code.
+ *
* Revision 1.51 1998/01/26 15:57:05 curt
* Tweaks for dynamic scenery development.
*