#include "AIPlane.hxx"
-#include "ATCdisplay.hxx"
FGAIPlane::FGAIPlane() {
leg = LEG_UNKNOWN;
pending_transmission[i] = ' ';
}
}
- globals->get_ATC_display()->RegisterSingleMessage(pending_transmission, 0.0);
}
playing = true;
}
globals->get_soundmgr()->stop(refname);
globals->get_soundmgr()->remove(refname);
#endif
- } else {
- globals->get_ATC_display()->CancelRepeatingMessage();
}
playing = false;
}
#include <Main/fg_props.hxx>
#include "ATC.hxx"
-#include "ATCdisplay.hxx"
FGATC::FGATC() {
freqClear = true;
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';
//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);
msg[i] = ' ';
}
}
- if(repeating) {
- globals->get_ATC_display()->RegisterRepeatingMessage(msg);
- } else {
- globals->get_ATC_display()->RegisterSingleMessage(msg);
- }
}
_playing = true;
}
globals->get_soundmgr()->stop(refname);
globals->get_soundmgr()->remove(refname);
#endif
- } else {
- globals->get_ATC_display()->CancelRepeatingMessage();
}
_playing = false;
}
#include "ATCDialog.hxx"
#include "ATC.hxx"
#include "ATCmgr.hxx"
-#include "ATCdisplay.hxx"
#include "commlist.hxx"
#include "ATCutils.hxx"
#include <Airports/simple.hxx>
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;
+++ /dev/null
-// 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;
-}
-
+++ /dev/null
-// 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
#include "ATCmgr.hxx"
#include "commlist.hxx"
-#include "ATCdisplay.hxx"
#include "ATCDialog.hxx"
#include "ATCutils.hxx"
#include "transmissionlist.hxx"
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 \
#include "approach.hxx"
#include "transmission.hxx"
#include "transmissionlist.hxx"
-#include "ATCdisplay.hxx"
#include "ATCDialog.hxx"
#include <Airports/runways.hxx>
void FGApproach::set_message(const string &msg)
{
fgSetString("/sim/messages/approach", msg.c_str());
- globals->get_ATC_display()->RegisterSingleMessage( msg, 0 );
}
#include "atis.hxx"
#include "commlist.hxx"
-#include "ATCdisplay.hxx"
#include "ATCutils.hxx"
#include "ATCmgr.hxx"
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();
#include STL_FSTREAM
#include "ground.hxx"
-#include "ATCdisplay.hxx"
#include "ATCutils.hxx"
#include "AILocalTraffic.hxx"
#include "ATCmgr.hxx"
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;
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;
#include <simgear/debug/logstream.hxx>
#include "tower.hxx"
-#include "ATCdisplay.hxx"
#include "ATCmgr.hxx"
#include "ATCutils.hxx"
#include "ATCDialog.hxx"
}
trns += ConvertRwyNumToSpokenString(activeRwy);
if(_display) {
- //globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
pending_transmission = trns;
Transmit();
} else {
string trns = t->plane.callsign;
trns += " hold position";
if(_display) {
- //globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
pending_transmission = trns;
Transmit();
}
t->clearedToLand = false;
}
if(_display && disp) {
- //globals->get_ATC_display()->RegisterSingleMessage(trns);
pending_transmission = trns;
Transmit();
}
}
}
if(_display) {
- //globals->get_ATC_display()->RegisterSingleMessage(trns);
pending_transmission = trns;
Transmit();
}
}
//cout << "trns = " << trns << '\n';
if(_display) {
- //globals->get_ATC_display()->RegisterSingleMessage(trns);
pending_transmission = trns;
Transmit();
}
timeSinceLastDeparture = 0.0;
}
if(_display) {
- //globals->get_ATC_display()->RegisterSingleMessage(trns, 0);
pending_transmission = trns;
Transmit();
}
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)
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;
#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
-}
-
#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>
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
////////////////////////////////////////////////////////////////////
#include STL_IOSTREAM
-#include <ATC/ATCdisplay.hxx>
#include <Aircraft/aircraft.hxx>
#include <Time/tmp.hxx>
#include <Environment/environment.hxx>
soundmgr( NULL ),
airports( NULL ),
ATC_mgr( NULL ),
- ATC_display( NULL ),
AI_mgr( NULL ),
controls( NULL ),
viewmgr( NULL ),
class FGRunwayList;
class FGAIMgr;
class FGATCMgr;
-class FGATCDisplay;
class FGAircraftModel;
class FGControls;
class FGFlightPlanDispatcher;
// ATC manager
FGATCMgr *ATC_mgr;
- // ATC Renderer
- FGATCDisplay *ATC_display;
-
// AI manager
FGAIMgr *AI_mgr;
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; }
#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>
#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>
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();
// 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());
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());
#endif // ENABLE_THREADS
queue<FGTileEntry *> FGTileMgr::delete_queue;
-bool FGTileMgr::tile_filter = true;
-
// Constructor
FGTileMgr::FGTileMgr():
state( Start ),
}
}
-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!)
#endif // ENABLE_THREADS
static queue<FGTileEntry *> delete_queue;
- /**
- * Tile filter indicator, to implement multipass rendering
- */
- static bool tile_filter;
-
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.