1
0
Fork 0

Prepended "fg" on the name of all global structures that didn't have it yet.

i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
This commit is contained in:
curt 1997-12-10 22:37:34 +00:00
parent 871ee408fa
commit 28fad1d296
30 changed files with 278 additions and 169 deletions

View file

@ -30,10 +30,15 @@
#include "../constants.h"
/* This is a record containing all the info for the aircraft currently
being operated */
struct fgAIRCRAFT current_aircraft;
/* Display various parameters to stdout */
void fgAircraftOutputCurrent(struct AIRCRAFT *a) {
struct FLIGHT *f;
struct CONTROLS *c;
void fgAircraftOutputCurrent(struct fgAIRCRAFT *a) {
struct fgFLIGHT *f;
struct fgCONTROLS *c;
f = &a->flight;
c = &a->controls;
@ -48,10 +53,14 @@ void fgAircraftOutputCurrent(struct AIRCRAFT *a) {
/* $Log$
/* Revision 1.11 1997/09/13 02:00:05 curt
/* Mostly working on stars and generating sidereal time for accurate star
/* placement.
/* Revision 1.12 1997/12/10 22:37:37 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.11 1997/09/13 02:00:05 curt
* Mostly working on stars and generating sidereal time for accurate star
* placement.
*
* Revision 1.10 1997/08/27 03:29:56 curt
* Changed naming scheme of basic shared structures.
*

View file

@ -32,29 +32,33 @@
/* Define a structure containing all the parameters for an aircraft */
struct AIRCRAFT {
struct FLIGHT flight;
struct CONTROLS controls;
struct fgAIRCRAFT {
struct fgFLIGHT flight;
struct fgCONTROLS controls;
};
/* current_aircraft contains all the parameters of the aircraft
currently being operated. */
extern struct AIRCRAFT current_aircraft;
extern struct fgAIRCRAFT current_aircraft;
/* Display various parameters to stdout */
void fgAircraftOutputCurrent(struct AIRCRAFT *a);
void fgAircraftOutputCurrent(struct fgAIRCRAFT *a);
#endif /* AIRCRAFT_H */
/* $Log$
/* Revision 1.6 1997/09/13 02:00:06 curt
/* Mostly working on stars and generating sidereal time for accurate star
/* placement.
/* Revision 1.7 1997/12/10 22:37:38 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.6 1997/09/13 02:00:06 curt
* Mostly working on stars and generating sidereal time for accurate star
* placement.
*
* Revision 1.5 1997/08/27 03:29:58 curt
* Changed naming scheme of basic shared structures.
*

View file

@ -43,14 +43,14 @@
// #define DEBUG
/* This is a structure that contains all data related to cockpit/panel/hud system */
static struct COCKPIT *aircraft_cockpit;
static struct fgCOCKPIT *aircraft_cockpit;
struct COCKPIT *fgCockpitInit( struct AIRCRAFT cur_aircraft )
struct fgCOCKPIT *fgCockpitInit( struct fgAIRCRAFT cur_aircraft )
{
struct COCKPIT *cockpit;
struct fgCOCKPIT *cockpit;
Hptr hud;
cockpit = (struct COCKPIT *)calloc(sizeof(struct COCKPIT),1);
cockpit = (struct fgCOCKPIT *)calloc(sizeof(struct fgCOCKPIT),1);
if( cockpit == NULL )
return( NULL );
@ -71,7 +71,7 @@ struct COCKPIT *fgCockpitInit( struct AIRCRAFT cur_aircraft )
return( cockpit );
}
struct COCKPIT *fgCockpitAddHUD( struct COCKPIT *cockpit, struct HUD *hud )
struct fgCOCKPIT *fgCockpitAddHUD( struct fgCOCKPIT *cockpit, struct HUD *hud )
{
cockpit->hud = hud;
}
@ -87,7 +87,11 @@ void fgCockpitUpdate()
/* $Log$
/* Revision 1.1 1997/08/29 18:03:20 curt
/* Initial revision.
/* Revision 1.2 1997/12/10 22:37:38 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.1 1997/08/29 18:03:20 curt
* Initial revision.
*
*/

View file

@ -30,7 +30,7 @@
// And in the future (near future i hope).
// #include "panel.h"
struct COCKPIT {
struct fgCOCKPIT {
int code;
Hptr hud;
// As above.
@ -38,12 +38,16 @@ struct COCKPIT {
int status;
};
struct COCKPIT *fgCockpitInit( struct AIRCRAFT cur_aircraft );
struct fgCOCKPIT *fgCockpitInit( struct fgAIRCRAFT cur_aircraft );
void fgCockpitUpdate();
/* $Log$
/* Revision 1.1 1997/08/29 18:03:21 curt
/* Initial revision.
/* Revision 1.2 1997/12/10 22:37:39 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.1 1997/08/29 18:03:21 curt
* Initial revision.
*
*/

View file

@ -386,7 +386,7 @@ static void drawhorizon( struct HUD_horizon horizon )
{
int x_inc1, y_inc1;
int x_inc2, y_inc2;
struct FLIGHT *f;
struct fgFLIGHT *f;
double sin_bank, cos_bank;
double bank_angle;
@ -464,7 +464,7 @@ static void drawlabel( struct HUD_label label )
double get_speed()
{
struct FLIGHT *f;
struct fgFLIGHT *f;
f = &current_aircraft.flight;
return( FG_V_equiv_kts );
@ -472,7 +472,7 @@ double get_speed()
double get_aoa()
{
struct FLIGHT *f;
struct fgFLIGHT *f;
f = &current_aircraft.flight;
return( FG_Gamma_vert_rad*RAD_TO_DEG );
@ -480,7 +480,7 @@ double get_aoa()
double get_roll()
{
struct FLIGHT *f;
struct fgFLIGHT *f;
f = &current_aircraft.flight;
return( FG_Phi );
@ -488,7 +488,7 @@ double get_roll()
double get_pitch()
{
struct FLIGHT *f;
struct fgFLIGHT *f;
f = &current_aircraft.flight;
return( FG_Theta );
@ -496,7 +496,7 @@ double get_pitch()
double get_heading()
{
struct FLIGHT *f;
struct fgFLIGHT *f;
f = &current_aircraft.flight;
return( FG_Psi*RAD_TO_DEG );
@ -504,7 +504,7 @@ double get_heading()
double get_altitude()
{
struct FLIGHT *f;
struct fgFLIGHT *f;
double rough_elev;
f = &current_aircraft.flight;
@ -522,7 +522,7 @@ void add_instrument( Hptr hud, HIptr instrument )
// while( ++instruments
}
Hptr fgHUDInit( struct AIRCRAFT current_aircraft, int color )
Hptr fgHUDInit( struct fgAIRCRAFT current_aircraft, int color )
{
Hptr hud;
@ -807,9 +807,13 @@ void fgUpdateHUD( Hptr hud )
/* $Log$
/* Revision 1.4 1997/09/23 00:29:32 curt
/* Tweaks to get things to compile with gcc-win32.
/* Revision 1.5 1997/12/10 22:37:39 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.4 1997/09/23 00:29:32 curt
* Tweaks to get things to compile with gcc-win32.
*
* Revision 1.3 1997/09/05 14:17:26 curt
* More tweaking with stars.
*

View file

@ -203,7 +203,7 @@ struct HUD {
typedef struct HUD *Hptr;
Hptr fgHUDInit( struct AIRCRAFT cur_aircraft, int color );
Hptr fgHUDInit( struct fgAIRCRAFT cur_aircraft, int color );
Hptr fgHUDAddHorizon( Hptr hud, int x_pos, int y_pos, int length, int hole_len, double (*load_value)() );
Hptr fgHUDAddScale( Hptr hud, int type, int scr_pos, int scr_min, int scr_max, int div_min, int div_max, \
int orientation, int with_min, int min_value, int width_units, double (*load_value)() );
@ -226,7 +226,11 @@ void fgUpdateHUD2( struct HUD *hud );
/* $Log$
/* Revision 1.1 1997/08/29 18:03:22 curt
/* Initial revision.
/* Revision 1.2 1997/12/10 22:37:40 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.1 1997/08/29 18:03:22 curt
* Initial revision.
*
*/

View file

@ -30,7 +30,7 @@
void fgControlsInit() {
int i;
struct CONTROLS *c;
struct fgCONTROLS *c;
c = &current_aircraft.controls;
FG_Elevator = 0.0;
@ -46,7 +46,7 @@ void fgControlsInit() {
void fgElevMove(double amt) {
struct CONTROLS *c;
struct fgCONTROLS *c;
c = &current_aircraft.controls;
FG_Elevator += amt;
@ -56,7 +56,7 @@ void fgElevMove(double amt) {
}
void fgElevSet(double pos) {
struct CONTROLS *c;
struct fgCONTROLS *c;
c = &current_aircraft.controls;
FG_Elevator = pos;
@ -66,7 +66,7 @@ void fgElevSet(double pos) {
}
void fgElevTrimMove(double amt) {
struct CONTROLS *c;
struct fgCONTROLS *c;
c = &current_aircraft.controls;
FG_Elev_Trim += amt;
@ -76,7 +76,7 @@ void fgElevTrimMove(double amt) {
}
void fgElevTrimSet(double pos) {
struct CONTROLS *c;
struct fgCONTROLS *c;
c = &current_aircraft.controls;
FG_Elev_Trim = pos;
@ -86,7 +86,7 @@ void fgElevTrimSet(double pos) {
}
void fgAileronMove(double amt) {
struct CONTROLS *c;
struct fgCONTROLS *c;
c = &current_aircraft.controls;
FG_Aileron += amt;
@ -96,7 +96,7 @@ void fgAileronMove(double amt) {
}
void fgAileronSet(double pos) {
struct CONTROLS *c;
struct fgCONTROLS *c;
c = &current_aircraft.controls;
FG_Aileron = pos;
@ -106,7 +106,7 @@ void fgAileronSet(double pos) {
}
void fgRudderMove(double amt) {
struct CONTROLS *c;
struct fgCONTROLS *c;
c = &current_aircraft.controls;
FG_Rudder += amt;
@ -116,7 +116,7 @@ void fgRudderMove(double amt) {
}
void fgRudderSet(double pos) {
struct CONTROLS *c;
struct fgCONTROLS *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 CONTROLS *c;
struct fgCONTROLS *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 CONTROLS *c;
struct fgCONTROLS *c;
c = &current_aircraft.controls;
if ( engine == FG_Throttle_All ) {
@ -167,9 +167,13 @@ void fgThrottleSet(int engine, double pos) {
/* $Log$
/* Revision 1.3 1997/08/27 03:30:01 curt
/* Changed naming scheme of basic shared structures.
/* Revision 1.4 1997/12/10 22:37:41 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* 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.
*

View file

@ -33,7 +33,7 @@
/* Define a structure containing the control parameters */
struct CONTROLS {
struct fgCONTROLS {
double aileron;
double elevator;
double elevator_trim;
@ -81,9 +81,13 @@ void fgThrottleSet(int engine, double pos);
/* $Log$
/* Revision 1.5 1997/08/27 03:30:02 curt
/* Changed naming scheme of basic shared structures.
/* Revision 1.6 1997/12/10 22:37:41 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* 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.
*

View file

@ -28,7 +28,7 @@
/* Initialize the flight model parameters */
int fgFlightModelInit(int model, struct FLIGHT *f, double dt) {
int fgFlightModelInit(int model, struct fgFLIGHT *f, double dt) {
int result;
if ( model == FG_LARCSIM ) {
@ -45,7 +45,7 @@ int fgFlightModelInit(int model, struct FLIGHT *f, double dt) {
/* Run multiloop iterations of the flight model */
int fgFlightModelUpdate(int model, struct FLIGHT *f, int multiloop) {
int fgFlightModelUpdate(int model, struct fgFLIGHT *f, int multiloop) {
int result;
if ( model == FG_LARCSIM ) {
@ -61,9 +61,13 @@ int fgFlightModelUpdate(int model, struct FLIGHT *f, int multiloop) {
/* $Log$
/* Revision 1.3 1997/08/27 03:30:04 curt
/* Changed naming scheme of basic shared structures.
/* Revision 1.4 1997/12/10 22:37:42 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* 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.
*

View file

@ -47,7 +47,7 @@
typedef double FG_VECTOR_3[3];
/* This is based heavily on LaRCsim/ls_generic.h */
struct FLIGHT {
struct fgFLIGHT {
/*================== Mass properties and geometry values ==================*/
@ -386,19 +386,23 @@ struct FLIGHT {
/* General interface to the flight model routines */
/* Initialize the flight model parameters */
int fgFlightModelInit(int model, struct FLIGHT *f, double dt);
int fgFlightModelInit(int model, struct fgFLIGHT *f, double dt);
/* Run multiloop iterations of the flight model */
int fgFlightModelUpdate(int model, struct FLIGHT *f, int multiloop);
int fgFlightModelUpdate(int model, struct fgFLIGHT *f, int multiloop);
#endif /* FLIGHT_H */
/* $Log$
/* Revision 1.9 1997/09/04 02:17:33 curt
/* Shufflin' stuff.
/* Revision 1.10 1997/12/10 22:37:43 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.9 1997/09/04 02:17:33 curt
* Shufflin' stuff.
*
* Revision 1.8 1997/08/27 03:30:06 curt
* Changed naming scheme of basic shared structures.
*

View file

@ -495,7 +495,7 @@ int initialize;
int ls_cockpit() {
struct CONTROLS *c;
struct fgCONTROLS *c;
sim_control_.paused = 0;
@ -559,8 +559,8 @@ int fgLaRCsimUpdate(int multiloop) {
}
/* Convert from the FG FLIGHT struct to the LaRCsim generic_ struct */
int fgFlight_2_LaRCsim (struct FLIGHT *f) {
/* Convert from the fgFLIGHT struct to the LaRCsim generic_ struct */
int fgFlight_2_LaRCsim (struct fgFLIGHT *f) {
Mass = FG_Mass;
I_xx = FG_I_xx;
I_yy = FG_I_yy;
@ -733,8 +733,8 @@ int fgFlight_2_LaRCsim (struct FLIGHT *f) {
}
/* Convert from the LaRCsim generic_ struct to the FG FLIGHT struct */
int fgLaRCsim_2_Flight (struct FLIGHT *f) {
/* Convert from the LaRCsim generic_ struct to the fgFLIGHT struct */
int fgLaRCsim_2_Flight (struct fgFLIGHT *f) {
FG_Mass = Mass;
FG_I_xx = I_xx;
FG_I_yy = I_yy;
@ -909,6 +909,10 @@ int fgLaRCsim_2_Flight (struct FLIGHT *f) {
/* Flight Gear Modification Log
*
* $Log$
* Revision 1.10 1997/12/10 22:37:43 curt
* Prepended "fg" on the name of all global structures that didn't have it yet.
* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
*
* Revision 1.9 1997/08/27 03:30:08 curt
* Changed naming scheme of basic shared structures.
*

View file

@ -45,9 +45,9 @@ extern int show_hud; /* HUD state */
/* Handle keyboard events */
void GLUTkey(unsigned char k, int x, int y) {
struct CONTROLS *c;
struct VIEW *v;
struct WEATHER *w;
struct fgCONTROLS *c;
struct fgVIEW *v;
struct fgWEATHER *w;
c = &current_aircraft.controls;
v = &current_view;
@ -144,8 +144,8 @@ void GLUTkey(unsigned char k, int x, int y) {
/* Handle "special" keyboard events */
void GLUTspecialkey(int k, int x, int y) {
struct CONTROLS *c;
struct VIEW *v;
struct fgCONTROLS *c;
struct fgVIEW *v;
c = &current_aircraft.controls;
v = &current_view;
@ -224,9 +224,13 @@ void GLUTspecialkey(int k, int x, int y) {
/* $Log$
/* Revision 1.21 1997/08/27 21:32:23 curt
/* Restructured view calculation code. Added stars.
/* Revision 1.22 1997/12/10 22:37:45 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.21 1997/08/27 21:32:23 curt
* Restructured view calculation code. Added stars.
*
* Revision 1.20 1997/08/27 03:30:13 curt
* Changed naming scheme of basic shared structures.
*

View file

@ -52,18 +52,8 @@
#include "../Weather/weather.h"
/* This is a record containing all the info for the aircraft currently
being operated */
struct AIRCRAFT current_aircraft;
/* This is a record containing global housekeeping information */
struct GENERAL general;
/* This is a record containing current weather info */
struct WEATHER current_weather;
/* This is a record containing current view parameters */
struct VIEW current_view;
struct fgGENERAL general;
/* view parameters */
static GLfloat win_ratio = 1.0;
@ -102,7 +92,7 @@ int show_hud;
static void fgInitVisuals() {
struct fgLIGHT *l;
struct fgTIME *t;
struct WEATHER *w;
struct fgWEATHER *w;
l = &cur_light_params;
t = &cur_time_params;
@ -140,10 +130,10 @@ static void fgInitVisuals() {
**************************************************************************/
static void fgUpdateViewParams() {
struct FLIGHT *f;
struct fgFLIGHT *f;
struct fgLIGHT *l;
struct fgTIME *t;
struct VIEW *v;
struct fgVIEW *v;
double x_2, x_4, x_8, x_10;
double ambient, diffuse, sky;
@ -265,9 +255,9 @@ static void fgUpdateVisuals( void ) {
**************************************************************************/
void fgUpdateTimeDepCalcs(int multi_loop) {
struct FLIGHT *f;
struct fgFLIGHT *f;
struct fgTIME *t;
struct VIEW *v;
struct fgVIEW *v;
int i;
f = &current_aircraft.flight;
@ -417,8 +407,8 @@ static void fgMainLoop( void ) {
double cur_elev;
double joy_x, joy_y;
int joy_b1, joy_b2;
struct AIRCRAFT *a;
struct FLIGHT *f;
struct fgAIRCRAFT *a;
struct fgFLIGHT *f;
struct fgTIME *t;
a = &current_aircraft;
@ -507,7 +497,7 @@ static void fgReshape( int width, int height ) {
**************************************************************************/
int main( int argc, char *argv[] ) {
struct FLIGHT *f;
struct fgFLIGHT *f;
f = &current_aircraft.flight;
@ -583,9 +573,13 @@ int main( int argc, char *argv[] ) {
/* $Log$
/* Revision 1.27 1997/12/09 05:11:54 curt
/* Working on tweaking lighting.
/* Revision 1.28 1997/12/10 22:37:45 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.27 1997/12/09 05:11:54 curt
* Working on tweaking lighting.
*
* Revision 1.26 1997/12/09 04:25:29 curt
* Working on adding a global lighting params structure.
*

View file

@ -26,11 +26,9 @@ fg_init.o: fg_init.c fg_init.h views.h ../types.h ../Flight/flight.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/moon.h ../Scenery/orbits.h ../Scenery/../Time/fg_time.h \
../Scenery/../Time/../types.h ../Scenery/../Time/../Flight/flight.h \
../Scenery/scenery.h ../Scenery/../types.h ../Scenery/stars.h \
../Time/fg_time.h ../Time/sunpos.h ../Time/../types.h \
../Weather/weather.h
../Scenery/astro.h ../Scenery/stars.h ../Scenery/scenery.h \
../Scenery/../types.h ../Time/fg_time.h ../Time/../types.h \
../Time/../Flight/flight.h ../Time/sunpos.h ../Weather/weather.h
views.o: views.c views.h ../types.h ../Flight/flight.h \
../Flight/Slew/slew.h ../Flight/LaRCsim/ls_interface.h \
../Flight/LaRCsim/../flight.h ../Math/mat3.h ../constants.h \

View file

@ -51,7 +51,7 @@ extern int show_hud; /* HUD state */
/* General house keeping initializations */
void fgInitGeneral( void ) {
struct GENERAL *g;
struct fgGENERAL *g;
g = &general;
@ -75,9 +75,9 @@ void fgInitGeneral( void ) {
void fgInitSubsystems( void ) {
double cur_elev;
struct FLIGHT *f;
struct fgFLIGHT *f;
struct fgTIME *t;
struct VIEW *v;
struct fgVIEW *v;
f = &current_aircraft.flight;
t = &cur_time_params;
@ -216,9 +216,13 @@ void fgInitSubsystems( void ) {
/* $Log$
/* Revision 1.13 1997/11/25 19:25:32 curt
/* Changes to integrate Durk's moon/sun code updates + clean up.
/* Revision 1.14 1997/12/10 22:37:47 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.13 1997/11/25 19:25:32 curt
* Changes to integrate Durk's moon/sun code updates + clean up.
*
* Revision 1.12 1997/11/15 18:16:35 curt
* minor tweaks.
*

View file

@ -34,15 +34,19 @@
#include "../Scenery/scenery.h"
/* This is a record containing current view parameters */
struct fgVIEW current_view;
/* Initialize a view structure */
void fgViewInit(struct VIEW *v) {
void fgViewInit(struct fgVIEW *v) {
v->view_offset = 0.0;
v->goal_view_offset = 0.0;
}
/* Update the view parameters */
void fgViewUpdate(struct FLIGHT *f, struct VIEW *v) {
void fgViewUpdate(struct fgFLIGHT *f, struct fgVIEW *v) {
MAT3vec vec, forward;
MAT3mat R, TMP, UP, LOCAL, VIEW;
@ -129,7 +133,11 @@ void fgViewUpdate(struct FLIGHT *f, struct VIEW *v) {
/* $Log$
/* Revision 1.1 1997/08/27 21:31:17 curt
/* Initial revision.
/* Revision 1.2 1997/12/10 22:37:48 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.1 1997/08/27 21:31:17 curt
* Initial revision.
*
*/

View file

@ -34,28 +34,32 @@
/* Define a structure containing view information */
struct VIEW {
struct fgVIEW {
struct fgCartesianPoint view_pos;
MAT3vec local_up, view_up, view_forward;
double view_offset, goal_view_offset;
};
extern struct VIEW current_view;
extern struct fgVIEW current_view;
/* Initialize a view structure */
void fgViewInit(struct VIEW *v);
void fgViewInit(struct fgVIEW *v);
/* Update the view parameters */
void fgViewUpdate(struct FLIGHT *f, struct VIEW *v);
void fgViewUpdate(struct fgFLIGHT *f, struct fgVIEW *v);
#endif /* VIEWS_H */
/* $Log$
/* Revision 1.1 1997/08/27 21:31:18 curt
/* Initial revision.
/* Revision 1.2 1997/12/10 22:37:48 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.1 1997/08/27 21:31:18 curt
* Initial revision.
*
*/

View file

@ -68,9 +68,9 @@ void fgAstroInit() {
/* Render Astronomical Objects */
void fgAstroRender() {
struct FLIGHT *f;
struct fgFLIGHT *f;
struct fgLIGHT *l;
struct VIEW *v;
struct fgVIEW *v;
struct fgTIME *t;
double angle;
@ -121,9 +121,13 @@ void fgAstroRender() {
/* $Log$
/* Revision 1.2 1997/12/09 04:25:33 curt
/* Working on adding a global lighting params structure.
/* Revision 1.3 1997/12/10 22:37:49 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.2 1997/12/09 04:25:33 curt
* Working on adding a global lighting params structure.
*
* Revision 1.1 1997/11/25 23:20:22 curt
* Initial revision.
*

View file

@ -28,12 +28,8 @@ planets.o: planets.c ../Time/fg_time.h ../Time/../types.h \
../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \
../Time/../Flight/LaRCsim/../flight.h orbits.h planets.h sun.h
scenery.o: scenery.c ../general.h moon.h orbits.h ../Time/fg_time.h \
../Time/../types.h ../Time/../Flight/flight.h \
../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \
../Time/../Flight/LaRCsim/../flight.h obj.h scenery.h ../types.h \
stars.h
scenery.o: scenery.c ../general.h astro.h stars.h obj.h scenery.h \
../types.h
stars.o: stars.c orbits.h ../Time/fg_time.h ../Time/../types.h \
../Time/../Flight/flight.h ../Time/../Flight/Slew/slew.h \
../Time/../Flight/LaRCsim/ls_interface.h \

View file

@ -119,7 +119,7 @@ void fgReadOrbElements(struct OrbElements *dest, FILE *src)
void fgSolarSystemInit(struct fgTIME t)
{
struct GENERAL *g;
struct fgGENERAL *g;
char path[80];
int i;
FILE *data;
@ -170,9 +170,13 @@ void fgSolarSystemUpdate(struct OrbElements *planet, struct fgTIME t)
/* $Log$
/* Revision 1.3 1997/11/25 23:20:44 curt
/* Changed planets.dat Planets.dat
/* Revision 1.4 1997/12/10 22:37:51 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.3 1997/11/25 23:20:44 curt
* Changed planets.dat Planets.dat
*
* Revision 1.2 1997/11/25 19:25:36 curt
* Changes to integrate Durk's moon/sun code updates + clean up.
*

View file

@ -45,7 +45,7 @@ GLint area_terrain;
/* Shared structure to hold current scenery parameters */
struct SCENERY scenery;
struct fgSCENERY scenery;
/* Initialize the Scenery Management system */
@ -58,7 +58,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 *g;
struct fgGENERAL *g;
char path[1024];
g = &general;
@ -87,11 +87,15 @@ void fgSceneryRender() {
/* $Log$
/* Revision 1.24 1997/12/08 22:51:18 curt
/* Enhanced to handle ccw and cw tri-stripe winding. This is a temporary
/* admission of defeat. I will eventually go back and get all the stripes
/* wound the same way (ccw).
/* Revision 1.25 1997/12/10 22:37:51 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.24 1997/12/08 22:51:18 curt
* Enhanced to handle ccw and cw tri-stripe winding. This is a temporary
* admission of defeat. I will eventually go back and get all the stripes
* wound the same way (ccw).
*
* Revision 1.23 1997/11/25 19:25:37 curt
* Changes to integrate Durk's moon/sun code updates + clean up.
*

View file

@ -32,7 +32,7 @@
/* Define a structure containing global scenery parameters */
struct SCENERY {
struct fgSCENERY {
/* number of terrain data points to skip */
int terrain_skip;
@ -43,7 +43,7 @@ struct SCENERY {
double sun_angle;
};
extern struct SCENERY scenery;
extern struct fgSCENERY scenery;
/* Initialize the Scenery Management system */
@ -63,9 +63,13 @@ void fgSceneryRender();
/* $Log$
/* Revision 1.10 1997/09/04 02:17:37 curt
/* Shufflin' stuff.
/* Revision 1.11 1997/12/10 22:37:52 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.10 1997/09/04 02:17:37 curt
* Shufflin' stuff.
*
* Revision 1.9 1997/08/27 03:30:33 curt
* Changed naming scheme of basic shared structures.
*

View file

@ -57,7 +57,7 @@
/* Initialize the Star Management Subsystem */
void fgStarsInit() {
FILE *fd;
struct GENERAL *g;
struct fgGENERAL *g;
struct CelestialCoord pltPos;
char path[1024];
char line[256], name[256];
@ -216,8 +216,8 @@ void fgStarsInit() {
/* Draw the Stars */
void fgStarsRender() {
struct FLIGHT *f;
struct VIEW *v;
struct fgFLIGHT *f;
struct fgVIEW *v;
struct fgLIGHT *l;
struct fgTIME *t;
int i;
@ -256,9 +256,13 @@ void fgStarsRender() {
/* $Log$
/* Revision 1.17 1997/12/09 04:25:33 curt
/* Working on adding a global lighting params structure.
/* Revision 1.18 1997/12/10 22:37:52 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.17 1997/12/09 04:25:33 curt
* Working on adding a global lighting params structure.
*
* Revision 1.16 1997/11/25 19:25:38 curt
* Changes to integrate Durk's moon/sun code updates + clean up.
*

View file

@ -145,7 +145,7 @@ void fgSunInit()
/* Draw the Sun */
void fgSunRender() {
struct VIEW *v;
struct fgVIEW *v;
struct fgTIME *t;
GLfloat color[4] = { 0.85, 0.65, 0.05, 1.0 };
/* double x_2, x_4, x_8, x_10; */
@ -201,9 +201,13 @@ void fgSunRender() {
/* $Log$
/* Revision 1.3 1997/12/09 05:11:56 curt
/* Working on tweaking lighting.
/* Revision 1.4 1997/12/10 22:37:53 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.3 1997/12/09 05:11:56 curt
* Working on tweaking lighting.
*
* Revision 1.2 1997/11/25 19:25:39 curt
* Changes to integrate Durk's moon/sun code updates + clean up.
*

View file

@ -31,21 +31,25 @@
/* the general house keeping structure definition */
struct GENERAL {
struct fgGENERAL {
/* The flight gear "root" directory */
char *root_dir;
};
/* general contains all the general house keeping parameters. */
extern struct GENERAL general;
extern struct fgGENERAL general;
#endif /* GENERAL_H */
/* $Log$
/* Revision 1.2 1997/08/27 03:29:38 curt
/* Changed naming scheme of basic shared structures.
/* Revision 1.3 1997/12/10 22:37:34 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* 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.
*

View file

@ -226,7 +226,7 @@ double sidereal_course(struct tm *gmt, time_t now, double lng) {
/* Update the time dependent variables */
void fgTimeUpdate(struct FLIGHT *f, struct fgTIME *t) {
void fgTimeUpdate(struct fgFLIGHT *f, struct fgTIME *t) {
double gst_precise, gst_course;
static long int warp = 0;
@ -285,9 +285,13 @@ void fgTimeUpdate(struct FLIGHT *f, struct fgTIME *t) {
/* $Log$
/* Revision 1.14 1997/12/10 01:19:52 curt
/* Tweaks for verion 0.15 release.
/* Revision 1.15 1997/12/10 22:37:54 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.14 1997/12/10 01:19:52 curt
* Tweaks for verion 0.15 release.
*
* Revision 1.13 1997/12/09 05:11:56 curt
* Working on tweaking lighting.
*

View file

@ -85,16 +85,20 @@ extern struct fgLIGHT cur_light_params;
void fgTimeInit(struct fgTIME *t);
/* Update the time dependent variables */
void fgTimeUpdate(struct FLIGHT *f, struct fgTIME *t);
void fgTimeUpdate(struct fgFLIGHT *f, struct fgTIME *t);
#endif /* FG_TIME_H */
/* $Log$
/* Revision 1.8 1997/12/09 04:25:38 curt
/* Working on adding a global lighting params structure.
/* Revision 1.9 1997/12/10 22:37:55 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.8 1997/12/09 04:25:38 curt
* Working on adding a global lighting params structure.
*
* Revision 1.7 1997/11/25 19:25:41 curt
* Changes to integrate Durk's moon/sun code updates + clean up.
*

View file

@ -263,7 +263,7 @@ void fgSunPosition(time_t ssue, double *lon, double *lat) {
void fgUpdateSunPos(struct fgCartesianPoint scenery_center) {
struct fgLIGHT *l;
struct fgTIME *t;
struct VIEW *v;
struct fgVIEW *v;
MAT3vec nup, nsun;
double sun_gd_lat, sl_radius, temp;
static int time_warp = 0;
@ -308,9 +308,13 @@ void fgUpdateSunPos(struct fgCartesianPoint scenery_center) {
/* $Log$
/* Revision 1.14 1997/12/09 04:25:39 curt
/* Working on adding a global lighting params structure.
/* Revision 1.15 1997/12/10 22:37:55 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* Revision 1.14 1997/12/09 04:25:39 curt
* Working on adding a global lighting params structure.
*
* Revision 1.13 1997/11/25 19:25:42 curt
* Changes to integrate Durk's moon/sun code updates + clean up.
*

View file

@ -29,9 +29,13 @@
#include "../Math/fg_random.h"
/* This is a record containing current weather info */
struct fgWEATHER current_weather;
/* Initialize the weather modeling subsystem */
void fgWeatherInit(void) {
struct WEATHER *w;
struct fgWEATHER *w;
w = &current_weather;
@ -44,8 +48,8 @@ void fgWeatherInit(void) {
/* Update the weather parameters for the current position */
void fgWeatherUpdate(double lon, double lat, double alt) {
struct FLIGHT *f;
struct WEATHER *w;
struct fgFLIGHT *f;
struct fgWEATHER *w;
f = &current_aircraft.flight;
w = &current_weather;
@ -58,9 +62,13 @@ void fgWeatherUpdate(double lon, double lat, double alt) {
/* $Log$
/* Revision 1.6 1997/08/27 03:30:38 curt
/* Changed naming scheme of basic shared structures.
/* Revision 1.7 1997/12/10 22:37:56 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* 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.
*

View file

@ -29,11 +29,11 @@
/* holds the current weather values */
struct WEATHER {
struct fgWEATHER {
float visibility;
};
extern struct WEATHER current_weather;
extern struct fgWEATHER current_weather;
/* Initialize the weather modeling subsystem */
@ -47,9 +47,13 @@ void fgWeatherUpdate(double lon, double lat, double alt);
/* $Log$
/* Revision 1.4 1997/08/27 03:30:39 curt
/* Changed naming scheme of basic shared structures.
/* Revision 1.5 1997/12/10 22:37:56 curt
/* Prepended "fg" on the name of all global structures that didn't have it yet.
/* i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
/*
* 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.
*