[pkg-fgfs-crew] r93 - in /fgfs-atlas/trunk: debian/changelog src/Atlas.cxx src/FlightTrack.hxx src/Map.cxx src/MapBrowser.hxx src/MapMaker.cxx src/MapMaker.hxx src/MapPS.cxx src/OutputGL.hxx src/Overlays.cxx src/Overlays.hxx src/Scenery.cxx

ovek at users.alioth.debian.org ovek at users.alioth.debian.org
Sat Oct 17 00:32:17 UTC 2009


Author: ovek
Date: Sat Oct 17 00:32:16 2009
New Revision: 93

URL: http://svn.debian.org/wsvn/pkg-fgfs/?sc=1&rev=93
Log:
Applied patch by Peter Green and Stefan Potyra.

Modified:
    fgfs-atlas/trunk/debian/changelog
    fgfs-atlas/trunk/src/Atlas.cxx
    fgfs-atlas/trunk/src/FlightTrack.hxx
    fgfs-atlas/trunk/src/Map.cxx
    fgfs-atlas/trunk/src/MapBrowser.hxx
    fgfs-atlas/trunk/src/MapMaker.cxx
    fgfs-atlas/trunk/src/MapMaker.hxx
    fgfs-atlas/trunk/src/MapPS.cxx
    fgfs-atlas/trunk/src/OutputGL.hxx
    fgfs-atlas/trunk/src/Overlays.cxx
    fgfs-atlas/trunk/src/Overlays.hxx
    fgfs-atlas/trunk/src/Scenery.cxx

Modified: fgfs-atlas/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-fgfs/fgfs-atlas/trunk/debian/changelog?rev=93&op=diff
==============================================================================
--- fgfs-atlas/trunk/debian/changelog (original)
+++ fgfs-atlas/trunk/debian/changelog Sat Oct 17 00:32:16 2009
@@ -1,3 +1,11 @@
+fgfs-atlas (0.3.1-2) unstable; urgency=low
+
+  * Applied patch by Peter Green and Stefan Potyra (of Ubuntu)
+    to make Atlas build with SimGear 1.9.
+    Closes: #545593.
+
+ -- Ove Kaaven <ovek at arcticnet.no>  Sat, 17 Oct 2009 02:27:02 +0200
+
 fgfs-atlas (0.3.1-1) unstable; urgency=low
 
   * New upstream release.

Modified: fgfs-atlas/trunk/src/Atlas.cxx
URL: http://svn.debian.org/wsvn/pkg-fgfs/fgfs-atlas/trunk/src/Atlas.cxx?rev=93&op=diff
==============================================================================
--- fgfs-atlas/trunk/src/Atlas.cxx (original)
+++ fgfs-atlas/trunk/src/Atlas.cxx Sat Oct 17 00:32:16 2009
@@ -29,6 +29,9 @@
 #include <memory.h>
 #include <stdio.h>
 #include <simgear/compiler.h>
+#ifndef SG_GLUT_H
+  #define SG_GLUT_H <GL/glut.h>
+#endif
 #include SG_GLUT_H
 #include <plib/fnt.h>
 #include <plib/pu.h>
@@ -41,6 +44,10 @@
 #include "FlightTrack.hxx"
 
 #define SCALECHANGEFACTOR 1.3f
+
+#include <iostream>
+using std::cout;
+using std::endl;
 
 SGIOChannel *input_channel;
 

Modified: fgfs-atlas/trunk/src/FlightTrack.hxx
URL: http://svn.debian.org/wsvn/pkg-fgfs/fgfs-atlas/trunk/src/FlightTrack.hxx?rev=93&op=diff
==============================================================================
--- fgfs-atlas/trunk/src/FlightTrack.hxx (original)
+++ fgfs-atlas/trunk/src/FlightTrack.hxx Sat Oct 17 00:32:16 2009
@@ -27,7 +27,12 @@
 #include <plib/sg.h>
 #include <simgear/compiler.h>
 
-SG_USING_STD(list);
+
+#ifdef SG_USING_STD
+  SG_USING_STD(list);
+#else
+  using std::list;
+#endif
 
 struct FlightData {
   float lat, lon, alt, hdg, spd;

Modified: fgfs-atlas/trunk/src/Map.cxx
URL: http://svn.debian.org/wsvn/pkg-fgfs/fgfs-atlas/trunk/src/Map.cxx?rev=93&op=diff
==============================================================================
--- fgfs-atlas/trunk/src/Map.cxx (original)
+++ fgfs-atlas/trunk/src/Map.cxx Sat Oct 17 00:32:16 2009
@@ -39,6 +39,13 @@
 #include <plib/ul.h>
 
 #include <simgear/compiler.h>
+#ifndef SG_GLUT_H
+  #define SG_GLUT_H <GL/glut.h>
+#endif
+#ifndef SG_GL_H
+  #define SG_GL_H <GL/gl.h>
+#endif
+
 #include SG_GL_H
 #ifdef UL_GLX
 #  define GLX_GLXEXT_PROTOTYPES
@@ -65,10 +72,16 @@
 #include <simgear/screen/RenderTexture.h>
 #include "Scenery.hxx"
 #include <vector>
-#include STL_STRING
-
-SG_USING_STD(vector);
-SG_USING_STD(string);
+#include <string>
+#include <iostream>
+
+#ifdef SG_USING_STD
+  SG_USING_STD(vector);
+  SG_USING_STD(string);
+#else
+  using std::vector;
+  using std::string;
+#endif
 
 typedef vector<string> string_list;
 
@@ -318,6 +331,9 @@
   return true;
 }
 
+using std::cout;
+using std::cin;
+
 bool ContinueIfNoHeadless() {
   cout << "Unable to continue in headless mode - revert to doublebuffer mode? [Y/n] ";
   char c;

Modified: fgfs-atlas/trunk/src/MapBrowser.hxx
URL: http://svn.debian.org/wsvn/pkg-fgfs/fgfs-atlas/trunk/src/MapBrowser.hxx?rev=93&op=diff
==============================================================================
--- fgfs-atlas/trunk/src/MapBrowser.hxx (original)
+++ fgfs-atlas/trunk/src/MapBrowser.hxx Sat Oct 17 00:32:16 2009
@@ -27,10 +27,16 @@
 #include "FlightTrack.hxx"
 #include "Projection.hxx"
 #include <simgear/compiler.h>
+#ifndef SG_GL_H 
+  #define SG_GL_H <GL/gl.h> 
+#endif
 #include SG_GL_H
 #include <math.h>
 #include <list>
 #include <map>
+
+using std::map;
+
 
 class MapBrowser {
 public:
@@ -107,6 +113,7 @@
     bool tex;
   };
 
+
   struct TileLess {
     bool operator()(const Coord &v1, const Coord &v2) const {
       return (v1.lat < v2.lat || (v1.lat == v2.lat && v1.lon < v2.lon));

Modified: fgfs-atlas/trunk/src/MapMaker.cxx
URL: http://svn.debian.org/wsvn/pkg-fgfs/fgfs-atlas/trunk/src/MapMaker.cxx?rev=93&op=diff
==============================================================================
--- fgfs-atlas/trunk/src/MapMaker.cxx (original)
+++ fgfs-atlas/trunk/src/MapMaker.cxx Sat Oct 17 00:32:16 2009
@@ -31,9 +31,11 @@
 #endif
 #include <sys/stat.h>
 #include <plib/ul.h>
+#include <iostream>
 
 #include "MapMaker.hxx"
 /*#include <simgear/magvar/magvar.hxx>*/
+
 
 // Utility function that I needed to put somewhere - this probably isn't the best place for it.
 // Appends a path separator to a directory path if not present.
@@ -653,9 +655,9 @@
 
   /* convert point_list of wgs84 nodes to a list of points transformed
      into the maps local coordinate system */
-  const point_list wgs84_nodes = tile.get_wgs84_nodes();
-  for ( point_list::const_iterator node = wgs84_nodes . begin(); 
-	node != wgs84_nodes . end();
+  const std::vector<SGVec3d> &wgs84_nodes = tile.get_wgs84_nodes();
+  for ( std::vector<SGVec3d>::const_iterator node = wgs84_nodes.begin(); 
+	node != wgs84_nodes.end();
 	node++ ) {
 
     float *nv = new sgVec3;
@@ -674,8 +676,8 @@
   }
 
   // same as above for normals
-  const point_list m_norms = tile.get_normals();
-  for ( point_list::const_iterator normal = m_norms.begin(); 
+  const std::vector<SGVec3f> &m_norms = tile.get_normals();
+  for ( std::vector<SGVec3f>::const_iterator normal = m_norms.begin();
 	normal != m_norms.end();
 	normal++ ) {
     // Make a new normal
@@ -760,8 +762,8 @@
   }
 	
   if(0) {
-    cout << "Node_list sizes are nodes: " << wgs84_nodes.size() << " -- normals: " << m_norms.size() << '\n'; 
-    cout << "Group_list sizes are tris: " << tris.size() << " -- fans: " << fans.size() << " -- strips: " << strips.size() << '\n';
+    std::cout << "Node_list sizes are nodes: " << wgs84_nodes.size() << " -- normals: " << m_norms.size() << '\n'; 
+    std::cout << "Group_list sizes are tris: " << tris.size() << " -- fans: " << fans.size() << " -- strips: " << strips.size() << '\n';
   } 
 
   for (i = 0; i < v.size(); i++) {

Modified: fgfs-atlas/trunk/src/MapMaker.hxx
URL: http://svn.debian.org/wsvn/pkg-fgfs/fgfs-atlas/trunk/src/MapMaker.hxx?rev=93&op=diff
==============================================================================
--- fgfs-atlas/trunk/src/MapMaker.hxx (original)
+++ fgfs-atlas/trunk/src/MapMaker.hxx Sat Oct 17 00:32:16 2009
@@ -31,14 +31,19 @@
 #include <vector>
 #include <list>
 #include <map>
-#include STL_STRING
+#include <string>
 
 #include "Output.hxx"
 #include "Overlays.hxx"
 #include "Geodesy.hxx"
 
-SG_USING_STD(vector);
-SG_USING_STD(string);
+#ifdef SG_USING_STD
+  SG_USING_STD(vector);
+  SG_USING_STD(string);
+#else
+  using std::vector;
+  using std::string;
+#endif
 
 // Utility function that I needed to put somewhere - this probably isn't the best place for it.
 // Appends a path separator to a directory path if not present.

Modified: fgfs-atlas/trunk/src/MapPS.cxx
URL: http://svn.debian.org/wsvn/pkg-fgfs/fgfs-atlas/trunk/src/MapPS.cxx?rev=93&op=diff
==============================================================================
--- fgfs-atlas/trunk/src/MapPS.cxx (original)
+++ fgfs-atlas/trunk/src/MapPS.cxx Sat Oct 17 00:32:16 2009
@@ -38,9 +38,15 @@
 #include "OutputPS.hxx"
 #include <plib/ul.h>
 #include "Scenery.hxx"
-
+#include <iostream>
+
+#ifdef SG_USING_STD
 SG_USING_STD(vector);
 SG_USING_STD(string);
+#else
+using std::vector;
+using std::string;
+#endif
 
 typedef vector<string> string_list;
 
@@ -149,7 +155,7 @@
     scenerypath = new char[max_path_length + 256];
     scenery_pos = 0;
   } else {
-    cout << "No scenery paths could be found.  You need to set either a valid FG_ROOT and/or FG_SCENERY variable, or specify a valid --fg-root and/or --fg-scenery on the command line.\n";
+    std::cout << "No scenery paths could be found.  You need to set either a valid FG_ROOT and/or FG_SCENERY variable, or specify a valid --fg-root and/or --fg-scenery on the command line.\n";
     exit(-1);
   }
 

Modified: fgfs-atlas/trunk/src/OutputGL.hxx
URL: http://svn.debian.org/wsvn/pkg-fgfs/fgfs-atlas/trunk/src/OutputGL.hxx?rev=93&op=diff
==============================================================================
--- fgfs-atlas/trunk/src/OutputGL.hxx (original)
+++ fgfs-atlas/trunk/src/OutputGL.hxx Sat Oct 17 00:32:16 2009
@@ -2,6 +2,9 @@
 #define __OUTPUTGL_H__
 
 #include <simgear/compiler.h>
+#ifndef SG_GLUT_H 
+  #define SG_GLUT_H <GL/glut.h> 
+#endif 
 #include SG_GLUT_H
 #include <plib/fnt.h>
 #include <plib/pu.h>

Modified: fgfs-atlas/trunk/src/Overlays.cxx
URL: http://svn.debian.org/wsvn/pkg-fgfs/fgfs-atlas/trunk/src/Overlays.cxx?rev=93&op=diff
==============================================================================
--- fgfs-atlas/trunk/src/Overlays.cxx (original)
+++ fgfs-atlas/trunk/src/Overlays.cxx Sat Oct 17 00:32:16 2009
@@ -27,7 +27,11 @@
 #include "Overlays.hxx"
 #include "Geodesy.hxx"
 
-SG_USING_STD(map);
+#ifdef SG_USING_STD
+  SG_USING_STD(map);
+#else
+  using std::map;
+#endif
 
 #ifdef _MSC_VER
 
@@ -151,6 +155,8 @@
     return y;
 }
 
+using std::string;
+
 // Convert an angle to degrees and possibly minutes and possibly seconds,
 // according to the given resolution.
 // 'ns' is the prefixes for positive and negative, e.g. "NS" or "EW" or "+-".
@@ -184,6 +190,9 @@
   sprintf(s, format, *ns, deg, min % 60, sec % 60);
   return string(s);
 }
+
+using std::max;
+using std::min;
 
 // Draw grid lines in latitude range lat-dtheta to lat+dtheta radians,
 // longitude range lon-dalpha to lon+dalpha.

Modified: fgfs-atlas/trunk/src/Overlays.hxx
URL: http://svn.debian.org/wsvn/pkg-fgfs/fgfs-atlas/trunk/src/Overlays.hxx?rev=93&op=diff
==============================================================================
--- fgfs-atlas/trunk/src/Overlays.hxx (original)
+++ fgfs-atlas/trunk/src/Overlays.hxx Sat Oct 17 00:32:16 2009
@@ -34,6 +34,8 @@
 #include "Output.hxx"
 #include "FlightTrack.hxx"
 #include "Projection.hxx"
+
+using std::vector;
 
 class Overlays {
 public:

Modified: fgfs-atlas/trunk/src/Scenery.cxx
URL: http://svn.debian.org/wsvn/pkg-fgfs/fgfs-atlas/trunk/src/Scenery.cxx?rev=93&op=diff
==============================================================================
--- fgfs-atlas/trunk/src/Scenery.cxx (original)
+++ fgfs-atlas/trunk/src/Scenery.cxx Sat Oct 17 00:32:16 2009
@@ -3,8 +3,13 @@
 
 #include "MapMaker.hxx"
 
+#ifdef SG_USING_STD
 SG_USING_STD(vector);
 SG_USING_STD(string);
+#else
+using std::vector;
+using std::string;
+#endif
 
 typedef vector<string> string_list;
 




More information about the pkg-fgfs-crew mailing list