]> git.mxchange.org Git - flightgear.git/commitdiff
Modified Files:
authorfrohlich <frohlich>
Wed, 9 May 2007 20:41:08 +0000 (20:41 +0000)
committerfrohlich <frohlich>
Wed, 9 May 2007 20:41:08 +0000 (20:41 +0000)
src/ATC/AIPlane.cxx src/ATC/ATC.cxx src/ATC/ATCDialog.cxx
src/ATC/ATCmgr.cxx src/ATC/Makefile.am src/ATC/approach.cxx
src/ATC/atis.cxx src/ATC/ground.cxx src/ATC/tower.cxx
src/GUI/mouse.cxx src/Main/Makefile.am src/Main/fg_init.cxx
src/Main/fg_props.cxx src/Main/globals.cxx
src/Main/globals.hxx src/Main/main.cxx src/Main/renderer.cxx
src/Model/acmodel.cxx src/Scenery/scenery.cxx
src/Scenery/scenery.hxx src/Scenery/tilemgr.cxx
src/Scenery/tilemgr.hxx
Removed Files:
src/ATC/ATCdisplay.cxx src/ATC/ATCdisplay.hxx:
Remove unused functions and the disabled ATC display.

21 files changed:
src/ATC/AIPlane.cxx
src/ATC/ATC.cxx
src/ATC/ATCDialog.cxx
src/ATC/ATCdisplay.cxx [deleted file]
src/ATC/ATCdisplay.hxx [deleted file]
src/ATC/ATCmgr.cxx
src/ATC/Makefile.am
src/ATC/approach.cxx
src/ATC/atis.cxx
src/ATC/ground.cxx
src/ATC/tower.cxx
src/GUI/mouse.cxx
src/Main/fg_init.cxx
src/Main/fg_props.cxx
src/Main/globals.cxx
src/Main/globals.hxx
src/Main/main.cxx
src/Main/renderer.cxx
src/Model/acmodel.cxx
src/Scenery/tilemgr.cxx
src/Scenery/tilemgr.hxx

index 8158a008881cd8474110bf2fab5c59401433c480..84006294d984304c968cbdaf0c4fe77d3d908754 100644 (file)
@@ -29,7 +29,6 @@ SG_USING_STD(string);
 
 
 #include "AIPlane.hxx"
-#include "ATCdisplay.hxx"
 
 FGAIPlane::FGAIPlane() {
        leg = LEG_UNKNOWN;
@@ -210,7 +209,6 @@ void FGAIPlane::Render(const string& refname, bool repeating) {
                                pending_transmission[i] = ' ';
                        }
                }
-               globals->get_ATC_display()->RegisterSingleMessage(pending_transmission, 0.0);
        }
        playing = true; 
 }
@@ -224,8 +222,6 @@ void FGAIPlane::NoRender(const string& refname) {
                        globals->get_soundmgr()->stop(refname);
                        globals->get_soundmgr()->remove(refname);
 #endif
-               } else {
-                       globals->get_ATC_display()->CancelRepeatingMessage();
                }
                playing = false;
        }
index c0352fa59ea9b09a1852361f01d9ed827f672401..2bc321805619481bed8f0698fdeb42cdfd700693 100644 (file)
@@ -29,7 +29,6 @@
 #include <Main/fg_props.hxx>
 
 #include "ATC.hxx"
-#include "ATCdisplay.hxx"
 
 FGATC::FGATC() {
        freqClear = true;
@@ -109,8 +108,6 @@ void FGATC::Update(double dt) {
                if(_display) {
                        //Render(pending_transmission, ident, false);
                        Render(pending_transmission);
-                       // At the moment Render only works for ATIS
-                       //globals->get_ATC_display()->RegisterSingleMessage(pending_transmission);
                }
                // Run the callback regardless of whether on same freq as user or not.
                //cout << "_callback_code = " << _callback_code << '\n';
@@ -185,7 +182,6 @@ void FGATC::ImmediateTransmit(int callback_code) {
                //Render(pending_transmission, ident, false);
                Render(pending_transmission);
                // At the moment Render doesn't work except for ATIS
-               //globals->get_ATC_display()->RegisterSingleMessage(pending_transmission);
        }
        if(callback_code) {
                ProcessCallback(callback_code);
@@ -258,11 +254,6 @@ void FGATC::Render(string& msg, const string& refname, bool repeating) {
                                msg[i] = ' ';
                        }
                }
-               if(repeating) {
-                       globals->get_ATC_display()->RegisterRepeatingMessage(msg);
-               } else {
-                       globals->get_ATC_display()->RegisterSingleMessage(msg);
-               }
        }
        _playing = true;        
 }
@@ -276,8 +267,6 @@ void FGATC::NoRender(const string& refname) {
                        globals->get_soundmgr()->stop(refname);
                        globals->get_soundmgr()->remove(refname);
 #endif
-               } else {
-                       globals->get_ATC_display()->CancelRepeatingMessage();
                }
                _playing = false;
        }
index 3119ae3364adbb6862f4ee114f5656b0f677efc9..ab54a3f7b22b409e563128f4802883e5e5b1d557 100644 (file)
@@ -33,7 +33,6 @@
 #include "ATCDialog.hxx"
 #include "ATC.hxx"
 #include "ATCmgr.hxx"
-#include "ATCdisplay.hxx"
 #include "commlist.hxx"
 #include "ATCutils.hxx"
 #include <Airports/simple.hxx>
@@ -274,7 +273,6 @@ void FGATCDialog::PopupCallback(int num) {
                        string pilot = atcptr->GenText(a.transmission, a.callback_code);
                        fgSetString("/sim/messages/pilot", pilot.c_str());
                        // This is the user's speech getting displayed.
-                       globals->get_ATC_display()->RegisterSingleMessage(pilot);
                        _callbackPending = true;
                        _callbackTimer = 0.0;
                        _callbackWait = 5.0;
diff --git a/src/ATC/ATCdisplay.cxx b/src/ATC/ATCdisplay.cxx
deleted file mode 100644 (file)
index e554a4d..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-// ATCdisplay.cxx - routines to display ATC output - graphically for now
-//
-// Written by David Luff, started October 2001.
-//
-// Copyright (C) 2001  David C Luff - david.luff@nottingham.ac.uk
-//
-// 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#ifdef HAVE_WINDOWS_H
-#   include <windows.h>
-#endif
-
-#include <simgear/compiler.h>
-
-#include SG_GLU_H
-
-#include <simgear/props/props.hxx>
-
-#include <Include/general.hxx>
-#include <Main/fg_props.hxx>
-#include <GUI/gui.h>
-
-#include "ATCdisplay.hxx"
-
-
-// Constructor
-FGATCDisplay::FGATCDisplay() {
-       rep_msg = false;
-       change_msg_flag = false;
-       dsp_offset1 = 0.0;
-       dsp_offset2 = 0.0;
-}
-
-
-// Destructor
-FGATCDisplay::~FGATCDisplay() {
-}
-
-void FGATCDisplay::init() {
-}
-
-void FGATCDisplay::bind() {
-}
-
-void FGATCDisplay::unbind() {
-}
-
-void FGATCDisplay::update(double dt)
-{
-  std::cout << "OSGFIXME" << std::endl;
-}
-
-// update - this actually draws the visuals and should be called from the main Flightgear rendering loop.
-void FGATCDisplay::update(double dt, osg::State& state) {
-       
-       // These strings are used for temporary storage of the transmission string in order
-       // that the string we view only changes when the next repetition starts scrolling
-       // even though the master string (rep_msg_str) may change at any time.
-       static string msg1 = "";
-       static string msg2 = "";
-       
-       if( rep_msg || msgList.size() ) {
-               //cout << "In FGATC::update()" << endl;
-               SGPropertyNode *xsize_node = fgGetNode("/sim/startup/xsize");
-               SGPropertyNode *ysize_node = fgGetNode("/sim/startup/ysize");
-               int iwidth   = xsize_node->getIntValue();
-               int iheight  = ysize_node->getIntValue();
-               
-               glMatrixMode( GL_PROJECTION );
-               glPushMatrix();
-               glLoadIdentity();
-               gluOrtho2D( 0, iwidth, 0, iheight );
-               glMatrixMode( GL_MODELVIEW );
-               glPushMatrix();
-               glLoadIdentity();
-               
-               glDisable( GL_DEPTH_TEST );
-               glDisable( GL_LIGHTING );
-               
-               glColor3f( 0.9, 0.4, 0.2 );
-               
-               float fps = general.get_frame_rate();
-               
-               if(rep_msg) {
-                       //cout << "dsp_offset1 = " << dsp_offset1 << " dsp_offset2 = " << dsp_offset2 << endl;
-                       if(dsp_offset1 == 0) {
-                               msg1 = rep_msg_str;
-                       }
-                       if(dsp_offset2 == 0) {
-                               msg2 = rep_msg_str;
-                       }
-                       // Check for the situation where one offset is negative and the message is changed
-                       if(change_msg_flag) {
-                               if(dsp_offset1 < 0) {
-                                       msg1 = rep_msg_str;
-                               } else if(dsp_offset2 < 0) {
-                                       msg2 = rep_msg_str;
-                               }
-                               change_msg_flag = false;
-                       }
-                       
-                       //      guiFnt.drawString( rep_msg_str.c_str(),
-                       //          int(iwidth - guiFnt.getStringWidth(buf) - 10 - (int)dsp_offset),
-                       //          (iheight - 20) );
-                       guiFnt.drawString( msg1.c_str(),
-                       int(iwidth - 10 - dsp_offset1),
-                       (iheight - 20) );
-                       guiFnt.drawString( msg2.c_str(),
-                       int(iwidth - 10 - dsp_offset2),
-                       (iheight - 20) );
-                       
-                       // Try to scroll at a frame rate independent speed
-                       // 40 pixels/second looks about right for now
-                       if(dsp_offset1 >= dsp_offset2) {
-                               dsp_offset1+=(40.0/fps);
-                               dsp_offset2 = dsp_offset1 - (rep_msg_str.size() * 10) - 100;
-                               if(dsp_offset1 > (iwidth + (rep_msg_str.size() * 10)))
-                                       dsp_offset1 = 0;
-                       } else {
-                               dsp_offset2+=(40.0/fps);
-                               dsp_offset1 = dsp_offset2 - (rep_msg_str.size() * 10) - 100;
-                               if(dsp_offset2 > (iwidth + (rep_msg_str.size() * 10)))
-                                       dsp_offset2 = 0;
-                       }
-                       
-               }
-               
-               if(msgList.size()) {
-                       //cout << "Attempting to render single message\n";
-                       // We have at least one non-repeating message to process
-                       if(fgGetBool("/ATC/display/scroll-single-messages")) {  // Scroll single messages across the screen.
-                               msgList_itr = msgList.begin();
-                               int i = 0;
-                               while(msgList_itr != msgList.end()) {
-                                       atcMessage m = *msgList_itr;
-                                       //cout << "m.counter = " << m.counter << '\n';
-                                       if(m.dsp_offset > (iwidth + (m.msg.size() * 10))) {
-                                               //cout << "Stopping single message\n";
-                                               msgList_itr = msgList.erase(msgList_itr);
-                                       } else if(m.counter > m.start_count) {
-                                               //cout << "Drawing single message\n";
-                                               guiFnt.drawString( m.msg.c_str(),
-                                               int(iwidth - 10 - m.dsp_offset),
-                                               (iheight - 40) );
-                                               m.counter += dt;
-                                               m.dsp_offset += (80.0/fps);
-                                               msgList[i] = m;
-                                               ++msgList_itr;
-                                               ++i;
-                                       } else {
-                                               //cout << "Not yet started single message\n";
-                                               m.counter += dt;
-                                               msgList[i] = m;
-                                               ++msgList_itr;
-                                               ++i;
-                                       }
-                               }
-                       } else {        // Display single messages for a short period of time.
-                               msgList_itr = msgList.begin();
-                               int i = 0;
-                               while(msgList_itr != msgList.end()) {
-                                       atcMessage m = *msgList_itr;
-                                       //cout << "m.counter = " << m.counter << '\n';
-                                       if(m.counter > m.stop_count) {
-                                               //cout << "Stopping single message\n";
-                                               msgList_itr = msgList.erase(msgList_itr);
-                                       } else if(m.counter > m.start_count) {
-                                               int pin = (((int)m.msg.size() * 8) >= iwidth ? 5 : (iwidth - (m.msg.size() * 8))/2);
-                                               //cout << m.msg << '\n';
-                                               //cout << "pin = " << pin << ", iwidth = " << iwidth << ", msg.size = " << m.msg.size() << '\n';
-                                               guiFnt.drawString( m.msg.c_str(), pin, (iheight - 40) );
-                                               m.counter += dt;
-                                               msgList[i] = m;
-                                               ++msgList_itr;
-                                               ++i;
-                                       } else {
-                                               m.counter += dt;
-                                               msgList[i] = m;
-                                               ++msgList_itr;
-                                               ++i;
-                                       }
-                               }
-                       }
-               }
-               glEnable( GL_DEPTH_TEST );
-               glEnable( GL_LIGHTING );
-               glMatrixMode( GL_PROJECTION );
-               glPopMatrix();
-               glMatrixMode( GL_MODELVIEW );
-               glPopMatrix();
-       }
-}
-
-void FGATCDisplay::RegisterSingleMessage(const string& msg, double delay) {
-/**/   return;
-       //cout << msg << '\n';
-       atcMessage m;
-       m.msg = msg;
-       m.repeating = false;
-       m.counter = 0.0;
-       m.start_count = delay;
-       m.stop_count = m.start_count + 5.0;             // Display for 5ish seconds for now - this might have to change eg. be related to length of message in future
-       //cout << "m.stop_count = " << m.stop_count << '\n';
-       m.id = 0;
-       m.dsp_offset = 0.0;
-       
-       msgList.push_back(m);
-       //cout << "Single message registered\n";
-}
-
-void FGATCDisplay::RegisterRepeatingMessage(const string& msg) {
-/**/   return;
-       rep_msg = true;
-       rep_msg_str = msg;
-       return;
-}
-
-void FGATCDisplay::ChangeRepeatingMessage(const string& newmsg) {
-/**/   return;
-       rep_msg_str = newmsg;
-       change_msg_flag = true;
-       return;
-}
-
-void FGATCDisplay::CancelRepeatingMessage() {
-/**/   return;
-       rep_msg = false;
-       rep_msg_str = "";
-       dsp_offset1 = 0;
-       dsp_offset2 = 0;
-       return;
-}
-
diff --git a/src/ATC/ATCdisplay.hxx b/src/ATC/ATCdisplay.hxx
deleted file mode 100644 (file)
index bf94d0a..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-// ATCdisplay.hxx - class to manage the graphical display of ATC messages.
-//                - The idea is to separate the display of ATC messages from their
-//               - generation so that the generation may come from any source.
-//
-// Written by David Luff, started October 2001.
-//
-// Copyright (C) 2001  David C Luff - david.luff@nottingham.ac.uk
-//
-// 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-
-#ifndef _FG_ATC_DISPLAY_HXX
-#define _FG_ATC_DISPLAY_HXX
-
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif
-
-#include <osg/State>
-#include <simgear/structure/subsystem_mgr.hxx>
-
-#include <vector>
-#include <string>
-
-SG_USING_STD(vector);
-SG_USING_STD(string);
-
-struct atcMessage {
-    string msg;
-    bool repeating;
-    double counter;            // count of how many seconds since the message was registered
-    double start_count;        // value of counter at which display should start (seconds)
-    double stop_count; // value of counter at which display should stop (seconds)
-    int id;
-       double dsp_offset;
-};
-
-// ASSUMPTION - with two radios the list won't be long so we don't need to map the id's
-typedef vector<atcMessage> atcMessageList;
-typedef atcMessageList::iterator atcMessageListIterator;
-
-class FGATCDisplay : public SGSubsystem 
-{
-
-private:
-    bool rep_msg;              // Flag to indicate there is a repeating transmission to display
-    bool change_msg_flag;      // Flag to indicate that the repeating message has changed
-    double dsp_offset1;                // Used to set the correct position of scrolling display
-    double dsp_offset2;
-    string rep_msg_str;                // The repeating transmission to play
-    atcMessageList msgList;
-    atcMessageListIterator msgList_itr;
-
-public:
-    FGATCDisplay();
-    ~FGATCDisplay();
-
-    void init();
-
-    void bind();
-
-    void unbind();
-
-    // Display any registered messages
-    void update(double dt, osg::State&);
-    void update(double dt);
-
-    // Register a single message for display after a delay of delay seconds
-    // Will automatically stop displaying after a suitable interval.
-    void RegisterSingleMessage(const string& msg, double delay = 0.0);
-
-    // For now we will assume only one repeating message at once
-    // This is not really robust
-
-    // Register a continuously repeating message
-    void RegisterRepeatingMessage(const string& msg);
-
-    // Change a repeating message - assume that the message changes after the string has finished for now
-    void ChangeRepeatingMessage(const string& newmsg); 
-
-    // Cancel the current repeating message
-    void CancelRepeatingMessage();
-};
-
-#endif // _FG_ATC_DISPLAY_HXX
index c06c6438227ba83ef5e812d4a0abebb79830b7e0..bbf99dfa620f2965f2796213d4b67ddbca58e6ff 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "ATCmgr.hxx"
 #include "commlist.hxx"
-#include "ATCdisplay.hxx"
 #include "ATCDialog.hxx"
 #include "ATCutils.hxx"
 #include "transmissionlist.hxx"
index 2107b12cf47aaefa3e3587cfb3ae998d4a3be0ed..c560d1643605eb3b973a52aa153dea45a5d6d615 100644 (file)
@@ -8,7 +8,6 @@ libATC_a_SOURCES = \
        ground.hxx ground.cxx \
        commlist.hxx commlist.cxx \
        ATCDialog.hxx ATCDialog.cxx \
-       ATCdisplay.hxx ATCdisplay.cxx \
        ATCVoice.hxx ATCVoice.cxx \
        ATCmgr.hxx ATCmgr.cxx \
        ATCutils.hxx ATCutils.cxx \
index a0c2c504d973fbbe848a67efc767153eda315663..44784abf1e5b45c52db3bf70cea496b4fdbb661a 100644 (file)
@@ -25,7 +25,6 @@
 #include "approach.hxx"
 #include "transmission.hxx"
 #include "transmissionlist.hxx"
-#include "ATCdisplay.hxx"
 #include "ATCDialog.hxx"
 
 #include <Airports/runways.hxx>
@@ -756,6 +755,5 @@ int FGApproach::RemovePlane() {
 void FGApproach::set_message(const string &msg)
 {
   fgSetString("/sim/messages/approach", msg.c_str());
-  globals->get_ATC_display()->RegisterSingleMessage( msg, 0 );
 }
 
index c4caefdd6303212fa5d24e21fad2edc1228d3c26..0957d18ac002b1088c4bcee5d6e1895149fc16cd 100644 (file)
@@ -45,7 +45,6 @@ SG_USING_STD(cout);
 
 #include "atis.hxx"
 #include "commlist.hxx"
-#include "ATCdisplay.hxx"
 #include "ATCutils.hxx"
 #include "ATCmgr.hxx"
 
@@ -70,7 +69,6 @@ void FGATIS::Update(double dt) {
                if(_displaying) {
                        // Check if we need to update the message
                        // - basically every hour and if the weather changes significantly at the station
-                       //globals->get_ATC_display()->ChangeRepeatingMessage(transmission);
                } else {
                        // We need to get and display the message
                        UpdateTransmission();
index 1a1948383ba3ba741f8435bfc88610c90f6e3465..4adfa9958c821c83c51f6b54467f2773b573cb0c 100644 (file)
@@ -33,7 +33,6 @@
 #include STL_FSTREAM
 
 #include "ground.hxx"
-#include "ATCdisplay.hxx"
 #include "ATCutils.hxx"
 #include "AILocalTraffic.hxx"
 #include "ATCmgr.hxx"
@@ -321,7 +320,6 @@ void FGGround::Update(double dt) {
                                trns += ConvertRwyNumToSpokenString(activeRwy);
                                if(_display) {
                                        fgSetString("/sim/messages/ground", trns.c_str());
-                                       globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
                                }
                                g->planePtr->RegisterTransmission(1);   // cleared to taxi
                                g->clearanceCounter = 0.0;
@@ -340,7 +338,6 @@ void FGGround::Update(double dt) {
                        trns += buf;
                        if(_display) {
                                fgSetString("/sim/messages/ground", trns.c_str());
-                               globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
                        }
                        g->planePtr->RegisterTransmission(2);   // contact tower
                        delete *ground_traffic_itr;
index cdeb185482f1b02d0610ae906cf23e2454bac0bf..0b71c11ef8b24a0319b3baf7c194acb1e48e87bf 100644 (file)
@@ -34,7 +34,6 @@
 #include <simgear/debug/logstream.hxx>
 
 #include "tower.hxx"
-#include "ATCdisplay.hxx"
 #include "ATCmgr.hxx"
 #include "ATCutils.hxx"
 #include "ATCDialog.hxx"
@@ -507,7 +506,6 @@ void FGTower::Respond() {
                        }
                        trns += ConvertRwyNumToSpokenString(activeRwy);
                        if(_display) {
-                               //globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
                                pending_transmission = trns;
                                Transmit();
                        } else {
@@ -545,7 +543,6 @@ void FGTower::Respond() {
                                string trns = t->plane.callsign;
                                trns += " hold position";
                                if(_display) {
-                                       //globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
                                        pending_transmission = trns;
                                        Transmit();
                                }
@@ -585,7 +582,6 @@ void FGTower::Respond() {
                                t->clearedToLand = false;
                        }
                        if(_display && disp) {
-                               //globals->get_ATC_display()->RegisterSingleMessage(trns);
                                pending_transmission = trns;
                                Transmit();
                        }
@@ -682,7 +678,6 @@ void FGTower::ProcessDownwindReport(TowerPlaneRec* t) {
                }
        }
        if(_display) {
-               //globals->get_ATC_display()->RegisterSingleMessage(trns);
                pending_transmission = trns;
                Transmit();
        }
@@ -716,7 +711,6 @@ void FGTower::ProcessRunwayVacatedReport(TowerPlaneRec* t) {
        }
        //cout << "trns = " << trns << '\n';
        if(_display) {
-               //globals->get_ATC_display()->RegisterSingleMessage(trns);
                pending_transmission = trns;
                Transmit();
        }
@@ -829,7 +823,6 @@ void FGTower::ClearHoldingPlane(TowerPlaneRec* t) {
                timeSinceLastDeparture = 0.0;
        }
        if(_display) {
-               //globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
                pending_transmission = trns;
                Transmit();
        }
index d60786623ce669b507d91133ef5c4f9cc8266d3b..29e1df2626efe68526cde361de6bd9323500b711 100644 (file)
@@ -73,34 +73,11 @@ SG_USING_STD(cout);
 Mouse stuff
 ---------------------------------------------------------------------*/
 
-static int _mX = 0;
-static int _mY = 0;
-static int _savedX = 0;
-static int _savedY = 0;
-static int last_buttons = 0 ;
 static int mouse_active = 0;
-static int mouse_joystick_control = 0;
-
-//static time_t mouse_off_time;
-//static int mouse_timed_out;
-
-// to allow returning to previous view
-// on second left click in MOUSE_VIEW mode
-// This has file scope so that it can be reset
-// if the little rodent is moved  NHV
-static  int _mVtoggle = 0;
 
 static int MOUSE_XSIZE = 0;
 static int MOUSE_YSIZE = 0;
 
-// uncomment this for view to exactly follow mouse in MOUSE_VIEW mode
-// else smooth out the view panning to .01 radian per frame
-// see view_offset smoothing mechanism in main.cxx
-#define NO_SMOOTH_MOUSE_VIEW
-
-// uncomment following to
-#define RESET_VIEW_ON_LEAVING_MOUSE_VIEW
-
 /* --------------------------------------------------------------------
 Support for mouse as control yoke (david@megginson.com)
 
@@ -123,115 +100,12 @@ TODO: allow differential braking (this will be useful if FlightGear
 
 MouseMode mouse_mode = MOUSE_POINTER;
 
-static double aileron_sensitivity = 1.0/500.0;
-static double elevator_sensitivity = 1.0/500.0;
-static double brake_sensitivity = 1.0/250.0;
-static double throttle_sensitivity = 1.0/250.0;
-static double rudder_sensitivity = 1.0/500.0;
-static double trim_sensitivity = 1.0/1000.0;
-
 void guiInitMouse(int width, int height)
 {
        MOUSE_XSIZE = width;
        MOUSE_YSIZE = height;
 }
 
-static inline int guiGetMouseButton(void)
-{
-       return last_buttons;
-}
-
-static inline void guiGetMouse(int *x, int *y)
-{
-       *x = _mX;
-       *y = _mY;
-};
-
-static inline int left_button( void ) {
-    return( last_buttons & (1 << MOUSE_BUTTON_LEFT) );
-}
-
-static inline int middle_button( void ) {
-    return( last_buttons & (1 << MOUSE_BUTTON_MIDDLE) );
-}
-
-static inline int right_button( void ) {
-    return( last_buttons & (1 << MOUSE_BUTTON_RIGHT) );
-}
-
-static inline void set_goal_view_offset( float offset )
-{
-       globals->get_current_view()->setGoalHeadingOffset_deg(offset * SGD_RADIANS_TO_DEGREES);
-}
-
-static inline void set_view_offset( float offset )
-{
-       globals->get_current_view()->setHeadingOffset_deg(offset * SGD_RADIANS_TO_DEGREES);
-}
-
-static inline void set_goal_view_tilt( float tilt )
-{
-       globals->get_current_view()->setGoalPitchOffset_deg(tilt);
-}
-
-static inline void set_view_tilt( float tilt )
-{
-       globals->get_current_view()->setPitchOffset_deg(tilt);
-}
-
-static inline float get_view_offset() {
-       return globals->get_current_view()->getHeadingOffset_deg() * SGD_DEGREES_TO_RADIANS;
-}
-
-static inline float get_goal_view_offset() {
-       return globals->get_current_view()->getGoalHeadingOffset_deg() * SGD_DEGREES_TO_RADIANS;
-}
-
-static inline void move_brake(float offset) {
-       globals->get_controls()->move_brake_left(offset);
-       globals->get_controls()->move_brake_right(offset);
-}
-
-static inline void move_throttle(float offset) {
-       globals->get_controls()->move_throttle(FGControls::ALL_ENGINES, offset);
-}
-
-static inline void move_rudder(float offset) {
-       globals->get_controls()->move_rudder(offset);
-}
-
-static inline void move_elevator_trim(float offset) {
-       globals->get_controls()->move_elevator_trim(offset);
-}
-
-static inline void move_aileron(float offset) {
-       globals->get_controls()->move_aileron(offset);
-}
-
-static inline void move_elevator(float offset) {
-       globals->get_controls()->move_elevator(offset);
-}
-
-static inline float get_aileron() {
-       return globals->get_controls()->get_aileron();
-}
-
-static inline float get_elevator() {
-       return globals->get_controls()->get_elevator();
-}
-
-static inline bool AP_HeadingEnabled() {
-    static const SGPropertyNode *heading_enabled
-        = fgGetNode("/autopilot/locks/heading");
-    return ( strcmp( heading_enabled->getStringValue(), "" ) != 0 );
-}
-
-static inline bool AP_AltitudeEnabled() {
-    static const SGPropertyNode *altitude_enabled
-        = fgGetNode("/autopilot/locks/altitude");
-    return ( strcmp( altitude_enabled->getStringValue(), "" ) != 0 );
-}
-
 void TurnCursorOn( void )
 {
     mouse_active = ~0;
@@ -288,29 +162,3 @@ void maybeToggleMouse( void )
 #endif // #ifdef WIN32
 }
 
-//#define TRANSLATE_HUD
-// temporary hack until pitch_offset is added to view pipeline
-void fgTranslateHud( void ) {
-#ifdef TRANSLATE_HUD
-    if(mouse_mode == MOUSE_VIEW) {
-
-        int ww = MOUSE_XSIZE;
-        int wh = MOUSE_YSIZE;
-
-        float y = 4*(_mY-(wh/2));// * ((wh/SGD_PI)*SG_RADIANS_TO_DEGREES);
-       
-        float x =  get_view_offset() * SG_RADIANS_TO_DEGREES;
-
-        if( x < -180 )     x += 360;
-        else if( x > 180 )     x -= 360;
-
-        x *= ww/90.0;
-        //     x *= ww/180.0;
-        //     x *= ww/360.0;
-
-        //     glTranslatef( x*ww/640, y*wh/480, 0 );
-        glTranslatef( x*640/ww, y*480/wh, 0 );
-    }
-#endif // TRANSLATE_HUD
-}
-
index d50e4f7ab28cc751515f3fb2cc3d48cf7c216b89..d05d07bc8b8dad9868437eaf8739f6654ba832ee 100644 (file)
@@ -67,7 +67,6 @@
 #include <Airports/runways.hxx>
 #include <Airports/simple.hxx>
 #include <AIModel/AIManager.hxx>
-#include <ATC/ATCdisplay.hxx>
 #include <ATC/ATCmgr.hxx>
 #include <ATC/AIMgr.hxx>
 #include <Autopilot/route_mgr.hxx>
@@ -1718,14 +1717,6 @@ bool fgInitSubsystems() {
     globals->add_subsystem("voice", new FGVoiceMgr);
 #endif
 
-    ////////////////////////////////////////////////////////////////////
-    // Initialise ATC display system
-    ////////////////////////////////////////////////////////////////////
-
-    SG_LOG(SG_GENERAL, SG_INFO, "  ATC Display");
-    globals->set_ATC_display(new FGATCDisplay);
-    globals->get_ATC_display()->init(); 
-
     ////////////////////////////////////////////////////////////////////
     // Initialise the ATC Manager 
     ////////////////////////////////////////////////////////////////////
index aed7cbf0f36b0aa8f1205e19887194069f4fa925..30c298edbd50fdc9e32990d5b90cd7c66dd333a0 100644 (file)
@@ -35,7 +35,6 @@
 
 #include STL_IOSTREAM
 
-#include <ATC/ATCdisplay.hxx>
 #include <Aircraft/aircraft.hxx>
 #include <Time/tmp.hxx>
 #include <Environment/environment.hxx>
index 33098d807ee09619d331933e3bc437f0ee78a381..ffb8a9fb21c20f4eff372de9b10ed8832f886f58 100644 (file)
@@ -66,7 +66,6 @@ FGGlobals::FGGlobals() :
     soundmgr( NULL ),
     airports( NULL ),
     ATC_mgr( NULL ),
-    ATC_display( NULL ),
     AI_mgr( NULL ),
     controls( NULL ),
     viewmgr( NULL ),
index 1f0ff5500df16947d5b0ec4b083951d7b7d55a94..8db8f5557e9b4d761024f5e0a9d6fbafcb17a5fb 100644 (file)
@@ -67,7 +67,6 @@ class FGAirportList;
 class FGRunwayList;
 class FGAIMgr;
 class FGATCMgr;
-class FGATCDisplay;
 class FGAircraftModel;
 class FGControls;
 class FGFlightPlanDispatcher;
@@ -154,9 +153,6 @@ private:
     // ATC manager
     FGATCMgr *ATC_mgr;
 
-    // ATC Renderer
-    FGATCDisplay *ATC_display;
-
     // AI manager
     FGAIMgr *AI_mgr;
 
@@ -279,9 +275,6 @@ public:
     inline FGATCMgr *get_ATC_mgr() const { return ATC_mgr; }
     inline void set_ATC_mgr( FGATCMgr *a ) {ATC_mgr = a; }
 
-    inline FGATCDisplay *get_ATC_display() const { return ATC_display; }
-    inline void set_ATC_display( FGATCDisplay *d ) {ATC_display = d; }
-
     inline FGAIMgr *get_AI_mgr() const { return AI_mgr; }
     inline void set_AI_mgr( FGAIMgr *a ) {AI_mgr = a; }
 
index 94729fc73fbc0057afe55849569899956bd36ad6..1198d29da45abf7a87730464763f09c766c8b64b 100644 (file)
@@ -66,8 +66,6 @@
 #include <Sound/beacon.hxx>
 #include <Sound/morse.hxx>
 #include <FDM/flight.hxx>
-// #include <FDM/ADA.hxx>
-#include <ATC/ATCdisplay.hxx>
 #include <ATC/ATCmgr.hxx>
 #include <ATC/AIMgr.hxx>
 #include <Time/tmp.hxx>
index 755be7a6dd4426d650d4d159ba2ee4d5af44fd30..b6a8c6f0761bc538e6668badd8d56689da3f5ef9 100644 (file)
@@ -92,7 +92,6 @@
 #include <Scenery/scenery.hxx>
 #include <Scenery/redout.hxx>
 #include <Scenery/tilemgr.hxx>
-#include <ATC/ATCdisplay.hxx>
 #include <GUI/new_gui.hxx>
 #include <Instrumentation/instrument_mgr.hxx>
 #include <Instrumentation/HUD/HUD.hxx>
@@ -135,10 +134,6 @@ public:
     glPushAttrib(GL_ALL_ATTRIB_BITS);
     glPushClientAttrib(~0u);
 
-    if((fgGetBool("/sim/atc/enabled"))
-       || (fgGetBool("/sim/ai-traffic/enabled")))
-      globals->get_ATC_display()->update(delta_time_sec, state);
-
     puDisplay();
 
     glPopClientAttrib();
@@ -761,8 +756,6 @@ FGRenderer::update( bool refresh_camera_settings ) {
 //         shadows->endOfFrame();
 
     // need to call the update visitor once
-    globals->get_aircraft_model()->select( true );
-    FGTileMgr::set_tile_filter( true );
     mFrameStamp->setReferenceTime(globals->get_sim_time_sec());
     mFrameStamp->setFrameNumber(1+mFrameStamp->getFrameNumber());
     mFrameStamp->setCalendarTime(*globals->get_time_params()->getGmt());
index c8706e6970c1a31ac490261458837b80f3c6285c..a322f66c6ea2a312c68d130abe682a9a56ce281f 100644 (file)
@@ -81,7 +81,7 @@ FGAircraftModel::init ()
                                            liveryPath);
     _aircraft->init( model );
   }
-  _selector->addChild(_aircraft->getSceneGraph());
+  _selector->addChild(_aircraft->getSceneGraph(), true);
   // Do not do altitude computations with that model
   _selector->setNodeMask(~SG_NODEMASK_TERRAIN_BIT);
   globals->get_scenery()->get_aircraft_branch()->addChild(_selector.get());
index 8fe1d760f7da660867b264bd1c96bb9bf8bd11e0..1b6196f7ab8eb8aae72b79799a50ba1f49c173ac 100644 (file)
@@ -54,8 +54,6 @@ queue<FGDeferredModel *> FGTileMgr::model_queue;
 #endif // ENABLE_THREADS
 queue<FGTileEntry *> FGTileMgr::delete_queue;
 
-bool FGTileMgr::tile_filter = true;
-
 // Constructor
 FGTileMgr::FGTileMgr():
     state( Start ),
@@ -472,12 +470,6 @@ void FGTileMgr::prep_ssg_nodes(float vis) {
     }
 }
 
-bool FGTileMgr::set_tile_filter( bool f ) {
-    bool old = tile_filter;
-    tile_filter = f;
-    return old;
-}
-
 bool FGTileMgr::scenery_available(double lat, double lon, double range_m)
 {
   // sanity check (unfortunately needed!)
index 31a8a443c4be853030891aa28f93c9c8c5affe52..e274ac98d36b5727c9b0c23a1554eddc377f46da 100644 (file)
@@ -122,11 +122,6 @@ private:
 #endif // ENABLE_THREADS
     static queue<FGTileEntry *> delete_queue;
 
-    /**
-     * Tile filter indicator, to implement multipass rendering
-     */
-    static bool tile_filter;
-
 public:
 
     /**
@@ -175,8 +170,6 @@ public:
 
     const SGBucket& get_current_bucket () const { return current_bucket; }
 
-    static bool set_tile_filter( bool f );
-
     /// Returns true if scenery is avaliable for the given lat, lon position
     /// within a range of range_m.
     /// lat and lon are expected to be in degrees.