]> git.mxchange.org Git - flightgear.git/commitdiff
Code reorganization.
authorcurt <curt>
Tue, 15 Feb 2000 03:30:01 +0000 (03:30 +0000)
committercurt <curt>
Tue, 15 Feb 2000 03:30:01 +0000 (03:30 +0000)
153 files changed:
src/Aircraft/Makefile.am
src/Aircraft/aircraft.cxx
src/Airports/Makefile.am
src/Airports/genapt.cxx
src/Airports/genapt.hxx
src/Airports/simple.cxx
src/Airports/simple.hxx
src/Autopilot/Makefile.am
src/Autopilot/autopilot.cxx
src/Autopilot/autopilot.hxx
src/Cockpit/Makefile.am
src/Cockpit/cockpit.cxx
src/Cockpit/hud.cxx
src/Cockpit/hud.hxx
src/Cockpit/hud_card.cxx
src/Cockpit/hud_dnst.cxx
src/Cockpit/hud_guag.cxx
src/Cockpit/hud_inst.cxx
src/Cockpit/hud_labl.cxx
src/Cockpit/hud_ladr.cxx
src/Cockpit/hud_lat.cxx
src/Cockpit/hud_lon.cxx
src/Cockpit/hud_scal.cxx
src/Cockpit/hud_tbi.cxx
src/Cockpit/panel.cxx
src/Cockpit/panel.hxx
src/Controls/Makefile.am
src/Done [deleted file]
src/FDM/Balloon.cxx
src/FDM/Balloon/BalloonSim.cpp
src/FDM/Balloon/Makefile.am
src/FDM/JSBSim.cxx
src/FDM/JSBSim/FGAircraft.cpp
src/FDM/JSBSim/FGAircraft.h
src/FDM/JSBSim/FGCoefficient.h
src/FDM/JSBSim/FGEngine.cpp
src/FDM/JSBSim/FGEngine.h
src/FDM/JSBSim/FGFDMExec.cpp
src/FDM/JSBSim/FGLGear.h
src/FDM/JSBSim/FGModel.h
src/FDM/JSBSim/FGOutput.h
src/FDM/JSBSim/FGPosition.cpp
src/FDM/JSBSim/FGRotation.h
src/FDM/JSBSim/FGState.cpp
src/FDM/JSBSim/FGState.h
src/FDM/JSBSim/FGTank.h
src/FDM/JSBSim/FGTranslation.h
src/FDM/JSBSim/FGUtility.cpp
src/FDM/JSBSim/FGfdmSocket.h
src/FDM/JSBSim/JSBSim.cpp
src/FDM/LaRCsim.cxx
src/FDM/LaRCsim/Makefile.am
src/FDM/MagicCarpet.cxx
src/FDM/Makefile.am
src/FDM/flight.cxx
src/FDM/flight.hxx
src/GUI/Makefile.am
src/GUI/gui.cxx
src/GUI/gui.h
src/Include/compiler.h [deleted file]
src/Include/fg_constants.h [deleted file]
src/Include/fg_traits.hxx [deleted file]
src/Include/fg_types.hxx [deleted file]
src/Include/fg_zlib.h [deleted file]
src/Joystick/Makefile.am
src/Joystick/joystick.cxx
src/Main/Makefile.am
src/Main/fg_init.cxx
src/Main/fg_io.cxx
src/Main/fg_io.hxx
src/Main/keyboard.cxx
src/Main/keyboard.hxx
src/Main/main.cxx
src/Main/options.cxx
src/Main/options.hxx
src/Main/save.cxx
src/Main/save.hxx
src/Main/splash.cxx
src/Main/views.cxx
src/Main/views.hxx
src/Network/Makefile.am
src/Network/fg_file.cxx
src/Network/fg_file.hxx
src/Network/fg_serial.cxx
src/Network/fg_serial.hxx
src/Network/fg_socket.cxx
src/Network/fg_socket.hxx
src/Network/garmin.cxx
src/Network/garmin.hxx
src/Network/iochannel.hxx
src/Network/native.cxx
src/Network/native.hxx
src/Network/nmea.cxx
src/Network/nmea.hxx
src/Network/protocol.cxx
src/Network/protocol.hxx
src/Network/pve.cxx
src/Network/pve.hxx
src/Network/rul.cxx
src/Network/rul.hxx
src/NetworkOLK/Makefile.am
src/NetworkOLK/net_hud.cxx
src/NetworkOLK/net_send.cxx
src/NetworkOLK/network.cxx
src/NetworkOLK/network.h
src/Objects/Makefile.am
src/Objects/fragment.cxx
src/Objects/fragment.hxx
src/Objects/material.cxx
src/Objects/material.hxx
src/Objects/materialmgr.cxx
src/Objects/materialmgr.hxx
src/Objects/obj.cxx
src/Objects/obj.hxx
src/Objects/texload.c
src/Scenery/Makefile.am
src/Scenery/scenery.cxx
src/Scenery/scenery.hxx
src/Scenery/tilecache.cxx
src/Scenery/tilecache.hxx
src/Scenery/tileentry.cxx
src/Scenery/tileentry.hxx
src/Scenery/tilemgr.cxx
src/Scenery/tilemgr.hxx
src/Time/Makefile.am
src/Time/event.cxx
src/Time/event.hxx
src/Time/fg_time.cxx
src/Time/fg_time.hxx
src/Time/geocoord.h
src/Time/light.cxx
src/Time/light.hxx
src/Time/moonpos.cxx
src/Time/moonpos.hxx
src/Time/mymath.h
src/Time/sunpos.cxx
src/Time/sunpos.hxx
src/Time/timestamp.hxx
src/Todo [deleted file]
src/Weather/Makefile.am
src/WeatherCM/FGLocalWeatherDatabase.cpp
src/WeatherCM/FGLocalWeatherDatabase.h
src/WeatherCM/FGPhysicalProperties.h
src/WeatherCM/FGPhysicalProperty.h
src/WeatherCM/FGTemperatureItem.h
src/WeatherCM/FGThunderstorm.cpp
src/WeatherCM/FGTurbulenceItem.h
src/WeatherCM/FGVaporPressureItem.h
src/WeatherCM/FGWeatherFeature.h
src/WeatherCM/FGWeatherParse.cpp
src/WeatherCM/FGWeatherParse.h
src/WeatherCM/FGWindItem.h
src/WeatherCM/Makefile.am

index 9620f85e17297d2790ad0b4e92f80ebd55a10275..af69982778edc4adbf4be0a61fa86dfa68d69763 100644 (file)
@@ -2,4 +2,4 @@ noinst_LIBRARIES = libAircraft.a
 
 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
index a6ce9e11e93dd8c5c49a0053ac8613494db38cec..ef51a239d966a8193483f7ef1c86768c00e3ce17 100644 (file)
 
 #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
index 250420518eb220f4deb7b62c794f9a6ca49d043d..63eecbb3307a2ceddf5b6b2b6c6835794e0f12ef 100644 (file)
@@ -4,4 +4,4 @@ libAirports_a_SOURCES = \
        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
index 2e2bcb66aea629f838252d0b0e4793d1ccc8e426..8d509e09792a9f26068f85e62c26ff56a8eea253 100644 (file)
@@ -22,7 +22,7 @@
 // $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>
index 911b547c2d99ee5bd3fd909db53f8090726c3abb..2092a36c06863d1b944cd5cd0676e1329fe72702 100644 (file)
@@ -31,7 +31,7 @@
 #endif                                   
 
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #include STL_STRING
 #include <set>
index f9411a198979d34005cc48ea2bb8dee7521699bd..c31cce339a00305a40e2102e9e25e280db325d49 100644 (file)
 // $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
index eee9737c97a88a3eb2f8cb7ed9883de8285777b1..92f872d23ed810c0382c00bb1b3592b9a7e114e5 100644 (file)
@@ -33,7 +33,8 @@
 #endif                                   
 
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
+
 #ifdef FG_HAVE_STD_INCLUDES
 #  include <istream>
 #elif defined( FG_HAVE_NATIVE_SGI_COMPILERS )
index 02b62e771b785012e16327aad77fea8d2212aebe..9e38e9d6999f3c3c6fef735e0ea7145ebbf9b686 100644 (file)
@@ -2,4 +2,4 @@ noinst_LIBRARIES = libAutopilot.a
 
 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
index 66b88a9cb3636f55444a79df93608ff9fe018a36..d60026ba1805fa0e9d4bdf8bbb30136824788627 100644 (file)
 
 #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
 
index bae1b9c1c1ccc8c6991ec5dffbc5d7d7b4fd2b2c..584d69a2afdaa118da0d2293d41821771f27a81f 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef _AUTOPILOT_HXX
 #define _AUTOPILOT_HXX
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
                        
 #include STL_STRING
 
index 9d30fa66bfa13fb68f0527e8e7d8d1857b57985d..5aac8271f4c37232fa5487132da92d72d433ffdc 100644 (file)
@@ -9,4 +9,4 @@ libCockpit_a_SOURCES = \
        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
index 587dd59d1b1dedca1efdc93c366ddc08bad74b46..1987f8bac7485155042a2971f1fb2fae22236235 100644 (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>
index 8629fa4d4462890b759c2bf21544ce866c91cf30..c8124619e5d608415f965fdcc0e149e191994ab3 100644 (file)
 #  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
index c64a83f14c9f8c315963134ca965b603593c8076..b2225ae4294968c93789eb34348beb6574899f97 100644 (file)
 #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);
index 5aa8066512af8bb6f3b67a7205382b4e5c9b84fb..b722cbfca96da99214ec6994c38e8d2fbf63dea8 100644 (file)
@@ -7,12 +7,14 @@
 #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>
 
index 49dc1d2cff3090178cf40b66ece8dc5edf119e5e..bfd9e07a4e20553376bbfc6ced7b469e0398f637 100644 (file)
@@ -5,18 +5,21 @@
 #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 ============
 
index dc4c4362de0b2627d4a631ddc9c964f1b7f4ebf1..156147c6c413602adf6831cdc289ed6599f8c504 100644 (file)
@@ -5,19 +5,23 @@
 #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
index fb6eece1f8703dbe3d19dd84664ddf0a67536ba5..ecf427a0266b378a0fdd013eb26e840980642dfd 100644 (file)
 
 #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};
index 9d4ee38c25abf603b238d153813b057a5f571eab..5380848b58c1a556dea7aeea014d9d81e1c3f6d6 100644 (file)
@@ -5,19 +5,23 @@
 #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
index 337d92d20b20f3b7167594f9ae103d087248bafd..bfa97dcb046d93a305102d04d6f3474b39c7dddd 100644 (file)
@@ -5,18 +5,23 @@
 #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,
index 177a58fb34b146d980c16c0b2ae80eae9fa52177..6b30ea98a77a848e60a856d950d55c5aef797cad 100644 (file)
@@ -5,14 +5,17 @@
 #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>
 
index 07a75fea1b5b410f8b5a3a91ee00ed8c33c14ac2..8de08ca82e2194f8599c162401d7f15bfe449ee7 100644 (file)
@@ -5,20 +5,23 @@
 #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
index 6be8757c117c07e7ddf452539b6673d9da068d3c..e092b504ffb85dad499817b801eb90b007618073 100644 (file)
@@ -5,18 +5,22 @@
 #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:
index 0036e5ca2d18602eef911e33aa8245e27b52ae7f..868e1184c5c9f37214585a8e59279b70811cd8a6 100644 (file)
@@ -5,18 +5,22 @@
 #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 ::
index 23a29540f06c9ffeaf52fea60a8f4ad40cc54b73..09005b936606f67c3133bab2859c4304ddf1e344 100644 (file)
@@ -1,27 +1,22 @@
-// 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
index c0906834d754c4b117ef44117b80fcb54e40e8d5..0fdc626714a3a9fb72b79b75201beb9f8b730f27 100644 (file)
@@ -1,9 +1,7 @@
-//  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 
index 68c60fd6f91ffbb9589c9e1336bd584a11e9d7c6..8b63268eb3d0af8f6892f8405406142bf69ec33d 100644 (file)
@@ -2,4 +2,4 @@ noinst_LIBRARIES = libControls.a
 
 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
diff --git a/src/Done b/src/Done
deleted file mode 100644 (file)
index 4a35d93..0000000
--- a/src/Done
+++ /dev/null
@@ -1,166 +0,0 @@
---------------------------------------------------------------------------
-| 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
-
index 85331bb6398937cb01919a54520ae105896a203f..a8bbfb27f3ac7fa0d3058786ff7d4b53170c1f38 100644 (file)
@@ -37,7 +37,7 @@ HISTORY
 /* INCLUDES                                                                */
 /****************************************************************************/
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #ifdef FG_MATH_EXCEPTION_CLASH
 #  include <math.h>
@@ -45,13 +45,14 @@ HISTORY
 
 #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"
 
index 44950f57f6f2e2795f49bcc3ce28a4d1eb0cdf06..92cb0a26f19d77ea8f48320619ff3d4d795bed54 100644 (file)
@@ -42,8 +42,9 @@ HISTORY
 // #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>
 
index d20022e7fb19579be216dd93d2fe5704458bf435..b0697009880f816060a28e012287b6e6cde851f4 100644 (file)
@@ -2,4 +2,4 @@ noinst_LIBRARIES = libBalloon.a
 
 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
index 52d860fe2988eb616344d5fa3485a0093b9e0646..4c9fba90b66464b9c4fb6b372cb821b8252a76b0 100644 (file)
@@ -21,7 +21,7 @@
 // $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>
@@ -47,7 +48,6 @@
 #include <FDM/JSBsim/FGAuxiliary.h>
 #include <FDM/JSBsim/FGDefs.h>
 
-
 #include "JSBsim.hxx"
 
 
index 2042a04b3b20f306cbb4d0192beafc265a51ddd0..59e02b0bf934a9b44b2c8366144a11d14e94d89d 100644 (file)
@@ -106,7 +106,7 @@ INCLUDES
 
 #ifdef FGFS
 # ifndef __BORLANDC__
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 # endif
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <cmath>
index 12ccf7951122cb6e497e3bec1a1d9deb8963c256..e2abf06e8caeb4eefe00b0dfed9af181ec8ef728 100644 (file)
@@ -97,7 +97,7 @@ INCLUDES
 *******************************************************************************/
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <fstream>
 #    include <vector>
index a1c2ca4af9db8587debd15670a571b766996dd66..a3c49466753a65810ae2259ee6a4835dbc1ab2ad 100644 (file)
@@ -38,7 +38,7 @@ SENTRY
 INCLUDES
 *******************************************************************************/
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  include STL_STRING
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <fstream>
index eab3cd3fcde97e8a2ae6d055cf8fcf7a85fae95b..7701445bfd651044461919d9a63027716c1a7115 100644 (file)
@@ -39,7 +39,7 @@ INCLUDES
 *******************************************************************************/
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <fstream>
 #  else
index a515983cf7f0fb697577506ad5ac1720404163a5..deeb86f8369a9ab88fbaa1d2dbac9515f17b234b 100644 (file)
@@ -45,7 +45,7 @@ INCLUDES
 *******************************************************************************/
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  include STL_STRING
 FG_USING_STD(string);
 #else
index 942f045189ddca752eb0e2b314c9f490eaa25999..df4733a051a14d2cfe5e28e06b2323f7e1877b5d 100644 (file)
@@ -39,7 +39,7 @@ INCLUDES
 *******************************************************************************/
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <iostream>
 #    include <ctime>
index 24475597b8ef06d5a28f2baeda5e14cb32f2f177..4378fe93f0f710f5f98b7c8f2b6b2d4ffb9cd333 100644 (file)
@@ -55,7 +55,7 @@ INCLUDES
 *******************************************************************************/
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  include STL_STRING
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <fstream>
@@ -95,4 +95,4 @@ private:
 };
 
 /******************************************************************************/
-#endif
\ No newline at end of file
+#endif
index 2c752893224a8f385be8551c5679c25f0920d222..621719a577c2d1ede6d1f08d60074ebb54f95c0a 100644 (file)
@@ -41,7 +41,7 @@ INCLUDES
 #include "FGDefs.h"
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  include STL_STRING
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <iostream>
index c9cfe5df808c4c260e8b68ec1bea5ef9c1ce1b21..470c2b7aeb23b03cee33f5313e3666d532154ce7 100644 (file)
@@ -41,7 +41,7 @@ INCLUDES
 #include "FGModel.h"
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <iostream>
 #    include <fstream>
index 3489bc0f1a19f962b8d3e7a697ad61935039cc53..436538c897ceaafcb59b1f7fd96ab7b18a43d749 100644 (file)
@@ -54,7 +54,7 @@ INCLUDES
 *******************************************************************************/
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <cmath>
 #  else
index 57ad21c6331121a8b6e4519827ebecc668c85462..09452f5d0293531e7ef6de76145d656478031779 100644 (file)
@@ -57,7 +57,7 @@ INCLUDES
 *******************************************************************************/
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <cmath>
 #  else
index 59773edb45fdaf6daacf12f6cc0e45f213ca5db3..069228189e405015e53ae404f17613f02190467f 100644 (file)
@@ -37,7 +37,7 @@ INCLUDES
 *******************************************************************************/
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <cmath>
 #  else
index 7e488c4fff2f996941508de4b761f8f647969654..9311cba4bf6eb138f9330d5893b6486b26e036b3 100644 (file)
@@ -45,7 +45,7 @@ INCLUDES
 *******************************************************************************/
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  include STL_STRING
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <fstream>
index a329ffb50f62e8e14b37750c782c8cab1f98842a..8ffaf3bac4ec2d2a5f09fa52fa54d03e796bc024 100644 (file)
@@ -44,7 +44,7 @@ SENTRY
 INCLUDES
 *******************************************************************************/
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  include STL_STRING
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <fstream>
index a13026166919e29daf62b2256c521ed03b54bbc6..3e2857b9d64cda7165a3c45ba26b1b69ccf2ea8c 100644 (file)
@@ -57,7 +57,7 @@ INCLUDES
 *******************************************************************************/
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <cmath>
 #  else
index f44b29e8802833d894132417f84cbc746bd78e67..6a5225aab1b9d9cd89477290dc28a4f4034d5c6a 100644 (file)
@@ -43,7 +43,7 @@ INCLUDES
 *******************************************************************************/
 
 #ifdef FGFS
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <cmath>
 #  else
index dc05226a16a4137579f818023844c200cf631cf9..5f611d093b53f10952f16761752606275d2f094d 100644 (file)
@@ -47,7 +47,7 @@ INCLUDES
 
 #ifdef FGFS
 #  pragma message("FGFS defined")
-#  include <Include/compiler.h>
+#  include <simgear/compiler.h>
 #  include STL_STRING
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <fstream>
@@ -104,4 +104,4 @@ private:
   string buffer;
 };
 
-#endif
\ No newline at end of file
+#endif
index 72fe75dc37bcdd713c9ed399455e893c4f52799b..c9ed9ee8d8219e5d860bba4b2c8dd57093618169 100644 (file)
@@ -78,7 +78,7 @@ USEUNIT("FGfdmSocket.cpp");
 #include "FGOutput.h"
 
 #ifdef FGFS
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 #include STL_IOSTREAM
 #  ifdef FG_HAVE_STD_INCLUDES
 #    include <ctime>
index e95bdebd0df59155f9f69f0c0c30b08988271890..1331ea3a2335bfe1ab99a58fe7b9590a70c81754 100644 (file)
 
 #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>
index dbcecf700143fd87fa8dd7f5526412551fef50c9..1503337bdf60f661847c76cc89e1d791ed370a21 100644 (file)
@@ -32,4 +32,4 @@ libLaRCsim_a_SOURCES = \
        $(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
index 56cd1381d22c4b41e3bae77a839b3e6490cce926..8bff737926b61706957fb5d310d9a96cc1ef971b 100644 (file)
 // $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"
 
index a70cf69ef93233787dad89e463c4a7a01a67a676..424ab54d63c038391b658ed78286f06a5be1d874 100644 (file)
@@ -10,4 +10,4 @@ libFlight_a_SOURCES = \
        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
index 0894a607fb3492fe6a141a50f98d422abc32bac1..9b1c089060c602a44f1bbd1a52a0f72957132ee0 100644 (file)
 
 #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"
index 0f2e14ef6a6a6b4abaf28ee95ebf6be85e531b35..c9f4fdb8cc1e23f7736d176d3b45911cdbd85250 100644 (file)
@@ -81,7 +81,7 @@
  */
 
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #include <math.h>
 
index b0a375f338ecb4b5a69d24fe03f74af383e77617..5d4224413352b24876057742788de46e1448e5a5 100644 (file)
@@ -2,7 +2,4 @@ noinst_LIBRARIES = libGUI.a
 
 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
index d183e766cdb882ce3fd62314c69723edee649aed..dba7223c3b728d450b0efdd60c89ff938adcb219 100644 (file)
@@ -28,7 +28,7 @@
 #  include <config.h>
 #endif
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #ifdef FG_MATH_EXCEPTION_CLASH
 #  include <math.h>
@@ -39,7 +39,7 @@
 #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__ )
index 318d185fc8a7f864992d2c7f6d6fbb7da86a0e64..dc0e171e86fe5084dd12a8560ad5e5a7c53276f2 100644 (file)
@@ -25,6 +25,7 @@
 #ifndef _GUI_H_
 #define _GUI_H_
 
+#include <GL/glut.h>           // needed before pu.h
 #include <plib/pu.h>           // plib include
 
 extern void guiInit();
diff --git a/src/Include/compiler.h b/src/Include/compiler.h
deleted file mode 100644 (file)
index a6d0b88..0000000
+++ /dev/null
@@ -1,303 +0,0 @@
-/**************************************************************************
- * 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
diff --git a/src/Include/fg_constants.h b/src/Include/fg_constants.h
deleted file mode 100644 (file)
index ad8ee5d..0000000
+++ /dev/null
@@ -1,170 +0,0 @@
-// 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
-
-
diff --git a/src/Include/fg_traits.hxx b/src/Include/fg_traits.hxx
deleted file mode 100644 (file)
index 1547bca..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#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
diff --git a/src/Include/fg_types.hxx b/src/Include/fg_types.hxx
deleted file mode 100644 (file)
index 83cc3b5..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-// 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
-
diff --git a/src/Include/fg_zlib.h b/src/Include/fg_zlib.h
deleted file mode 100644 (file)
index d0dba91..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/**************************************************************************
- * 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 */
-
-
index 5c3c58a00c5941eec94dbb636cb3e72c3e5d708f..a0d9801eaa8839110726aef75a2353b0480c00d5 100644 (file)
@@ -6,7 +6,4 @@ noinst_PROGRAMS = js_demo
 
 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
index e834571a8865a88898235a3d1be768d3fe3fa999..9ef133e4e248d850073f427c8a90281a8275f933 100644 (file)
 #  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
 
 
index 5fb7798f8a6cfa04cf5463808f0ec00b3dfaa768..338e18831fe7cf48152a33c447cd2d0fa3bc4d6d 100644 (file)
@@ -1,22 +1,22 @@
 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
@@ -44,37 +44,29 @@ fgfs_SOURCES = \
 #      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
index 6aac3191b0b9e58f430003eeaa35425b32c09044..8fd02cd841c05513bd06b34dd796996caa8c0255 100644 (file)
@@ -33,7 +33,7 @@
 #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>
index 82cdf7b29d36d8c3fc6d94dad65d24d6c4a5b016..b5b15156cdebe8d4a980f03a474ecc98cff1aa87 100644 (file)
 // $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>
index 71a0fd30bb8197bcb98271437bfac06b05e40b49..b92a50a84133c441a7eea9b6858d654c6e4bdbcd 100644 (file)
@@ -25,7 +25,7 @@
 #define _FG_IO_HXX
 
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
 
 #include <Network/iochannel.hxx>
 
index cdf406825e188005e7660d4e8ddd5a64321756eb..be17f6997bfcab87eca3e1e173b07838957744f0 100644 (file)
@@ -30,7 +30,7 @@
 #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>
index ce984582295dcecb72a659e362b10ebd1185b0cb..a6f7bde7a95e8886651c48b5fca11058e542cb3f 100644 (file)
@@ -39,7 +39,7 @@
 #endif
 
 #include <GL/glut.h>
-#include <XGL/xgl.h>
+#include <simgear/xgl.h>
 
 
 // Handle keyboard events
index 66dc790dac5daae89ee0be36b853337356a8268e..eabc9788ddac7cdb5b949b31da5d77e28dcdb877 100644 (file)
@@ -38,7 +38,8 @@
 #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
index a55b9fd0422716975c56720908d28a09235e7321..1cbd37325ccb65257dc56ce31a3ffb03048baf72 100644 (file)
@@ -29,7 +29,7 @@
 bool global_fullscreen = true;
 #endif
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #include <math.h>            // rint()
 #include <stdio.h>
@@ -38,9 +38,10 @@ bool global_fullscreen = true;
 
 #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>
@@ -49,6 +50,7 @@ bool global_fullscreen = true;
 #endif
 #include <Time/fg_time.hxx>
 
+#include "views.hxx"
 #include "options.hxx"
 
 FG_USING_STD(string);
index 1c4d8b37d2a567c6181210d70b098a52a0d7342d..65a83e05222b562e8109a146f65233a3fe54fd94 100644 (file)
 #  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>
@@ -54,6 +54,9 @@ extern bool global_fullscreen;
 FG_USING_STD(vector);
 FG_USING_STD(string);
 
+#define NEW_DEFAULT_MODEL_HZ 120
+
+
 class fgOPTIONS {
 
 public:
index 69f3b01cedfd4d538699198fa921a56e449d7222..50c80a7c4c333d12fd376a659daec54fafa025e8 100644 (file)
@@ -38,8 +38,9 @@ TODO:
 
 #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>
@@ -50,7 +51,6 @@ TODO:
 #  include <Weather/weather.hxx>
 #endif
 
-
 #include "options.hxx"
 #include "save.hxx"
 #include "fg_init.hxx"
index 38624b077a68e632b9b7306898237ee71c6ecd7c..b074d9468665a5ff13d17e3b24907831a922f9a6 100644 (file)
@@ -31,7 +31,7 @@
 #  include <config.h>
 #endif
 
-#include <Include/fg_types.hxx>
+#include <simgear/fg_types.hxx>
 #include <iostream>
 
 FG_USING_NAMESPACE(std);
index d69e30b5c758bef4758d5ac29ad23929cd6f90b4..dea67dd6970806df348994b1da98b1ca8761603c 100644 (file)
 #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"
index 79bf08e9d36feba74f776def52c8c907bab0534a..3e64dc912e329bfdaec054fb1c4d9f48250b2a32 100644 (file)
 
 #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>
 
index 15cf2e15fa0f0c21273c42d53d8f141f42f814c9..56c76f753fcd3abd4b90ddad94ca0da8f3f7ee1d 100644 (file)
 # 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>
 
@@ -47,6 +47,8 @@ FG_USING_STD(list);
 
 // 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
index 828924d3ee3d2517f091b1ffff3328268d68b3cd..6e923d261ff6c8cab5d7e739bdaad39e63bfa686 100644 (file)
@@ -12,4 +12,4 @@ libNetwork_a_SOURCES = \
        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
index 86bc78276d444a6f85b6983e9d41851de7535036..407926736883630961f4498e13651eb69cab4159 100644 (file)
 // $Id$
 
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #include STL_STRING
 
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
 
 #include "fg_file.hxx"
 
index a5995b0e4499b13a100f40d754fefdf9713b3b9b..f7409948b6d632b9907d4d23d82caf6e04166c0a 100644 (file)
@@ -29,7 +29,7 @@
 # error This library requires C++
 #endif
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
 
 #include <string>
 
index 3c07bb6fb630ba40d7a636418674c0a4328a080f..97721034794dae011e397bc770c47597d17360a0 100644 (file)
 // $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"
 
index 80afd0131b27db596fbbb94ae57bb501413e3a52..0360c61977991e13f39ebcebda4949f8ceea8cd0 100644 (file)
@@ -29,7 +29,7 @@
 # error This library requires C++
 #endif
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
 
 #include <string>
 
@@ -39,7 +39,7 @@
 // #  include <time.h>
 // #endif
 
-#include <Serial/serial.hxx>
+#include <simgear/serial.hxx>
 
 #include "iochannel.hxx"
 #include "protocol.hxx"
index b0fb4b5becaecf51bcb17c2a3d3fb46925815b49..f718143ef08035d204ead4c84095ea18dbeb678a 100644 (file)
@@ -21,7 +21,7 @@
 // $Id$
 
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #include <sys/time.h>          // select()
 #include <sys/types.h>         // socket(), bind(), select(), accept()
@@ -36,7 +36,7 @@
 
 #include STL_STRING
 
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
 
 #include "fg_socket.hxx"
 
index 51f64ba3ca01e419a1b19ecf61b6b587671e1fd7..9c35ea93a6cfbd86c99ab52219e744d13c8f6139 100644 (file)
 # 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"
index 40238c1adea39109962175dedf72b0e34c786d45..68ec3c0deb5228690940d1745abfa25f40be03f1 100644 (file)
 // $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"
index 901db374c2f62992bcb1c262edbf932dab6f5349..ee50834de8200ae99e0872e431682b74ed91ff59 100644 (file)
@@ -25,7 +25,7 @@
 #define _FG_GARMIN_HXX
 
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
 
 #include STL_STRING
 
index 09c7e7bb43870a24d7356d2c92e86e64a1b56516..5830f6e2af29c8a595fa5fa751ac4166ad9b2bef 100644 (file)
@@ -25,7 +25,7 @@
 #define _IOCHANNEL_HXX
 
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
 
 #include "protocol.hxx"
 
index 957cbe2b2309ee8e34bf33fd2c3f0bd38dea6102..9418a7884366b96a95d797b555c0edaa711293a9 100644 (file)
@@ -21,8 +21,9 @@
 // $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"
index e692cbdbfb5ccba9b3612a87d8517a3d973c0ed9..2c6be68dc6f18517d0f7e38f7fc80b48e348dc5d 100644 (file)
 #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);
index d32d6953de844a283617065b8c19cd244f1f87d5..9a5b46ae752847da35124d207729f1f4491aaccc 100644 (file)
 // $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"
index d480b127dd2e6354b6d9ba820ee6368bbf3bf1ac..142809ec5bf35c5d2a795b33daab84b01cdee235 100644 (file)
@@ -25,7 +25,7 @@
 #define _FG_NMEA_HXX
 
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
 
 #include STL_STRING
 
index 1e5b7ca0d3d2a2c6a34384d1770607427053183b..61c04084021b3e231776f1f41b4c952cc38c2806 100644 (file)
@@ -21,7 +21,7 @@
 // $Id$
 
 
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
 
 #include "iochannel.hxx"
 #include "protocol.hxx"
index 1fcc9597132bc49acb1b92e2aff7787b05877601..f3c7fe4d68959e169d3e0edf82f987106edb586a 100644 (file)
@@ -25,7 +25,7 @@
 #define _PROTOCOL_HXX
 
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
 
 #include STL_STRING
 #include <vector>
index f9d3cc8c6f4ae0dbac973bb85c2de2dfaa5b3cbe..16c87fa31013eb1b858f98cc7c3b3d30436878aa 100644 (file)
 // $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"
index 632dafdf1a4753ab309171fce2179f42475c9507..f923c241db5a5f2693907fdd8cf6969bda487c17 100644 (file)
@@ -25,7 +25,7 @@
 #define _FG_PVE_HXX
 
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
 
 #include STL_STRING
 
index 47eb238e97de77f925d3b8acc5f2ee1e5d0c1372..d8b1bf20662f4e69e8e078a487a94f020eb3d7b6 100644 (file)
 // $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"
index b093244cd4d897e14cf585ea268a13f52beb94f5..8db5bfba98beae0864b20d93c2680292953c8abf 100644 (file)
@@ -26,7 +26,7 @@
 #define _FG_RUL_HXX
 
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
 
 #include STL_STRING
 
index f9880e8def344f242df16de765c92fb6861f960f..9b845a7d9aa69bb2d04f2a4fc413399cac7c8e7b 100644 (file)
@@ -3,4 +3,4 @@ noinst_LIBRARIES = libNetworkOLK.a
 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
index bee19df932a1cc3dc3aadc4ccaa1546bc22c9e14..33880216dbedee63a0898387586012ee1f2cb34e 100644 (file)
 #  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>
 
index 31329531eb6bf8dd8cc58a5ecba66f224e027201..473fd9925ab05312b03268a3f9d115e9d52a5eca 100644 (file)
@@ -35,8 +35,9 @@
 #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>
 
index 07c9a9bc09a47092b8adb5b350aef8d3451deeef..64dec6c9dbe6b4cd9ee3261647edf4b645106400 100644 (file)
 #  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>
 
index 1f0d16587fda10e7de0a97cfc2628d451037790e..28bca9e1e419d28502da4fa6ea0f67ba6e4949e4 100644 (file)
@@ -20,8 +20,8 @@
 //
 // $Id$
 
-#ifndef NETWORK_H
-#define NETWORK_H
+#ifndef NETWORK_OLK_H
+#define NETWORK_OLK_H
 
 #define FGD
 
index 9a8e5665e0f0a42345c4e3c30dfd0d63944f6d3c..6ddb2412c75afe025a59471f8b99c969590d612b 100644 (file)
@@ -7,4 +7,4 @@ libObjects_a_SOURCES = \
        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
index 3398e16530eec76b536531e15270d6dcb9e0f136..047db1c4616e1ac8719d8901f4e64c4f3581c489 100644 (file)
 // $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"
index d31790cde64ad8299723c8bfc72a4ee9f6b75736..3314ad4ea5490548fd1201717cc6eff6627bbca6 100644 (file)
 #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);
 
index c8caf2c7efe6f08b64dbbe2059b7c6ea6704791a..d16760fd8476c2c5c1cc4062a050c26321d06b8c 100644 (file)
@@ -25,7 +25,7 @@
 #  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"
index 31784ca69c4db9ad1f6d165c59b66552793a6569..cb0cd06db2cf201ad1965e413a6812b2edeb805e 100644 (file)
 #  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
 
index 85db3929a40c75e02646b47b7b77879d3a028015..204d1f2871600bde6b265cb0185e2b6a96cff735 100644 (file)
 #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>
index f7af3ee494fef4f6bd5d8761f13b7b236f9ecc98..69d482394c2da98fe3f0c0e5461bcd8b5917f6c9 100644 (file)
 #  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"
index e59a212ab11ee488b79959e05c7bf8b7b802416d..93e87b38023a0ca7d9da85f6da11f087d4835234 100644 (file)
 // 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"
index d833a9a3a5f712f4a4117c3b13b417e92d0ea0a4..8db6cc3bd1f73369ca34b7152d25b46d2eefa7f1 100644 (file)
@@ -34,7 +34,7 @@
 #  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);
 
index 69701af3617dd45ace1195f3a9e2736185e59121..24de7160d2bd17e2ef981e2576265d1459fdae3f 100644 (file)
@@ -15,7 +15,7 @@
 #include <stdlib.h> 
 #include <string.h>
 
-#include <Include/fg_zlib.h>
+#include <simgear/fg_zlib.h>
 
 #include "texload.h"
 #include "colours.h"
index 699a4442e0c0f8cc86ffcc5fcec561b021e9eb3c..dd4d1cdfd4f39fcbf6a47013a5ea35a2e718fee6 100644 (file)
@@ -6,7 +6,4 @@ libScenery_a_SOURCES = \
        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
index 163a4da58e1d249041d01bc2f0db78c77664b5d2..056debf9343bee2eb80f3757c6c1b810be0242cc 100644 (file)
 #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
index 0fa5f315fb84252f98955b034b08cff45fc6d41b..73ec74c21d65baeb993f430b8221510d67bee0e4 100644 (file)
@@ -30,7 +30,7 @@
 #endif                                   
 
 
-#include <Math/point3d.hxx>
+#include <simgear/point3d.hxx>
 
 
 // Define a structure containing global scenery parameters
index ed0c6d6b710c05004133290353dde6c7fad53351..4b142eaffabcdc25b9188a4df737a58e65146cf6 100644 (file)
 #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
 
index 789c0db125e1220955cb1eb72899fdc4224599d7..61fea8f323e58dbda3122d2dfc7d4e4c55c8d77e 100644 (file)
 #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"
 
index b46703051989c4408cdb637309055f2709cad1c6..cc336b081ee1fbdfbe3f792636c9628b74ae2b9a 100644 (file)
@@ -21,7 +21,7 @@
 // $Id$
 
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #ifdef FG_MATH_EXCEPTION_CLASH
 #  include <math.h>
@@ -30,8 +30,8 @@
 #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"
 
index d84051b0984d82ef62ac9df7d9afbcf45b1455f3..f17fb75cedbf1d1ed46653a95597d21245c02215 100644 (file)
 #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 )
index 2607dd1b8e9c85bcb5f743136f5ae8402c4d2810..4621d762baf08c4ed2ef97bff3053f2f5f39a3f0 100644 (file)
 #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>
 
index efb8a77ba16d65a23b06c18e9cdc1e8b49e52574..fef2448020f8084cb80e8a8e0fe92636bb8c0bbf 100644 (file)
 # 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);
index 56443e6ba4f3696b041b2d789cbb3181a4740753..d278925737bd874167a1b3e8e658a18adccf76dd 100644 (file)
@@ -13,4 +13,4 @@ libTime_a_SOURCES = \
        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
index 9a31d19b03f9c6744cbe5ac04ae86af54274aea9..9345f979f0abefeb98e56dd95d1a74d637d85851 100644 (file)
@@ -25,7 +25,7 @@
 #  include <config.h>
 #endif
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
 
 #ifdef FG_MATH_EXCEPTION_CLASH
 #  include <math.h>
@@ -53,7 +53,7 @@
                          // contains milliseconds
 #endif
 
-#include <Debug/logstream.hxx>
+#include <simgear/logstream.hxx>
 
 #include "event.hxx"
 
index 40b4311eef7dfbcf357ff48461953aaca6050fc0..f6a694938b546ce065b74904bcb956c72df6e2e6 100644 (file)
@@ -30,7 +30,8 @@
 #endif                                   
 
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
+
 #include <Include/fg_callback.hxx>
 
 #include <deque>        // STL double ended queue
index 0b7cee42d659e92b52eeb341fbed646520d3d9aa..88cc02aae864dff6320f66f91e15edf65a965e94 100644 (file)
@@ -25,7 +25,7 @@
 #  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"
index 51a9b287de161dad8e58a19e3a8c3c0a0db8f55a..d73c58f3394f6964811deeef507b8274ad54d9cc 100644 (file)
@@ -40,7 +40,8 @@
 
 #include <GL/glut.h>
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
+
 #ifdef FG_HAVE_STD_INCLUDES
 #  include <ctime>
 #else
index c38bab71268f57186dc5736b24b145dbbc450756..f3c0ef08d76d3ab78bf03b137b3678e75b6198d2 100644 (file)
@@ -32,7 +32,7 @@
 #ifndef _GEOCOORD_H_
 #define _GEOCOORD_H_
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 
 #include <math.h>
index 401fd2a3d4fa113b827e39c56b1a0380abac9369..4cee244bded339180cb4dc18a400ec197143ac48 100644 (file)
@@ -31,9 +31,9 @@
 #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"
index f378ff183e961e63dc74bc9775ee37209664fda2..ac7449b3936a9fa6e4946de22d45383d093877e8 100644 (file)
 #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
@@ -149,5 +149,3 @@ extern fgLIGHT cur_light_params;
 
 
 #endif // _LIGHT_HXX
-
-
index e32df4ac1ed7a50714c3106e2fefc8bc74ed68b1..bd236d7b29bf5d52f8e9f70aeda8166ef9e9d176 100644 (file)
@@ -39,7 +39,8 @@
 #  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"
index dad36e880b312a9d1cdeca90cac2ba1165f24e9f..cfc4763bef790fe12c0f2684f21d79baaef3e793 100644 (file)
@@ -44,7 +44,8 @@
 # error This library requires C++
 #endif                                   
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
+
 #ifdef FG_HAVE_STD_INCLUDES
 #  include <ctime>
 #else
index 737bb29e0879469b7cca07db754a498a43283a7c..f68cdad84096f360bd2497f00dccb2c10f41a5c5 100755 (executable)
@@ -37,7 +37,7 @@
 #ifndef _MY_MATH_H_
 #define _MY_MATH_H__
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #include <math.h>
 #include STL_FSTREAM
@@ -45,7 +45,8 @@
 
 FG_USING_NAMESPACE(std);
 
-#include <fg_constants.h>
+#include <simgear/constants.h>
+
 extern const  double PiOver180;
 extern const double Pix4dif3;
 
index 182132f8898c2be80dbf3ab0341bf715646b66b5..d2665549dbcef7bca975fb8a39ef7c08537c98ca 100644 (file)
@@ -38,7 +38,7 @@
 #  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"
index c1a57b83bebfe3ebb4259e19ecbd1f9f07f1386e..13bbd184514ef1bb9b40e94041c12997608e68bc 100644 (file)
@@ -44,7 +44,8 @@
 # error This library requires C++
 #endif                                   
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
+
 #ifdef FG_HAVE_STD_INCLUDES
 #  include <ctime>
 #else
index 50af0ead13f6697ca339136bc21270092105d983..00b7352a481d46bb75fef6289a66e41ecfbf4244 100644 (file)
@@ -38,7 +38,8 @@
 #  include <windows.h>
 #endif
 
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
+
 #ifdef FG_HAVE_STD_INCLUDES
 #  include <ctime>
 #else
diff --git a/src/Todo b/src/Todo
deleted file mode 100644 (file)
index 96a4b48..0000000
--- a/src/Todo
+++ /dev/null
@@ -1,72 +0,0 @@
---------------------------------------------------------------------------
-| 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
index 4a5521e1bcf46e9f1c677ddf26b6b136bcb8c0b7..cb4ba062035ee9b344dbb7f6e71d242b95836042 100644 (file)
@@ -6,4 +6,4 @@ noinst_LIBRARIES = libWeather.a
 
 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
index 160466a15967562948061c95dbe1003e9611932c..ba4da125429df2b0e32de198b2c4044fed34f1b1 100644 (file)
@@ -47,8 +47,8 @@ HISTORY
 /****************************************************************************/
 /* INCLUDES                                                                */
 /****************************************************************************/
-#include <Include/compiler.h>
-#include <Include/fg_constants.h>
+#include <simgear/compiler.h>
+#include <simgear/constants.h>
 
 #include <Aircraft/aircraft.hxx>
 
index f45ece1b7a1839c281c24cb44baefc558a4a0d6d..7155854ae70dcad9193ea2604a657c55b337cb9e 100644 (file)
@@ -57,7 +57,7 @@ HISTORY
 
 #include <plib/sg.h>
 
-#include <Math/sphrintp.h>
+#include "sphrintp.h"
 
 #include "FGPhysicalProperties.h"
 #include "FGPhysicalProperty.h"
index a634036056e1881e3a5d836d574c141f5277a1d0..5c50c77e949fd4b090230327028df640a007d5c5 100644 (file)
@@ -57,7 +57,7 @@ HISTORY
 #  include <config.h>
 #endif
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #ifdef HAVE_WINDOWS_H
 #  include <windows.h>
index f6b2d39a913c2a0ebc066ad2a0bb73e452a5eb05..cdafea250692f9e9a2bf8f24e466dddbc0e8f4d2 100644 (file)
@@ -54,7 +54,7 @@ HISTORY
 #  include <config.h>
 #endif
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #ifdef HAVE_WINDOWS_H
 #  include <windows.h>
index 8e519902a0c2aa99eed839ce7468fa407263bce1..14f19934e762c4855a37ff6d9271a0dc4bc21ffb 100644 (file)
@@ -49,7 +49,7 @@ HISTORY
 #include "FGWeatherDefs.h"
 
 // for the case that mutable isn't supported:
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
                
 /****************************************************************************/
 /* DEFINES                                                                 */
index 5dbdddd537ec0f18485bb579098f3bb9ba316a82..51a5c1c108b5f25bec8e103f8041f302bc030451 100644 (file)
@@ -39,7 +39,7 @@ HISTORY
 #  include <config.h>
 #endif
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #include <stdlib.h>
 #include <time.h>
index 0c6b2ae93f99c398c9a32a280bef4ebed6d85b47..379748d0777b447bead52da2bd2ea2d7100c5423 100644 (file)
@@ -54,7 +54,7 @@ HISTORY
 #  include <config.h>
 #endif
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #ifdef HAVE_WINDOWS_H
 #  include <windows.h>
index d9709aafb7490c2d4d95cee38c28b1f674c2e807..b04c80b90f04d343d2bf02a49911d4d16432ea00 100644 (file)
@@ -49,7 +49,7 @@ HISTORY
 #include "FGWeatherDefs.h"
 
 //for the case that mutable isn't supported:
-#include "Include/compiler.h"
+#include <simgear/compiler.h>
                
 /****************************************************************************/
 /* DEFINES                                                                 */
index 415a0527897e04dd8fc15cdc88bafcbd28d5f01b..74d7e105bc0fcc49f22b9f5d1b00f576642774c0 100644 (file)
@@ -49,7 +49,7 @@ HISTORY
 /****************************************************************************/
 /* INCLUDES                                                                */
 /****************************************************************************/
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #include <plib/sg.h>
 
index f83b4a1d02c804956544f80f0249e401d7e1b137..8dfcfb33b82cc45879cad71823dc3aead117d48b 100644 (file)
@@ -56,7 +56,7 @@ HISTORY
 /****************************************************************************/
 /* INCLUDES                                                                */
 /****************************************************************************/
-#include <Include/fg_constants.h>
+#include <simgear/constants.h>
 
 #include "FGWeatherParse.h"
 #include "FGWeatherUtils.h"
index ff6cd175604ba2beae8130a0aadcc597240ad6eb..bd5bf4f75f73d62c2088cff240102dec2c0ebbf4 100644 (file)
@@ -61,10 +61,10 @@ HISTORY
 /****************************************************************************/
 /* INCLUDES                                                                */
 /****************************************************************************/
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 #include <vector>
 
-#include <Misc/fgstream.hxx>
+#include <simgear/fgstream.hxx>
 
 #include "FGPhysicalProperties.h"
 
index 80c6f9f98dc36beb6bbeb93d3979a5fc5c78d049..3142de0f2ba52f6a73a9a80521a54edfd908e291 100644 (file)
@@ -54,7 +54,7 @@ HISTORY
 #  include <config.h>
 #endif
 
-#include <Include/compiler.h>
+#include <simgear/compiler.h>
 
 #ifdef HAVE_WINDOWS_H
 #  include <windows.h>
index a2dcee18676a01c160a6bb23ed0d8b5af552088d..1f2162cb749e97048fe3f69b056ae367a15f3493 100644 (file)
@@ -16,4 +16,4 @@ libWeatherCM_a_SOURCES = \
        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