]> git.mxchange.org Git - flightgear.git/commitdiff
- Added "SG" prefix to sound classes that recently moved to SimGear.
authorcurt <curt>
Fri, 9 May 2003 19:39:48 +0000 (19:39 +0000)
committercurt <curt>
Fri, 9 May 2003 19:39:48 +0000 (19:39 +0000)
- Cleaned up some minor compiler warnings.
- Moved src/Model/placement.[ch]xx over into simgear/scene/model/

26 files changed:
src/ATC/AIEntity.hxx
src/ATC/ATC.cxx
src/Cockpit/kr_87.cxx
src/Cockpit/marker_beacon.cxx
src/Cockpit/navcom.cxx
src/Cockpit/panel.cxx
src/FDM/LaRCsim.cxx
src/FDM/YASim/YASim.cxx
src/FDM/flight.cxx
src/GUI/menubar.cxx
src/Main/fg_init.cxx
src/Main/fg_props.cxx
src/Main/globals.hxx
src/Main/viewer.cxx
src/Model/Makefile.am
src/Model/acmodel.cxx
src/Model/modelmgr.cxx
src/Model/placement.cxx [deleted file]
src/Model/placement.hxx [deleted file]
src/Network/multiplay.cxx
src/Sound/beacon.cxx
src/Sound/beacon.hxx
src/Sound/fg_fx.cxx
src/Sound/fg_fx.hxx
src/Sound/morse.cxx
src/Sound/morse.hxx

index 17c62b0c69fe523ed50b6531a39666ec3ccba998..3156c4724782ed120feb006b98e18df7dedb243b 100644 (file)
@@ -25,9 +25,9 @@
 #include <plib/ssg.h>
 
 #include <simgear/math/point3d.hxx>
+#include <simgear/scene/model/placement.hxx>
 
 #include <Model/model.hxx>
-#include <Model/placement.hxx>
 
 
 /*****************************************************************
@@ -47,9 +47,9 @@ public:
     // Run the internal calculations
     virtual void Update(double dt);
        
-       // Send a transmission *TO* the AIEntity.
-       // FIXME int code is a hack - eventually this will receive Alexander's coded messages.
-       virtual void RegisterTransmission(int code);
+    // Send a transmission *TO* the AIEntity.
+    // FIXME int code is a hack - eventually this will receive Alexander's coded messages.
+    virtual void RegisterTransmission(int code);
 
 protected:
 
index 11705bdee545977484baf9ec5ca2735466a23878..38af59ef5fe116dd3cd664b9dfbb9721dd1daf5b 100644 (file)
@@ -74,7 +74,7 @@ void FGATC::Render(string msg, string refname, bool repeating) {
                int len;
                unsigned char* buf = vPtr->WriteMessage((char*)msg.c_str(), len, voice);
                if(voice) {
-                       SimpleSound* simple = new SimpleSound(buf, len);
+                       SGSimpleSound* simple = new SGSimpleSound(buf, len);
                        // TODO - at the moment the volume is always set off comm1 
                        // and can't be changed after the transmission has started.
                        simple->set_volume(5.0 * fgGetDouble("/radios/comm[0]/volume"));
index fcffd0d1150beaa6c3c1a168be6ec71367b73808..ea3afd644b56350362102ec63cde16c6c1748a37 100644 (file)
@@ -445,7 +445,7 @@ void FGKR_87::update( double dt ) {
        // play station ident via audio system if on + ant mode,
        // otherwise turn it off
        if ( vol_btn >= 0.01 && audio_btn ) {
-           SimpleSound *sound;
+           SGSimpleSound *sound;
            sound = globals->get_soundmgr()->find( "adf-ident" );
             if ( sound != NULL ) {
                 if ( !adf_btn ) {
@@ -514,7 +514,7 @@ void FGKR_87::search() {
            if ( globals->get_soundmgr()->exists( "adf-ident" ) ) {
                globals->get_soundmgr()->remove( "adf-ident" );
            }
-           SimpleSound *sound;
+           SGSimpleSound *sound;
            sound = morse.make_ident( trans_ident, LO_FREQUENCY );
            sound->set_volume( 0.3 );
            globals->get_soundmgr()->add( sound, "adf-ident" );
index d40a02c4a541c1ceb5e8e69366cc0c86488c9285..eed3f1a032f83147c7bb337cac87d0136b3e2120 100644 (file)
@@ -193,7 +193,7 @@ void FGMarkerBeacon::search()
        // cout << "OUTER MARKER" << endl;
         if ( last_beacon != FGMkrBeacon::OUTER ) {
             if ( ! globals->get_soundmgr()->exists( "outer-marker" ) ) {
-                SimpleSound *sound = beacon.get_outer();
+                SGSimpleSound *sound = beacon.get_outer();
                 sound->set_volume( 0.3 );
                 globals->get_soundmgr()->add( sound, "outer-marker" );
             }
@@ -210,7 +210,7 @@ void FGMarkerBeacon::search()
        // cout << "MIDDLE MARKER" << endl;
        if ( last_beacon != FGMkrBeacon::MIDDLE ) {
            if ( ! globals->get_soundmgr()->exists( "middle-marker" ) ) {
-               SimpleSound *sound = beacon.get_middle();
+               SGSimpleSound *sound = beacon.get_middle();
                sound->set_volume( 0.3 );
                globals->get_soundmgr()->add( sound, "middle-marker" );
            }
@@ -227,7 +227,7 @@ void FGMarkerBeacon::search()
        // cout << "INNER MARKER" << endl;
        if ( last_beacon != FGMkrBeacon::INNER ) {
            if ( ! globals->get_soundmgr()->exists( "inner-marker" ) ) {
-               SimpleSound *sound = beacon.get_inner();
+               SGSimpleSound *sound = beacon.get_inner();
                sound->set_volume( 0.3 );
                globals->get_soundmgr()->add( sound, "inner-marker" );
            }
index bdcdbd2a45c2860413a7254469e247548c18f516..5a87b7461b20cfc2577935e664e86e7a5d2230d5 100644 (file)
@@ -336,7 +336,7 @@ FGNavCom::update(double dt)
             nav_gs_dist = sqrt( dist );
             // cout << nav_gs_dist;
 
-            Point3D tmp( nav_gs_x, nav_gs_y, nav_gs_z );
+            // Point3D tmp( nav_gs_x, nav_gs_y, nav_gs_z );
             // cout << " (" << aircraft.distance3D( tmp ) << ")" << endl;
 
             // wgs84 heading to glide slope (to determine sign of distance)
@@ -410,7 +410,7 @@ FGNavCom::update(double dt)
        if ( power_btn && (bus_power->getDoubleValue() > 1.0)
              && nav_ident_btn && audio_btn )
         {
-           SimpleSound *sound;
+           SGSimpleSound *sound;
            sound = globals->get_soundmgr()->find( nav_fx_name );
             if ( sound != NULL ) {
                 sound->set_volume( nav_vol_btn );
@@ -522,7 +522,7 @@ void FGNavCom::search()
            if ( globals->get_soundmgr()->exists( nav_fx_name ) ) {
                globals->get_soundmgr()->remove( nav_fx_name );
            }
-           SimpleSound *sound;
+           SGSimpleSound *sound;
            sound = morse.make_ident( nav_trans_ident, LO_FREQUENCY );
            sound->set_volume( 0.3 );
            globals->get_soundmgr()->add( sound, nav_fx_name );
@@ -572,7 +572,7 @@ void FGNavCom::search()
            if ( globals->get_soundmgr()->exists( nav_fx_name ) ) {
                globals->get_soundmgr()->remove( nav_fx_name );
            }
-           SimpleSound *sound;
+           SGSimpleSound *sound;
            sound = morse.make_ident( nav_trans_ident, LO_FREQUENCY );
            sound->set_volume( 0.3 );
            if ( globals->get_soundmgr()->add( sound, nav_fx_name ) ) {
index 799298cb2a5a9617c4a8d8bbc685ef0509ed50f6..d593223181b9eac8e1227b511b1ae999b58f3bc6 100644 (file)
@@ -174,13 +174,13 @@ FGPanel::FGPanel ()
     _mouseInstrument(0),
     _width(WIN_W), _height(int(WIN_H * 0.5768 + 1)),
     _view_height(int(WIN_H * 0.4232)),
-    _xsize_node(fgGetNode("/sim/startup/xsize", true)),
-    _ysize_node(fgGetNode("/sim/startup/ysize", true)),
     _visibility(fgGetNode("/sim/panel/visibility", true)),
     _x_offset(fgGetNode("/sim/panel/x-offset", true)),
     _y_offset(fgGetNode("/sim/panel/y-offset", true)),
     _jitter(fgGetNode("/sim/panel/jitter", true)),
-    _flipx(fgGetNode("/sim/panel/flip-x", true))
+    _flipx(fgGetNode("/sim/panel/flip-x", true)),
+    _xsize_node(fgGetNode("/sim/startup/xsize", true)),
+    _ysize_node(fgGetNode("/sim/startup/ysize", true))
 {
 }
 
@@ -432,13 +432,13 @@ FGPanel::draw()
 
   // Draw yellow "hotspots" if directed to.  This is a panel authoring
   // feature; not intended to be high performance or to look good.
-  if(fgGetBool("/sim/panel-hotspots")) {
+  if ( fgGetBool("/sim/panel-hotspots") ) {
     glPushAttrib(GL_ALL_ATTRIB_BITS);
     glDisable(GL_DEPTH_TEST);
     glDisable(GL_TEXTURE_2D);
     glColor3f(1, 1, 0);
     
-    for(int i=0; i<_instruments.size(); i++)
+    for ( unsigned int i = 0; i < _instruments.size(); i++ )
       _instruments[i]->drawHotspots();
 
     glPopAttrib();
@@ -673,7 +673,7 @@ FGPanelInstrument::~FGPanelInstrument ()
 void
 FGPanelInstrument::drawHotspots()
 {
-  for(int i=0; i<_actions.size(); i++) {
+  for ( unsigned int i = 0; i < _actions.size(); i++ ) {
     FGPanelAction* a = _actions[i];
     float x1 = getXPos() + a->getX();
     float x2 = x1 + a->getWidth();
index fe404157e9a363db77d34d79d98d3000952d191d..3a27172e4bf7ad92f3bcd735c7f73143e24b32b1 100644 (file)
 #include <simgear/constants.h>
 #include <simgear/debug/logstream.hxx>
 #include <simgear/scene/model/location.hxx>
+#include <simgear/scene/model/placement.hxx>
 
 #include <Aircraft/aircraft.hxx>
 #include <Controls/controls.hxx>
-#include <Model/placement.hxx>
 #include <FDM/flight.hxx>
 #include <FDM/LaRCsim/ls_cockpit.h>
 #include <FDM/LaRCsim/ls_generic.h>
index a57e5e42cad68aef8ca14451b83261e38b3efce2..6173f2d5f4fdb41ee417ca0464f6055ce1806b29 100644 (file)
@@ -1,12 +1,12 @@
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/scene/model/location.hxx>
+#include <simgear/scene/model/placement.hxx>
 #include <simgear/xml/easyxml.hxx>
 
 #include <Main/globals.hxx>
 #include <Main/fg_props.hxx>
 #include <Model/acmodel.hxx>
-#include <Model/placement.hxx>
 
 #include "FGFDM.hpp"
 #include "Atmosphere.hpp"
index f9ba04a615c56fee223b6c7de0832742ed83b8b7..9274166f17fa10673985cab134c314f69c883b02 100644 (file)
 #include <simgear/debug/logstream.hxx>
 #include <simgear/math/sg_geodesy.hxx>
 #include <simgear/scene/model/location.hxx>
+#include <simgear/scene/model/placement.hxx>
 #include <simgear/timing/timestamp.hxx>
 
 #include <Scenery/scenery.hxx>
 #include <FDM/LaRCsim/ls_interface.h>
 #include <Main/globals.hxx>
 #include <Main/fg_props.hxx>
-#include <Model/placement.hxx>
 #include <Model/acmodel.hxx>
 
 #include "flight.hxx"
index da8c09060146ad4a53a4a8c9bec9b169ac7b6f06..0164dd2d86a0796376ba377c2cb7503cf3532ea2 100644 (file)
@@ -208,7 +208,7 @@ FGMenuBar::~FGMenuBar ()
     hide();
     puDeleteObject(_menuBar);
 
-    int i;
+    unsigned int i;
 
                                 // Delete all the character arrays
                                 // we were forced to keep around for
@@ -233,7 +233,7 @@ FGMenuBar::~FGMenuBar ()
     it = _bindings.begin();
     for (it = _bindings.begin(); it != _bindings.end(); it++) {
         SG_LOG(SG_GENERAL, SG_INFO, "Deleting bindings for " << it->first);
-        for (int i = 0; i < it->second.size(); i++)
+        for ( i = 0; i < it->second.size(); i++ )
             delete it->second[i];
     }
 
@@ -296,7 +296,7 @@ FGMenuBar::make_menu (SGPropertyNode * node)
     char ** items = make_char_array(array_size);
     puCallback * callbacks = make_callback_array(array_size);
 
-    for (int i = 0, j = item_nodes.size() - 1;
+    for (unsigned int i = 0, j = item_nodes.size() - 1;
          i < item_nodes.size();
          i++, j--) {
         
@@ -308,7 +308,7 @@ FGMenuBar::make_menu (SGPropertyNode * node)
         vector<SGPropertyNode_ptr> binding_nodes =
             item_nodes[i]->getChildren("binding");
 
-        for (int k = 0; k < binding_nodes.size(); k++)
+        for (unsigned int k = 0; k < binding_nodes.size(); k++)
             _bindings[items[j]].push_back(new FGBinding(binding_nodes[k]));
     }
 
@@ -323,7 +323,7 @@ FGMenuBar::make_menubar ()
 
     fgLoadProps("gui/menubar.xml", &props);
     vector<SGPropertyNode_ptr> menu_nodes = props.getChildren("menu");
-    for (int i = 0; i < menu_nodes.size(); i++)
+    for (unsigned int i = 0; i < menu_nodes.size(); i++)
         make_menu(menu_nodes[i]);
 
     _menuBar->close();
index 22977d0a7640c7d312735ef42e3ee95950a7fc0a..856977bd2f7d50c469276f5a4e48fd6aeba5424f 100644 (file)
@@ -1539,7 +1539,7 @@ bool fgInitSubsystems() {
     // Initialize the sound subsystem.
     ////////////////////////////////////////////////////////////////////
 
-    globals->set_soundmgr(new SoundMgr);
+    globals->set_soundmgr(new SGSoundMgr);
     globals->get_soundmgr()->init();
     globals->get_soundmgr()->bind();
 
index a68e2403ece39b64cc1d572582fe53fc98db5dc3..de3e11d26ff01761969ce54a0294ce625ae53f90 100644 (file)
@@ -234,7 +234,7 @@ setFreeze (bool f)
     frozen = f;
 
     // Stop sound on a pause
-    SoundMgr *s = globals->get_soundmgr();
+    SGSoundMgr *s = globals->get_soundmgr();
     if ( s != NULL ) {
         if ( f ) {
             s->pause();
index e4ac10732b42d4fc39960e52a969378b25e65fb0..606cb79ecae827ff6ad97478644c0090dbd3b03c 100644 (file)
@@ -55,7 +55,7 @@ class SGMagVar;
 class SGPropertyNode;
 class SGRoute;
 class SGTime;
-class SoundMgr;
+class SGSoundMgr;
 
 class FGAIMgr;
 class FGATCMgr;
@@ -130,7 +130,7 @@ private:
     FGPanel *current_panel;
 
     // sound manager
-    SoundMgr *soundmgr;
+    SGSoundMgr *soundmgr;
 
     // environment information
     FGEnvironmentMgr * environment_mgr;
@@ -257,8 +257,8 @@ public:
     inline FGPanel *get_current_panel() const { return current_panel; }
     inline void set_current_panel( FGPanel *cp ) { current_panel = cp; }
 
-    inline SoundMgr *get_soundmgr() const { return soundmgr; }
-    inline void set_soundmgr( SoundMgr *sm ) { soundmgr = sm; }
+    inline SGSoundMgr *get_soundmgr() const { return soundmgr; }
+    inline void set_soundmgr( SGSoundMgr *sm ) { soundmgr = sm; }
 
     inline FGControls *get_controls() const { return controls; }
     inline void set_controls( FGControls *c ) { controls = c; }
index 1f6c1d450006198e338014844447d331be0817cb..cf56c96a0386d720042cd26a152e8428f70223e8 100644 (file)
 #include <simgear/math/polar3d.hxx>
 #include <simgear/math/sg_geodesy.hxx>
 #include <simgear/scene/model/location.hxx>
+#include <simgear/scene/model/placement.hxx>
 #include <simgear/math/vector.hxx>
 
 #include <Main/globals.hxx>
 #include <Scenery/scenery.hxx>
 #include <Model/acmodel.hxx>
-#include <Model/placement.hxx>
 
 #include "viewer.hxx"
 
index 9397c0159ff42b224f361c09b880843cb0304a2b..b08a8e6895b927e23711568a21f3aa408547925a 100644 (file)
@@ -6,7 +6,6 @@ libModel_a_SOURCES = \
        model.cxx model.hxx \
        model_panel.cxx model_panel.hxx \
         modelmgr.cxx modelmgr.hxx \
-        panelnode.cxx panelnode.hxx \
-       placement.cxx placement.hxx
+        panelnode.cxx panelnode.hxx
 
 INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src
index 1155d824ffccec6a189916106f824cbab03defe8..14d996b124a2746ccd03818db865e2a0784a209c 100644 (file)
@@ -16,6 +16,7 @@
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/exception.hxx>
 #include <simgear/misc/sg_path.hxx>
+#include <simgear/scene/model/placement.hxx>
 
 #include <Main/globals.hxx>
 #include <Main/fg_props.hxx>
@@ -23,7 +24,6 @@
 #include <Scenery/scenery.hxx>
 
 #include "model_panel.hxx"
-#include "placement.hxx"
 
 #include "acmodel.hxx"
 
index 72d257368421b74b0041f3bd3aeb1ffa985c4bb9..f178b26e9c29f2bdf371c7ab7c4ea1314b250df8 100644 (file)
@@ -3,16 +3,23 @@
 //
 // This file is in the Public Domain, and comes with no warranty.
 
+#include <simgear/compiler.h>
+
+#include <vector>
+
 #include <plib/ssg.h>
 
+#include <simgear/scene/model/placement.hxx>
+
 #include <Main/fg_props.hxx>
 #include <Scenery/scenery.hxx>
 
 #include "model.hxx"
-#include "placement.hxx"
 
 #include "modelmgr.hxx"
 
+SG_USING_STD(vector);
+
 
 FGModelMgr::FGModelMgr ()
   : _selector(new ssgSelector)
diff --git a/src/Model/placement.cxx b/src/Model/placement.cxx
deleted file mode 100644 (file)
index ac856e6..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-// placement.cxx - manage the placment of a 3D model.
-// Written by David Megginson, started 2002.
-//
-// This file is in the Public Domain, and comes with no warranty.
-
-#include <simgear/compiler.h>
-
-#include <string.h>             // for strcmp()
-
-#include <vector>
-
-#include <plib/sg.h>
-#include <plib/ssg.h>
-#include <plib/ul.h>
-
-#include <simgear/scene/model/location.hxx>
-
-#include "placement.hxx"
-
-SG_USING_STD(vector);
-
-
-\f
-////////////////////////////////////////////////////////////////////////
-// Implementation of FGModelPlacement.
-////////////////////////////////////////////////////////////////////////
-
-FGModelPlacement::FGModelPlacement ()
-  : _lon_deg(0),
-    _lat_deg(0),
-    _elev_ft(0),
-    _roll_deg(0),
-    _pitch_deg(0),
-    _heading_deg(0),
-    _selector(new ssgSelector),
-    _position(new ssgTransform),
-    _location(new FGLocation)
-{
-}
-
-FGModelPlacement::~FGModelPlacement ()
-{
-}
-
-void
-FGModelPlacement::init( ssgBranch * model )
-{
-  if (model != 0) {
-      _position->addKid(model);
-  }
-  _selector->addKid(_position);
-  _selector->clrTraversalMaskBits(SSGTRAV_HOT);
-}
-
-void
-FGModelPlacement::update( const Point3D scenery_center )
-{
-  _location->setPosition( _lon_deg, _lat_deg, _elev_ft );
-  _location->setOrientation( _roll_deg, _pitch_deg, _heading_deg );
-
-  sgCopyMat4( POS, _location->getTransformMatrix(scenery_center) );
-
-  sgVec3 trans;
-  sgCopyVec3(trans, _location->get_view_pos());
-
-  for(int i = 0; i < 4; i++) {
-    float tmp = POS[i][3];
-    for( int j=0; j<3; j++ ) {
-      POS[i][j] += (tmp * trans[j]);
-    }
-  }
-  _position->setTransform(POS);
-}
-
-bool
-FGModelPlacement::getVisible () const
-{
-  return (_selector->getSelect() != 0);
-}
-
-void
-FGModelPlacement::setVisible (bool visible)
-{
-  _selector->select(visible);
-}
-
-void
-FGModelPlacement::setLongitudeDeg (double lon_deg)
-{
-  _lon_deg = lon_deg;
-}
-
-void
-FGModelPlacement::setLatitudeDeg (double lat_deg)
-{
-  _lat_deg = lat_deg;
-}
-
-void
-FGModelPlacement::setElevationFt (double elev_ft)
-{
-  _elev_ft = elev_ft;
-}
-
-void
-FGModelPlacement::setPosition (double lon_deg, double lat_deg, double elev_ft)
-{
-  _lon_deg = lon_deg;
-  _lat_deg = lat_deg;
-  _elev_ft = elev_ft;
-}
-
-void
-FGModelPlacement::setRollDeg (double roll_deg)
-{
-  _roll_deg = roll_deg;
-}
-
-void
-FGModelPlacement::setPitchDeg (double pitch_deg)
-{
-  _pitch_deg = pitch_deg;
-}
-
-void
-FGModelPlacement::setHeadingDeg (double heading_deg)
-{
-  _heading_deg = heading_deg;
-}
-
-void
-FGModelPlacement::setOrientation (double roll_deg, double pitch_deg,
-                                  double heading_deg)
-{
-  _roll_deg = roll_deg;
-  _pitch_deg = pitch_deg;
-  _heading_deg = heading_deg;
-}
-
-// end of model.cxx
diff --git a/src/Model/placement.hxx b/src/Model/placement.hxx
deleted file mode 100644 (file)
index 453353b..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-// placement.hxx - manage the placment of a 3D model.
-// Written by David Megginson, started 2002.
-//
-// This file is in the Public Domain, and comes with no warranty.
-
-
-#ifndef _SG_PLACEMENT_HXX
-#define _SG_PLACEMENT_HXX 1
-
-#ifndef __cplusplus
-# error This library requires C++
-#endif
-
-#include <vector>
-
-SG_USING_STD(vector);
-
-#include <plib/sg.h>
-#include <plib/ssg.h>
-
-#include <simgear/math/point3d.hxx>
-#include <simgear/props/props.hxx>
-
-
-// Don't pull in the headers, since we don't need them here.
-class FGLocation;
-
-
-// Has anyone done anything *really* stupid, like making min and max macros?
-#ifdef min
-#undef min
-#endif
-#ifdef max
-#undef max
-#endif
-
-
-////////////////////////////////////////////////////////////////////////
-// Model placement.
-////////////////////////////////////////////////////////////////////////
-
-/**
- * A wrapper for a model with a definite placement.
- */
-class FGModelPlacement
-{
-public:
-
-  FGModelPlacement ();
-  virtual ~FGModelPlacement ();
-
-    virtual void FGModelPlacement::init( ssgBranch * model );
-  /* virtual void init( const string &fg_root,
-                     const string &path,
-                     SGPropertyNode *prop_root,
-                     double sim_time_sec, int dummy ); */
-  virtual void update( const Point3D scenery_center );
-
-  virtual ssgEntity * getSceneGraph () { return (ssgEntity *)_selector; }
-
-  virtual FGLocation * getFGLocation () { return _location; }
-
-  virtual bool getVisible () const;
-  virtual void setVisible (bool visible);
-
-  virtual double getLongitudeDeg () const { return _lon_deg; }
-  virtual double getLatitudeDeg () const { return _lat_deg; }
-  virtual double getElevationFt () const { return _elev_ft; }
-
-  virtual void setLongitudeDeg (double lon_deg);
-  virtual void setLatitudeDeg (double lat_deg);
-  virtual void setElevationFt (double elev_ft);
-  virtual void setPosition (double lon_deg, double lat_deg, double elev_ft);
-
-  virtual double getRollDeg () const { return _roll_deg; }
-  virtual double getPitchDeg () const { return _pitch_deg; }
-  virtual double getHeadingDeg () const { return _heading_deg; }
-
-  virtual void setRollDeg (double roll_deg);
-  virtual void setPitchDeg (double pitch_deg);
-  virtual void setHeadingDeg (double heading_deg);
-  virtual void setOrientation (double roll_deg, double pitch_deg,
-                               double heading_deg);
-  
-  // Addition by Diarmuid Tyson for Multiplayer Support
-  // Allows multiplayer to get players position transform
-  virtual const sgVec4 *get_POS() { return POS; }
-
-private:
-
-                                // Geodetic position
-  double _lon_deg;
-  double _lat_deg;
-  double _elev_ft;
-
-                                // Orientation
-  double _roll_deg;
-  double _pitch_deg;
-  double _heading_deg;
-
-  ssgSelector * _selector;
-  ssgTransform * _position;
-
-                                // Location
-  FGLocation * _location;
-
-
-  // Addition by Diarmuid Tyson for Multiplayer Support
-  // Moved from update method
-  // POS for transformation Matrix
-  sgMat4 POS;
-
-};
-
-#endif // _SG_PLACEMENT_HXX
index ff88c98c2fcea84c2edc3dc520caa5914cbab887..4bc37c120acd023a07de770fe50b9bb8d9eb1404 100644 (file)
@@ -28,8 +28,7 @@
 #include <iostream>
 
 #include <simgear/debug/logstream.hxx>
-
-#include <Model/placement.hxx>
+#include <simgear/scene/model/placement.hxx>
 
 #include "multiplay.hxx"
 
index 66cc8898a01edcccf6a5d3b634a362198e0347fc..3da3843f9f7f0997c693289f46876fa523f26672 100644 (file)
@@ -51,7 +51,7 @@ bool FGBeacon::init() {
        ptr += INNER_DIT_LEN;
     }
 
-    inner = new SimpleSound( inner_buf, INNER_SIZE );
+    inner = new SGSimpleSound( inner_buf, INNER_SIZE );
 
     // Make middle marker beacon sound
     len= (int)(MIDDLE_DIT_LEN / 2.0 );
@@ -69,7 +69,7 @@ bool FGBeacon::init() {
     ptr += MIDDLE_DIT_LEN;
     memcpy( ptr, middle_dah, MIDDLE_DAH_LEN );
 
-    middle = new SimpleSound( middle_buf, MIDDLE_SIZE );
+    middle = new SGSimpleSound( middle_buf, MIDDLE_SIZE );
 
     // Make outer marker beacon sound
     len= (int)(OUTER_DAH_LEN * 3.0 / 4.0 );
@@ -82,7 +82,7 @@ bool FGBeacon::init() {
     ptr += OUTER_DAH_LEN;
     memcpy( ptr, outer_dah, OUTER_DAH_LEN );
 
-    outer = new SimpleSound( outer_buf, OUTER_SIZE );
+    outer = new SGSimpleSound( outer_buf, OUTER_SIZE );
 
     return true;
 }
index dc0cb0daf0f9b0f1df50151ccf7ae10c264f671f..3b9a6e3c026697b77a9d66faef0ac533148aaa14 100644 (file)
@@ -100,9 +100,9 @@ private:
     unsigned char middle_buf[ MIDDLE_SIZE ] ;
     unsigned char outer_buf[ OUTER_SIZE ] ;
 
-    SimpleSound *inner;
-    SimpleSound *middle;
-    SimpleSound *outer;
+    SGSimpleSound *inner;
+    SGSimpleSound *middle;
+    SGSimpleSound *outer;
 
 public:
 
@@ -112,9 +112,9 @@ public:
     // allocate and initialize sound samples
     bool init();
 
-    SimpleSound *get_inner() { return inner; }
-    SimpleSound *get_middle() { return middle; }
-    SimpleSound *get_outer() { return outer; }
+    SGSimpleSound *get_inner() { return inner; }
+    SGSimpleSound *get_middle() { return middle; }
+    SGSimpleSound *get_outer() { return outer; }
    
 };
 
index 11ed71fa8992dd8747b84d6be880f916e032c90c..939e2c8c606f0a366651179a09dc27f665bcca5a 100644 (file)
@@ -76,7 +76,7 @@ FGFX::init()
 
    node = root.getNode("fx");
    for (i = 0; i < node->nChildren(); i++) {
-      Sound *sound = new Sound();
+      SGSound *sound = new SGSound();
 
       sound->init(globals->get_props(), node->getChild(i),
                   globals->get_soundmgr(), globals->get_fg_root());
index aaca87b9f01fec8d5161ff1e8357ce006f4619a2..a28ca9a7b80065574e702a618b50b06f698800f3 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <Main/fgfs.hxx>
 
-class Sound;
+class SGSound;
 
 /**
  * Generator for FlightGear sound effects.
@@ -51,7 +51,7 @@ public:
 
 private:
 
-  vector<Sound *> _sound;
+  vector<SGSound *> _sound;
 
 };
 
index 59796497b3648b02205d8106c1f2c4c55a3e306c..f9b2fd11440e39c636fc2352ce790a4ca903a512 100644 (file)
@@ -165,8 +165,8 @@ bool FGMorse::cust_init(const int freq ) {
 }
 
 
-// make a SimpleSound morse code transmission for the specified string
-SimpleSound *FGMorse::make_ident( const string& id, const int freq ) {
+// make a SGSimpleSound morse code transmission for the specified string
+SGSimpleSound *FGMorse::make_ident( const string& id, const int freq ) {
     char *idptr = (char *)id.c_str();
 
     int length = 0;
@@ -260,7 +260,7 @@ SimpleSound *FGMorse::make_ident( const string& id, const int freq ) {
     buf_ptr += SPACE_SIZE;
 
     // 4. create the simple sound and return
-    SimpleSound *sample = new SimpleSound( buffer, length );
+    SGSimpleSound *sample = new SGSimpleSound( buffer, length );
 
     return sample;
 }
index d64daecc528d986671505886a4c12df2cf4cdfa5..6166e747586ebe40dc4c383671bc0af5e3b8e2a2 100644 (file)
@@ -124,7 +124,7 @@ public:
     bool init();
 
     // make a SimpleSound morse code transmission for the specified string
-    SimpleSound *make_ident( const string& id,
+    SGSimpleSound *make_ident( const string& id,
                               const int freq = LO_FREQUENCY );
 };