]> git.mxchange.org Git - flightgear.git/commitdiff
Changed naming scheme of basic shared structures.
authorcurt <curt>
Wed, 27 Aug 1997 03:29:38 +0000 (03:29 +0000)
committercurt <curt>
Wed, 27 Aug 1997 03:29:38 +0000 (03:29 +0000)
27 files changed:
Aircraft/aircraft.c
Aircraft/aircraft.h
Controls/controls.c
Controls/controls.h
FDM/flight.c
FDM/flight.h
LaRCsim/ls_interface.c
Main/GLUTkey.c
Main/GLUTmain.c
Main/depend
Main/fg_init.c
Scenery/Makefile
Scenery/depend
Scenery/geometry.c
Scenery/mesh.c
Scenery/mesh.h
Scenery/parser.y
Scenery/scenery.c
Scenery/scenery.h
Simulator/general.h
Slew/slew.c
Time/depend
Time/fg_time.c
Time/fg_time.h
Time/sunpos.c
Weather/weather.c
Weather/weather.h

index 21affda865a47249d9c17d6e39ba8f3988f24c13..4aa51e0b44b2219d8f33062d0856c8308accfcec 100644 (file)
@@ -32,8 +32,8 @@
 
 /* Display various parameters to stdout */
 void aircraft_debug(int type) {
-    struct flight_params *f;
-    struct control_params *c;
+    struct FLIGHT *f;
+    struct CONTROLS *c;
 
     f = &current_aircraft.flight;
     c = &current_aircraft.controls;
@@ -48,9 +48,12 @@ void aircraft_debug(int type) {
 
 
 /* $Log$
-/* Revision 1.9  1997/07/19 22:39:08  curt
-/* Moved PI to ../constants.h
+/* Revision 1.10  1997/08/27 03:29:56  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.9  1997/07/19 22:39:08  curt
+ * Moved PI to ../constants.h
+ *
  * Revision 1.8  1997/06/25 15:39:45  curt
  * Minor changes to compile with rsxnt/win32.
  *
index 07a4dbf146ce2ad76e01e3537b133ca9b8b81211..1f1f788191e959ac0c83c361d4de691113a463d5 100644 (file)
 
 
 /* Define a structure containing all the parameters for an aircraft */
-struct aircraft_params {
-    struct flight_params flight;
-    struct control_params controls;
+struct AIRCRAFT {
+    struct FLIGHT flight;
+    struct CONTROLS controls;
 };
 
 
 /* current_aircraft contains all the parameters of the aircraft
    currently being operated. */
-extern struct aircraft_params current_aircraft;
+extern struct AIRCRAFT current_aircraft;
 
 
 /* Display various parameters to stdout */
@@ -51,9 +51,12 @@ void aircraft_debug(int type);
 
 
 /* $Log$
-/* Revision 1.4  1997/07/23 21:52:17  curt
-/* Put comments around the text after an #endif for increased portability.
+/* Revision 1.5  1997/08/27 03:29:58  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.4  1997/07/23 21:52:17  curt
+ * Put comments around the text after an #endif for increased portability.
+ *
  * Revision 1.3  1997/06/21 17:12:42  curt
  * Capitalized subdirectory names.
  *
index 0a0f9668f67545f7538cd64ca66be7b07a602758..414c377476b944eb3fe87cb28761e7516e3cb0fa 100644 (file)
@@ -30,7 +30,7 @@
 
 void fgControlsInit() {
     int i;
-    struct control_params *c;
+    struct CONTROLS *c;
     c = &current_aircraft.controls;
 
     FG_Elevator = 0.0;
@@ -46,7 +46,7 @@ void fgControlsInit() {
 
 
 void fgElevMove(double amt) {
-    struct control_params *c;
+    struct CONTROLS *c;
     c = &current_aircraft.controls;
 
     FG_Elevator += amt;
@@ -56,7 +56,7 @@ void fgElevMove(double amt) {
 }
 
 void fgElevSet(double pos) {
-    struct control_params *c;
+    struct CONTROLS *c;
     c = &current_aircraft.controls;
 
     FG_Elevator = pos;
@@ -66,7 +66,7 @@ void fgElevSet(double pos) {
 }
 
 void fgElevTrimMove(double amt) {
-    struct control_params *c;
+    struct CONTROLS *c;
     c = &current_aircraft.controls;
 
     FG_Elev_Trim += amt;
@@ -76,7 +76,7 @@ void fgElevTrimMove(double amt) {
 }
 
 void fgElevTrimSet(double pos) {
-    struct control_params *c;
+    struct CONTROLS *c;
     c = &current_aircraft.controls;
 
     FG_Elev_Trim = pos;
@@ -86,7 +86,7 @@ void fgElevTrimSet(double pos) {
 }
 
 void fgAileronMove(double amt) {
-    struct control_params *c;
+    struct CONTROLS *c;
     c = &current_aircraft.controls;
 
     FG_Aileron += amt;
@@ -96,7 +96,7 @@ void fgAileronMove(double amt) {
 }
 
 void fgAileronSet(double pos) {
-    struct control_params *c;
+    struct CONTROLS *c;
     c = &current_aircraft.controls;
 
     FG_Aileron = pos;
@@ -106,7 +106,7 @@ void fgAileronSet(double pos) {
 }
 
 void fgRudderMove(double amt) {
-    struct control_params *c;
+    struct CONTROLS *c;
     c = &current_aircraft.controls;
 
     FG_Rudder += amt;
@@ -116,7 +116,7 @@ void fgRudderMove(double amt) {
 }
 
 void fgRudderSet(double pos) {
-    struct control_params *c;
+    struct CONTROLS *c;
     c = &current_aircraft.controls;
 
     FG_Rudder = pos;
@@ -127,7 +127,7 @@ void fgRudderSet(double pos) {
 
 void fgThrottleMove(int engine, double amt) {
     int i;
-    struct control_params *c;
+    struct CONTROLS *c;
     c = &current_aircraft.controls;
 
     if ( engine == FG_Throttle_All ) {
@@ -147,7 +147,7 @@ void fgThrottleMove(int engine, double amt) {
 
 void fgThrottleSet(int engine, double pos) {
     int i;
-    struct control_params *c;
+    struct CONTROLS *c;
     c = &current_aircraft.controls;
 
     if ( engine == FG_Throttle_All ) {
@@ -167,9 +167,12 @@ void fgThrottleSet(int engine, double pos) {
 
 
 /* $Log$
-/* Revision 1.2  1997/06/21 17:12:48  curt
-/* Capitalized subdirectory names.
+/* Revision 1.3  1997/08/27 03:30:01  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.2  1997/06/21 17:12:48  curt
+ * Capitalized subdirectory names.
+ *
  * Revision 1.1  1997/05/31 19:24:04  curt
  * Initial revision.
  *
index 2425235c7c26790488c0c246490efe99b0eceb80..a877e46e341b85b0eb08b64233daaad62146a827 100644 (file)
@@ -33,7 +33,7 @@
 
 /* Define a structure containing the control parameters */
 
-struct control_params {
+struct CONTROLS {
     double aileron;
     double elevator;
     double elevator_trim;
@@ -81,9 +81,12 @@ void fgThrottleSet(int engine, double pos);
 
 
 /* $Log$
-/* Revision 1.4  1997/07/23 21:52:18  curt
-/* Put comments around the text after an #endif for increased portability.
+/* Revision 1.5  1997/08/27 03:30:02  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.4  1997/07/23 21:52:18  curt
+ * Put comments around the text after an #endif for increased portability.
+ *
  * Revision 1.3  1997/05/31 19:16:27  curt
  * Elevator trim added.
  *
index 33d1df650172638cd72fca90f2fe113866422e4a..cee1482955c2c2cc394227eaaea0ceb1aee1014d 100644 (file)
@@ -28,7 +28,7 @@
 
 
 /* Initialize the flight model parameters */
-int fgFlightModelInit(int model, struct flight_params *f, double dt) {
+int fgFlightModelInit(int model, struct FLIGHT *f, double dt) {
     int result;
 
     if ( model == FG_LARCSIM ) {
@@ -45,7 +45,7 @@ int fgFlightModelInit(int model, struct flight_params *f, double dt) {
 
 
 /* Run multiloop iterations of the flight model */
-int fgFlightModelUpdate(int model, struct flight_params *f, int multiloop) {
+int fgFlightModelUpdate(int model, struct FLIGHT *f, int multiloop) {
     int result;
 
     if ( model == FG_LARCSIM ) {
@@ -61,9 +61,12 @@ int fgFlightModelUpdate(int model, struct flight_params *f, int multiloop) {
 
 
 /* $Log$
-/* Revision 1.2  1997/05/29 22:39:57  curt
-/* Working on incorporating the LaRCsim flight model.
+/* Revision 1.3  1997/08/27 03:30:04  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.2  1997/05/29 22:39:57  curt
+ * Working on incorporating the LaRCsim flight model.
+ *
  * Revision 1.1  1997/05/29 02:35:04  curt
  * Initial revision.
  *
index 4b682d110f8e795195f7aee0219280c740fc2cb2..c9196ed568ea8ad972342a47d95394f523bc153a 100644 (file)
@@ -61,7 +61,7 @@
 typedef double FG_VECTOR_3[3];
 
 /* This is based heavily on LaRCsim/ls_generic.h */
-struct flight_params {
+struct FLIGHT {
 
 /*================== Mass properties and geometry values ==================*/
 
@@ -400,19 +400,22 @@ struct flight_params {
 /* General interface to the flight model routines */
 
 /* Initialize the flight model parameters */
-int fgFlightModelInit(int model, struct flight_params *f, double dt);
+int fgFlightModelInit(int model, struct FLIGHT *f, double dt);
 
 /* Run multiloop iterations of the flight model */
-int fgFlightModelUpdate(int model, struct flight_params *f, int multiloop);
+int fgFlightModelUpdate(int model, struct FLIGHT *f, int multiloop);
 
 
 #endif /* FLIGHT_H */
 
 
 /* $Log$
-/* Revision 1.7  1997/07/23 21:52:19  curt
-/* Put comments around the text after an #endif for increased portability.
+/* Revision 1.8  1997/08/27 03:30:06  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.7  1997/07/23 21:52:19  curt
+ * Put comments around the text after an #endif for increased portability.
+ *
  * Revision 1.6  1997/06/21 17:52:22  curt
  * Continue directory shuffling ... everything should be compilable/runnable
  * again.
index a0500e245dc56d3aa98e08f21e451b0d6271a8ca..c99bc23f679c7570fdfd48c3a00875f2e5119fe8 100644 (file)
@@ -495,7 +495,7 @@ int initialize;
 
 
 int ls_cockpit() {
-    struct control_params *c;
+    struct CONTROLS *c;
 
     sim_control_.paused = 0;
 
@@ -559,8 +559,8 @@ int fgLaRCsimUpdate(int multiloop) {
 }
 
 
-/* Convert from the FG flight_params struct to the LaRCsim generic_ struct */
-int fgFlight_2_LaRCsim (struct flight_params *f) {
+/* Convert from the FG FLIGHT struct to the LaRCsim generic_ struct */
+int fgFlight_2_LaRCsim (struct FLIGHT *f) {
     Mass =      FG_Mass;
     I_xx =      FG_I_xx;
     I_yy =      FG_I_yy;
@@ -733,8 +733,8 @@ int fgFlight_2_LaRCsim (struct flight_params *f) {
 }
 
 
-/* Convert from the LaRCsim generic_ struct to the FG flight_params struct */
-int fgLaRCsim_2_Flight (struct flight_params *f) {
+/* Convert from the LaRCsim generic_ struct to the FG FLIGHT struct */
+int fgLaRCsim_2_Flight (struct FLIGHT *f) {
     FG_Mass =   Mass;
     FG_I_xx =   I_xx;
     FG_I_yy =   I_yy;
@@ -909,6 +909,9 @@ int fgLaRCsim_2_Flight (struct flight_params *f) {
 /* Flight Gear Modification Log
  *
  * $Log$
+ * Revision 1.9  1997/08/27 03:30:08  curt
+ * Changed naming scheme of basic shared structures.
+ *
  * Revision 1.8  1997/06/21 17:12:50  curt
  * Capitalized subdirectory names.
  *
index 5a89d200efa3509726151d3cf5171d775a75099a..53df0817e5db48f09d9e1f91724d1f79a623a4b5 100644 (file)
@@ -45,8 +45,8 @@ extern int show_hud;             /* HUD state */
 
 /* Handle keyboard events */
 void GLUTkey(unsigned char k, int x, int y) {
-    struct control_params *c;
-    struct weather_params *w;
+    struct CONTROLS *c;
+    struct WEATHER *w;
 
     c = &current_aircraft.controls;
     w = &current_weather;
@@ -142,7 +142,7 @@ void GLUTkey(unsigned char k, int x, int y) {
 
 /* Handle "special" keyboard events */
 void GLUTspecialkey(int k, int x, int y) {
-    struct control_params *c;
+    struct CONTROLS *c;
 
     c = &current_aircraft.controls;
 
@@ -220,9 +220,12 @@ void GLUTspecialkey(int k, int x, int y) {
 
 
 /* $Log$
-/* Revision 1.19  1997/08/25 20:27:21  curt
-/* Merged in initial HUD and Joystick code.
+/* Revision 1.20  1997/08/27 03:30:13  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.19  1997/08/25 20:27:21  curt
+ * Merged in initial HUD and Joystick code.
+ *
  * Revision 1.18  1997/08/22 21:34:38  curt
  * Doing a bit of reorganizing and house cleaning.
  *
index 312da1a734d25f33de916c439200e7e5dbfaa35d..986e685d5ace5a75b0a6b91ab48bf7fccee35522 100644 (file)
 
 /* This is a record containing all the info for the aircraft currently
    being operated */
-struct aircraft_params current_aircraft;
+struct AIRCRAFT current_aircraft;
 
 /* This is a record containing global housekeeping information */
-struct general_params general;
+struct GENERAL general;
 
 /* This is a record containing current weather info */
-struct weather_params current_weather;
+struct WEATHER current_weather;
 
 /* view parameters */
 static GLfloat win_ratio = 1.0;
@@ -103,7 +103,7 @@ int show_hud;
  **************************************************************************/
 
 static void fgInitVisuals() {
-    struct weather_params *w;
+    struct WEATHER *w;
 
     w = &current_weather;
 
@@ -140,8 +140,8 @@ static void fgInitVisuals() {
 
 static void fgUpdateViewParams() {
     struct fgCartesianPoint view_pos /*, alt_up */;
-    struct flight_params *f;
-    struct time_params *t;
+    struct FLIGHT *f;
+    struct fgTIME *t;
     MAT3mat R, TMP, UP, LOCAL, VIEW;
     MAT3vec vec, view_up, forward, view_forward, local_up, nup, nsun;
     double sun_angle, temp, ambient, diffuse, sky;
@@ -330,8 +330,8 @@ static void fgUpdateVisuals( void ) {
  **************************************************************************/
 
 void fgUpdateTimeDepCalcs(int multi_loop) {
-    struct flight_params *f;
-    struct time_params *t;
+    struct FLIGHT *f;
+    struct fgTIME *t;
     int i;
 
     f = &current_aircraft.flight;
@@ -487,7 +487,7 @@ static void fgMainLoop( void ) {
     double cur_elev;
     double joy_x, joy_y;
     int joy_b1, joy_b2;
-    struct flight_params *f;
+    struct FLIGHT *f;
 
     f = &current_aircraft.flight;
 
@@ -570,7 +570,7 @@ static void fgReshape( int width, int height ) {
  **************************************************************************/
 
 int main( int argc, char *argv[] ) {
-    struct flight_params *f;
+    struct FLIGHT *f;
 
     f = &current_aircraft.flight;
 
@@ -646,9 +646,12 @@ int main( int argc, char *argv[] ) {
 
 
 /* $Log$
-/* Revision 1.10  1997/08/25 20:27:22  curt
-/* Merged in initial HUD and Joystick code.
+/* Revision 1.11  1997/08/27 03:30:16  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.10  1997/08/25 20:27:22  curt
+ * Merged in initial HUD and Joystick code.
+ *
  * Revision 1.9  1997/08/22 21:34:39  curt
  * Doing a bit of reorganizing and house cleaning.
  *
index b7e213b2f05f4c9d5894ac92e8656590a1a8e0ae..a87ec1bc876ce1ce348e3dd2d1a2d21c019eb097 100644 (file)
@@ -1,18 +1,21 @@
-GLUTkey.o: GLUTkey.c GLUTkey.h ../Aircraft/aircraft.h \
+GLUTkey.o: GLUTkey.c GLUTkey.h ../constants.h ../Aircraft/aircraft.h \
  ../Aircraft/../Flight/flight.h ../Aircraft/../Flight/Slew/slew.h \
  ../Aircraft/../Flight/LaRCsim/ls_interface.h \
  ../Aircraft/../Flight/LaRCsim/../flight.h \
  ../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../constants.h
+ ../Aircraft/../Controls/../limits.h ../Weather/weather.h
 GLUTmain.o: GLUTmain.c fg_init.h ../constants.h ../general.h \
  ../Aircraft/aircraft.h ../Aircraft/../Flight/flight.h \
  ../Aircraft/../Flight/Slew/slew.h \
  ../Aircraft/../Flight/LaRCsim/ls_interface.h \
  ../Aircraft/../Flight/LaRCsim/../flight.h \
  ../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../Scenery/mesh.h \
- ../Scenery/scenery.h ../Scenery/../types.h ../Math/fg_geodesy.h \
- ../Math/mat3.h ../Math/polar.h ../Math/../types.h ../Time/fg_time.h \
+ ../Aircraft/../Controls/../limits.h ../Cockpit/cockpit.h \
+ ../Cockpit/hud.h ../Cockpit/../Aircraft/aircraft.h \
+ ../Cockpit/../Flight/flight.h ../Cockpit/../Controls/controls.h \
+ ../Joystick/joystick.h ../Math/fg_geodesy.h ../Math/mat3.h \
+ ../Math/polar.h ../Math/../types.h ../Scenery/mesh.h \
+ ../Scenery/scenery.h ../Scenery/../types.h ../Time/fg_time.h \
  ../Time/../types.h ../Time/fg_timer.h ../Time/sunpos.h \
  ../Weather/weather.h
 fg_init.o: fg_init.c fg_init.h ../constants.h ../general.h \
@@ -21,4 +24,9 @@ fg_init.o: fg_init.c fg_init.h ../constants.h ../general.h \
  ../Aircraft/../Flight/LaRCsim/ls_interface.h \
  ../Aircraft/../Flight/LaRCsim/../flight.h \
  ../Aircraft/../Controls/controls.h \
- ../Aircraft/../Controls/../limits.h ../Math/fg_random.h
+ ../Aircraft/../Controls/../limits.h ../Cockpit/cockpit.h \
+ ../Cockpit/hud.h ../Cockpit/../Aircraft/aircraft.h \
+ ../Cockpit/../Flight/flight.h ../Cockpit/../Controls/controls.h \
+ ../Joystick/joystick.h ../Math/fg_random.h ../Scenery/mesh.h \
+ ../Scenery/scenery.h ../Scenery/../types.h ../Time/sunpos.h \
+ ../Weather/weather.h
index 973cbf99fb550c192d1362dcbcaa8477d15aef56..2fcf9acb7df332282fe179c40c8284c86faa10c7 100644 (file)
@@ -38,6 +38,7 @@
 #include "../Math/fg_random.h"
 #include "../Scenery/mesh.h"
 #include "../Scenery/scenery.h"
+#include "../Scenery/stars.h"
 #include "../Time/sunpos.h"
 #include "../Weather/weather.h"
 
@@ -48,7 +49,7 @@ extern int show_hud;             /* HUD state */
 /* General house keeping initializations */
 
 void fgInitGeneral( void ) {
-    struct general_params *g;
+    struct GENERAL *g;
 
     g = &general;
 
@@ -72,7 +73,7 @@ void fgInitGeneral( void ) {
 void fgInitSubsystems( void ) {
     double cur_elev;
 
-    struct flight_params *f;
+    struct FLIGHT *f;
 
     f = &current_aircraft.flight;
 
@@ -145,6 +146,9 @@ void fgInitSubsystems( void ) {
     /* Initialize the Cockpit subsystem */
     fgCockpitInit( current_aircraft );
 
+    /* Initialize the Stars subsystem  */
+    fgStarsInit();
+
     /* Initialize the Scenery Management subsystem */
     fgSceneryInit();
 
@@ -184,9 +188,12 @@ void fgInitSubsystems( void ) {
 
 
 /* $Log$
-/* Revision 1.2  1997/08/25 20:27:23  curt
-/* Merged in initial HUD and Joystick code.
+/* Revision 1.3  1997/08/27 03:30:19  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.2  1997/08/25 20:27:23  curt
+ * Merged in initial HUD and Joystick code.
+ *
  * Revision 1.1  1997/08/23 01:46:20  curt
  * Initial revision.
  *
index 65feea860fa88033c669b8422306f588bd54f734..f6ebee5ddf0196bb69cb6821bc610898e8d0c567 100644 (file)
@@ -26,7 +26,8 @@
 
 TARGET = libScenery.a
 
-CFILES = chunkmgr.c common.c mesh.c scenery.c scanner.c parser.c geometry.c
+CFILES = chunkmgr.c common.c mesh.c scenery.c scanner.c parser.c geometry.c \
+       stars.c
 OFILES = $(CFILES:.c=.o)
 
 
@@ -94,6 +95,9 @@ geometry.o:
 
 #---------------------------------------------------------------------------
 # $Log$
+# Revision 1.19  1997/08/27 03:30:23  curt
+# Changed naming scheme of basic shared structures.
+#
 # Revision 1.18  1997/08/02 19:10:12  curt
 # Incorporated mesh2GL.c into mesh.c
 #
index 39f19db9bea60da2164249e960026e5e03f52bff..2e59282b11b509c5867ec41b35d22501109f25a4 100644 (file)
@@ -7,4 +7,4 @@ mesh.o: mesh.c ../constants.h ../types.h ../Math/fg_geodesy.h \
 parser.o: parser.c parsevrml.h geometry.h common.h mesh.h scenery.h \
  ../types.h
 scanner.o: scanner.c parser.h
-scenery.o: scenery.c scenery.h ../types.h parsevrml.h
+scenery.o: scenery.c ../general.h scenery.h ../types.h parsevrml.h
index 84499f0e24716e3b7d206add4ea452c001f45f4a..da2b4b7bb9ce8f985bab7df3b207e2c2bdb52e15 100644 (file)
@@ -33,7 +33,7 @@
 
 
 static vrmlGeometryType;
-struct mesh eg;
+struct MESH eg;
 
 
 /* Begin a new vrml geometry statement */
@@ -119,9 +119,12 @@ int vrmlFreeGeometry() {
 
 
 /* $Log$
-/* Revision 1.3  1997/07/08 18:20:13  curt
-/* Working on establishing a hard ground.
+/* Revision 1.4  1997/08/27 03:30:26  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.3  1997/07/08 18:20:13  curt
+ * Working on establishing a hard ground.
+ *
  * Revision 1.2  1997/07/07 20:59:51  curt
  * Working on scenery transformations to enable us to fly fluidly over the
  * poles with no discontinuity/distortion in scenery.
index ccde7ab0dbda995341df2474c55229dc88e05e8c..6ff71031ef14a5656789339668e0970a40154263 100644 (file)
 
 /* Temporary hack until we get the scenery management system running */
 extern GLint mesh_hack;
-extern struct mesh eg;
+extern struct MESH eg;
 
 /* initialize the non-array mesh values */
-void mesh_init(struct mesh *m) {
+void mesh_init(struct MESH *m) {
     m->originx = 0.0;
     m->originy = 0.0;
 
@@ -72,10 +72,10 @@ void mesh_init(struct mesh *m) {
 
 
 /* return a pointer to a new mesh structure (no data array allocated yet) */
-struct mesh *(new_mesh)() {
-    struct mesh *mesh_ptr;
+struct MESH *(new_mesh)() {
+    struct MESH *mesh_ptr;
 
-    mesh_ptr = (struct mesh *)malloc(sizeof(struct mesh));
+    mesh_ptr = (struct MESH *)malloc(sizeof(struct MESH));
 
     if ( mesh_ptr == 0 ) {
        printf("Virtual memory exceeded\n");
@@ -107,7 +107,7 @@ float *(new_mesh_data)(int nrows, int ncols) {
 
 
 /* set the option name in the mesh data structure */
-void mesh_set_option_name(struct mesh *m, char *name) {
+void mesh_set_option_name(struct MESH *m, char *name) {
     if ( strlen(name) < MAX_IDENT_LEN ) {
        strcpy(m->option_name, name);
     } else {
@@ -123,7 +123,7 @@ void mesh_set_option_name(struct mesh *m, char *name) {
 
 
 /* set an option value in the mesh data structure */
-void mesh_set_option_value(struct mesh *m, char *value) {
+void mesh_set_option_value(struct MESH *m, char *value) {
     /* printf("Setting %s to %s\n", m->option_name, value); */
 
     if ( m->do_data ) {
@@ -160,7 +160,7 @@ void mesh_set_option_value(struct mesh *m, char *value) {
 
 /* do whatever needs to be done with the mesh now that it's been
    loaded, such as generating the OpenGL call list. */
-void mesh_do_it(struct mesh *m) {
+void mesh_do_it(struct MESH *m) {
     mesh_hack = mesh_to_OpenGL(m);
 }
 
@@ -271,7 +271,7 @@ double mesh_altitude(double lon, double lat) {
 
 
 /* walk through mesh and make opengl calls */
-GLint mesh_to_OpenGL(struct mesh *m) {
+GLint mesh_to_OpenGL(struct MESH *m) {
     GLint mesh;
     /* static GLfloat color[4] = { 0.5, 0.4, 0.25, 1.0 }; */ /* dark desert */
     static GLfloat color[4] = { 0.5, 0.5, 0.25, 1.0 };
@@ -395,9 +395,12 @@ GLint mesh_to_OpenGL(struct mesh *m) {
 
 
 /* $Log$
-/* Revision 1.20  1997/08/19 23:55:08  curt
-/* Worked on better simulating real lighting.
+/* Revision 1.21  1997/08/27 03:30:27  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.20  1997/08/19 23:55:08  curt
+ * Worked on better simulating real lighting.
+ *
  * Revision 1.19  1997/08/06 00:24:28  curt
  * Working on correct real time sun lighting.
  *
index 9b9d795e4a9e3dec02af37573e855b03c62b372f..ceb22f6b2ce502069b8c6a172a51add48567edf2 100644 (file)
@@ -31,7 +31,7 @@
 #include <GL/glut.h>
 
 
-struct mesh {
+struct MESH {
     /* start coordinates (in arc seconds) */
     double originx, originy;
 
@@ -52,39 +52,42 @@ struct mesh {
 
 
 /* return a pointer to a new mesh structure (no data array allocated yet) */
-struct mesh *(new_mesh)();
+struct MESH *(new_mesh)();
 
 /* initialize the non-array mesh values */
-void mesh_init(struct mesh *m);
+void mesh_init(struct MESH *m);
 
 /* return a pointer to a dynamically allocated array */
 float *(new_mesh_data)(int nrows, int ncols);
 
 /* set the option name in the mesh data structure */
-void mesh_set_option_name(struct mesh *m, char *name);
+void mesh_set_option_name(struct MESH *m, char *name);
 
 /* set an option value in the mesh data structure */
-void mesh_set_option_value(struct mesh *m, char *value);
+void mesh_set_option_value(struct MESH *m, char *value);
 
 /* do whatever needs to be done with the mesh now that it's been
  * loaded, such as generating the OpenGL call list. */
-void mesh_do_it(struct mesh *m);
+void mesh_do_it(struct MESH *m);
 
 /* return the current altitude based on mesh data.  We should rewrite
  * this to interpolate exact values, but for now this is good enough */
 double mesh_altitude(double lon, double lat);
 
 /* walk through mesh and make opengl calls */
-GLint mesh_to_OpenGL(struct mesh *m);
+GLint mesh_to_OpenGL(struct MESH *m);
 
 
 #endif /* MESH_H */
 
 
 /* $Log$
-/* Revision 1.6  1997/08/02 19:10:15  curt
-/* Incorporated mesh2GL.c into mesh.c
+/* Revision 1.7  1997/08/27 03:30:29  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.6  1997/08/02 19:10:15  curt
+ * Incorporated mesh2GL.c into mesh.c
+ *
  * Revision 1.5  1997/07/23 21:52:25  curt
  * Put comments around the text after an #endif for increased portability.
  *
index 0a375a5e97ef21cd433da7a6fc38b3125343aa03..41f7b8fb7bc09a672f592273a7c15d71cde5cfe1 100644 (file)
@@ -170,7 +170,7 @@ int main(int argc, char **argv) {
     yydebug = 1;
 #endif
 
-    printf("input file = %s\n", argv[1]);
+    printf("  input file = %s\n", argv[1]);
     push_input_stream(argv[1]);
     yyparse();
 
@@ -183,7 +183,7 @@ int main(int argc, char **argv) {
 int fgParseVRML(char *file) {
     int result;
 
-    printf("input file = %s\n", file);
+    printf("  input file = %s\n", file);
     push_input_stream(file);
     result = yyparse();
 
index 3fb045097c14a8b7890c547f01dae3dbecc29698..834c25b5beec17b333b7608044e31f2feeb6bf8f 100644 (file)
@@ -29,6 +29,7 @@
 #endif
 
 #include <GL/glut.h>
+#include <stdio.h>
 #include <string.h>
 
 #include "../general.h"
@@ -42,7 +43,7 @@ GLint mesh_hack;
 
 
 /* Shared structure to hold current scenery parameters */
-struct scenery_params scenery;
+struct SCENERY scenery;
 
 
 /* Initialize the Scenery Management system */
@@ -55,7 +56,7 @@ void fgSceneryInit() {
 /* Tell the scenery manager where we are so it can load the proper data, and
  * build the proper structures. */
 void fgSceneryUpdate(double lon, double lat, double elev) {
-    struct general_params *g;
+    struct GENERAL *g;
     char path[1024];
 
     g = &general;
@@ -68,6 +69,9 @@ void fgSceneryUpdate(double lon, double lat, double elev) {
     strcat(path, g->root_dir);
     strcat(path, "/Scenery/");
     strcat(path, "mesa-e.wrl");
+
+    printf("Loading Scenery: %s\n", path);
+
     fgParseVRML(path);
 }
 
@@ -81,9 +85,12 @@ void fgSceneryRender() {
 
 
 /* $Log$
-/* Revision 1.14  1997/08/25 20:27:24  curt
-/* Merged in initial HUD and Joystick code.
+/* Revision 1.15  1997/08/27 03:30:32  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.14  1997/08/25 20:27:24  curt
+ * Merged in initial HUD and Joystick code.
+ *
  * Revision 1.13  1997/08/22 21:34:41  curt
  * Doing a bit of reorganizing and house cleaning.
  *
index aea333f56100b97f94f9d446b5ad4540a0886f5b..e6f76028950fbddfc173b12bb7b066451621008d 100644 (file)
@@ -32,7 +32,7 @@
 
 
 /* Define a structure containing global scenery parameters */
-struct scenery_params {
+struct SCENERY {
     /* number of terrain data points to skip */
     int terrain_skip;
 
@@ -40,7 +40,7 @@ struct scenery_params {
     struct fgCartesianPoint center;
 };
 
-extern struct scenery_params scenery;
+extern struct SCENERY scenery;
 
 
 /* Initialize the Scenery Management system */
@@ -60,9 +60,12 @@ void fgSceneryRender();
 
 
 /* $Log$
-/* Revision 1.8  1997/08/06 00:24:30  curt
-/* Working on correct real time sun lighting.
+/* Revision 1.9  1997/08/27 03:30:33  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.8  1997/08/06 00:24:30  curt
+ * Working on correct real time sun lighting.
+ *
  * Revision 1.7  1997/07/23 21:52:27  curt
  * Put comments around the text after an #endif for increased portability.
  *
index c75cb546ca7bb28864c3fe23a758ae1be20aeb8d..8bd85906ea26e18ca557ec637bf4229446a15fe7 100644 (file)
 
 
 /* the general house keeping structure definition */
-struct general_params {
+struct GENERAL {
     /* The flight gear "root" directory */
     char *root_dir;
 };
 
 /* general contains all the general house keeping parameters. */
-extern struct general_params general;
+extern struct GENERAL general;
 
 #endif /* GENERAL_H */
 
 
 /* $Log$
-/* Revision 1.1  1997/08/23 11:37:12  curt
-/* Initial revision.
+/* Revision 1.2  1997/08/27 03:29:38  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.1  1997/08/23 11:37:12  curt
+ * Initial revision.
+ *
  */
index f8029e01b81191c58ac4c645713631e75d5e9bc3..3f81dfb1748cf8fd4678f0def8a937fdbe415a86 100644 (file)
@@ -44,7 +44,7 @@
 
 /* reset flight params to a specific position */
 void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading) {
-    struct flight_params *f;
+    struct FLIGHT *f;
 
     f = &current_aircraft.flight;
 
@@ -70,8 +70,8 @@ void fgSlewInit(double pos_x, double pos_y, double pos_z, double heading) {
 
 /* update position based on inputs, positions, velocities, etc. */
 void fgSlewUpdate() {
-    struct flight_params *f;
-    struct control_params *c;
+    struct FLIGHT *f;
+    struct CONTROLS *c;
 
     f = &current_aircraft.flight;
     c = &current_aircraft.controls;
@@ -91,9 +91,12 @@ void fgSlewUpdate() {
 
 
 /* $Log$
-/* Revision 1.5  1997/07/19 22:35:06  curt
-/* Moved fiddled with PI to avoid compiler warnings.
+/* Revision 1.6  1997/08/27 03:30:11  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.5  1997/07/19 22:35:06  curt
+ * Moved fiddled with PI to avoid compiler warnings.
+ *
  * Revision 1.4  1997/06/21 17:12:51  curt
  * Capitalized subdirectory names.
  *
index e641d93288c425081e6807438dd2f836ad1409ba..e73736bdc077fba0d321d250110ab5a0adc6e93a 100644 (file)
@@ -1,5 +1,4 @@
 fg_time.o: fg_time.c fg_time.h ../types.h
 fg_timer.o: fg_timer.c fg_timer.h
-sptest.o: sptest.c sunpos.h ../constants.h
 sunpos.o: sunpos.c sunpos.h fg_time.h ../types.h ../constants.h \
  ../Math/fg_geodesy.h ../Math/polar.h ../Math/../types.h
index 1aaa9b4acd3b1a6f7273b4d256eb8de0c0704cb5..064a75c2c5128fabe998f72082e23353cbacea51 100644 (file)
 #include "fg_time.h"
 
 
-struct time_params cur_time_params;
+struct fgTIME cur_time_params;
 
 
 /* $Log$
-/* Revision 1.1  1997/08/13 21:55:59  curt
-/* Initial revision.
+/* Revision 1.2  1997/08/27 03:30:35  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.1  1997/08/13 21:55:59  curt
+ * Initial revision.
+ *
  */
index 8b8d28f8118f0c7a7ed2af03839459eb41dcff62..9518d913ab1421fc7f8e67dcea0572326c01b7b2 100644 (file)
 
 
 /* Define a structure containing global time parameters */
-struct time_params {
+struct fgTIME {
     /* the point on the earth's surface above which the sun is directly 
      * overhead */
     struct fgCartesianPoint fg_sunpos;  /* in cartesian coordiantes */
     double sun_lon, sun_gc_lat;         /* in geocentric coordinates */
 };
 
-extern struct time_params cur_time_params;
+extern struct fgTIME cur_time_params;
 
 
 #endif /* FG_TIME_H */
 
 
 /* $Log$
-/* Revision 1.1  1997/08/13 21:56:00  curt
-/* Initial revision.
+/* Revision 1.2  1997/08/27 03:30:36  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.1  1997/08/13 21:56:00  curt
+ * Initial revision.
+ *
  */
index 9965f0797f44103b333e088e6a7a23ef06566a7d..074265d876bc6eb5f7714d700b15fcb480a372b6 100644 (file)
@@ -259,7 +259,7 @@ void fgSunPosition(time_t ssue, double *lon, double *lat) {
 
 /* update the cur_time_params structure with the current sun position */
 void fgUpdateSunPos() {
-    struct time_params *t;
+    struct fgTIME *t;
     double sun_gd_lat, sl_radius;
     static int time_warp = 0;
 
@@ -272,13 +272,19 @@ void fgUpdateSunPos() {
     fgGeodToGeoc(sun_gd_lat, 0.0, &sl_radius, &t->sun_gc_lat);
 
     t->fg_sunpos = fgPolarToCart(t->sun_lon, t->sun_gc_lat, sl_radius);
+
+    /* printf("Geodetic lat = %.5f Geocentric lat = %.5f\n", sun_gd_lat,
+       t->sun_gc_lat); */
 }
 
 
 /* $Log$
-/* Revision 1.5  1997/08/22 21:34:41  curt
-/* Doing a bit of reorganizing and house cleaning.
+/* Revision 1.6  1997/08/27 03:30:37  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.5  1997/08/22 21:34:41  curt
+ * Doing a bit of reorganizing and house cleaning.
+ *
  * Revision 1.4  1997/08/19 23:55:09  curt
  * Worked on better simulating real lighting.
  *
index f3070b252aba8344399cc1d58b4a715a384225c6..2c783dd03c627497d9113d2498519f2a44ce132d 100644 (file)
@@ -31,7 +31,7 @@
 
 /* Initialize the weather modeling subsystem */
 void fgWeatherInit(void) {
-    struct weather_params *w;
+    struct WEATHER *w;
 
     w = &current_weather;
 
@@ -44,8 +44,8 @@ void fgWeatherInit(void) {
 
 /* Update the weather parameters for the current position */
 void fgWeatherUpdate(double lon, double lat, double alt) {
-    struct flight_params *f;
-    struct weather_params *w;
+    struct FLIGHT *f;
+    struct WEATHER *w;
 
     f = &current_aircraft.flight;
     w = &current_weather;
@@ -58,9 +58,12 @@ void fgWeatherUpdate(double lon, double lat, double alt) {
 
 
 /* $Log$
-/* Revision 1.5  1997/08/22 21:34:42  curt
-/* Doing a bit of reorganizing and house cleaning.
+/* Revision 1.6  1997/08/27 03:30:38  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.5  1997/08/22 21:34:42  curt
+ * Doing a bit of reorganizing and house cleaning.
+ *
  * Revision 1.4  1997/08/02 16:23:55  curt
  * Misc. tweaks.
  *
index 7e93f60a993afe89b42c4d7d1d21b91c2d6b2779..c15b420b603764065dbfc94a5571817d4d5a66fe 100644 (file)
 
 
 /* holds the current weather values */
-struct weather_params {
+struct WEATHER {
     float visibility;
 };
 
-extern struct weather_params current_weather;
+extern struct WEATHER current_weather;
 
 
 /* Initialize the weather modeling subsystem */
@@ -47,9 +47,12 @@ void fgWeatherUpdate(double lon, double lat, double alt);
 
 
 /* $Log$
-/* Revision 1.3  1997/08/22 21:34:43  curt
-/* Doing a bit of reorganizing and house cleaning.
+/* Revision 1.4  1997/08/27 03:30:39  curt
+/* Changed naming scheme of basic shared structures.
 /*
+ * Revision 1.3  1997/08/22 21:34:43  curt
+ * Doing a bit of reorganizing and house cleaning.
+ *
  * Revision 1.2  1997/07/23 21:52:30  curt
  * Put comments around the text after an #endif for increased portability.
  *