1
0
Fork 0

Use one standard define for enableing of the Special Purpose FDM code.

This commit is contained in:
ehofman 2006-07-17 17:58:53 +00:00
parent 4914844c31
commit a4265a3b0a
5 changed files with 19 additions and 19 deletions

View file

@ -91,7 +91,7 @@ if test "x$with_logging" = "xno" ; then
fi
AC_ARG_ENABLE(sp_fdms, [ --enable-sp-fdms Include special purpose Flight Models], [enable_sp_fdms="$enableval"] )
AC_DEFINE([ENABLE_SP_FMDS], test "x$enable_sp_fdms" = "xyes", [Define to include special purpose FDMs])
AC_DEFINE([ENABLE_SP_FDM], test "x$enable_sp_fdms" = "xyes", [Define to include special purpose FDMs])
AM_CONDITIONAL(ENABLE_SP_FDM, test "x$enable_sp_fdms" != "xno")

View file

@ -45,7 +45,7 @@
#include <Aircraft/aircraft.hxx>
#include <Include/general.hxx>
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
#include <FDM/SP/ADA.hxx>
#endif
#include <Main/globals.hxx>
@ -341,7 +341,7 @@ float get_anzg ( void )
return anzg;
}
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
int get_iaux1 (void)
{
FGADA *fdm = (FGADA *)current_aircraft.fdm_state;
@ -603,7 +603,7 @@ struct FuncTable {
{ "view_direction", get_view_direction },
{ "vfc_tris_culled", get_vfc_tris_culled },
{ "vfc_tris_drawn", get_vfc_tris_drawn },
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
{ "aux1", get_aux1 },
{ "aux2", get_aux2 },
{ "aux3", get_aux3 },

View file

@ -94,7 +94,7 @@ void HudLadder::draw(void)
alpha = get_aoa();
pla = get_throttleval();
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
int lgear, wown, wowm, ilcanclaw, ihook;
ilcanclaw = get_iaux2();
lgear = get_iaux3();
@ -247,7 +247,7 @@ void HudLadder::draw(void)
glVertex2f(vel_x, vel_y + 6);
glEnd();
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
// OBJECT MOVING RETICLE
// TYPE LINE
// ATTRIB - ON CONDITION
@ -295,7 +295,7 @@ void HudLadder::draw(void)
// TYPE - SQUARE_BRACKET
// ATTRIB - ON CONDITION
// alpha bracket
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
if (alpha_bracket && ihook == 1) {
glBegin(GL_LINE_STRIP);
glVertex2f(vel_x - 20 , vel_y - (16 - alpha) * factor);
@ -365,7 +365,7 @@ void HudLadder::draw(void)
// OBJECT STATIC RETICLE
// TYPE LINE
// ATTRIB - ON CONDITION
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
if (energy_worm && ilcanclaw == 1) {
glBegin(GL_LINE_STRIP);
glVertex2f(-15, -134);
@ -562,7 +562,7 @@ void HudLadder::draw(void)
// TYPE LINE
// ATTRIB - ON CONDITION
// draw appraoch glide slope marker
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
if (glide_slope_marker && ihook) {
Line(-half_span + 15, (glide_slope-actslope) * factor,
-half_span + hole, (glide_slope - actslope) * factor);
@ -590,7 +590,7 @@ void HudLadder::draw(void)
//*************************************************************
//*************************************************************
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
if (waypoint_marker) {
//waypoint marker computation
float fromwp_lat, towp_lat, fromwp_lon, towp_lon, dist, delx, dely, hyp, theta, brg;

View file

@ -37,7 +37,7 @@ float get__Vz() { return fgGetFloat("/velocities/wBody-fps"); }
float get__Ax() { return fgGetFloat("/acclerations/pilot/x-accel-fps_sec"); }
float get__Ay() { return fgGetFloat("/acclerations/pilot/y-accel-fps_sec"); }
float get__Az() { return fgGetFloat("/acclerations/pilot/z-accel-fps_sec"); }
#undef ENABLE_SP_FMDS
#undef ENABLE_SP_FDM
HUD::Ladder::Ladder(HUD *hud, const SGPropertyNode *n, float x, float y) :
@ -103,7 +103,7 @@ void HUD::Ladder::draw(void)
alpha = get__aoa();
pla = get__throttleval();
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
int lgear, wown, wowm, ilcanclaw, ihook;
ilcanclaw = get__iaux2();
lgear = get__iaux3();
@ -256,7 +256,7 @@ void HUD::Ladder::draw(void)
glVertex2f(vel_x, vel_y + 6);
glEnd();
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
// OBJECT MOVING RETICLE
// TYPE LINE
// ATTRIB - ON CONDITION
@ -304,7 +304,7 @@ void HUD::Ladder::draw(void)
// TYPE - SQUARE_BRACKET
// ATTRIB - ON CONDITION
// alpha bracket
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
if (_alpha_bracket && ihook == 1) {
glBegin(GL_LINE_STRIP);
glVertex2f(vel_x - 20 , vel_y - (16 - alpha) * _compression);
@ -374,7 +374,7 @@ void HUD::Ladder::draw(void)
// OBJECT STATIC RETICLE
// TYPE LINE
// ATTRIB - ON CONDITION
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
if (_energy_worm && ilcanclaw == 1) {
glBegin(GL_LINE_STRIP);
glVertex2f(-15, -134);
@ -568,7 +568,7 @@ void HUD::Ladder::draw(void)
// TYPE LINE
// ATTRIB - ON CONDITION
// draw appraoch glide slope marker
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
if (_glide_slope_marker && ihook) {
draw_line(-half_span + 15, (_glide_slope - actslope) * _compression,
-half_span + hole, (_glide_slope - actslope) * _compression);
@ -596,7 +596,7 @@ void HUD::Ladder::draw(void)
//*************************************************************
//*************************************************************
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
if (_waypoint_marker) {
//waypoint marker computation
float fromwp_lat, towp_lat, fromwp_lon, towp_lon, dist, delx, dely, hyp, theta, brg;

View file

@ -75,7 +75,7 @@
#include <Cockpit/cockpit.hxx>
#include <Cockpit/panel.hxx>
#include <Cockpit/panel_io.hxx>
#ifdef ENABLE_SP_FMDS
#ifdef ENABLE_SP_FDM
#include <FDM/SP/ADA.hxx>
#include <FDM/SP/ACMS.hxx>
#endif
@ -1266,7 +1266,7 @@ void fgInitFDM() {
cur_fdm_state = new FGLaRCsim( dt );
} else if ( model == "jsb" ) {
cur_fdm_state = new FGJSBsim( dt );
#if ENABLE_SP_FDMS
#if ENABLE_SP_FDM
} else if ( model == "ada" ) {
cur_fdm_state = new FGADA( dt );
} else if ( model == "acms" ) {