]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/dclgps.cxx
move some of the sound postion and orientation calculations over to the sample class...
[flightgear.git] / src / Instrumentation / dclgps.cxx
index 3156c55ac531f6cfd58e40898dd2d80a33963aee..a20189cd973a54f05e4a41ab3ab34cb3accabcab 100644 (file)
@@ -257,9 +257,8 @@ void GPSPage::OBSPressed() {}
 void GPSPage::MsgPressed() {}
 
 string GPSPage::GPSitoa(int n) {
-       char buf[4];
-       // TODO - sanity check n!
-       sprintf(buf, "%i", n);
+       char buf[6];
+       snprintf(buf, 6, "%i", n);
        string s = buf;
        return(s);
 }
@@ -357,9 +356,8 @@ DCLGPS::~DCLGPS() {
        // TODO - may need to delete the approach database!!
 }
 
-void DCLGPS::draw() {
-       //cout << "draw called!\n";
-       _instrument->draw();
+void DCLGPS::draw(osg::State& state) {
+       _instrument->draw(state);
 }
 
 void DCLGPS::init() {
@@ -1029,6 +1027,9 @@ void DCLGPS::CreateFlightPlan(GPSFlightPlan* fp, vector<string> ids, vector<GPSW
                case GPS_WP_USR:
                        // TODO
                        break;
+               case GPS_WP_VIRT:
+                       // TODO
+                       break;
                }
        }
 }