]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/YASim/yasim-test.cpp
Use bool where the source and destination variable is bool.
[flightgear.git] / src / FDM / YASim / yasim-test.cpp
index 9938cc109da5c3a9c100a38af0d159b49c9fe56d..d00a564bb509c6289583d01dec9aa9fdc5487117 100644 (file)
@@ -1,7 +1,7 @@
 #include <stdio.h>
 
+#include <simgear/props/props.hxx>
 #include <simgear/xml/easyxml.hxx>
-#include <simgear/misc/props.hxx>
 
 #include "FGFDM.hpp"
 #include "Airplane.hpp"
@@ -11,19 +11,24 @@ using namespace yasim;
 // Stubs.  Not needed by a batch program, but required to link.
 bool fgSetFloat (const char * name, float val) { return false; }
 bool fgSetBool(char const * name, bool val) { return false; }
+bool fgGetBool(char const * name, bool def) { return false; }
 SGPropertyNode* fgGetNode (const char * path, bool create) { return 0; }
+SGPropertyNode* fgGetNode (const char * path, int i, bool create) { return 0; }
 float fgGetFloat (const char * name, float defaultValue) { return 0; }
+float fgGetDouble (const char * name, double defaultValue) { return 0; }
+float fgSetDouble (const char * name, double defaultValue) { return 0; }
 
 static const float RAD2DEG = 57.2957795131;
 
 int main(int argc, char** argv)
 {
-    FGFDM fdm;
-    Airplane* a = fdm.getAirplane();
+    FGFDM* fdm = new FGFDM();
+    Airplane* a = fdm->getAirplane();
 
     // Read
     try {
-        readXML(argv[1], fdm);
+        string file = argv[1];
+        readXML(file, *fdm);
     } catch (const sg_exception &e) {
         printf("XML parse error: %s (%s)\n",
                e.getFormattedMessage().c_str(), e.getOrigin().c_str());
@@ -49,4 +54,8 @@ int main(int argc, char** argv)
 
     if(a->getFailureMsg())
         printf("SOLUTION FAILURE: %s\n", a->getFailureMsg());
+
+    delete fdm;
+
+    return 0;
 }