Modified Files:
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.
This commit is contained in:
parent
7b05646ed0
commit
16a2bb0118
21 changed files with 1 additions and 573 deletions
|
@ -29,7 +29,6 @@ SG_USING_STD(string);
|
||||||
|
|
||||||
|
|
||||||
#include "AIPlane.hxx"
|
#include "AIPlane.hxx"
|
||||||
#include "ATCdisplay.hxx"
|
|
||||||
|
|
||||||
FGAIPlane::FGAIPlane() {
|
FGAIPlane::FGAIPlane() {
|
||||||
leg = LEG_UNKNOWN;
|
leg = LEG_UNKNOWN;
|
||||||
|
@ -210,7 +209,6 @@ void FGAIPlane::Render(const string& refname, bool repeating) {
|
||||||
pending_transmission[i] = ' ';
|
pending_transmission[i] = ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
globals->get_ATC_display()->RegisterSingleMessage(pending_transmission, 0.0);
|
|
||||||
}
|
}
|
||||||
playing = true;
|
playing = true;
|
||||||
}
|
}
|
||||||
|
@ -224,8 +222,6 @@ void FGAIPlane::NoRender(const string& refname) {
|
||||||
globals->get_soundmgr()->stop(refname);
|
globals->get_soundmgr()->stop(refname);
|
||||||
globals->get_soundmgr()->remove(refname);
|
globals->get_soundmgr()->remove(refname);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
|
||||||
globals->get_ATC_display()->CancelRepeatingMessage();
|
|
||||||
}
|
}
|
||||||
playing = false;
|
playing = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include <Main/fg_props.hxx>
|
#include <Main/fg_props.hxx>
|
||||||
|
|
||||||
#include "ATC.hxx"
|
#include "ATC.hxx"
|
||||||
#include "ATCdisplay.hxx"
|
|
||||||
|
|
||||||
FGATC::FGATC() {
|
FGATC::FGATC() {
|
||||||
freqClear = true;
|
freqClear = true;
|
||||||
|
@ -109,8 +108,6 @@ void FGATC::Update(double dt) {
|
||||||
if(_display) {
|
if(_display) {
|
||||||
//Render(pending_transmission, ident, false);
|
//Render(pending_transmission, ident, false);
|
||||||
Render(pending_transmission);
|
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.
|
// Run the callback regardless of whether on same freq as user or not.
|
||||||
//cout << "_callback_code = " << _callback_code << '\n';
|
//cout << "_callback_code = " << _callback_code << '\n';
|
||||||
|
@ -185,7 +182,6 @@ void FGATC::ImmediateTransmit(int callback_code) {
|
||||||
//Render(pending_transmission, ident, false);
|
//Render(pending_transmission, ident, false);
|
||||||
Render(pending_transmission);
|
Render(pending_transmission);
|
||||||
// At the moment Render doesn't work except for ATIS
|
// At the moment Render doesn't work except for ATIS
|
||||||
//globals->get_ATC_display()->RegisterSingleMessage(pending_transmission);
|
|
||||||
}
|
}
|
||||||
if(callback_code) {
|
if(callback_code) {
|
||||||
ProcessCallback(callback_code);
|
ProcessCallback(callback_code);
|
||||||
|
@ -258,11 +254,6 @@ void FGATC::Render(string& msg, const string& refname, bool repeating) {
|
||||||
msg[i] = ' ';
|
msg[i] = ' ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(repeating) {
|
|
||||||
globals->get_ATC_display()->RegisterRepeatingMessage(msg);
|
|
||||||
} else {
|
|
||||||
globals->get_ATC_display()->RegisterSingleMessage(msg);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
_playing = true;
|
_playing = true;
|
||||||
}
|
}
|
||||||
|
@ -276,8 +267,6 @@ void FGATC::NoRender(const string& refname) {
|
||||||
globals->get_soundmgr()->stop(refname);
|
globals->get_soundmgr()->stop(refname);
|
||||||
globals->get_soundmgr()->remove(refname);
|
globals->get_soundmgr()->remove(refname);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
|
||||||
globals->get_ATC_display()->CancelRepeatingMessage();
|
|
||||||
}
|
}
|
||||||
_playing = false;
|
_playing = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include "ATCDialog.hxx"
|
#include "ATCDialog.hxx"
|
||||||
#include "ATC.hxx"
|
#include "ATC.hxx"
|
||||||
#include "ATCmgr.hxx"
|
#include "ATCmgr.hxx"
|
||||||
#include "ATCdisplay.hxx"
|
|
||||||
#include "commlist.hxx"
|
#include "commlist.hxx"
|
||||||
#include "ATCutils.hxx"
|
#include "ATCutils.hxx"
|
||||||
#include <Airports/simple.hxx>
|
#include <Airports/simple.hxx>
|
||||||
|
@ -274,7 +273,6 @@ void FGATCDialog::PopupCallback(int num) {
|
||||||
string pilot = atcptr->GenText(a.transmission, a.callback_code);
|
string pilot = atcptr->GenText(a.transmission, a.callback_code);
|
||||||
fgSetString("/sim/messages/pilot", pilot.c_str());
|
fgSetString("/sim/messages/pilot", pilot.c_str());
|
||||||
// This is the user's speech getting displayed.
|
// This is the user's speech getting displayed.
|
||||||
globals->get_ATC_display()->RegisterSingleMessage(pilot);
|
|
||||||
_callbackPending = true;
|
_callbackPending = true;
|
||||||
_callbackTimer = 0.0;
|
_callbackTimer = 0.0;
|
||||||
_callbackWait = 5.0;
|
_callbackWait = 5.0;
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
|
@ -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
|
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
#include "ATCmgr.hxx"
|
#include "ATCmgr.hxx"
|
||||||
#include "commlist.hxx"
|
#include "commlist.hxx"
|
||||||
#include "ATCdisplay.hxx"
|
|
||||||
#include "ATCDialog.hxx"
|
#include "ATCDialog.hxx"
|
||||||
#include "ATCutils.hxx"
|
#include "ATCutils.hxx"
|
||||||
#include "transmissionlist.hxx"
|
#include "transmissionlist.hxx"
|
||||||
|
|
|
@ -8,7 +8,6 @@ libATC_a_SOURCES = \
|
||||||
ground.hxx ground.cxx \
|
ground.hxx ground.cxx \
|
||||||
commlist.hxx commlist.cxx \
|
commlist.hxx commlist.cxx \
|
||||||
ATCDialog.hxx ATCDialog.cxx \
|
ATCDialog.hxx ATCDialog.cxx \
|
||||||
ATCdisplay.hxx ATCdisplay.cxx \
|
|
||||||
ATCVoice.hxx ATCVoice.cxx \
|
ATCVoice.hxx ATCVoice.cxx \
|
||||||
ATCmgr.hxx ATCmgr.cxx \
|
ATCmgr.hxx ATCmgr.cxx \
|
||||||
ATCutils.hxx ATCutils.cxx \
|
ATCutils.hxx ATCutils.cxx \
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include "approach.hxx"
|
#include "approach.hxx"
|
||||||
#include "transmission.hxx"
|
#include "transmission.hxx"
|
||||||
#include "transmissionlist.hxx"
|
#include "transmissionlist.hxx"
|
||||||
#include "ATCdisplay.hxx"
|
|
||||||
#include "ATCDialog.hxx"
|
#include "ATCDialog.hxx"
|
||||||
|
|
||||||
#include <Airports/runways.hxx>
|
#include <Airports/runways.hxx>
|
||||||
|
@ -756,6 +755,5 @@ int FGApproach::RemovePlane() {
|
||||||
void FGApproach::set_message(const string &msg)
|
void FGApproach::set_message(const string &msg)
|
||||||
{
|
{
|
||||||
fgSetString("/sim/messages/approach", msg.c_str());
|
fgSetString("/sim/messages/approach", msg.c_str());
|
||||||
globals->get_ATC_display()->RegisterSingleMessage( msg, 0 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,6 @@ SG_USING_STD(cout);
|
||||||
|
|
||||||
#include "atis.hxx"
|
#include "atis.hxx"
|
||||||
#include "commlist.hxx"
|
#include "commlist.hxx"
|
||||||
#include "ATCdisplay.hxx"
|
|
||||||
#include "ATCutils.hxx"
|
#include "ATCutils.hxx"
|
||||||
#include "ATCmgr.hxx"
|
#include "ATCmgr.hxx"
|
||||||
|
|
||||||
|
@ -70,7 +69,6 @@ void FGATIS::Update(double dt) {
|
||||||
if(_displaying) {
|
if(_displaying) {
|
||||||
// Check if we need to update the message
|
// Check if we need to update the message
|
||||||
// - basically every hour and if the weather changes significantly at the station
|
// - basically every hour and if the weather changes significantly at the station
|
||||||
//globals->get_ATC_display()->ChangeRepeatingMessage(transmission);
|
|
||||||
} else {
|
} else {
|
||||||
// We need to get and display the message
|
// We need to get and display the message
|
||||||
UpdateTransmission();
|
UpdateTransmission();
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include STL_FSTREAM
|
#include STL_FSTREAM
|
||||||
|
|
||||||
#include "ground.hxx"
|
#include "ground.hxx"
|
||||||
#include "ATCdisplay.hxx"
|
|
||||||
#include "ATCutils.hxx"
|
#include "ATCutils.hxx"
|
||||||
#include "AILocalTraffic.hxx"
|
#include "AILocalTraffic.hxx"
|
||||||
#include "ATCmgr.hxx"
|
#include "ATCmgr.hxx"
|
||||||
|
@ -321,7 +320,6 @@ void FGGround::Update(double dt) {
|
||||||
trns += ConvertRwyNumToSpokenString(activeRwy);
|
trns += ConvertRwyNumToSpokenString(activeRwy);
|
||||||
if(_display) {
|
if(_display) {
|
||||||
fgSetString("/sim/messages/ground", trns.c_str());
|
fgSetString("/sim/messages/ground", trns.c_str());
|
||||||
globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
|
|
||||||
}
|
}
|
||||||
g->planePtr->RegisterTransmission(1); // cleared to taxi
|
g->planePtr->RegisterTransmission(1); // cleared to taxi
|
||||||
g->clearanceCounter = 0.0;
|
g->clearanceCounter = 0.0;
|
||||||
|
@ -340,7 +338,6 @@ void FGGround::Update(double dt) {
|
||||||
trns += buf;
|
trns += buf;
|
||||||
if(_display) {
|
if(_display) {
|
||||||
fgSetString("/sim/messages/ground", trns.c_str());
|
fgSetString("/sim/messages/ground", trns.c_str());
|
||||||
globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
|
|
||||||
}
|
}
|
||||||
g->planePtr->RegisterTransmission(2); // contact tower
|
g->planePtr->RegisterTransmission(2); // contact tower
|
||||||
delete *ground_traffic_itr;
|
delete *ground_traffic_itr;
|
||||||
|
|
|
@ -34,7 +34,6 @@
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
|
|
||||||
#include "tower.hxx"
|
#include "tower.hxx"
|
||||||
#include "ATCdisplay.hxx"
|
|
||||||
#include "ATCmgr.hxx"
|
#include "ATCmgr.hxx"
|
||||||
#include "ATCutils.hxx"
|
#include "ATCutils.hxx"
|
||||||
#include "ATCDialog.hxx"
|
#include "ATCDialog.hxx"
|
||||||
|
@ -507,7 +506,6 @@ void FGTower::Respond() {
|
||||||
}
|
}
|
||||||
trns += ConvertRwyNumToSpokenString(activeRwy);
|
trns += ConvertRwyNumToSpokenString(activeRwy);
|
||||||
if(_display) {
|
if(_display) {
|
||||||
//globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
|
|
||||||
pending_transmission = trns;
|
pending_transmission = trns;
|
||||||
Transmit();
|
Transmit();
|
||||||
} else {
|
} else {
|
||||||
|
@ -545,7 +543,6 @@ void FGTower::Respond() {
|
||||||
string trns = t->plane.callsign;
|
string trns = t->plane.callsign;
|
||||||
trns += " hold position";
|
trns += " hold position";
|
||||||
if(_display) {
|
if(_display) {
|
||||||
//globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
|
|
||||||
pending_transmission = trns;
|
pending_transmission = trns;
|
||||||
Transmit();
|
Transmit();
|
||||||
}
|
}
|
||||||
|
@ -585,7 +582,6 @@ void FGTower::Respond() {
|
||||||
t->clearedToLand = false;
|
t->clearedToLand = false;
|
||||||
}
|
}
|
||||||
if(_display && disp) {
|
if(_display && disp) {
|
||||||
//globals->get_ATC_display()->RegisterSingleMessage(trns);
|
|
||||||
pending_transmission = trns;
|
pending_transmission = trns;
|
||||||
Transmit();
|
Transmit();
|
||||||
}
|
}
|
||||||
|
@ -682,7 +678,6 @@ void FGTower::ProcessDownwindReport(TowerPlaneRec* t) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(_display) {
|
if(_display) {
|
||||||
//globals->get_ATC_display()->RegisterSingleMessage(trns);
|
|
||||||
pending_transmission = trns;
|
pending_transmission = trns;
|
||||||
Transmit();
|
Transmit();
|
||||||
}
|
}
|
||||||
|
@ -716,7 +711,6 @@ void FGTower::ProcessRunwayVacatedReport(TowerPlaneRec* t) {
|
||||||
}
|
}
|
||||||
//cout << "trns = " << trns << '\n';
|
//cout << "trns = " << trns << '\n';
|
||||||
if(_display) {
|
if(_display) {
|
||||||
//globals->get_ATC_display()->RegisterSingleMessage(trns);
|
|
||||||
pending_transmission = trns;
|
pending_transmission = trns;
|
||||||
Transmit();
|
Transmit();
|
||||||
}
|
}
|
||||||
|
@ -829,7 +823,6 @@ void FGTower::ClearHoldingPlane(TowerPlaneRec* t) {
|
||||||
timeSinceLastDeparture = 0.0;
|
timeSinceLastDeparture = 0.0;
|
||||||
}
|
}
|
||||||
if(_display) {
|
if(_display) {
|
||||||
//globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
|
|
||||||
pending_transmission = trns;
|
pending_transmission = trns;
|
||||||
Transmit();
|
Transmit();
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,34 +73,11 @@ SG_USING_STD(cout);
|
||||||
Mouse stuff
|
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_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_XSIZE = 0;
|
||||||
static int MOUSE_YSIZE = 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)
|
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;
|
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)
|
void guiInitMouse(int width, int height)
|
||||||
{
|
{
|
||||||
MOUSE_XSIZE = width;
|
MOUSE_XSIZE = width;
|
||||||
MOUSE_YSIZE = height;
|
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 )
|
void TurnCursorOn( void )
|
||||||
{
|
{
|
||||||
mouse_active = ~0;
|
mouse_active = ~0;
|
||||||
|
@ -288,29 +162,3 @@ void maybeToggleMouse( void )
|
||||||
#endif // #ifdef WIN32
|
#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
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,6 @@
|
||||||
#include <Airports/runways.hxx>
|
#include <Airports/runways.hxx>
|
||||||
#include <Airports/simple.hxx>
|
#include <Airports/simple.hxx>
|
||||||
#include <AIModel/AIManager.hxx>
|
#include <AIModel/AIManager.hxx>
|
||||||
#include <ATC/ATCdisplay.hxx>
|
|
||||||
#include <ATC/ATCmgr.hxx>
|
#include <ATC/ATCmgr.hxx>
|
||||||
#include <ATC/AIMgr.hxx>
|
#include <ATC/AIMgr.hxx>
|
||||||
#include <Autopilot/route_mgr.hxx>
|
#include <Autopilot/route_mgr.hxx>
|
||||||
|
@ -1718,14 +1717,6 @@ bool fgInitSubsystems() {
|
||||||
globals->add_subsystem("voice", new FGVoiceMgr);
|
globals->add_subsystem("voice", new FGVoiceMgr);
|
||||||
#endif
|
#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
|
// Initialise the ATC Manager
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
|
|
||||||
#include STL_IOSTREAM
|
#include STL_IOSTREAM
|
||||||
|
|
||||||
#include <ATC/ATCdisplay.hxx>
|
|
||||||
#include <Aircraft/aircraft.hxx>
|
#include <Aircraft/aircraft.hxx>
|
||||||
#include <Time/tmp.hxx>
|
#include <Time/tmp.hxx>
|
||||||
#include <Environment/environment.hxx>
|
#include <Environment/environment.hxx>
|
||||||
|
|
|
@ -66,7 +66,6 @@ FGGlobals::FGGlobals() :
|
||||||
soundmgr( NULL ),
|
soundmgr( NULL ),
|
||||||
airports( NULL ),
|
airports( NULL ),
|
||||||
ATC_mgr( NULL ),
|
ATC_mgr( NULL ),
|
||||||
ATC_display( NULL ),
|
|
||||||
AI_mgr( NULL ),
|
AI_mgr( NULL ),
|
||||||
controls( NULL ),
|
controls( NULL ),
|
||||||
viewmgr( NULL ),
|
viewmgr( NULL ),
|
||||||
|
|
|
@ -67,7 +67,6 @@ class FGAirportList;
|
||||||
class FGRunwayList;
|
class FGRunwayList;
|
||||||
class FGAIMgr;
|
class FGAIMgr;
|
||||||
class FGATCMgr;
|
class FGATCMgr;
|
||||||
class FGATCDisplay;
|
|
||||||
class FGAircraftModel;
|
class FGAircraftModel;
|
||||||
class FGControls;
|
class FGControls;
|
||||||
class FGFlightPlanDispatcher;
|
class FGFlightPlanDispatcher;
|
||||||
|
@ -154,9 +153,6 @@ private:
|
||||||
// ATC manager
|
// ATC manager
|
||||||
FGATCMgr *ATC_mgr;
|
FGATCMgr *ATC_mgr;
|
||||||
|
|
||||||
// ATC Renderer
|
|
||||||
FGATCDisplay *ATC_display;
|
|
||||||
|
|
||||||
// AI manager
|
// AI manager
|
||||||
FGAIMgr *AI_mgr;
|
FGAIMgr *AI_mgr;
|
||||||
|
|
||||||
|
@ -279,9 +275,6 @@ public:
|
||||||
inline FGATCMgr *get_ATC_mgr() const { return ATC_mgr; }
|
inline FGATCMgr *get_ATC_mgr() const { return ATC_mgr; }
|
||||||
inline void set_ATC_mgr( FGATCMgr *a ) {ATC_mgr = a; }
|
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 FGAIMgr *get_AI_mgr() const { return AI_mgr; }
|
||||||
inline void set_AI_mgr( FGAIMgr *a ) {AI_mgr = a; }
|
inline void set_AI_mgr( FGAIMgr *a ) {AI_mgr = a; }
|
||||||
|
|
||||||
|
|
|
@ -66,8 +66,6 @@
|
||||||
#include <Sound/beacon.hxx>
|
#include <Sound/beacon.hxx>
|
||||||
#include <Sound/morse.hxx>
|
#include <Sound/morse.hxx>
|
||||||
#include <FDM/flight.hxx>
|
#include <FDM/flight.hxx>
|
||||||
// #include <FDM/ADA.hxx>
|
|
||||||
#include <ATC/ATCdisplay.hxx>
|
|
||||||
#include <ATC/ATCmgr.hxx>
|
#include <ATC/ATCmgr.hxx>
|
||||||
#include <ATC/AIMgr.hxx>
|
#include <ATC/AIMgr.hxx>
|
||||||
#include <Time/tmp.hxx>
|
#include <Time/tmp.hxx>
|
||||||
|
|
|
@ -92,7 +92,6 @@
|
||||||
#include <Scenery/scenery.hxx>
|
#include <Scenery/scenery.hxx>
|
||||||
#include <Scenery/redout.hxx>
|
#include <Scenery/redout.hxx>
|
||||||
#include <Scenery/tilemgr.hxx>
|
#include <Scenery/tilemgr.hxx>
|
||||||
#include <ATC/ATCdisplay.hxx>
|
|
||||||
#include <GUI/new_gui.hxx>
|
#include <GUI/new_gui.hxx>
|
||||||
#include <Instrumentation/instrument_mgr.hxx>
|
#include <Instrumentation/instrument_mgr.hxx>
|
||||||
#include <Instrumentation/HUD/HUD.hxx>
|
#include <Instrumentation/HUD/HUD.hxx>
|
||||||
|
@ -135,10 +134,6 @@ public:
|
||||||
glPushAttrib(GL_ALL_ATTRIB_BITS);
|
glPushAttrib(GL_ALL_ATTRIB_BITS);
|
||||||
glPushClientAttrib(~0u);
|
glPushClientAttrib(~0u);
|
||||||
|
|
||||||
if((fgGetBool("/sim/atc/enabled"))
|
|
||||||
|| (fgGetBool("/sim/ai-traffic/enabled")))
|
|
||||||
globals->get_ATC_display()->update(delta_time_sec, state);
|
|
||||||
|
|
||||||
puDisplay();
|
puDisplay();
|
||||||
|
|
||||||
glPopClientAttrib();
|
glPopClientAttrib();
|
||||||
|
@ -761,8 +756,6 @@ FGRenderer::update( bool refresh_camera_settings ) {
|
||||||
// shadows->endOfFrame();
|
// shadows->endOfFrame();
|
||||||
|
|
||||||
// need to call the update visitor once
|
// 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->setReferenceTime(globals->get_sim_time_sec());
|
||||||
mFrameStamp->setFrameNumber(1+mFrameStamp->getFrameNumber());
|
mFrameStamp->setFrameNumber(1+mFrameStamp->getFrameNumber());
|
||||||
mFrameStamp->setCalendarTime(*globals->get_time_params()->getGmt());
|
mFrameStamp->setCalendarTime(*globals->get_time_params()->getGmt());
|
||||||
|
|
|
@ -81,7 +81,7 @@ FGAircraftModel::init ()
|
||||||
liveryPath);
|
liveryPath);
|
||||||
_aircraft->init( model );
|
_aircraft->init( model );
|
||||||
}
|
}
|
||||||
_selector->addChild(_aircraft->getSceneGraph());
|
_selector->addChild(_aircraft->getSceneGraph(), true);
|
||||||
// Do not do altitude computations with that model
|
// Do not do altitude computations with that model
|
||||||
_selector->setNodeMask(~SG_NODEMASK_TERRAIN_BIT);
|
_selector->setNodeMask(~SG_NODEMASK_TERRAIN_BIT);
|
||||||
globals->get_scenery()->get_aircraft_branch()->addChild(_selector.get());
|
globals->get_scenery()->get_aircraft_branch()->addChild(_selector.get());
|
||||||
|
|
|
@ -54,8 +54,6 @@ queue<FGDeferredModel *> FGTileMgr::model_queue;
|
||||||
#endif // ENABLE_THREADS
|
#endif // ENABLE_THREADS
|
||||||
queue<FGTileEntry *> FGTileMgr::delete_queue;
|
queue<FGTileEntry *> FGTileMgr::delete_queue;
|
||||||
|
|
||||||
bool FGTileMgr::tile_filter = true;
|
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
FGTileMgr::FGTileMgr():
|
FGTileMgr::FGTileMgr():
|
||||||
state( Start ),
|
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)
|
bool FGTileMgr::scenery_available(double lat, double lon, double range_m)
|
||||||
{
|
{
|
||||||
// sanity check (unfortunately needed!)
|
// sanity check (unfortunately needed!)
|
||||||
|
|
|
@ -122,11 +122,6 @@ private:
|
||||||
#endif // ENABLE_THREADS
|
#endif // ENABLE_THREADS
|
||||||
static queue<FGTileEntry *> delete_queue;
|
static queue<FGTileEntry *> delete_queue;
|
||||||
|
|
||||||
/**
|
|
||||||
* Tile filter indicator, to implement multipass rendering
|
|
||||||
*/
|
|
||||||
static bool tile_filter;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -175,8 +170,6 @@ public:
|
||||||
|
|
||||||
const SGBucket& get_current_bucket () const { return current_bucket; }
|
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
|
/// Returns true if scenery is avaliable for the given lat, lon position
|
||||||
/// within a range of range_m.
|
/// within a range of range_m.
|
||||||
/// lat and lon are expected to be in degrees.
|
/// lat and lon are expected to be in degrees.
|
||||||
|
|
Loading…
Add table
Reference in a new issue