libAircraft_a_SOURCES = aircraft.cxx aircraft.hxx
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
#include <stdio.h>
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+
#include "aircraft.hxx"
-#include <Debug/logstream.hxx>
-#include <Include/fg_constants.h>
// This is a record containing all the info for the aircraft currently
// being operated
genapt.cxx genapt.hxx \
simple.cxx simple.hxx
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
// $Id$
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include STL_STRING
#include <vector>
# include <strings.h>
#endif
-#include <Debug/logstream.hxx>
-// #include <Include/fg_types.h>
-#include <Math/fg_geodesy.hxx>
-#include <Math/mat3.h>
-#include <Math/point3d.hxx>
-#include <Math/polar3d.hxx>
-#include <Misc/fgstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/fg_geodesy.hxx>
+#include <simgear/mat3.h>
+#include <simgear/point3d.hxx>
+#include <simgear/polar3d.hxx>
+#include <simgear/fgstream.hxx>
+
#include <Objects/materialmgr.hxx>
// #include <gpc/gpc.h>
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include STL_STRING
#include <set>
// $Id$
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
+
+#include <simgear/logstream.hxx>
+#include <simgear/fgpath.hxx>
+#include <simgear/fgstream.hxx>
-#include <Debug/logstream.hxx>
-#include <Misc/fgpath.hxx>
-#include <Misc/fgstream.hxx>
#include <Main/options.hxx>
#include STL_STRING
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
+
#ifdef FG_HAVE_STD_INCLUDES
# include <istream>
#elif defined( FG_HAVE_NATIVE_SGI_COMPILERS )
libAutopilot_a_SOURCES = autopilot.cxx autopilot.hxx
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
#include <Scenery/scenery.hxx>
-#include "autopilot.hxx"
+#include <simgear/constants.h>
+#include <simgear/logstream.hxx>
-#include <Include/fg_constants.h>
-#include <Debug/logstream.hxx>
#include <Airports/simple.hxx>
#include <GUI/gui.h>
#include <Main/fg_init.hxx>
#include <Main/options.hxx>
#include <Time/fg_time.hxx>
+#include "autopilot.hxx"
+
#define mySlider puSlider
#ifndef _AUTOPILOT_HXX
#define _AUTOPILOT_HXX
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include STL_STRING
hud_scal.cxx hud_tbi.cxx \
panel.cxx panel.hxx
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
\ No newline at end of file
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
-#include <Debug/logstream.hxx>
-#include <Include/fg_constants.h>
#include <Include/general.hxx>
#include <Main/options.hxx>
#include <Main/views.hxx>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
#include <Time/fg_time.hxx>
# include <values.h> // for MAXINT
#endif
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
-#include <Debug/logstream.hxx>
#include <GUI/gui.h>
-#include <Include/fg_constants.h>
#include <Main/options.hxx>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#ifdef FG_NETWORK_OLK
#include <NetworkOLK/network.h>
#endif
#include <vector> // STL vector
#include <deque> // STL double ended queue
+#include <simgear/constants.h>
+#include <simgear/mat3.h>
+
#include <fg_typedefs.h>
-#include <fg_constants.h>
#include <Aircraft/aircraft.hxx>
#include <FDM/flight.hxx>
#include <Controls/controls.hxx>
#include <GUI/gui.h>
-#include <Math/mat3.h>
FG_USING_STD(deque);
FG_USING_STD(vector);
#endif
#include <stdlib.h>
#include <string.h>
+
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
#include <GUI/gui.h>
-#include <Include/fg_constants.h>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
#ifdef HAVE_WINDOWS_H
# include <windows.h>
#endif
+
#include <stdlib.h>
#include <string.h>
+
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
-#include <Include/fg_constants.h>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
-
#include "hud.hxx"
+
//============ Top of dual_instr_item class member definitions ============
#ifdef HAVE_WINDOWS_H
# include <windows.h>
#endif
+
#include <stdlib.h>
#include <string.h>
+
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
#include <GUI/gui.h>
-#include <Include/fg_constants.h>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
#include "hud.hxx"
+
#ifdef USE_HUD_TextList
#define textString( x , y, text, font ) TextString( text, x , y )
#else
#include <stdlib.h>
#include <string.h>
+
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
-#include <Include/fg_constants.h>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
-
#include "hud.hxx"
+
UINT instr_item :: instances = 0; // Initial value of zero
int instr_item :: brightness = BRT_MEDIUM;
glRGBTRIPLE instr_item :: color = {0.1, 0.7, 0.0};
#ifdef HAVE_WINDOWS_H
# include <windows.h>
#endif
+
#include <stdlib.h>
#include <string.h>
+
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
#include <GUI/gui.h>
-#include <Include/fg_constants.h>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
#include "hud.hxx"
+
#ifdef USE_HUD_TextList
#define textString( x , y, text, font ) TextString( text, x , y )
#else
#ifdef HAVE_WINDOWS_H
# include <windows.h>
#endif
+
#include <stdlib.h>
#include <string.h>
+
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
-#include <Include/fg_constants.h>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
#include <GUI/gui.h>
#include "hud.hxx"
+
+
//====================== Top of HudLadder Class =======================
HudLadder :: HudLadder( int x,
int y,
#ifdef HAVE_WINDOWS_H
# include <windows.h>
#endif
+
#include <stdlib.h>
#include <string.h>
+
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
#include <GUI/gui.h>
-#include <Include/fg_constants.h>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
#ifdef HAVE_WINDOWS_H
# include <windows.h>
#endif
+
#include <stdlib.h>
#include <string.h>
+
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
#include <GUI/gui.h>
-#include <Include/fg_constants.h>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
-
#include "hud.hxx"
+
#ifdef USE_HUD_TextList
#define textString( x , y, text, font ) TextString( text, x , y )
#else
#ifdef HAVE_WINDOWS_H
# include <windows.h>
#endif
+
#include <stdlib.h>
#include <string.h>
+
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
-#include <Include/fg_constants.h>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
-
#include "hud.hxx"
+
+
//============== Top of instr_scale class memeber definitions ===============
//
// Notes:
#ifdef HAVE_WINDOWS_H
# include <windows.h>
#endif
+
#include <stdlib.h>
#include <string.h>
+
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
-#include <Include/fg_constants.h>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
-
#include "hud.hxx"
+
+
//============ Top of fgTBI_instr class member definitions ==============
fgTBI_instr ::
-// panel.cxx -- routines to draw an instrument panel
+// panel.cxx - default, 2D single-engine prop instrument panel
//
-// Written by Friedemann Reinhard, started June 1998.
+// Written by David Megginson, started January 2000.
//
-// Major code reorganization by David Megginson, November 1999.
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
//
-// Copyright(C)1998 Friedemann Reinhard-reinhard@theorie2.physik.uni-erlangen.de
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 2 of the
-// License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
-// $Id$
-
+// $Id$
#ifdef HAVE_CONFIG_H
# include <config.h>
# include <windows.h>
#endif
-#define FILLED true
+#include <string.h>
+#include <plib/ssg.h>
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <string>
-#include <math.h>
+#include <simgear/logstream.hxx>
+#include <simgear/fgpath.hxx>
-#include <Debug/logstream.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Main/options.hxx>
-#include <Main/views.hxx>
-#include <Misc/fgpath.hxx>
#include <Objects/texload.h>
+#include <Autopilot/autopilot.hxx>
-#include "panel.hxx"
#include "cockpit.hxx"
-#include "hud.hxx"
+#include "panel.hxx"
+
+#define SIX_X 200
+#define SIX_Y 345
+#define SIX_W 128
+#define SIX_SPACING (SIX_W + 5)
+#define SMALL_W 112
\f
// Implementation of FGPanel.
////////////////////////////////////////////////////////////////////////
+FGPanel * FGPanel::OurPanel = 0;
-// Global panel.
-FGPanel* FGPanel::OurPanel = 0;
-
+FGPanel::FGPanel ()
+{
+ if (OurPanel == 0) {
+ OurPanel = this;
+ } else {
+ FG_LOG(FG_GENERAL, FG_ALERT, "Multiple panels");
+ exit(-1);
+ }
+
+ int x = SIX_X;
+ int y = SIX_Y;
+
+ FGPath tpath(current_options.get_fg_root());
+ tpath.append("Textures/Panel/panel-bg.rgb");
+ _bg = new ssgTexture((char *)tpath.c_str(), false, false);
+
+ _airspeed = new FGAirspeedIndicator(x, y);
+ x += SIX_SPACING;
+ _horizon = new FGHorizon(x, y);
+ x += SIX_SPACING;
+ _altimeter = new FGAltimeter(x, y);
+ x = SIX_X;
+ y -= SIX_SPACING;
+ _coordinator = new FGTurnCoordinator(x, y);
+ x += SIX_SPACING;
+ _gyro = new FGGyroCompass(x, y);
+ x += SIX_SPACING;
+ _vertical = new FGVerticalVelocity(x, y);
+
+ y -= SIX_SPACING;
+ _rpm = new FGRPMGauge(x, y);
+
+ x -= SIX_SPACING;
+ _flaps = new FGFlapIndicator(x, y);
+}
-// Constructor (ensures that the panel is a singleton).
-FGPanel::FGPanel(void) {
- int x, y;
- FILE *f;
- char line[256];
- GLint test;
- GLubyte *tex = new GLubyte[262144];
- float Xzoom, Yzoom;
-
- if(OurPanel) {
- FG_LOG( FG_GENERAL, FG_ALERT, "Error: only one Panel allowed" );
- exit(-1);
- }
-
- OurPanel = this;
-
- Xzoom = (float)((float)(current_view.get_winWidth())/1024);
- Yzoom = (float)((float)(current_view.get_winHeight())/768);
-
- airspeedIndicator = new FGAirspeedIndicator(144.375, 166.875);
- verticalSpeedIndicator = new FGVerticalSpeedIndicator(358, 52);
- // Each hand of the altimeter is a
- // separate instrument for now...
- altimeter = new FGAltimeter(357.5, 167);
- altimeter2 = new FGAltimeter2(357.5, 167);
- horizonIndicator = new FGHorizon(251, 166.75);
- turnCoordinator = new FGTurnCoordinator(143.75, 51.75);
- rpmIndicator = new FGRPMIndicator(462.5, 133);
-
-#ifdef GL_VERSION_1_1
- xglGenTextures(2, panel_tex_id);
- xglBindTexture(GL_TEXTURE_2D, panel_tex_id[1]);
-#elif GL_EXT_texture_object
- xglGenTexturesEXT(2, panel_tex_id);
- xglBindTextureEXT(GL_TEXTURE_2D, panel_tex_id[1]);
-#else
-# error port me
-#endif
-
- xglMatrixMode(GL_PROJECTION);
- xglPushMatrix();
- xglLoadIdentity();
- xglViewport(0, 0, 640, 480);
- xglOrtho(0, 640, 0, 480, 1, -1);
- xglMatrixMode(GL_MODELVIEW);
- xglPushMatrix();
- xglLoadIdentity();
- xglPixelStorei(GL_UNPACK_ALIGNMENT, 4);
- xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-
- // load in the texture data
-
- xglPixelStorei(GL_UNPACK_ROW_LENGTH, 256);
- FGPath tpath( current_options.get_fg_root() );
- tpath.append( "Textures/gauges.rgb" );
- if((img = read_rgb_texture( (char *)tpath.c_str(), &img_width, &img_height ))==NULL){
- }
-
- xglPixelStorei(GL_UNPACK_ROW_LENGTH, 256);
- tpath.set( current_options.get_fg_root() );
- tpath.append( "Textures/gauges2.rgb" );
- if((imag = read_rgb_texture( (char *)tpath.c_str(), &imag_width, &imag_height ))==NULL){
- }
-
- xglPixelStorei(GL_UNPACK_ROW_LENGTH, 1024);
-
- tpath.set( current_options.get_fg_root() );
- tpath.append( "Textures/Fullone.rgb" );
- if ((background = read_rgb_texture( (char *)tpath.c_str(), &width, &height ))==NULL ){
- }
-
- xglPixelZoom(Xzoom, Yzoom);
- xglPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- xglPixelStorei(GL_UNPACK_ROW_LENGTH, 1024);
- xglRasterPos2i(0,0);
- xglPixelZoom(Xzoom, Yzoom);
- xglPixelStorei(GL_UNPACK_ROW_LENGTH, 256);
- xglTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 256, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, imag);
-
-#ifdef GL_VERSION_1_1
- xglBindTexture(GL_TEXTURE_2D, panel_tex_id[0]);
-#elif GL_EXT_texture_object
- xglBindTextureEXT(GL_TEXTURE_2D, panel_tex_id[0]);
-#else
-# error port me
-#endif
- xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- xglTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 256, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *)(img));
-
- xglMatrixMode(GL_MODELVIEW);
- xglPopMatrix();
+FGPanel::~FGPanel ()
+{
+ OurPanel = 0;
+ delete _airspeed;
+ delete _horizon;
+ delete _altimeter;
+ delete _coordinator;
+ delete _gyro;
+ delete _vertical;
+ delete _rpm;
+ delete _flaps;
+}
+
+float
+FGPanel::get_height () const
+{
+ return _panel_h;
}
+void
+FGPanel::ReInit (int x, int y, int finx, int finy)
+{
+ _x = x;
+ _y = y;
+ _w = finx - x;
+ _h = finy - y;
+ _panel_h = (int)((finy - y) * 0.5768 + 1);
+}
-// Destructor.
-FGPanel::~FGPanel ()
+void
+FGPanel::Update () const
{
- delete airspeedIndicator;
- delete verticalSpeedIndicator;
- delete altimeter;
- delete altimeter2;
- delete horizonIndicator;
- delete turnCoordinator;
- delete rpmIndicator;
- OurPanel = 0;
-}
-
-
-// Reinitialize the panel.
-void FGPanel::ReInit( int x, int y, int finx, int finy){
- GLint buffer;
- float Xzoom, Yzoom;
-
- xglDisable(GL_DEPTH_TEST);
-
- Xzoom = (float)((float)(current_view.get_winWidth())/1024);
- Yzoom = (float)((float)(current_view.get_winHeight())/768);
-
- // save the current buffer state
- xglGetIntegerv(GL_DRAW_BUFFER, &buffer);
-
- // and enable both buffers for writing
- xglDrawBuffer(GL_FRONT_AND_BACK);
-
- xglMatrixMode(GL_PROJECTION);
- xglPushMatrix();
- xglLoadIdentity();
- xglViewport(0, 0, 640, 480);
- xglOrtho(0, 640, 0, 480, 1, -1);
- xglMatrixMode(GL_MODELVIEW);
- xglPushMatrix();
- xglLoadIdentity();
- xglPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- xglPixelZoom(Xzoom, Yzoom);
- xglPixelStorei(GL_UNPACK_ALIGNMENT, 1);
- xglPixelStorei(GL_UNPACK_ROW_LENGTH, 1024);
- xglPixelStorei(GL_UNPACK_SKIP_PIXELS, x);
- xglPixelStorei(GL_UNPACK_SKIP_ROWS, y);
- xglRasterPos2i(x, y);
- xglPixelZoom(Xzoom, Yzoom);
- xglDrawPixels(finx - x, finy - y, GL_RGB, GL_UNSIGNED_BYTE,
- (GLvoid *)(background));
-
- // restore original buffer state
- xglDrawBuffer( (GLenum)buffer );
- xglEnable(GL_DEPTH_TEST);
-}
-
-
-// Update the panel.
-void FGPanel::Update ( void ) {
- xglMatrixMode(GL_PROJECTION);
- xglPushMatrix();
- xglLoadIdentity();
- xglOrtho(0, 640, 0, 480, 10, -10);
- xglMatrixMode(GL_MODELVIEW);
- xglPushMatrix();
- xglLoadIdentity();
- xglDisable(GL_DEPTH_TEST);
- xglEnable(GL_LIGHTING);
- xglEnable(GL_TEXTURE_2D);
- xglDisable(GL_BLEND);
-
- xglMatrixMode(GL_MODELVIEW);
- xglPopMatrix();
- xglPushMatrix();
-
- xglDisable(GL_LIGHTING);
- airspeedIndicator->Render();
- verticalSpeedIndicator->Render();
- altimeter->Render();
- altimeter2->Render();
-
- xglPopMatrix();
- xglPushMatrix();
-
- turnCoordinator->Render();
- rpmIndicator->Render();
-
- xglEnable(GL_LIGHTING);
-
- horizonIndicator->Render();
-
-
- xglDisable(GL_TEXTURE_2D);
- xglPopMatrix();
- xglEnable(GL_DEPTH_TEST);
- xglEnable(GL_LIGHTING);
- xglDisable(GL_TEXTURE_2D);
- xglDisable(GL_BLEND);
- xglMatrixMode(GL_PROJECTION);
- xglPopMatrix();
- xglMatrixMode(GL_MODELVIEW);
- xglPopMatrix();
-}
-
-
-// fgEraseArea - 'Erases' a drawn Polygon by overlaying it with a textured
-// area. Shall be a method of a panel class once.
-// This should migrate into FGPanel somehow.
-void fgEraseArea(GLfloat *array, int NumVerti, GLfloat texXPos, GLfloat texYPos, GLfloat XPos, GLfloat YPos, int Texid, float ScaleFactor){
- int i, j;
- int n;
- float a;
- float ififth;
-
- xglEnable(GL_TEXTURE_2D);
- xglEnable(GL_TEXTURE_GEN_S);
- xglEnable(GL_TEXTURE_GEN_T);
- glTexGeni(GL_S, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
- glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
- xglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- xglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- xglTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
- xglMatrixMode(GL_TEXTURE);
- xglLoadIdentity();
-
-#ifdef GL_VERSION_1_1
- xglBindTexture(GL_TEXTURE_2D, FGPanel::OurPanel->panel_tex_id[Texid]);
-#elif GL_EXT_texture_object
- xglBindTextureEXT(GL_TEXTURE_2D, FGPanel::OurPanel->panel_tex_id[Texid]);
-#else
-# error port me
-#endif
-
- xglMatrixMode(GL_TEXTURE);
- xglLoadIdentity();
- xglTranslatef(-((float)((XPos/0.625)/256)), -((float)((YPos/0.625)/256)), 0.0);
- xglTranslatef(texXPos/256 , texYPos/256, 0.0);
- xglScalef(0.00625, 0.00625, 1.0);
-
- xglBegin(GL_POLYGON);
- for(n=0;n<NumVerti;n += 2){
- xglVertex2f(array[n] * ScaleFactor, array[n + 1] * ScaleFactor);
- }
- xglEnd();
-
- xglLoadIdentity();
- xglMatrixMode(GL_MODELVIEW);
- xglPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
- xglPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
- xglDisable(GL_TEXTURE_2D);
- xglDisable(GL_TEXTURE_GEN_S);
- xglDisable(GL_TEXTURE_GEN_T);
+ // glPushAttrib(GL_ALL_ATTRIB_BITS);
+
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glLoadIdentity();
+ gluOrtho2D(_x, _x + _w, _y, _y + _h);
+
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glLoadIdentity();
+
+ // Draw the background
+ glDisable(GL_LIGHTING);
+ glEnable(GL_TEXTURE_2D);
+ if ( _bg->getHandle() >= 0 ) {
+ glBindTexture(GL_TEXTURE_2D, _bg->getHandle());
+ } else {
+ cout << "invalid texture handle in FGPanel::Update()" << endl;
+ }
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+ glBegin(GL_POLYGON);
+ glTexCoord2f(0.0, 0.0); glVertex3f(_x, _y, 0);
+ glTexCoord2f(10.0, 0.0); glVertex3f(_x + _w, _y, 0);
+ glTexCoord2f(10.0, 5.0); glVertex3f(_x + _w, _y + _panel_h, 0);
+ glTexCoord2f(0.0, 5.0); glVertex3f(_x, _y + _panel_h, 0);
+ glEnd();
+
+ // Draw the instruments.
+ glLoadIdentity();
+ glTranslated(_airspeed->getXPos(), _airspeed->getYPos(), 0);
+ _airspeed->draw();
+
+ glLoadIdentity();
+ glTranslated(_horizon->getXPos(), _horizon->getYPos(), 0);
+ _horizon->draw();
+
+ glLoadIdentity();
+ glTranslated(_altimeter->getXPos(), _altimeter->getYPos(), 0);
+ _altimeter->draw();
+
+ glLoadIdentity();
+ glTranslated(_coordinator->getXPos(), _coordinator->getYPos(), 0);
+ _coordinator->draw();
+
+ glLoadIdentity();
+ glTranslated(_gyro->getXPos(), _gyro->getYPos(), 0);
+ _gyro->draw();
+
+ glLoadIdentity();
+ glTranslated(_vertical->getXPos(), _vertical->getYPos(), 0);
+ _vertical->draw();
+
+ glLoadIdentity();
+ glTranslated(_rpm->getXPos(), _rpm->getYPos(), 0);
+ _rpm->draw();
+
+ glLoadIdentity();
+ glTranslated(_flaps->getXPos(), _flaps->getYPos(), 0);
+ _flaps->draw();
+
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();
+
+ // glPopAttrib();
+
+// ssgForceBasicState();
}
\f
////////////////////////////////////////////////////////////////////////
-// Implementation of FGHorizon instrument.
+// Implementation of FGPanelInstrument.
////////////////////////////////////////////////////////////////////////
-FGHorizon::FGHorizon (float inXPos, float inYPos)
+FGPanelInstrument::FGPanelInstrument ()
{
- XPos = inXPos;
- YPos = inYPos;
- Init();
+ setPosition(0, 0);
+ setSize(0, 0);
}
+FGPanelInstrument::FGPanelInstrument (int x, int y, int w, int h)
+{
+ setPosition(x, y);
+ setSize(w, h);
+}
-FGHorizon::~FGHorizon ()
+FGPanelInstrument::~FGPanelInstrument ()
+{
+}
+
+void
+FGPanelInstrument::setPosition (int x, int y)
{
+ _x = x;
+ _y = y;
}
+void
+FGPanelInstrument::setSize (int w, int h)
+{
+ _w = w;
+ _h = h;
+}
-void FGHorizon::Render(void){
- double pitch;
- double roll;
- float shifted, alpha, theta;
- float epsi = 360 / 180;
- GLboolean Light;
- GLfloat normal[2];
-
- int n1, n2, n, dn, rot, tmp1, tmp2;
- float a;
-
- GLfloat material[] = { 0.714844, 0.265625, 0.056875 ,1.0};
- GLfloat material2[] = {0.6640625, 0.921875, 0.984375, 1.0};
- GLfloat material3[] = {0.2, 0.2, 0.2, 1.0};
- GLfloat material4[] = {0.8, 0.8, 0.8, 1.0};
- GLfloat material5[] = {0.0, 0.0, 0.0, 1.0};
- GLfloat direction[] = {0.0, 0.0, 0.0};
- GLfloat light_position[4];
- GLfloat light_ambient[] = {0.7, 0.7, 0.7, 1.0};
- GLfloat light_ambient2[] = {0.7, 0.7, 0.7, 1.0};
- GLfloat light_diffuse[] = {1.0, 1.0, 1.0, 1.0};
- GLfloat light_specular[] = {1.0, 1.0, 1.0, 1.0};
-
- pitch = get_pitch() * RAD_TO_DEG;
- if(pitch > 45)
- pitch = 45;
-
- if(pitch < -45)
- pitch = -45;
-
- roll = get_roll() * RAD_TO_DEG;
-
- xglEnable(GL_NORMALIZE);
- xglEnable(GL_LIGHTING);
- xglEnable(GL_TEXTURE_2D);
- xglEnable(GL_LIGHT1);
- xglDisable(GL_LIGHT2);
- xglDisable(GL_LIGHT0);
- xglMatrixMode(GL_MODELVIEW);
- xglLoadIdentity();
- xglTranslatef(XPos, YPos, 0);
- xglTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
- xglMatrixMode(GL_TEXTURE);
- xglPushMatrix();
-
- // computations for the non-textured parts of the AH
-
- shifted = -((pitch / 10) * 7.0588235);
-
- if(shifted > (bottom - radius)){
- theta = (180 - (acos((bottom - shifted) / radius)*RAD_TO_DEG));
- n = (int)(theta / epsi) - 1;
- n1 = n;
- n2 = (180 - n1) + 2;
- dn = n2 - n1;
- rot = (int)(roll / epsi);
- n1 += rot + 45;
- n2 += rot + 45;
- }
-
- if(shifted < (-top + radius)){
- theta = ((acos((-top - shifted) / radius)*RAD_TO_DEG));
- n = (int)(theta / epsi) + 1;
- n1 = n;
- n2 = (180 - n1) + 2;
- dn = n2 - n1;
- rot = (int)(roll / epsi);
- n1 += rot - 45;
- n2 += rot - 45;
- if(n1 < 0){ n1 += 180; n2 +=180;}
- }
-
- // end of computations
-
- light_position[0] = 0.0;
- light_position[1] = 0.0;
- light_position[2] = 1.5;
- light_position[3] = 0.0;
- xglLightfv(GL_LIGHT1, GL_POSITION, light_position);
- xglLightfv(GL_LIGHT1, GL_AMBIENT, light_ambient);
- xglLightfv(GL_LIGHT1, GL_DIFFUSE, light_diffuse);
- xglLightfv(GL_LIGHT1, GL_SPECULAR, light_specular);
- xglLightfv(GL_LIGHT1, GL_SPOT_DIRECTION, direction);
-
-#ifdef GL_VERSION_1_1
- // FIXME!!
- xglBindTexture(GL_TEXTURE_2D, FGPanel::OurPanel->panel_tex_id[1]);
-#elif GL_EXT_texture_object
- // FIXME!!
- xglBindTextureEXT(GL_TEXTURE_2D, FGPanel::OurPanel->panel_tex_id[1]);
-#else
-# error port me
-#endif
-
- xglLoadIdentity();
- xglTranslatef(0.0, ((pitch / 10) * 0.046875), 0.0);
- xglTranslatef((texXPos/256), (texYPos/256), 0.0);
- xglRotatef(-roll, 0.0, 0.0, 1.0);
- xglScalef(1.7, 1.7, 0.0);
-
- // the following loop draws the textured part of the AH
-
- xglMaterialf(GL_FRONT, GL_SHININESS, 85.0);
-
- xglMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, material4);
- xglMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, material5);
- xglMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, material3);
-
- xglMatrixMode(GL_MODELVIEW);
- xglBegin(GL_TRIANGLES);
-
- int i;
- for(i=45; i < 225; i++){
- xglTexCoord2f(0.0, 0.0);
- xglNormal3f(0.0, 0.0, 0.6);
- xglVertex3f(0.0, 0.0, 0.0);
- xglTexCoord2f(texCoord[i % 180][0], texCoord[i % 180][1]);
- xglNormal3f(normals[i % 180][0], normals[i % 180][1], 0.6);
- xglVertex3f(vertices[i % 180][0], vertices[i % 180][1], 0.0);
- n = (i + 1) % 180;
- xglTexCoord2f(texCoord[n][0], texCoord[n][1]);
- xglNormal3f(normals[n][0], normals[n][1], 0.6);
- xglVertex3f(vertices[n][0], vertices[n][1], 0.0);
- }
- xglEnd();
-
-
- if((shifted > (bottom - radius)) && (n1 < 1000) && (n1 > 0)){
-
- a = sin(theta * DEG_TO_RAD) * sin(theta * DEG_TO_RAD);
- light_ambient2[0] = a;
- light_ambient2[1] = a;
- light_ambient2[2] = a;
-
- xglLightfv(GL_LIGHT1, GL_AMBIENT, light_ambient2);
- xglLightfv(GL_LIGHT1, GL_DIFFUSE, light_ambient2);
- xglLightfv(GL_LIGHT1, GL_SPECULAR, light_ambient2);
-
- xglBegin(GL_TRIANGLES);
-
- tmp1 = n1; tmp2 = n2;
-
- for(i = tmp1; i < tmp2 + 1; i++){
- n = i % 180;
- xglNormal3f(0.0, 0.0, 1.5);
- xglTexCoord2f((56 / 256), (140 / 256));
- xglVertex3f(((vertices[n1 % 180][0] + vertices[n2 % 180][0]) / 2), ((vertices[n1 % 180][1] + vertices[n2 % 180][1]) / 2), 0.0);
-
- xglTexCoord2f((57 / 256), (139 / 256));
- xglNormal3f(normals[n][0], normals[n][1], normals[n][3]);
- xglVertex3f(vertices[n][0], vertices[n][1], 0.0);
-
- n = (i + 1) % 180;
- xglTexCoord2f((57 / 256), (139 / 256));
- xglNormal3f(normals[n][0], normals[n][1], normals[n][3]);
- xglVertex3f(vertices[n][0], vertices[n][1], 0.0);
- }
- xglEnd();
- }
-
- if((shifted < (-top + radius)) && (n1 < 1000) && (n1 > 0)){
- a = sin(theta * DEG_TO_RAD) * sin(theta * DEG_TO_RAD);
- light_ambient2[0] = a;
- light_ambient2[1] = a;
- light_ambient2[2] = a;
-
- xglLightfv(GL_LIGHT1, GL_AMBIENT, light_ambient2);
- xglLightfv(GL_LIGHT1, GL_DIFFUSE, light_ambient2);
- xglLightfv(GL_LIGHT1, GL_SPECULAR, light_ambient2);
- xglMaterialf(GL_FRONT, GL_SHININESS, a * 85);
- xglBegin(GL_TRIANGLES);
- tmp1 = n1; tmp2 = n2;
- for(i = tmp1; i <= tmp2; i++){
- n = i % 180;
- xglNormal3f(0.0, 0.0, 1.5);
- xglTexCoord2f((73 / 256), (237 / 256));
- xglVertex3f(((vertices[n1 % 180][0] + vertices[n2 % 180][0]) / 2), ((vertices[n1 % 180][1] + vertices[n2 % 180][1]) / 2), 0.0);
-
- xglTexCoord2f((73 / 256), (236 / 256));
- xglNormal3f(normals[n][0], normals[n][1], normals[n][2]);
- xglVertex3f(vertices[n][0], vertices[n][1], 0.0);
-
- n = (i + 1) % 180;
- xglTexCoord2f((73 / 256), (236 / 256));
- xglNormal3f(normals[n][0], normals[n][1], normals[n][2]);
- xglVertex3f(vertices[n][0], vertices[n][1], 0.0);
- }
- xglEnd();
- }
-
- // Now we will have to draw the small triangle indicating the roll value
-
- xglDisable(GL_LIGHTING);
- xglDisable(GL_TEXTURE_2D);
-
- xglRotatef(roll, 0.0, 0.0, 1.0);
-
- xglBegin(GL_TRIANGLES);
- xglColor3f(1.0, 1.0, 1.0);
- xglVertex3f(0.0, radius, 0.0);
- xglVertex3f(-3.0, (radius - 7.0), 0.0);
- xglVertex3f(3.0, (radius - 7.0), 0.0);
- xglEnd();
-
- xglLoadIdentity();
-
- xglBegin(GL_POLYGON);
- xglColor3f(0.2109375, 0.23046875, 0.203125);
- xglVertex2f(275.625, 138.0);
- xglVertex2f(275.625, 148.125);
- xglVertex2f(258.125, 151.25);
- xglVertex2f(246.875, 151.25);
- xglVertex2f(226.875, 147.5);
- xglVertex2f(226.875, 138.0);
- xglVertex2f(275.625, 138.0);
- xglEnd();
-
- xglLoadIdentity();
-
- xglMatrixMode(GL_TEXTURE);
- xglPopMatrix();
- xglMatrixMode(GL_PROJECTION);
- xglPopMatrix();
- xglDisable(GL_TEXTURE_2D);
- xglDisable(GL_NORMALIZE);
- xglDisable(GL_LIGHTING);
- xglDisable(GL_LIGHT1);
- xglEnable(GL_LIGHT0);
-}
-
-// fgHorizonInit - initialize values for the AH
-
-void FGHorizon::Init(void){
- radius = 28.9;
- texXPos = 56;
- texYPos = 174;
- bottom = 36.5;
- top = 36.5;
- int n;
-
- float step = (360*DEG_TO_RAD)/180;
-
- for(n=0;n<180;n++){
- vertices[n][0] = cos(n * step) * radius;
- vertices[n][1] = sin(n * step) * radius;
- texCoord[n][0] = (cos(n * step) * radius)/256;
- texCoord[n][1] = (sin(n * step) * radius)/256;
- normals[n][0] = cos(n * step) * radius + sin(n * step);
- normals[n][1] = sin(n * step) * radius + cos(n * step);
- normals[n][2] = 0.0;
- }
+int
+FGPanelInstrument::getXPos () const
+{
+ return _x;
+}
+
+int
+FGPanelInstrument::getYPos () const
+{
+ return _y;
}
\f
////////////////////////////////////////////////////////////////////////
-// Implementation of FGTurnCoordinator.
+// Implementation of FGTexturedInstrument.
////////////////////////////////////////////////////////////////////////
+FGTexturedInstrument::FGTexturedInstrument (int x, int y, int w, int h)
+ : FGPanelInstrument(x, y, w, h)
+{
+ for (int i = 0; i < MAX_LAYERS; i++) {
+ _layers[i] = false;
+ }
+}
-// Static constants
-
-GLfloat FGTurnCoordinator::wingArea[] = {
- -1.25, -28.125, 1.255, -28.125, 1.255, 28.125, -1.25, 28.125 };
+FGTexturedInstrument::~FGTexturedInstrument ()
+{
+ // FIXME: maybe free textures
+}
-GLfloat FGTurnCoordinator::elevatorArea[] = {
- 3.0, -10.9375, 4.5, -10.9375, 4.5, 10.9375, 3.0, 10.9375 };
-
-GLfloat FGTurnCoordinator::rudderArea[] = {
- 2.0, -0.45, 10.625, -0.45, 10.625, 0.55, 2.0, 0.55};
+void
+FGTexturedInstrument::addLayer (int layer, const char * textureName)
+{
+ FGPath tpath(current_options.get_fg_root());
+ tpath.append(textureName);
+ ssgTexture * texture = new ssgTexture((char *)tpath.c_str(), false, false);
+ cerr << "Loaded texture " << textureName << endl;
+ addLayer(layer, texture);
+}
+void
+FGTexturedInstrument::addLayer (int layer, ssgTexture * texture)
+{
+ _layers[layer] = true;
+ _textures[layer] = texture;
+ _rotation[layer] = 0.0;
+ _xoffset[layer] = _yoffset[layer] = 0;
+ _xcenter[layer] = _ycenter[layer] = 0;
+}
-FGTurnCoordinator::FGTurnCoordinator (float inXPos, float inYPos)
+void
+FGTexturedInstrument::setLayerCenter (int layer, int x, int y)
{
- XPos = inXPos;
- YPos = inYPos;
- Init();
+ _xcenter[layer] = x;
+ _ycenter[layer] = y;
}
-FGTurnCoordinator::~FGTurnCoordinator ()
+void
+FGTexturedInstrument::setLayerRot (int layer, double rotation) const
{
+ _rotation[layer] = rotation;
}
+void
+FGTexturedInstrument::setLayerOffset (int layer, int xoff, int yoff) const
+{
+ _xoffset[layer] = xoff;
+ _yoffset[layer] = yoff;
+}
-// fgUpdateTurnCoordinator - draws turn coordinator related stuff
+bool
+FGTexturedInstrument::hasLayer (int layer) const
+{
+ return _layers[layer];
+}
-void FGTurnCoordinator::Render(void){
- int n;
-
- xglDisable(GL_LIGHTING);
- xglDisable(GL_BLEND);
- xglEnable(GL_TEXTURE_2D);
-
- alpha = (get_sideslip() / 1.5) * 560;
- if(alpha > 56){
- alpha = 56;
- }
- if(alpha < -56){
- alpha = -56;
- }
-
- PlaneAlpha = get_roll();
-
- xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- xglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- xglTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
-
- xglMatrixMode(GL_MODELVIEW);
- xglLoadIdentity();
- xglTranslatef(BallXPos, BallYPos, 0.0);
- xglTranslatef(0.75 * sin(alphahist[0] * DEG_TO_RAD) * 31, 0.3 * (39 - (cos(alphahist[0] * DEG_TO_RAD) * 39)), 0.0);
- fgEraseArea(vertices, 72, BallTexXPos + ((0.75 * sin(alphahist[0] * DEG_TO_RAD) * 31) / 0.625), BallTexYPos + ((0.3 * (39 - (cos(alphahist[0] * DEG_TO_RAD) * 39))) / 0.625), BallXPos + (0.75 * sin(alphahist[0] * DEG_TO_RAD) * 31), BallYPos + (0.3 * (39 - (cos(alphahist[0] * DEG_TO_RAD) * 39))), 1, 1);
- xglDisable(GL_TEXTURE_2D);
- xglEnable(GL_BLEND);
- xglBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ONE);
- xglMatrixMode(GL_MODELVIEW);
- xglLoadIdentity();
- xglTranslatef(BallXPos, BallYPos, 0.0);
- xglTranslatef(0.75 * sin(alpha * DEG_TO_RAD) * 31, 0.3 * (39 - (cos(alpha * DEG_TO_RAD) * 39)), 0.0);
- xglBegin(GL_POLYGON);
- xglColor3f(0.8, 0.8, 0.8);
-
- int i;
- for(i=0;i<36;i++){
- xglVertex2f(vertices[2 * i], vertices[(2 * i) + 1]);
- }
- xglEnd();
-
- xglDisable(GL_TEXTURE_2D);
- xglDisable(GL_BLEND);
-
- xglMatrixMode(GL_MODELVIEW);
- xglLoadIdentity();
- xglTranslatef(XPos, YPos, 0.0);
- xglRotatef(rollhist[0] * RAD_TO_DEG + 90, 0.0, 0.0, 1.0);
-
- fgEraseArea(wingArea, 8, PlaneTexXPos, PlaneTexYPos, XPos, YPos, 1, 1);
- fgEraseArea(elevatorArea, 8, PlaneTexXPos, PlaneTexYPos, XPos, YPos, 1, 1);
- fgEraseArea(rudderArea, 8, PlaneTexXPos, PlaneTexYPos, XPos, YPos, 1, 1);
-
- xglLoadIdentity();
- xglTranslatef(XPos, YPos, 0.0);
- xglRotatef(-get_roll() * RAD_TO_DEG + 90, 0.0, 0.0, 1.0);
-
- xglBegin(GL_POLYGON);
- xglColor3f(1.0, 1.0, 1.0);
- for(i=0;i<90;i++){
- xglVertex2f(cos(i * 4 * DEG_TO_RAD) * 5, sin(i * 4 * DEG_TO_RAD) * 5);
+void
+FGTexturedInstrument::draw () const
+{
+ glEnable(GL_TEXTURE_2D);
+
+ int i;
+ int w2 = _w / 2;
+ int h2 = _h / 2;
+
+ glMatrixMode(GL_MODELVIEW);
+ for (i = 0; i < MAX_LAYERS; i++) {
+ if (hasLayer(i)) {
+ glPushMatrix();
+ glTranslated(_xcenter[i], _ycenter[i], 0);
+ glRotatef(0.0 - _rotation[i], 0.0, 0.0, 1.0);
+ glTranslated(_xoffset[i], _yoffset[i], 0);
+ if ( _textures[i]->getHandle() >= 0 ) {
+ glBindTexture(GL_TEXTURE_2D, _textures[i]->getHandle());
+ } else {
+ cout << "invalid texture handle in FGTexturedInstrument::draw()"
+ << endl;
+ }
+ glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+ glBegin(GL_POLYGON);
+ // FIXME: is this really correct
+ // for layering?
+ glTexCoord2f(0.0, 0.0); glVertex3f(-w2, -h2, i / 100.0 + 0.1);
+ glTexCoord2f(1.0, 0.0); glVertex3f(w2, -h2, i / 100.0 + 0.1);
+ glTexCoord2f(1.0, 1.0); glVertex3f(w2, h2, i / 100.0 + 0.1);
+ glTexCoord2f(0.0, 1.0); glVertex3f(-w2, h2, i / 100.0 + 0.1);
+ glEnd();
+ glPopMatrix();
}
- xglEnd();
-
- xglBegin(GL_POLYGON);
- xglVertex2f(wingArea[0], wingArea[1]);
- xglVertex2f(wingArea[2], wingArea[3]);
- xglVertex2f(wingArea[4], wingArea[5]);
- xglVertex2f(wingArea[6], wingArea[7]);
- xglVertex2f(wingArea[0], wingArea[1]);
- xglEnd();
-
- xglBegin(GL_POLYGON);
- xglVertex2f(elevatorArea[0], elevatorArea[1]);
- xglVertex2f(elevatorArea[2], elevatorArea[3]);
- xglVertex2f(elevatorArea[4], elevatorArea[5]);
- xglVertex2f(elevatorArea[6], elevatorArea[7]);
- xglVertex2f(elevatorArea[0], elevatorArea[1]);
- xglEnd();
-
- xglBegin(GL_POLYGON);
- xglVertex2f(rudderArea[0], rudderArea[1]);
- xglVertex2f(rudderArea[2], rudderArea[3]);
- xglVertex2f(rudderArea[4], rudderArea[5]);
- xglVertex2f(rudderArea[6], rudderArea[7]);
- xglVertex2f(rudderArea[0], rudderArea[1]);
- xglEnd();
-
-
- alphahist[0] = alphahist[1];
- alphahist[1] = alpha;
- rollhist[0] = rollhist[1];
- rollhist[1] = -get_roll();
-
- xglDisable(GL_BLEND);
-}
-
-void FGTurnCoordinator::Init(void){
- int n;
- PlaneTexXPos = 49;
- PlaneTexYPos = 59.75;
- BallXPos = 145;
- BallYPos = 24;
- BallTexXPos = 49;
- BallTexYPos = 16;
- BallRadius = 3.5;
-
- for(n=0;n<36;n++){
- vertices[2 * n] = cos(10 * n * DEG_TO_RAD) * BallRadius;
- vertices[(2 * n) + 1] = sin(10 * n * DEG_TO_RAD) * BallRadius;
- }
+ }
+
+ glDisable(GL_TEXTURE_2D);
}
\f
////////////////////////////////////////////////////////////////////////
-// Implementation of FGTexInstrument base class.
+// Implementation of FGAirspeedIndicator.
////////////////////////////////////////////////////////////////////////
-FGTexInstrument::FGTexInstrument (void)
-{
-}
-
-FGTexInstrument::~FGTexInstrument (void)
-{
-}
-
-void FGTexInstrument::UpdatePointer(void){
- float alpha;
-
- glEnableClientState(GL_VERTEX_ARRAY);
- glVertexPointer(2, GL_FLOAT, 0, vertices);
-
- alpha=((((float)(getValue() - (value1))) /
- (value2 - value1))* (alpha2 - alpha1) + alpha1);
-
- if (alpha < alpha1)
- alpha = alpha1;
- if (alpha > alpha2)
- alpha -= alpha2;
- xglMatrixMode(GL_MODELVIEW);
- xglPushMatrix();
- xglLoadIdentity();
- xglDisable(GL_TEXTURE_2D);
- xglTranslatef(XPos, YPos, 0);
- xglRotatef(-alpha, 0.0, 0.0, 1.0);
- xglColor4f(1.0, 1.0, 1.0, 1.0);
- glDrawArrays(GL_POLYGON, 0, 10);
- tape[0] = tape[1];
- tape[1] = alpha;
- xglEnable(GL_TEXTURE_2D);
- glDisableClientState(GL_VERTEX_ARRAY);
-}
-
-// CreatePointer - calculate the vertices of a pointer
-
-void FGTexInstrument::CreatePointer(void){
- int i;
- float alpha;
- float alphastep;
- float r = radius;
-
- vertices[0] = 0;
- vertices[1] = length;
- vertices[2] = -(width/2);
- vertices[3] = length - ((width/2)/(tan(angle*DEG_TO_RAD/2)));
- vertices[4] = -(width/2);
- vertices[5] = cos(asin((width/2)/r))*r;
-
- alphastep = (asin((width/2)/r)+asin((width/2)/r))/5;
- alpha = asin(-(width/2)/r);
-
- for(i=0;i<5;i++){
- alpha += alphastep;
- vertices[(i*2)+6] = sin(alpha)*r;
- }
-
- alpha = asin(-(width/2)/r);
-
- for(i=0;i<5;i++){
- alpha +=alphastep;
- vertices[(i*2)+7]= cos(alpha)*r;
- }
-
- vertices[16] = - vertices[4];
- vertices[17] = vertices[5];
- vertices[18] = - vertices[2];
- vertices[19] = vertices[3];
-
+FGAirspeedIndicator::FGAirspeedIndicator (int x, int y)
+ : FGTexturedInstrument(x, y, SIX_W, SIX_W)
+{
+ addLayer(0, "Textures/Panel/airspeed.rgb");
+ addLayer(1, "Textures/Panel/long-needle.rgb");
}
-void FGTexInstrument::Init(void){
- CreatePointer();
+FGAirspeedIndicator::~FGAirspeedIndicator ()
+{
}
-void FGTexInstrument::Render(void){
- xglEnable(GL_TEXTURE_2D);
- xglLoadIdentity();
- xglTranslatef(XPos, YPos, 0.0);
- xglRotatef(-tape[0], 0.0, 0.0, 1.0);
- fgEraseArea(vertices, 20, (GLfloat)(textureXPos), (GLfloat)(textureYPos), (GLfloat)(XPos), (GLfloat)(YPos), 0, 1);
-
- UpdatePointer();
-
- xglDisable(GL_TEXTURE_2D);
+void
+FGAirspeedIndicator::draw () const
+{
+ double speed = get_speed();
+ if (speed < 30.0) {
+ speed = 30.0;
+ } else if (speed > 220.0) {
+ speed = 220.0;
+ }
+ double angle = speed / 20.0 * 36.0 - 54.0;
+ setLayerRot(1, angle);
+ FGTexturedInstrument::draw();
}
\f
////////////////////////////////////////////////////////////////////////
-// Implementation of FGAirspeedIndicator.
+// Implementation of FGHorizon.
////////////////////////////////////////////////////////////////////////
-
-FGAirspeedIndicator::FGAirspeedIndicator (int x, int y)
+FGHorizon::FGHorizon (int x, int y)
+ : FGTexturedInstrument(x, y, SIX_W, SIX_W)
{
- XPos = x;
- YPos = y;
- radius = 4;
- length = 32;
- width = 3;
- angle = 30;
- value1 = 15.0;
- value2 = 260.0;
- alpha1 = -20.0;
- alpha2 = 360;
- textureXPos = 65;
- textureYPos = 193;
- Init();
+ addLayer(0, "Textures/Panel/horizon-bg.rgb");
+ addLayer(1, "Textures/Panel/horizon-float.rgb");
+ addLayer(2, "Textures/Panel/horizon-rim.rgb");
+ addLayer(3, "Textures/Panel/horizon-fg.rgb");
}
-
-FGAirspeedIndicator::~FGAirspeedIndicator ()
+FGHorizon::~FGHorizon ()
{
}
-
-double
-FGAirspeedIndicator::getValue () const
+void
+FGHorizon::draw () const
{
- return get_speed();
+ double rot = get_roll() * RAD_TO_DEG;
+ double pitch = get_pitch() * RAD_TO_DEG;
+ if (pitch > 20)
+ pitch = 20;
+ else if (pitch < -20)
+ pitch = -20;
+ int yoffset = 0 - (pitch * ((1.5 / 160.0) * _h));
+ setLayerRot(0, 0 - rot);
+ setLayerRot(1, 0 - rot);
+ setLayerOffset(1, 0, yoffset);
+ setLayerRot(2, 0 - rot);
+ FGTexturedInstrument::draw();
}
\f
////////////////////////////////////////////////////////////////////////
-// Implementation of FGVerticalSpeedIndicator.
+// Implementation of FGAltimeter.
////////////////////////////////////////////////////////////////////////
+// TODO: add 10,000 bug
-FGVerticalSpeedIndicator::FGVerticalSpeedIndicator (int x, int y)
+FGAltimeter::FGAltimeter (int x, int y)
+ : FGTexturedInstrument(x, y, SIX_W, SIX_W)
{
- XPos = x;
- YPos = y;
- radius = 4;
- length = 30;
- width = 3;
- angle = 30;
- value1 = -3.0;
- value2 = 3.0;
- alpha1 = 100;
- alpha2 = 440;
- textureXPos = 66.15;
- textureYPos = 66;
- Init();
+ addLayer(0, "Textures/Panel/altimeter.rgb");
+ addLayer(1, "Textures/Panel/long-needle.rgb");
+ addLayer(2, "Textures/Panel/short-needle.rgb");
+ addLayer(3, "Textures/Panel/bug.rgb");
}
-
-FGVerticalSpeedIndicator::~FGVerticalSpeedIndicator ()
+FGAltimeter::~FGAltimeter ()
{
}
-
-double
-FGVerticalSpeedIndicator::getValue () const
+void
+FGAltimeter::draw () const
{
- return get_climb_rate() / 1000.0;
+ long altitude = get_altitude();
+ setLayerRot(1, (altitude % 1000) / 1000.0 * 360.0);
+ setLayerRot(2, (altitude % 10000) / 10000.0 * 360.0);
+ setLayerRot(3, (altitude % 100000) / 100000.0 * 360.0);
+ FGTexturedInstrument::draw();
}
\f
////////////////////////////////////////////////////////////////////////
-// Implementation of FGAltimeter.
+// Implementation of FGTurnCoordinator.
////////////////////////////////////////////////////////////////////////
+// TODO: add slip/skid ball
-FGAltimeter::FGAltimeter (int x, int y)
+FGTurnCoordinator::FGTurnCoordinator (int x, int y)
+ : FGTexturedInstrument(x, y, SIX_W, SIX_W)
{
- XPos = x;
- YPos = y;
- radius = 5;
- length = 25;
- width = 4;
- angle = 30;
- value1 = 0;
- value2 = 10000;
- alpha1 = 0;
- alpha2 = 360;
- textureXPos = 194;
- textureYPos = 191;
- Init();
+ addLayer(0, "Textures/Panel/turn-bg.rgb");
+ addLayer(1, "Textures/Panel/turn.rgb");
+ addLayer(2, "Textures/Panel/ball.rgb");
}
-
-FGAltimeter::~FGAltimeter ()
+FGTurnCoordinator::~FGTurnCoordinator ()
{
}
-
-double
-FGAltimeter::getValue () const
+void
+FGTurnCoordinator::draw () const
{
- return get_altitude();
+ // Set little plane
+ // FIXME: this should be turn, maybe
+ double rot = get_roll() * RAD_TO_DEG;
+ if (rot > 30.0)
+ rot = 30.0;
+ else if (rot < -30.0)
+ rot = -30.0;
+ setLayerRot(1, rot);
+
+ // Set ball
+ // FIXME: totally bogus values
+ double slip = get_sideslip() * 450;
+ if (slip > 45) {
+ slip = 45;
+ } else if (slip < -45) {
+ slip = -45;
+ }
+ setLayerRot(2, 0 - slip);
+
+ FGTexturedInstrument::draw();
}
\f
////////////////////////////////////////////////////////////////////////
-// Implementation of FGAltimeter2.
+// Implementation of FGGyroCompass.
////////////////////////////////////////////////////////////////////////
+// TODO: add heading bug
-FGAltimeter2::FGAltimeter2 (int x, int y)
+FGGyroCompass::FGGyroCompass (int x, int y)
+ : FGTexturedInstrument(x, y, SIX_W, SIX_W)
{
- XPos = x;
- YPos = y;
- radius = 5;
- length = 32;
- width = 3;
- angle = 30;
- value1 = 0;
- value2 = 3000;
- alpha1 = 0;
- alpha2 = 1080;
- textureXPos = 194;
- textureYPos = 191;
- Init();
+ addLayer(0, "Textures/Panel/gyro-bg.rgb");
+ addLayer(1, "Textures/Panel/bug.rgb");
+ addLayer(2, "Textures/Panel/gyro-fg.rgb");
}
+FGGyroCompass::~FGGyroCompass ()
+{
+}
-FGAltimeter2::~FGAltimeter2 ()
+void
+FGGyroCompass::draw () const
{
+ setLayerRot(0, 0.0 - get_heading());
+ setLayerRot(1, 0.0 - get_heading() + fgAPget_TargetHeading());
+ FGTexturedInstrument::draw();
}
-double
-FGAltimeter2::getValue () const
+\f
+////////////////////////////////////////////////////////////////////////
+// Implementation of FGVerticalVelocity.
+////////////////////////////////////////////////////////////////////////
+
+FGVerticalVelocity::FGVerticalVelocity (int x, int y)
+ : FGTexturedInstrument(x, y, SIX_W, SIX_W)
+{
+ addLayer(0, "Textures/Panel/vertical.rgb");
+ addLayer(1, "Textures/Panel/long-needle.rgb");
+}
+
+FGVerticalVelocity::~FGVerticalVelocity ()
+{
+}
+
+void
+FGVerticalVelocity::draw () const
{
- return get_altitude();
+ double climb = get_climb_rate() / 500.0;
+ if (climb < -4.0) {
+ climb = -4.0;
+ } else if (climb > 4.0) {
+ climb = 4.0;
+ }
+ double rot = (climb * 42.0) + 270.0;
+ // FIXME: why inverted?
+ setLayerRot(1, rot);
+ FGTexturedInstrument::draw();
}
\f
////////////////////////////////////////////////////////////////////////
-// Implementation of FGRPMIndicator.
+// Implementation of FGRPMGauge.
////////////////////////////////////////////////////////////////////////
+FGRPMGauge::FGRPMGauge (int x, int y)
+ : FGTexturedInstrument(x, y, SMALL_W, SMALL_W)
+{
+ addLayer(0, "Textures/Panel/rpm.rgb");
+ addLayer(1, "Textures/Panel/long-needle.rgb");
+}
+
+FGRPMGauge::~FGRPMGauge ()
+{
+}
-FGRPMIndicator::FGRPMIndicator (int x, int y)
+void
+FGRPMGauge::draw () const
{
- XPos = x;
- YPos = y;
- radius = 10;
- length = 20;
- width = 5.5;
- angle = 60;
- value1 = 0.0;
- value2 = 1.0;
- alpha1 = -67;
- alpha2 = 180;
- textureXPos = 174;
- textureYPos = 83;
- Init();
+ double rot = get_throttleval() * 300 - 150;
+ setLayerRot(1, rot);
+ FGTexturedInstrument::draw();
}
-FGRPMIndicator::~FGRPMIndicator ()
+\f
+////////////////////////////////////////////////////////////////////////
+// Implementation of FGFlapIndicator.
+////////////////////////////////////////////////////////////////////////
+
+FGFlapIndicator::FGFlapIndicator (int x, int y)
+ : FGTexturedInstrument(x, y, SMALL_W, SMALL_W)
{
+ addLayer(0, "Textures/Panel/flaps.rgb");
+ addLayer(1, "Textures/Panel/long-needle.rgb");
+ setLayerCenter(1, 0 - (SMALL_W / 4) + (SMALL_W / 16), 0);
}
+FGFlapIndicator::~FGFlapIndicator ()
+{
+}
-double
-FGRPMIndicator::getValue () const
+void
+FGFlapIndicator::draw () const
{
- return get_throttleval();
+ double rot = controls.get_flaps() * 120 + 30;
+ setLayerRot(1, rot);
+ FGTexturedInstrument::draw();
}
+
+
+\f
+// end of panel.cxx
-// panel.hxx -- instrument panel defines and prototypes
-//
-// Written by Friedemann Reinhard, started June 1998.
+// panel.cxx - default, 2D single-engine prop instrument panel
+//
+// Written by David Megginson, started January 2000.
//
-// Major code reorganization by David Megginson, November 1999.
-//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License as
// published by the Free Software Foundation; either version 2 of the
//
// $Id$
-
-#ifndef _PANEL_HXX
-#define _PANEL_HXX
-
+#ifndef __PANEL_HXX
+#define __PANEL_HXX
#ifndef __cplusplus
# error This library requires C++
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
-
-class FGInstrument; // FIXME: rearrange to avoid this?
+#include <simgear/xgl.h>
+#include <plib/ssg.h>
-/**
- * Top-level class to hold an instance of a panel.
- */
-class FGPanel{
+class FGPanelInstrument;
-public:
- static FGPanel *OurPanel; // current_panel would be better
- // FIXME: a few other classes have a
- // dependency on this information; it
- // would be nice to fix that.
- GLuint panel_tex_id[2];
+\f
+////////////////////////////////////////////////////////////////////////
+// Instrument panel class.
+////////////////////////////////////////////////////////////////////////
- FGPanel();
+class FGPanel
+{
+public:
+ FGPanel ();
virtual ~FGPanel ();
- virtual float get_height(void) { return height; }
- virtual void ReInit( int x, int y, int finx, int finy);
- virtual void Update(void);
-private:
+ // Legacy interface from old panel.
+ static FGPanel * OurPanel;
+ virtual float get_height () const;
+ virtual void ReInit (int x, int y, int finx, int finy);
+ virtual void Update () const;
- int height;
- int width;
- GLubyte *background;
- GLubyte *imag;
- int imag_width, imag_height;
- GLubyte *img;
- int img_width, img_height;
- // The instruments on the panel.
- FGInstrument * horizonIndicator;
- FGInstrument * turnCoordinator;
- FGInstrument * rpmIndicator;
- FGInstrument * airspeedIndicator;
- FGInstrument * verticalSpeedIndicator;
- FGInstrument * altimeter;
- FGInstrument * altimeter2;
+private:
+ int _x, _y, _w, _h;
+ int _panel_h;
+
+ ssgTexture * _bg;
+
+ const FGPanelInstrument * _airspeed;
+ const FGPanelInstrument * _horizon;
+ const FGPanelInstrument * _altimeter;
+ const FGPanelInstrument * _coordinator;
+ const FGPanelInstrument * _gyro;
+ const FGPanelInstrument * _vertical;
+ const FGPanelInstrument * _flaps;
+ const FGPanelInstrument * _rpm;
};
-/**
- * Abstract base class for all panel instruments.
- */
-class FGInstrument{
+\f
+////////////////////////////////////////////////////////////////////////
+// Instrument base class.
+////////////////////////////////////////////////////////////////////////
+class FGPanelInstrument
+{
public:
- FGInstrument (void) {}
- virtual ~FGInstrument (void) {}
- virtual void Init(void) = 0;
- virtual void Render(void) = 0;
+ FGPanelInstrument ();
+ FGPanelInstrument (int x, int y, int w, int h);
+ virtual ~FGPanelInstrument ();
-protected:
- float XPos;
- float YPos;
-};
+ virtual void draw () const = 0;
+ virtual void setPosition(int x, int y);
+ virtual void setSize(int w, int h);
-/**
- * Instrument: the artificial horizon.
- */
-class FGHorizon : public FGInstrument
-{
+ virtual int getXPos () const;
+ virtual int getYPos () const;
-public:
- FGHorizon (float inXPos, float inYPos);
- virtual ~FGHorizon (void);
- virtual void Init (void);
- virtual void Render (void);
-
-private:
- float texXPos;
- float texYPos;
- float radius;
- float bottom; // tell the program the offset between midpoint and bottom
- float top; // guess what ;-)
- float vertices[180][2];
- float normals[180][3];
- float texCoord[180][2];
+protected:
+ int _x, _y, _w, _h;
};
-/**
- * Instrument: the turn co-ordinator.
- */
-class FGTurnCoordinator : public FGInstrument
-{
+\f
+////////////////////////////////////////////////////////////////////////
+// An instrument composed of layered textures.
+////////////////////////////////////////////////////////////////////////
-public:
- FGTurnCoordinator (float inXPos, float inYPos);
- virtual ~FGTurnCoordinator (void);
- virtual void Init (void);
- virtual void Render(void);
-
-private:
- float PlaneTexXPos;
- float PlaneTexYPos;
- float alpha;
- float PlaneAlpha;
- float alphahist[2];
- float rollhist[2];
- float BallXPos;
- float BallYPos;
- float BallTexXPos;
- float BallTexYPos;
- float BallRadius;
- GLfloat vertices[72];
- static GLfloat wingArea[];
- static GLfloat elevatorArea[];
- static GLfloat rudderArea[];
-};
-
-
-/**
- * Abstract base class for gauges with needles and textured backgrounds.
- *
- * The airspeed indicator, vertical speed indicator, altimeter, and RPM
- * gauge are all derived from this class.
- */
-class FGTexInstrument : public FGInstrument
+class FGTexturedInstrument : public FGPanelInstrument
{
public:
- FGTexInstrument (void);
- virtual ~FGTexInstrument ();
- virtual void Init(void);
- virtual void Render(void);
-
+ static const int MAX_LAYERS = 8;
+ FGTexturedInstrument (int x, int y, int w, int h);
+ virtual ~FGTexturedInstrument ();
+
+ virtual void addLayer (int layer, const char * textureName);
+ virtual void addLayer (int layer, ssgTexture * texture);
+ virtual void setLayerCenter (int layer, int x, int y);
+ virtual void setLayerRot (int layer, double rotation) const;
+ virtual void setLayerOffset (int layer, int xoffset, int yoffset) const;
+ virtual bool hasLayer (int layer) const;
+
+ virtual void draw () const;
protected:
- virtual void CreatePointer(void);
- virtual void UpdatePointer(void);
- virtual double getValue () const = 0;
-
- float radius;
- float length;
- float width;
- float angle;
- float tape[2];
- float value1;
- float value2;
- float alpha1;
- float alpha2;
- float textureXPos;
- float textureYPos;
- GLfloat vertices[20];
+ bool _layers[MAX_LAYERS];
+ mutable int _xcenter[MAX_LAYERS];
+ mutable int _ycenter[MAX_LAYERS];
+ mutable double _rotation[MAX_LAYERS];
+ mutable int _xoffset[MAX_LAYERS];
+ mutable int _yoffset[MAX_LAYERS];
+ ssgTexture * _textures[MAX_LAYERS];
};
-/**
- * Instrument: the airspeed indicator.
- */
-class FGAirspeedIndicator : public FGTexInstrument
+\f
+////////////////////////////////////////////////////////////////////////
+// Airspeed indicator.
+////////////////////////////////////////////////////////////////////////
+
+class FGAirspeedIndicator : public FGTexturedInstrument
{
public:
FGAirspeedIndicator (int x, int y);
virtual ~FGAirspeedIndicator ();
-
-protected:
- double getValue () const;
+ virtual void draw () const;
};
-/**
- * Instrument: the vertical speed indicator.
- */
-class FGVerticalSpeedIndicator : public FGTexInstrument
+\f
+////////////////////////////////////////////////////////////////////////
+// Artificial Horizon.
+////////////////////////////////////////////////////////////////////////
+
+class FGHorizon : public FGTexturedInstrument
{
public:
- FGVerticalSpeedIndicator (int x, int y);
- virtual ~FGVerticalSpeedIndicator ();
-
-protected:
- double getValue () const;
+ FGHorizon (int x, int y);
+ virtual ~FGHorizon ();
+ virtual void draw () const;
};
-/**
- * Instrument: the altimeter (big hand?)
- */
-class FGAltimeter : public FGTexInstrument
+\f
+////////////////////////////////////////////////////////////////////////
+// Altimeter.
+////////////////////////////////////////////////////////////////////////
+
+class FGAltimeter : public FGTexturedInstrument
{
public:
FGAltimeter (int x, int y);
virtual ~FGAltimeter ();
+ virtual void draw () const;
+};
-protected:
- double getValue () const;
+
+\f
+////////////////////////////////////////////////////////////////////////
+// Turn Co-ordinator.
+////////////////////////////////////////////////////////////////////////
+
+class FGTurnCoordinator : public FGTexturedInstrument
+{
+public:
+ FGTurnCoordinator (int x, int y);
+ virtual ~FGTurnCoordinator ();
+ virtual void draw () const;
};
-/**
- * Instrument: the altimeter (little hand?)
- */
-class FGAltimeter2 : public FGTexInstrument
+\f
+////////////////////////////////////////////////////////////////////////
+// Gyro Compass.
+////////////////////////////////////////////////////////////////////////
+
+class FGGyroCompass : public FGTexturedInstrument
{
public:
- FGAltimeter2 (int x, int y);
- virtual ~FGAltimeter2 ();
+ FGGyroCompass (int x, int y);
+ virtual ~FGGyroCompass ();
+ virtual void draw () const;
+};
-protected:
- double getValue () const;
+
+\f
+////////////////////////////////////////////////////////////////////////
+// Vertical velocity indicator.
+////////////////////////////////////////////////////////////////////////
+
+class FGVerticalVelocity : public FGTexturedInstrument
+{
+public:
+ FGVerticalVelocity (int x, int y);
+ virtual ~FGVerticalVelocity ();
+ virtual void draw () const;
};
-/**
- * Instrument: the RPM gauge (actually manifold pressure right now).
- */
-class FGRPMIndicator : public FGTexInstrument
+\f
+////////////////////////////////////////////////////////////////////////
+// RPM gauge.
+////////////////////////////////////////////////////////////////////////
+
+class FGRPMGauge : public FGTexturedInstrument
{
public:
- FGRPMIndicator (int x, int y);
- virtual ~FGRPMIndicator ();
+ FGRPMGauge (int x, int y);
+ virtual ~FGRPMGauge ();
+ virtual void draw () const;
+};
-protected:
- double getValue () const;
+
+\f
+////////////////////////////////////////////////////////////////////////
+// Flap position indicator.
+////////////////////////////////////////////////////////////////////////
+
+class FGFlapIndicator : public FGTexturedInstrument
+{
+public:
+ FGFlapIndicator (int x, int y);
+ virtual ~FGFlapIndicator ();
+ virtual void draw () const;
};
- // FIXME: move to FGPanel, somehow
-void fgEraseArea(GLfloat *array, int NumVerti, GLfloat texXPos, GLfloat texYPos, GLfloat XPos, GLfloat YPos, int Texid, float ScaleFactor);
+\f
+#endif // __PANEL_HXX
+
+// end of panel.hxx
+
-#endif // _PANEL_HXX
libControls_a_SOURCES = controls.cxx controls.hxx
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
+++ /dev/null
---------------------------------------------------------------------------
-| Done
---------------------------------------------------------------------------
-
-7/21/98 - add a --enable/disable-sound option.
-
-7/11/98 - Ground collision detection
-
-7/3/98 - Generate and store the transform matrix when rendering by
- material property so we don't have to push, transform, pop
- continually. See mesa code for gluLookAt()
-
-6/11/98 - convert to static libraries and reduce libtool usage ...
-
-6/11/98 - Converted to GL_FOG_EXP2
-
-5/29/98 - Widened edges of tiles to overlap a bit. This should help
- reduce floating point induced gaps between tiles.
-
-5/27/98 - Rewrote airport list manager using an STL "map" (associative
- array) for quick lookup.
-
-5/26/98 - Impose a maximum triangle area during scenery generation so
- even very flat areas will get split into a few smaller sub
- triangles.
-
-5/26/98 - Overhaul view parameter generation ... see if we can piggy
- back off of larcsim calcs, and consolate potentially
- redundant code -- Norman Vine
-
-5/24/98 - Fine grain view frustum culling
-
-5/20/98 - fix winding problem with tri-strips in obj.c (wait for next
- version of stripe)
-
-5/17/98 - Course grain (tile based) view frustum culling
-
-5/6/98 - HUD updates from Jeff Goeke-Smith.
-
-5/5/98 - Added a visual frame rate counter on the HUD.
-
-5/2/98 - Option to go full screen. call glutFullScreen()
-
-4/29/98 - Option to toggle between smooth / flat shading.
-
-4/28/98 - Physically check if airport list overruns array size when loading.
-
-4/28/98 - Wrap up zlib so we can conditionally compile back in normal
- behavior on systems that have trouble building zlib.
-
-4/27/98 - Do a better job of translating scenery tiles towards (0,0,0)
-
-4/27/98 - fgTIME fgVIEW struct -> typedef
-
-4/27/98 - Add a option to disable texturing.
-
-4/25/98 - Clean up initialization sequence and eliminate
- interdependencies between lighting and position.
-
-4/23/98 - encapsulate all #include <config.h>'s with #ifdef HAVE_CONFIG_H
-
-4/23/98 - Give all textured polygons ambient and diffuse glMaterial()
- properties of "white" so GL_MODULATE works as expected and
- textures are not oddly tinted.
-
-4/21/98 - Convert lighting equations to table lookups
-
-4/21/98 - Make sure all #ifdef _cplusplus are after any other includes
- Make sure all .hxx files have #ifndef cplusplus #error
-
-4/21/98 - various autoconf cleanups/preparation for C++
-
-4/9/98 - Fixed a bug in event management where the next event run time
- was miscalculated so it was never run.
-
-4/6/98 - Cleanups
-
---------------------------------------------------------------------------
-
-4/3/98 - Released version 0.40
-
-4/3/98 - Incorporated the Gnu automake/autoconf/libtool system.
-
-3/17/98 - Fix time jumping problem on win32
-
-3/1/98 - Unify sun position render code with existing sunpos
- calculations so the sun doesn't do it's little jump every
- hour.
-
-2/19/98 - Fixed a problem with smooth view (scenery center) switch
- when entering a new tile.
-
-2/18/98 - Fixed a problem with terrain generation that was causing
- some strips to be put in the wrong winding list.
-
-2/9/98 - Fixed a problem with terrain tiles not quite matching up perfectly.
-
-2/2/98 - Fix warning when compiling with c++ ... also successfully built
- with cygnus-g++. There should be nothing holding us back from
- using C++.
-
-1/30/98 - remove Scenery/geometry.c and Scenery/mesh.c
-
-1/28/98 - Dynamic unloading of scenery.
-
-1/26/98 - Debug message system.
-
-1/26/98 - Dynamic loading of scenery
-
-1/24/98 - Remove some of the unused files such as ls_sync.c
-
-1/23/98 - in all .h's change #ifdef FILE_H -> #ifdef _FILE_H
-
---------------------------------------------------------------------------
-
-1/22/98 - Released version 0.25
-
-1/19/98 - Compile with c++
-
-1/17/98 - Change all "type function();" to "type function( void );"
-
---------------------------------------------------------------------------
-
-1/16/98 - Release verison 0.23
-
-1/6/98 - Added FGwin32.mak (a MSVC++ Makefile for building win32 versions)
-
---------------------------------------------------------------------------
-
-1/5/98 - Released version 0.21
-
-12/31/97 - remove Unix dependencies from .../Time/fg_time.c
-
---------------------------------------------------------------------------
-
-12/30/97 - Released version 0.20
-
-12/30/97 - Released version 0.19
-
-12/30/97 - Event manager
-
-12/23/97 - First stab at a reasonable sky ... I'm going to probably
- leave this for now so I don't spend the rest of my life
- trying to tweak it.
-
-12/17/97 - Released version 0.18
-
-12/17/97 - Fix sun/moon initialization code so display lists aren't
- re-created at every Init().
-
-12/12/97 - Released verison 0.17
-
-12/10/97 - Released version 0.16
-
-12/9/97 - Released demtools version 0.01
-
-12/9/97 - Released version 0.15
-
-11/25/97 - Released version 0.14
-
-10/24/97 - Released version 0.13
-
-9/22/97 - Released version 0.12
-
-9/16/97 - Released version 0.11
-
/* INCLUDES */
/****************************************************************************/
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#ifdef FG_MATH_EXCEPTION_CLASH
# include <math.h>
#include STL_STRING
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fg_geodesy.hxx>
+#include <simgear/fgpath.hxx>
+
#include <Aircraft/aircraft.hxx>
#include <Controls/controls.hxx>
-#include <Debug/logstream.hxx>
-#include <Include/fg_constants.h>
#include <Main/options.hxx>
-#include <Math/fg_geodesy.hxx>
-#include <Misc/fgpath.hxx>
#include "Balloon.h"
// #include <conio.h>
#include <math.h>
+#include <simgear/constants.h>
+
#include <Aircraft/aircraft.hxx>
-#include <Include/fg_constants.h>
#include <Main/options.hxx>
#include <WeatherCM/FGLocalWeatherDatabase.h>
libBalloon_a_SOURCES = BalloonSim.cpp BalloonSim.h
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
// $Id$
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#ifdef FG_MATH_EXCEPTION_CLASH
# include <math.h>
#include STL_STRING
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fg_geodesy.hxx>
+#include <simgear/fgpath.hxx>
+
#include <Aircraft/aircraft.hxx>
#include <Controls/controls.hxx>
-#include <Debug/logstream.hxx>
-#include <Include/fg_constants.h>
#include <Main/options.hxx>
-#include <Math/fg_geodesy.hxx>
-#include <Misc/fgpath.hxx>
#include <FDM/JSBsim/FGFDMExec.h>
#include <FDM/JSBsim/FGAircraft.h>
#include <FDM/JSBsim/FGAuxiliary.h>
#include <FDM/JSBsim/FGDefs.h>
-
#include "JSBsim.hxx"
#ifdef FGFS
# ifndef __BORLANDC__
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# endif
# ifdef FG_HAVE_STD_INCLUDES
# include <cmath>
*******************************************************************************/
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# ifdef FG_HAVE_STD_INCLUDES
# include <fstream>
# include <vector>
INCLUDES
*******************************************************************************/
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# include STL_STRING
# ifdef FG_HAVE_STD_INCLUDES
# include <fstream>
*******************************************************************************/
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# ifdef FG_HAVE_STD_INCLUDES
# include <fstream>
# else
*******************************************************************************/
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# include STL_STRING
FG_USING_STD(string);
#else
*******************************************************************************/
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# ifdef FG_HAVE_STD_INCLUDES
# include <iostream>
# include <ctime>
*******************************************************************************/
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# include STL_STRING
# ifdef FG_HAVE_STD_INCLUDES
# include <fstream>
};
/******************************************************************************/
-#endif
\ No newline at end of file
+#endif
#include "FGDefs.h"
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# include STL_STRING
# ifdef FG_HAVE_STD_INCLUDES
# include <iostream>
#include "FGModel.h"
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# ifdef FG_HAVE_STD_INCLUDES
# include <iostream>
# include <fstream>
*******************************************************************************/
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# ifdef FG_HAVE_STD_INCLUDES
# include <cmath>
# else
*******************************************************************************/
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# ifdef FG_HAVE_STD_INCLUDES
# include <cmath>
# else
*******************************************************************************/
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# ifdef FG_HAVE_STD_INCLUDES
# include <cmath>
# else
*******************************************************************************/
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# include STL_STRING
# ifdef FG_HAVE_STD_INCLUDES
# include <fstream>
INCLUDES
*******************************************************************************/
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# include STL_STRING
# ifdef FG_HAVE_STD_INCLUDES
# include <fstream>
*******************************************************************************/
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# ifdef FG_HAVE_STD_INCLUDES
# include <cmath>
# else
*******************************************************************************/
#ifdef FGFS
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# ifdef FG_HAVE_STD_INCLUDES
# include <cmath>
# else
#ifdef FGFS
# pragma message("FGFS defined")
-# include <Include/compiler.h>
+# include <simgear/compiler.h>
# include STL_STRING
# ifdef FG_HAVE_STD_INCLUDES
# include <fstream>
string buffer;
};
-#endif
\ No newline at end of file
+#endif
#include "FGOutput.h"
#ifdef FGFS
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include STL_IOSTREAM
# ifdef FG_HAVE_STD_INCLUDES
# include <ctime>
#include "LaRCsim.hxx"
-#include <Include/fg_constants.h>
+#include <simgear/constants.h>
+#include <simgear/logstream.hxx>
#include <Aircraft/aircraft.hxx>
#include <Controls/controls.hxx>
-#include <Debug/logstream.hxx>
#include <FDM/flight.hxx>
#include <FDM/LaRCsim/ls_cockpit.h>
#include <FDM/LaRCsim/ls_generic.h>
$(AIRCRAFT_MODEL) \
ls_interface.c ls_interface.h
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
// $Id$
+#include <simgear/fg_geodesy.hxx>
+#include <simgear/point3d.hxx>
+#include <simgear/polar3d.hxx>
+
#include <Controls/controls.hxx>
#include <Main/options.hxx>
-#include <Math/fg_geodesy.hxx>
-#include <Math/point3d.hxx>
-#include <Math/polar3d.hxx>
#include "MagicCarpet.hxx"
LaRCsim.cxx LaRCsim.hxx \
MagicCarpet.cxx MagicCarpet.hxx
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
#include <stdio.h>
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fg_geodesy.hxx>
+
#include <FDM/LaRCsim/ls_interface.h>
-#include <Include/fg_constants.h>
#include <Main/options.hxx>
-#include <Math/fg_geodesy.hxx>
#include <Time/timestamp.hxx>
#include "External.hxx"
*/
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <math.h>
libGUI_a_SOURCES = gui.cxx gui.h
-INCLUDES += -I$(top_builddir) \
- -I$(top_builddir)/Lib \
- -I$(top_builddir)/Lib/plib/include \
- -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
# include <config.h>
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#ifdef FG_MATH_EXCEPTION_CLASH
# include <math.h>
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
#if defined(FX) && defined(XMESA)
# include <GL/xmesa.h>
#include <stdlib.h>
#include <string.h>
+#include <simgear/constants.h>
+#include <simgear/logstream.hxx>
+#include <simgear/fgpath.hxx>
+#include <simgear/screen-dump.hxx>
+
#include <Include/general.hxx>
-#include <Include/fg_constants.h>
-#include <Debug/logstream.hxx>
#include <Aircraft/aircraft.hxx>
#include <Airports/simple.hxx>
#include <Cockpit/panel.hxx>
#include <Main/options.hxx>
#include <Main/fg_init.hxx>
#include <Main/views.hxx>
-#include <Misc/fgpath.hxx>
#ifdef FG_NETWORK_OLK
#include <NetworkOLK/network.h>
#endif
-#include <Screen/screen-dump.hxx>
#include <Time/fg_time.hxx>
#if defined( WIN32 ) && !defined( __CYGWIN__ )
#ifndef _GUI_H_
#define _GUI_H_
+#include <GL/glut.h> // needed before pu.h
#include <plib/pu.h> // plib include
extern void guiInit();
+++ /dev/null
-/**************************************************************************
- * compiler.h -- C++ Compiler Portability Macros
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- **************************************************************************/
-
-#ifndef _COMPILER_H
-#define _COMPILER_H
-
-// What this file does.
-// (1) Defines macros for some STL includes which may be affected
-// by file name length limitations.
-// (2) Defines macros for some features not supported by all C++ compilers.
-// (3) Defines 'explicit' as a null macro if the compiler doesn't support
-// the explicit keyword.
-// (4) Defines 'typename' as a null macro if the compiler doesn't support
-// the typename keyword.
-// (5) Defines bool, true and false if the compiler doesn't do so.
-// (6) Defines FG_EXPLICIT_FUNCTION_TMPL_ARGS if the compiler
-// supports calling a function template by providing its template
-// arguments explicitly.
-// (7) Defines FG_NEED_AUTO_PTR if STL doesn't provide auto_ptr<>.
-// (8) Defines FG_NO_ARROW_OPERATOR if the compiler is unable
-// to support operator->() for iterators.
-// (9) Defines FG_USE_EXCEPTIONS if the compiler supports exceptions.
-// Note: no FlightGear code uses exceptions.
-// (10) Define FG_NAMESPACES if the compiler supports namespaces.
-// (11) FG_MATH_FN_IN_NAMESPACE_STD -- not used??
-// (12) Define FG_HAVE_STD if std namespace is supported.
-// (13) Defines FG_CLASS_PARTIAL_SPECIALIZATION if the compiler
-// supports partial specialization of class templates.
-// (14) Defines FG_HAVE_STD_INCLUDES to use ISO C++ Standard headers.
-// (15) Defines FG_HAVE_STREAMBUF if <streambuf> of <streambuf.h> are present.
-// (16) Define FG_MATH_EXCEPTION_CLASH if math.h defines an exception class
-// that clashes with the one defined in <stdexcept>.
-
-#ifdef __GNUC__
-# if __GNUC__ == 2
-# if __GNUC_MINOR__ < 8
-
- // g++-2.7.x
-# define STL_ALGORITHM <algorithm>
-# define STL_FUNCTIONAL <functional>
-# define STL_IOMANIP <iomanip.h>
-# define STL_IOSTREAM <iostream.h>
-# define STL_FSTREAM <fstream.h>
-# define STL_STDEXCEPT <stdexcept>
-# define STL_STRING <string>
-# define STL_STRSTREAM <strstream.h>
-
-# define FG_NEED_AUTO_PTR
-# define FG_NO_DEFAULT_TEMPLATE_ARGS
-# define FG_INCOMPLETE_FUNCTIONAL
-# define FG_NO_ARROW_OPERATOR
-
-# elif __GNUC_MINOR__ >= 8
-
- // g++-2.8.x and egcs-1.x
-# define FG_EXPLICIT_FUNCTION_TMPL_ARGS
-# define FG_NEED_AUTO_PTR
-# define FG_MEMBER_TEMPLATES
-# define FG_NAMESPACES
-# define FG_HAVE_STD
-# define FG_HAVE_STREAMBUF
-# define FG_CLASS_PARTIAL_SPECIALIZATION
-
-# define STL_ALGORITHM <algorithm>
-# define STL_FUNCTIONAL <functional>
-# define STL_IOMANIP <iomanip>
-# define STL_IOSTREAM <iostream>
-# define STL_FSTREAM <fstream>
-# define STL_STDEXCEPT <stdexcept>
-# define STL_STRING <string>
-# define STL_STRSTREAM <strstream>
-
-# endif
-# else
-# error Time to upgrade. GNU compilers < 2.7 not supported
-# endif
-#endif
-
-//
-// Metrowerks
-//
-#if defined(__MWERKS__)
-/*
- CodeWarrior compiler from Metrowerks, Inc.
-*/
-# define FG_HAVE_TRAITS
-# define FG_HAVE_STD_INCLUDES
-# define FG_HAVE_STD
-# define FG_NAMESPACES
-
-# define STL_ALGORITHM <algorithm>
-# define STL_FUNCTIONAL <functional>
-# define STL_IOMANIP <iomanip>
-# define STL_IOSTREAM <iostream>
-# define STL_FSTREAM <fstream>
-# define STL_STDEXCEPT <stdexcept>
-# define STL_STRING <string>
-
-// Temp:
-# define bcopy(from, to, n) memcpy(to, from, n)
-
-// -rp- please use FG_MEM_COPY everywhere !
-# define FG_MEM_COPY(to,from,n) memcpy(to, from, n)
-
-// -dw- currently used glut has no game mode stuff
-# define GLUT_WRONG_VERSION
-#endif
-
-//
-// Microsoft compilers.
-//
-#ifdef _MSC_VER
-# if _MSC_VER == 1200 // msvc++ 6.0
-# define FG_NAMESPACES
-# define FG_HAVE_STD
-# define FG_HAVE_STD_INCLUDES
-# define FG_HAVE_STREAMBUF
-
-# define STL_ALGORITHM <algorithm>
-# define STL_FUNCTIONAL <functional>
-# define STL_IOMANIP <iomanip>
-# define STL_IOSTREAM <iostream>
-# define STL_FSTREAM <fstream>
-# define STL_STDEXCEPT <stdexcept>
-# define STL_STRING <string>
-# define STL_STRSTREAM <strstream>
-
-# pragma warning(disable: 4786) // identifier was truncated to '255' characters
-# pragma warning(disable: 4244) // conversion from double to float
-# pragma warning(disable: 4305) //
-
-# elif _MSC_VER == 1100 // msvc++ 5.0
-# error MSVC++ 5.0 still to be supported...
-# else
-# error What version of MSVC++ is this?
-# endif
-#endif
-
-#ifdef __BORLANDC__
-# if defined(HAVE_SGI_STL_PORT)
-
-// Use quotes around long file names to get around Borland's include hackery
-
-# define STL_ALGORITHM "algorithm"
-# define STL_FUNCTIONAL "functional"
-
-# define FG_MATH_EXCEPTION_CLASH
-
-# else
-
-# define STL_ALGORITHM <algorithm>
-# define STL_FUNCTIONAL <functional>
-# define STL_IOMANIP <iomanip>
-# define STL_STDEXCEPT <stdexcept>
-# define STL_STRSTREAM <strstream>
-
-# define FG_INCOMPLETE_FUNCTIONAL
-
-# endif // HAVE_SGI_STL_PORT
-
-# define STL_IOSTREAM <iostream>
-# define STL_FSTREAM <fstream>
-# define STL_STRING <string>
-# define FG_NO_DEFAULT_TEMPLATE_ARGS
-# define FG_NAMESPACES
-// # define FG_HAVE_STD
-
-#endif // __BORLANDC__
-
-//
-// Native SGI compilers
-//
-
-#if defined ( sgi ) && !defined( __GNUC__ )
-# define FG_HAVE_NATIVE_SGI_COMPILERS
-
-# define FG_EXPLICIT_FUNCTION_TMPL_ARGS
-# define FG_NEED_AUTO_PTR
-# define FG_MEMBER_TEMPLATES
-# define FG_NAMESPACES
-# define FG_HAVE_STD
-# define FG_CLASS_PARTIAL_SPECIALIZATION
-
-# define STL_ALGORITHM <algorithm>
-# define STL_FUNCTIONAL <functional>
-# define STL_IOMANIP <iomanip.h>
-# define STL_IOSTREAM <iostream.h>
-# define STL_FSTREAM <fstream.h>
-# define STL_STDEXCEPT <stdexcept>
-# define STL_STRING <string>
-# define STL_STRSTREAM <strstream>
-
-#endif // Native SGI compilers
-
-
-#if defined ( sun )
-# include <strings.h>
-# include <memory.h>
-# if defined ( __cplusplus )
- // typedef unsigned int size_t;
- extern "C" {
- extern void *memmove(void *, const void *, size_t);
- }
-# else
- extern void *memmove(void *, const void *, size_t);
-# endif // __cplusplus
-#endif // sun
-
-//
-// No user modifiable definitions beyond here.
-//
-
-#ifdef FG_NEED_EXPLICIT
-# define explicit
-#endif
-
-#ifdef FG_NEED_TYPENAME
-# define typename
-#endif
-
-#ifdef FG_NEED_MUTABLE
-# define mutable
-#endif
-
-#ifdef FG_NEED_BOOL
- typedef int bool;
-# define true 1
-# define false 0
-#endif
-
-#ifdef FG_EXPLICIT_FUNCTION_TMPL_ARGS
-# define FG_NULL_TMPL_ARGS <>
-#else
-# define FG_NULL_TMPL_ARGS
-#endif
-
-#ifdef FG_CLASS_PARTIAL_SPECIALIZATION
-# define FG_TEMPLATE_NULL template<>
-#else
-# define FG_TEMPLATE_NULL
-#endif
-
-// FG_NO_NAMESPACES is a hook so that users can disable namespaces
-// without having to edit library headers.
-#if defined(FG_NAMESPACES) && !defined(FG_NO_NAMESPACES)
-# define FG_NAMESPACE(X) namespace X {
-# define FG_NAMESPACE_END }
-# define FG_USING_NAMESPACE(X) using namespace X
-# else
-# define FG_NAMESPACE(X)
-# define FG_NAMESPACE_END
-# define FG_USING_NAMESPACE(X)
-#endif
-
-# ifdef FG_HAVE_STD
-# define FG_USING_STD(X) using std::X
-# define STD std
-# else
-# define FG_USING_STD(X)
-# define STD
-# endif
-
-// Additional <functional> implementation from SGI STL 3.11
-// Adapter function objects: pointers to member functions
-#ifdef FG_INCOMPLETE_FUNCTIONAL
-
-template <class _Ret, class _Tp>
-class const_mem_fun_ref_t
-#ifndef __BORLANDC__
- : public unary_function<_Tp,_Ret>
-#endif // __BORLANDC__
-{
-public:
- explicit const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) {}
- _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); }
-private:
- _Ret (_Tp::*_M_f)() const;
-};
-
-template <class _Ret, class _Tp>
-inline const_mem_fun_ref_t<_Ret,_Tp> mem_fun_ref(_Ret (_Tp::*__f)() const)
- { return const_mem_fun_ref_t<_Ret,_Tp>(__f); }
-
-#endif // FG_INCOMPLETE_FUNCTIONAL
-
-#endif // _COMPILER_H
+++ /dev/null
-// fg_constants.h -- various constant definitions
-//
-// Written by Curtis Olson, started July 1997.
-//
-// Copyright (C) 1997 Curtis L. Olson - curt@flightgear.org
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 2 of the
-// License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-//
-// $Id$
-
-
-#ifndef _FG_CONSTANTS_H
-#define _FG_CONSTANTS_H
-
-
-/*
-#ifndef __cplusplus
-# error This library requires C++
-#endif
-*/
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "Include/compiler.h"
-
-#ifdef FG_HAVE_STD_INCLUDES
-# include <cmath>
-#else
-# ifdef FG_MATH_EXCEPTION_CLASH
-# define exception C_exception
-# endif
-# include <math.h>
-#endif
-
-// This should be defined via autoconf in configure.in
-#ifndef VERSION
-#define VERSION "\"not defined\""
-#endif
-
-
-// Make sure PI is defined in its various forms
-
-// PI, only PI, and nothing but PI
-#ifdef M_PI
-# define FG_PI M_PI
-#else
-# define FG_PI 3.14159265358979323846
-#endif
-
-// 2 * PI
-#define FG_2PI 6.28318530717958647692
-
-// PI / 2
-#ifdef M_PI_2
-# define FG_PI_2 M_PI_2
-#else
-# define FG_PI_2 1.57079632679489661923
-#endif
-
-// PI / 4
-#define FG_PI_4 0.78539816339744830961
-
-#ifndef M_E
-# define M_E 2.7182818284590452354
-#endif
-
-// ONE_SECOND is pi/180/60/60, or about 100 feet at earths' equator
-#define ONE_SECOND 4.848136811E-6
-
-
-// Radius of Earth in kilometers at the equator. Another source had
-// 6378.165 but this is probably close enough
-#define EARTH_RAD 6378.155
-
-
-// Earth parameters for WGS 84, taken from LaRCsim/ls_constants.h
-
-// Value of earth radius from [8]
-#define EQUATORIAL_RADIUS_FT 20925650. // ft
-#define EQUATORIAL_RADIUS_M 6378138.12 // meter
-// Radius squared
-#define RESQ_FT 437882827922500. // ft
-#define RESQ_M 40680645877797.1344 // meter
-
-// Value of earth flattening parameter from ref [8]
-//
-// Note: FP = f
-// E = 1-f
-// EPS = sqrt(1-(1-f)^2)
-//
-
-#define FP 0.003352813178
-#define E 0.996647186
-#define EPS 0.081819221
-#define INVG 0.031080997
-
-// Time Related Parameters
-
-#define MJD0 2415020.0
-#define J2000 (2451545.0 - MJD0)
-#define SIDRATE .9972695677
-
-
-// Conversions
-
-// Degrees to Radians
-#define DEG_TO_RAD 0.017453292 // deg*pi/180 = rad
-
-// Radians to Degrees
-#define RAD_TO_DEG 57.29577951 // rad*180/pi = deg
-
-// Arc seconds to radians // (arcsec*pi)/(3600*180) = rad
-#define ARCSEC_TO_RAD 4.84813681109535993589e-06
-
-// Radians to arc seconds // (rad*3600*180)/pi = arcsec
-#define RAD_TO_ARCSEC 206264.806247096355156
-
-// Feet to Meters
-#define FEET_TO_METER 0.3048
-
-// Meters to Feet
-#define METER_TO_FEET 3.28083989501312335958
-
-// Meters to Nautical Miles, 1 nm = 6076.11549 feet
-#define METER_TO_NM 0.00053995680
-
-// Nautical Miles to Meters
-#define NM_TO_METER 1852.0000
-
-// Radians to Nautical Miles, 1 nm = 1/60 of a degree
-#define NM_TO_RAD 0.00029088820866572159
-
-// Nautical Miles to Radians
-#define RAD_TO_NM 3437.7467707849392526
-
-// For divide by zero avoidance, this will be close enough to zero
-#define FG_EPSILON 0.0000001
-
-
-// Timing constants for Flight Model updates
-#define NEW_DEFAULT_MODEL_HZ 120
-
-
-// Field of view limits
-#define FG_FOV_MIN 0.1
-#define FG_FOV_MAX 179.9
-
-
-// Maximum nodes per tile
-#define FG_MAX_NODES 2000
-
-
-#endif // _FG_CONSTANTS_H
-
-
+++ /dev/null
-#ifndef _FG_TRAITS_HXX
-#define _FG_TRAITS_HXX
-
-#include "Include/compiler.h"
-
-#ifndef FG_HAVE_TRAITS
-
-// Dummy up some char traits for now.
-template<class charT> struct char_traits{};
-
-FG_TEMPLATE_NULL
-struct char_traits<char>
-{
- typedef char char_type;
- typedef int int_type;
- typedef streampos pos_type;
- typedef streamoff off_type;
-
- static int_type eof() { return EOF; }
-};
-#endif // FG_HAVE_TRAITS
-
-#endif // _FG_TRAITS_HXX
+++ /dev/null
-// fg_types.hxx -- commonly used types I don't want to have to keep redefining
-//
-// Written by Curtis Olson, started March 1999.
-//
-// Copyright (C) 1999 Curtis L. Olson - curt@flightgear.org
-//
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 2 of the
-// License, or (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-//
-// $Id$
-
-
-#ifndef _CONSTRUCT_TYPES_HXX
-#define _CONSTRUCT_TYPES_HXX
-
-
-#ifndef __cplusplus
-# error This library requires C++
-#endif
-
-
-#include <Include/compiler.h>
-
-#include STL_STRING
-#include <vector>
-
-#include <Math/point3d.hxx>
-
-FG_USING_STD(vector);
-FG_USING_STD(string);
-
-
-typedef vector < int > int_list;
-typedef int_list::iterator int_list_iterator;
-typedef int_list::const_iterator const_int_list_iterator;
-
-typedef vector < Point3D > point_list;
-typedef point_list::iterator point_list_iterator;
-typedef point_list::const_iterator const_point_list_iterator;
-
-typedef vector < string > string_list;
-typedef string_list::iterator string_list_iterator;
-typedef string_list::const_iterator const_string_list_iterator;
-
-
-class point2d {
-public:
- union {
- double x;
- double dist;
- double lon;
- };
- union {
- double y;
- double theta;
- double lat;
- };
-};
-
-
-#endif // _CONSTRUCT_TYPES_HXX
-
+++ /dev/null
-/**************************************************************************
- * fg_zlib.h -- a zlib wrapper to replace zlib calls with normal uncompressed
- * calls for systems that have problems building zlib.
- *
- * Written by Curtis Olson, started April 1998.
- *
- * Copyright (C) 1998 Curtis L. Olson - curt@me.umn.edu
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- **************************************************************************/
-
-
-#ifndef _FG_ZLIB_H
-#define _FG_ZLIB_H
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-
-#ifdef AVOID_USING_ZLIB
-
- #include <stdio.h>
-
- #define fgFile FILE *
-
- /* fgFile fgopen(char *filename, const char *flags) */
- #define fgopen(P, F) (fopen((P), (F)))
-
- /* int fgseek(fgFile *file, long offset, int whence) */
- #define fgseek(F, O, W) (fseek((F), (O), (W)))
-
- /* fgread(fgFile file, void *buf, int size); */
- #define fgread(F, B, S) (fread((B), (S), 1, (F)))
-
- /* int fggets(fgFile fd, char *buffer, int len) */
- #define fggets(F, B, L) (fgets((B), (L), (F)))
-
- /* int fgclose(fgFile fd) */
- #define fgclose(F) (fclose((F)))
-#else
-
- #include <zlib/zlib.h>
-
- #define fgFile gzFile
-
- /* fgFile fgopen(char *filename, const char *flags) */
- #define fgopen(P, F) (gzopen((P), (F)))
-
- /* int fgseek(fgFile *file, long offset, int whence) */
- #define fgseek(F, O, W) (gzseek((F), (O), (W)))
-
- /* fgread(fgFile file, void *buf, int size); */
- #define fgread(F, B, S) (gzread((F), (B), (S)))
-
- /* int fggets(fgFile fd, char *buffer, int len) */
- #define fggets(F, B, L) (gzgets((F), (B), (L)))
-
- /* int fgclose(fgFile fd) */
- #define fgclose(F) (gzclose((F)))
-
-#endif /* #ifdef AVOID_USING_ZLIB #else #endif */
-
-
-#endif /* _FG_ZLIB_H */
-
-
js_demo_SOURCES = js_demo.cxx
-INCLUDES += -I$(top_builddir) \
- -I$(top_builddir)/Lib \
- -I$(top_builddir)/Lib/plib/include \
- -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
# include <windows.h>
#endif
+#include <simgear/logstream.hxx>
+
#include <Aircraft/aircraft.hxx>
-#include <Debug/logstream.hxx>
#include <Main/options.hxx>
#if defined( ENABLE_PLIB_JOYSTICK )
# include <plib/js.h> // plib include
#elif defined( ENABLE_GLUT_JOYSTICK )
# include <GL/glut.h>
-# include <XGL/xgl.h>
+# include <simgear/xgl.h>
#endif
if ENABLE_UNIX_SERIAL
-SERIAL_LIBS = $(top_builddir)/Lib/Serial/libSerial.a
+SERIAL_LIBS = -lsgserial
else
SERIAL_LIBS =
endif
if ENABLE_OLD_WEATHER
-WEATHER_LIBS = $(top_builddir)/Simulator/Weather/libWeather.a
+WEATHER_LIBS = $(top_builddir)/src/Weather/libWeather.a
else
-WEATHER_LIBS = $(top_builddir)/Simulator/WeatherCM/libWeatherCM.a
+WEATHER_LIBS = $(top_builddir)/src/WeatherCM/libWeatherCM.a
endif
if ENABLE_NETWORK_OLK
NETWORK_LIBS = \
- $(top_builddir)/Simulator/Network/libNetwork.a \
- $(top_builddir)/Simulator/NetworkOLK/libNetworkOLK.a
+ $(top_builddir)/src/Network/libNetwork.a \
+ $(top_builddir)/src/NetworkOLK/libNetworkOLK.a
else
NETWORK_LIBS = \
- $(top_builddir)/Simulator/Network/libNetwork.a
+ $(top_builddir)/src/Network/libNetwork.a
endif
if OLD_AUTOMAKE
# fg_serial.cxx fg_serial.hxx \
fgfs_LDADD = \
- $(top_builddir)/Simulator/Aircraft/libAircraft.a \
- $(top_builddir)/Simulator/Astro/libAstro.a \
- $(top_builddir)/Simulator/Autopilot/libAutopilot.a \
- $(top_builddir)/Simulator/Cockpit/libCockpit.a \
- $(top_builddir)/Simulator/Controls/libControls.a \
- $(top_builddir)/Simulator/FDM/libFlight.a \
- $(top_builddir)/Simulator/FDM/Balloon/libBalloon.a \
- $(top_builddir)/Simulator/FDM/JSBsim/libJSBsim.a \
- $(top_builddir)/Simulator/FDM/LaRCsim/libLaRCsim.a \
- $(top_builddir)/Simulator/GUI/libGUI.a \
- $(top_builddir)/Simulator/Scenery/libScenery.a \
- $(top_builddir)/Simulator/Airports/libAirports.a \
+ $(top_builddir)/src/Aircraft/libAircraft.a \
+ $(top_builddir)/src/Astro/libAstro.a \
+ $(top_builddir)/src/Autopilot/libAutopilot.a \
+ $(top_builddir)/src/Cockpit/libCockpit.a \
+ $(top_builddir)/src/Controls/libControls.a \
+ $(top_builddir)/src/FDM/libFlight.a \
+ $(top_builddir)/src/FDM/Balloon/libBalloon.a \
+ $(top_builddir)/src/FDM/JSBsim/libJSBsim.a \
+ $(top_builddir)/src/FDM/LaRCsim/libLaRCsim.a \
+ $(top_builddir)/src/GUI/libGUI.a \
+ $(top_builddir)/src/Scenery/libScenery.a \
+ $(top_builddir)/src/Airports/libAirports.a \
$(NETWORK_LIBS) \
- $(top_builddir)/Simulator/Objects/libObjects.a \
- $(top_builddir)/Simulator/Clouds/libClouds.a \
- $(top_builddir)/Simulator/Time/libTime.a \
+ $(top_builddir)/src/Objects/libObjects.a \
+ $(top_builddir)/src/Clouds/libClouds.a \
+ $(top_builddir)/src/Time/libTime.a \
$(WEATHER_LIBS) \
- $(top_builddir)/Simulator/Joystick/libJoystick.a \
+ $(top_builddir)/src/Joystick/libJoystick.a \
$(SERIAL_LIBS) \
- $(top_builddir)/Lib/Screen/libScreen.a \
- $(top_builddir)/Lib/Math/libMath.a \
- $(top_builddir)/Lib/Bucket/libBucket.a \
- $(top_builddir)/Lib/Debug/libDebug.a \
+ -lsgscreen -lsgmath -lsgbucket -lsgdebug -lsgmisc \
-lplibpu -lplibfnt -lplibssg -lplibsg \
- $(top_builddir)/Lib/Misc/libMisc.a \
- $(top_builddir)/Lib/zlib/libz.a \
+ -lz \
$(opengl_LIBS) \
$(audio_LIBS)
-
-INCLUDES += \
- -I$(top_builddir) \
- -I$(top_builddir)/Lib \
- -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
#include <stdio.h>
#include <stdlib.h>
# define _G_NO_EXTERN_TEMPLATES
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include STL_STRING
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fg_geodesy.hxx>
+#include <simgear/point3d.hxx>
+#include <simgear/polar3d.hxx>
+#include <simgear/fgpath.hxx>
+
#include <Aircraft/aircraft.hxx>
#include <Airports/simple.hxx>
#include <Astro/sky.hxx>
#include <FDM/JSBsim.hxx>
#include <FDM/LaRCsim.hxx>
#include <FDM/MagicCarpet.hxx>
-#include <Include/fg_constants.h>
#include <Include/general.hxx>
#include <Joystick/joystick.hxx>
-#include <Math/fg_geodesy.hxx>
-#include <Math/point3d.hxx>
-#include <Math/polar3d.hxx>
-#include <Misc/fgpath.hxx>
#include <Scenery/scenery.hxx>
#include <Scenery/tilemgr.hxx>
#include <Time/event.hxx>
// $Id$
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include STL_STRING
-#include <Debug/logstream.hxx>
-#include <Include/fg_types.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/fg_types.hxx>
+
#include <Main/options.hxx>
#include <Network/iochannel.hxx>
#define _FG_IO_HXX
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#include <Network/iochannel.hxx>
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
#if defined(FX) && defined(XMESA)
#include <GL/xmesa.h>
#include <plib/pu.h> // plib include
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fgpath.hxx>
+
#include <Aircraft/aircraft.hxx>
#include <Astro/solarsystem.hxx>
#include <Astro/sky.hxx>
#include <Autopilot/autopilot.hxx>
#include <Cockpit/hud.hxx>
#include <GUI/gui.h>
-#include <Include/fg_constants.h>
-#include <Misc/fgpath.hxx>
#include <Scenery/tilemgr.hxx>
#include <Objects/materialmgr.hxx>
#include <Time/fg_time.hxx>
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
// Handle keyboard events
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
+
#include <stdio.h>
#include <string.h>
#include <string>
# include <plib/sm.h> // plib include
#endif
-#include <Include/fg_constants.h> // for VERSION
+#include <simgear/constants.h> // for VERSION
+#include <simgear/logstream.hxx>
+#include <simgear/fg_geodesy.hxx>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+#include <simgear/fg_random.h>
+#include <simgear/fgpath.hxx>
+
#include <Include/general.hxx>
-#include <Debug/logstream.hxx>
#include <Aircraft/aircraft.hxx>
#include <Astro/sky.hxx>
#include <Astro/stars.hxx>
#include <Cockpit/cockpit.hxx>
#include <GUI/gui.h>
#include <Joystick/joystick.hxx>
-#include <Math/fg_geodesy.hxx>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
-#include <Math/fg_random.h>
-#include <Misc/fgpath.hxx>
#ifdef FG_NETWORK_OLK
#include <NetworkOLK/network.h>
#endif
bool global_fullscreen = true;
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <math.h> // rint()
#include <stdio.h>
#include STL_STRING
-#include <Debug/logstream.hxx>
-#include <Misc/fgstream.hxx>
-#include <Include/fg_constants.h>
+#include <simgear/logstream.hxx>
+#include <simgear/fgstream.hxx>
+#include <simgear/constants.h>
+
#include <Include/general.hxx>
#include <Cockpit/cockpit.hxx>
#include <FDM/flight.hxx>
#endif
#include <Time/fg_time.hxx>
+#include "views.hxx"
#include "options.hxx"
FG_USING_STD(string);
# include <config.h>
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#ifdef HAVE_WINDOWS_H
# include <windows.h>
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
#if defined(FX) && defined(XMESA)
extern bool global_fullscreen;
#endif
-#include <Include/fg_types.hxx>
+#include <simgear/fg_types.hxx>
#include STL_STRING
#include <vector>
FG_USING_STD(vector);
FG_USING_STD(string);
+#define NEW_DEFAULT_MODEL_HZ 120
+
+
class fgOPTIONS {
public:
#include <iostream>
-#include <Include/fg_types.hxx>
-#include <Include/fg_constants.h>
+#include <simgear/fg_types.hxx>
+#include <simgear/constants.h>
+
#include <Aircraft/aircraft.hxx>
#include <Controls/controls.hxx>
#include <Autopilot/autopilot.hxx>
# include <Weather/weather.hxx>
#endif
-
#include "options.hxx"
#include "save.hxx"
#include "fg_init.hxx"
# include <config.h>
#endif
-#include <Include/fg_types.hxx>
+#include <simgear/fg_types.hxx>
#include <iostream>
FG_USING_NAMESPACE(std);
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
#include <string.h>
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/fg_random.h>
+#include <simgear/fgpath.hxx>
+
#include <Main/options.hxx>
-#include <Math/fg_random.h>
-#include <Misc/fgpath.hxx>
#include <Objects/texload.h>
#include "splash.hxx"
#include <plib/ssg.h> // plib include
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/point3d.hxx>
+#include <simgear/polar3d.hxx>
+#include <simgear/vector.hxx>
+
#include <Aircraft/aircraft.hxx>
#include <Cockpit/panel.hxx>
-#include <Debug/logstream.hxx>
-#include <Include/fg_constants.h>
-#include <Math/point3d.hxx>
-#include <Math/polar3d.hxx>
-#include <Math/vector.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_time.hxx>
# error This library requires C++
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <list>
#include <plib/sg.h> // plib include
#include <FDM/flight.hxx>
-#include <Math/point3d.hxx>
+#include <simgear/point3d.hxx>
#include <Time/fg_time.hxx>
#include <Time/light.hxx>
// used in views.cxx and tilemgr.cxx
#define USE_FAST_FOV_CLIP
+#define FG_FOV_MIN 0.1
+#define FG_FOV_MAX 179.9
// Define a structure containing view information
pve.cxx pve.hxx \
rul.cxx rul.hxx
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
// $Id$
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include STL_STRING
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
#include "fg_file.hxx"
# error This library requires C++
#endif
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#include <string>
// $Id$
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include STL_STRING
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/serial.hxx>
+
#include <Aircraft/aircraft.hxx>
-#include <Serial/serial.hxx>
#include "fg_serial.hxx"
# error This library requires C++
#endif
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#include <string>
// # include <time.h>
// #endif
-#include <Serial/serial.hxx>
+#include <simgear/serial.hxx>
#include "iochannel.hxx"
#include "protocol.hxx"
// $Id$
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <sys/time.h> // select()
#include <sys/types.h> // socket(), bind(), select(), accept()
#include STL_STRING
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
#include "fg_socket.hxx"
# error This library requires C++
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <string>
-#include <Include/fg_types.hxx>
+#include <simgear/fg_types.hxx>
#include "iochannel.hxx"
#include "protocol.hxx"
// $Id$
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/fg_geodesy.hxx>
+
#include <FDM/flight.hxx>
-#include <Math/fg_geodesy.hxx>
#include <Time/fg_time.hxx>
#include "iochannel.hxx"
#define _FG_GARMIN_HXX
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#include STL_STRING
#define _IOCHANNEL_HXX
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#include "protocol.hxx"
// $Id$
-#include <Debug/logstream.hxx>
-#include <Math/fg_geodesy.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/fg_geodesy.hxx>
+
#include <Time/fg_time.hxx>
#include "iochannel.hxx"
#define _FG_NATIVE_HXX
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#include STL_STRING
#include <FDM/flight.hxx>
+
#include "protocol.hxx"
FG_USING_STD(string);
// $Id$
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/fg_geodesy.hxx>
+
#include <FDM/flight.hxx>
-#include <Math/fg_geodesy.hxx>
#include <Time/fg_time.hxx>
#include "iochannel.hxx"
#define _FG_NMEA_HXX
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#include STL_STRING
// $Id$
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
#include "iochannel.hxx"
#include "protocol.hxx"
#define _PROTOCOL_HXX
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#include STL_STRING
#include <vector>
// $Id$
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/fg_geodesy.hxx>
+
#include <FDM/flight.hxx>
-#include <Math/fg_geodesy.hxx>
#include <Time/fg_time.hxx>
#include "iochannel.hxx"
#define _FG_PVE_HXX
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#include STL_STRING
// $Id$
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/fg_geodesy.hxx>
+
#include <FDM/flight.hxx>
-#include <Math/fg_geodesy.hxx>
#include <Time/fg_time.hxx>
#include "iochannel.hxx"
#define _FG_RUL_HXX
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#include STL_STRING
libNetworkOLK_a_SOURCES = \
net_send.cxx net_hud.cxx network.cxx network.h fgd.h
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
# include <values.h> // for MAXINT
#endif
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
-#include <Debug/logstream.hxx>
#include <GUI/gui.h>
-#include <Include/fg_constants.h>
#include <Main/options.hxx>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
#include "fgd.h"
/* I prefer NHV's decl. */
+#include <simgear/constants.h>
+
#include <Cockpit/hud.hxx>
-#include <Include/fg_constants.h>
#include <plib/ssg.h>
#include <Main/views.hxx>
# include <values.h> // for MAXINT
#endif
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fg_random.h>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+
#include <Aircraft/aircraft.hxx>
-#include <Debug/logstream.hxx>
#include <GUI/gui.h>
-#include <Include/fg_constants.h>
#include <Main/options.hxx>
-#include <Math/fg_random.h>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
#include <Scenery/scenery.hxx>
#include <Time/fg_timer.hxx>
//
// $Id$
-#ifndef NETWORK_H
-#define NETWORK_H
+#ifndef NETWORK_OLK_H
+#define NETWORK_OLK_H
#define FGD
obj.cxx obj.hxx \
texload.c texload.h colours.h
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
// $Id$
-#include <Include/fg_constants.h>
-#include <Math/mat3.h>
-#include <Math/point3d.hxx>
+#include <simgear/constants.h>
+#include <simgear/mat3.h>
+#include <simgear/point3d.hxx>
+
#include <Scenery/tileentry.hxx>
#include "fragment.hxx"
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <vector>
-#include <Include/fg_constants.h>
-#include <Math/point3d.hxx>
+#include <simgear/constants.h>
+#include <simgear/point3d.hxx>
FG_USING_STD(vector);
# include <config.h>
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#ifdef FG_MATH_EXCEPTION_CLASH
# include <math.h>
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
#include STL_STRING
-#include <Debug/logstream.hxx>
-#include <Misc/fgpath.hxx>
-#include <Misc/fgstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/fgpath.hxx>
+#include <simgear/fgstream.hxx>
#include "material.hxx"
#include "texload.h"
# include <windows.h>
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
#include STL_STRING // Standard C++ string library
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <string.h>
#include STL_STRING
-#include <Debug/logstream.hxx>
-#include <Misc/fgpath.hxx>
-#include <Misc/fgstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/fgpath.hxx>
+#include <simgear/fgstream.hxx>
+
#include <Main/options.hxx>
#include <Main/views.hxx>
#include <Scenery/tileentry.hxx>
# include <windows.h>
#endif
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
#include STL_STRING // Standard C++ string library
#include <map> // STL associative "array"
// extern "C" void *memset(void *, int, size_t);
// #endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include STL_STRING
#include <map> // STL
#include <vector> // STL
#include <ctype.h> // isdigit()
-#include <Debug/logstream.hxx>
-#include <Misc/fgstream.hxx>
-#include <Include/fg_constants.h>
+#include <simgear/logstream.hxx>
+#include <simgear/fgstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/mat3.h>
+#include <simgear/fg_geodesy.hxx>
+#include <simgear/fg_random.h>
+#include <simgear/point3d.hxx>
+#include <simgear/polar3d.hxx>
+#include <simgear/stopwatch.hxx>
+#include <simgear/texcoord.hxx>
+
#include <Main/options.hxx>
-#include <Math/mat3.h>
-#include <Math/fg_geodesy.hxx>
-#include <Math/fg_random.h>
-#include <Math/point3d.hxx>
-#include <Math/polar3d.hxx>
-#include <Misc/stopwatch.hxx>
-#include <Misc/texcoord.hxx>
#include <Scenery/tileentry.hxx>
#include "materialmgr.hxx"
# include <config.h>
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
// #ifdef HAVE_WINDOWS_H
// # include <windows.h>
FG_USING_STD(string);
+// duplicated from the TerraGear tools
+#define FG_MAX_NODES 2000
+
+
// Load a .obj file and build the fragment list
ssgBranch *fgObjLoad(const string& path, FGTileEntry *tile, const bool is_base);
#include <stdlib.h>
#include <string.h>
-#include <Include/fg_zlib.h>
+#include <simgear/fg_zlib.h>
#include "texload.h"
#include "colours.h"
tileentry.cxx tileentry.hxx \
tilemgr.cxx tilemgr.hxx
-INCLUDES += \
- -I$(top_builddir) \
- -I$(top_builddir)/Lib \
- -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
#include <stdio.h>
#include <string.h>
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
+
#include <Main/options.hxx>
-// #include "obj.hxx"
#include "scenery.hxx"
-// #include "texload.h"
// Temporary hack until we get a better texture management system running
#endif
-#include <Math/point3d.hxx>
+#include <simgear/point3d.hxx>
// Define a structure containing global scenery parameters
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
#include <plib/ssg.h> // plib include
-#include <Debug/logstream.hxx>
-#include <Misc/fgstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/fgstream.hxx>
+#include <simgear/newbucket.hxx>
+#include <simgear/fgpath.hxx>
+
#include <Airports/genapt.hxx>
-#include <Bucket/newbucket.hxx>
#include <Clouds/cloudobj.hxx>
#include <Main/options.hxx>
#include <Main/views.hxx>
-#include <Misc/fgpath.hxx>
#include <Objects/obj.hxx>
#include <Scenery/scenery.hxx> // for scenery.center
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
#include <vector>
-#include <Bucket/newbucket.hxx>
-#include <Math/point3d.hxx>
+#include <simgear/newbucket.hxx>
+#include <simgear/point3d.hxx>
#include "tileentry.hxx"
// $Id$
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#ifdef FG_MATH_EXCEPTION_CLASH
# include <math.h>
#include STL_FUNCTIONAL
#include STL_ALGORITHM
-#include <Debug/logstream.hxx>
-#include <Bucket/newbucket.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/newbucket.hxx>
#include "tileentry.hxx"
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <vector>
#include STL_STRING
#include <plib/ssg.h> // plib includes
-#include <Bucket/newbucket.hxx>
-#include <Math/point3d.hxx>
+#include <simgear/newbucket.hxx>
+#include <simgear/point3d.hxx>
+
#include <Objects/fragment.hxx>
#if defined( sgi )
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
-#include <Aircraft/aircraft.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fg_geodesy.hxx>
+#include <simgear/mat3.h>
+#include <simgear/point3d.hxx>
+#include <simgear/polar3d.hxx>
+#include <simgear/vector.hxx>
-#include <Debug/logstream.hxx>
-// #include <Bucket/bucketutils.hxx>
-#include <Include/fg_constants.h>
+#include <Aircraft/aircraft.hxx>
#include <Main/options.hxx>
#include <Main/views.hxx>
-#include <Math/fg_geodesy.hxx>
-#include <Math/mat3.h>
-#include <Math/point3d.hxx>
-#include <Math/polar3d.hxx>
-#include <Math/vector.hxx>
#include <Objects/materialmgr.hxx>
#include <Objects/obj.hxx>
# error This library requires C++
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <list>
-#include <Bucket/newbucket.hxx>
+#include <simgear/newbucket.hxx>
FG_USING_STD(list);
sunpos.cxx sunpos.hxx \
timestamp.hxx
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
# include <config.h>
#endif
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#ifdef FG_MATH_EXCEPTION_CLASH
# include <math.h>
// contains milliseconds
#endif
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
#include "event.hxx"
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
+
#include <Include/fg_callback.hxx>
#include <deque> // STL double ended queue
# include <config.h>
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#ifdef FG_HAVE_STD_INCLUDES
# include <cmath>
# include <sys/time.h> // for get/setitimer, gettimeofday, struct timeval
#endif
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fgpath.hxx>
+
#include <Astro/sky.hxx>
#include <Astro/solarsystem.hxx>
#include <FDM/flight.hxx>
-#include <Include/fg_constants.h>
#include <Main/options.hxx>
-#include <Misc/fgpath.hxx>
#include <Time/light.hxx>
#include "fg_time.hxx"
#include <GL/glut.h>
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
+
#ifdef FG_HAVE_STD_INCLUDES
# include <ctime>
#else
#ifndef _GEOCOORD_H_
#define _GEOCOORD_H_
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <math.h>
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
#ifdef FG_MATH_EXCEPTION_CLASH
# define exception c_exception
#include <string>
FG_USING_STD(string);
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fg_geodesy.hxx>
+#include <simgear/interpolater.hxx>
+#include <simgear/mat3.h>
+#include <simgear/polar3d.hxx>
+#include <simgear/fgpath.hxx>
+
#include <Aircraft/aircraft.hxx>
-#include <Debug/logstream.hxx>
-#include <Include/fg_constants.h>
#include <Main/options.hxx>
#include <Main/views.hxx>
-#include <Math/fg_geodesy.hxx>
-#include <Math/interpolater.hxx>
-#include <Math/mat3.h>
-#include <Math/polar3d.hxx>
-#include <Misc/fgpath.hxx>
#include "fg_time.hxx"
#include "light.hxx"
#endif
#include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
#include <plib/sg.h> // plib include
-#include <Math/interpolater.hxx>
-#include <Math/point3d.hxx>
+#include <simgear/interpolater.hxx>
+#include <simgear/point3d.hxx>
// Define a structure containing the global lighting parameters
#endif // _LIGHT_HXX
-
-
# include <config.h>
#endif
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
+
#ifdef FG_HAVE_STD_INCLUDES
# include <cmath>
# include <cstdio>
# include <time.h>
#endif
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fg_geodesy.hxx>
+#include <simgear/mat3.h>
+#include <simgear/point3d.hxx>
+#include <simgear/polar3d.hxx>
+#include <simgear/vector.hxx>
-#include <Debug/logstream.hxx>
#include <Astro/solarsystem.hxx>
-#include <Include/fg_constants.h>
#include <Main/views.hxx>
-#include <Math/fg_geodesy.hxx>
-#include <Math/mat3.h>
-#include <Math/point3d.hxx>
-#include <Math/polar3d.hxx>
-#include <Math/vector.hxx>
#include <Scenery/scenery.hxx>
#include "fg_time.hxx"
# error This library requires C++
#endif
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
+
#ifdef FG_HAVE_STD_INCLUDES
# include <ctime>
#else
#ifndef _MY_MATH_H_
#define _MY_MATH_H__
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <math.h>
#include STL_FSTREAM
FG_USING_NAMESPACE(std);
-#include <fg_constants.h>
+#include <simgear/constants.h>
+
extern const double PiOver180;
extern const double Pix4dif3;
# include <config.h>
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#ifdef FG_HAVE_STD_INCLUDES
# include <cmath>
# include <time.h>
#endif
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
+#include <simgear/constants.h>
+#include <simgear/fg_geodesy.hxx>
+#include <simgear/mat3.h>
+#include <simgear/point3d.hxx>
+#include <simgear/polar3d.hxx>
+#include <simgear/vector.hxx>
+
#include <Astro/solarsystem.hxx>
-#include <Include/fg_constants.h>
#include <Main/views.hxx>
-#include <Math/fg_geodesy.hxx>
-#include <Math/mat3.h>
-#include <Math/point3d.hxx>
-#include <Math/polar3d.hxx>
-#include <Math/vector.hxx>
#include <Scenery/scenery.hxx>
#include "fg_time.hxx"
# error This library requires C++
#endif
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
+
#ifdef FG_HAVE_STD_INCLUDES
# include <ctime>
#else
# include <windows.h>
#endif
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
+
#ifdef FG_HAVE_STD_INCLUDES
# include <ctime>
#else
+++ /dev/null
---------------------------------------------------------------------------
-| Todo
---------------------------------------------------------------------------
-
- - M82, HSV , 3M5
- Charlie Scanlon (757) 864-2034 LaRC
- Geotif - geolocation tools for mapping.
- Dr. Nevan Bryant (818) 354-7236
- Position Integrity -- Terravoid Bob Servano (714) 854-2643
- http://www.jpl.nasa.gov/releases/98/damds3.html
- Press release #
- John G. Watson (818) 354-5011 release 98-52
-
-7/22/98 - add some trig debugging wrappers that can be #ifdef'd in
- kind of like the xgl stuff. The debugging version can do
- bounds checking and such.
-
-6/10/98 - terrain generation - add an option to try to iteratively change
- the error tolerance to try to generate "close" to a certain
- number of vertices so that we can have consistent size, rendering
- speed etc. among various terrain tiles.
-
-5/26/98 - Add version checking to scenery files
-
-4/25/98 - Roll all of Time/sunpos.cxx into Astro/sun.cxx
-
-4/21/98 - Tweak lighting parameter interpolation tables to better fit
- "perceived" reality
-
-4/21/98 - Make sure all .hxx files have #ifndef cplusplus #error
- Make sure all #ifdef _FILE_H or _FILE_HXX
-
-4/14/98 - Convert gl__() calls in Cockpit/ to xgl__() calls
-
-12/29/97 - Add a mechanism to parse additional command line options?
- * No astronomy.
- * Less detailed terrain.
- * Texture - but no MIP-mapping.
- * Texture - but no bilinear blending.
-
-12/29/97 - sky tweaking
- Steve Baker writes:
- So, by building the sky in the flattened shape, we can have it be
- very foggy at the horizon and clear blue overhead.
-
- The other important feature of this model is the colours. We
- colour each vertex of the dish individually to allow for cute
- sunsets, a darker blue overhead than at the horizon in daylight, a
- gradual darkening of the sky as a function of altitude for very
- high altitude flight - into space. Also we tint the horizon more
- in the direction of the sun so that sunset starts where the sun
- goes down - and the sky remains blue on the opposite side of the
- sky - then as the sun gets lower, the colour spreads outwards all
- around the sky and the black of night creeps in slowly from the
- opposite side of the sky from the sunset.
-
- We also like to tint the bottom edge of the sky with white - even
- in broad daylight - so it looks fuzzy - even when there is very
- little fog to achieve that effect.
-
- We use a text file that contains a lookup table relating the sun
- angle relative to the horizon to:
-
- * The colour at the top of the sky dome,
- * The colour of the horizon nearest to the sun
- * The colour of the horizon farthest from the sun
- * The colour of the texture environment blend for the clouds.
- * The fog colour.
-
- We can then tweak that file to set up all the conditions. The
- realtime system interpolates the horizon colours all around the edge
- of the sky.
\ No newline at end of file
libWeather_a_SOURCES = weather.cxx weather.hxx
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src
/****************************************************************************/
/* INCLUDES */
/****************************************************************************/
-#include <Include/compiler.h>
-#include <Include/fg_constants.h>
+#include <simgear/compiler.h>
+#include <simgear/constants.h>
#include <Aircraft/aircraft.hxx>
#include <plib/sg.h>
-#include <Math/sphrintp.h>
+#include "sphrintp.h"
#include "FGPhysicalProperties.h"
#include "FGPhysicalProperty.h"
# include <config.h>
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#ifdef HAVE_WINDOWS_H
# include <windows.h>
# include <config.h>
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#ifdef HAVE_WINDOWS_H
# include <windows.h>
#include "FGWeatherDefs.h"
// for the case that mutable isn't supported:
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
/****************************************************************************/
/* DEFINES */
# include <config.h>
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <stdlib.h>
#include <time.h>
# include <config.h>
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#ifdef HAVE_WINDOWS_H
# include <windows.h>
#include "FGWeatherDefs.h"
//for the case that mutable isn't supported:
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
/****************************************************************************/
/* DEFINES */
/****************************************************************************/
/* INCLUDES */
/****************************************************************************/
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <plib/sg.h>
/****************************************************************************/
/* INCLUDES */
/****************************************************************************/
-#include <Include/fg_constants.h>
+#include <simgear/constants.h>
#include "FGWeatherParse.h"
#include "FGWeatherUtils.h"
/****************************************************************************/
/* INCLUDES */
/****************************************************************************/
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#include <vector>
-#include <Misc/fgstream.hxx>
+#include <simgear/fgstream.hxx>
#include "FGPhysicalProperties.h"
# include <config.h>
#endif
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
#ifdef HAVE_WINDOWS_H
# include <windows.h>
FGWeatherVectorWrap.h \
FGWindItem.cpp FGWindItem.h
-INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
+INCLUDES += -I$(top_builddir) -I$(top_builddir)/src