#endif
#include <GL/glut.h>
-#include "../XGL/xgl.h"
+#include <XGL/xgl.h>
#include <stdio.h>
-#include "GLUTkey.h"
-#include "fg_init.h"
-#include "views.h"
-
-#include "../Include/constants.h"
-#include "../Include/general.h"
-
-#include "../Aircraft/aircraft.h"
-#include "../Astro/moon.h"
-#include "../Astro/sky.h"
-#include "../Astro/stars.h"
-#include "../Astro/sun.h"
-#include "../Cockpit/cockpit.h"
-#include "../Joystick/joystick.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"
-#include "../Time/fg_time.h"
-#include "../Time/fg_timer.h"
-#include "../Time/sunpos.h"
-#include "../Weather/weather.h"
+#include <Main/GLUTkey.h>
+#include <Main/fg_init.h>
+#include <Main/fg_debug.h>
+#include <Main/views.h>
+
+#include <Include/fg_constants.h>
+#include <Include/general.h>
+
+#include <Aircraft/aircraft.h>
+#include <Astro/moon.h>
+#include <Astro/sky.h>
+#include <Astro/stars.h>
+#include <Astro/sun.h>
+#include <Cockpit/cockpit.h>
+#include <Joystick/joystick.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>
+#include <Time/fg_time.h>
+#include <Time/fg_timer.h>
+#include <Time/sunpos.h>
+#include <Weather/weather.h>
/* This is a record containing global housekeeping information */
/* pointer to scenery structure */
/* static GLint scenery, runway; */
-double Simtime;
+/* double Simtime; */
/* Another hack */
int use_signals = 0;
* fgInitVisuals() -- Initialize various GL/view parameters
**************************************************************************/
-static void fgInitVisuals() {
+static void fgInitVisuals( void ) {
struct fgLIGHT *l;
struct fgTIME *t;
struct fgWEATHER *w;
* Update the view volume, position, and orientation
**************************************************************************/
-static void fgUpdateViewParams() {
+static void fgUpdateViewParams( void ) {
struct fgFLIGHT *f;
struct fgLIGHT *l;
struct fgTIME *t;
/*************************************************************************
* Draw a basic instrument panel
************************************************************************/
-static void fgUpdateInstrViewParams() {
+static void fgUpdateInstrViewParams( void ) {
xglViewport(0, 0 , (GLint)winWidth, (GLint)winHeight / 2);
xglMatrixMode(GL_PROJECTION);
/* update view volume parameters */
fgUpdateViewParams();
- xglClear( GL_DEPTH_BUFFER_BIT /* | GL_COLOR_BUFFER_BIT */ );
+ xglClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT );
/* Tell GL we are switching to model view parameters */
xglMatrixMode(GL_MODELVIEW);
}
-void fgInitTimeDepCalcs() {
+void fgInitTimeDepCalcs( void ) {
/* initialize timer */
#ifdef USE_ITIMER
struct fgFLIGHT *f;
struct fgTIME *t;
- printf("Running Main Loop\n");
- printf("======= ==== ====\n");
+ fgPrintf( FG_ALL, FG_DEBUG, "Running Main Loop\n");
+ fgPrintf( FG_ALL, FG_DEBUG, "======= ==== ====\n");
a = ¤t_aircraft;
f = &a->flight;
/* Calculate model iterations needed */
elapsed = fgGetTimeInterval();
- printf("Time interval is = %d, previous remainder is = %d\n", elapsed,
- remainder);
- printf("--> Frame rate is = %.2f\n", 1000.0 / (float)elapsed);
+ fgPrintf( FG_ALL, FG_BULK, "Time interval is = %d, previous remainder is = %d\n",
+ elapsed, remainder);
+ fgPrintf( FG_ALL, FG_BULK, "--> Frame rate is = %.2f\n", 1000.0 / (float)elapsed);
elapsed += remainder;
multi_loop = ((float)elapsed * 0.001) * DEFAULT_MODEL_HZ;
remainder = elapsed - ((multi_loop*1000) / DEFAULT_MODEL_HZ);
- printf("Model iterations needed = %d, new remainder = %d\n", multi_loop,
- remainder);
+ fgPrintf( FG_ALL, FG_BULK, "Model iterations needed = %d, new remainder = %d\n",
+ multi_loop, remainder);
/* Run flight model */
if ( ! use_signals ) {
/* now set aircraft altitude above ground */
FG_Altitude = cur_elev * METER_TO_FEET + 3.758099;
- printf("<*> resetting altitude to %.0f meters\n",
+ fgPrintf( FG_ALL, FG_BULK, "<*> resetting altitude to %.0f meters\n",
FG_Altitude * FEET_TO_METER);
}
- /* fgAircraftOutputCurrent(a); */
+ fgAircraftOutputCurrent(a);
/* see if we need to load any new scenery tiles */
- /* fgTileMgrUpdate(); */
+ fgTileMgrUpdate();
/* Process/manage pending events */
fgEventProcess();
/* redraw display */
fgRenderFrame();
- printf("\n");
+ fgPrintf( FG_ALL, FG_DEBUG, "\n");
}
#ifdef NO_PRINTF
#include <stdarg.h>
- int printf (const char *format, ...) {
- }
+ int printf (const char *format, ...) {}
#endif
/* $Log$
-/* Revision 1.48 1998/01/19 18:35:46 curt
-/* Minor tweaks and fixes for cygwin32.
+/* 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.
+ *
+ * Revision 1.50 1998/01/19 19:27:07 curt
+ * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
+ * This should simplify things tremendously.
+ *
+ * Revision 1.49 1998/01/19 18:40:31 curt
+ * Tons of little changes to clean up the code and to remove fatal errors
+ * when building with the c++ compiler.
+ *
+ * Revision 1.48 1998/01/19 18:35:46 curt
+ * Minor tweaks and fixes for cygwin32.
+ *
* Revision 1.47 1998/01/13 00:23:08 curt
* Initial changes to support loading and management of scenery tiles. Note,
* there's still a fair amount of work left to be done.