1 diff -wbBur Atlas-0.3.1/src/Atlas.cxx Atlas-0.3.1.my/src/Atlas.cxx
2 --- Atlas-0.3.1/src/Atlas.cxx 2006-10-28 16:28:32.000000000 +0000
3 +++ Atlas-0.3.1.my/src/Atlas.cxx 2009-03-11 16:33:33.000000000 +0000
7 #include <simgear/compiler.h>
14 #include "Overlays.hxx"
15 #include "FlightTrack.hxx"
19 #define SCALECHANGEFACTOR 1.3f
21 SGIOChannel *input_channel;
24 string nav1_freq_str = msg.substr(begin, end - begin);
26 - cout << " nav1_freq = " << nav1_freq_str << endl;
27 + std::cout << " nav1_freq = " << nav1_freq_str << std::endl;
29 // nav1 selected radial
30 end = msg.find(",", begin);
33 string nav1_rad_str = msg.substr(begin, end - begin);
35 - cout << " nav1_rad = " << nav1_rad_str << endl;
36 + std::cout << " nav1_rad = " << nav1_rad_str << std::endl;
39 end = msg.find(",", begin);
42 string nav2_freq_str = msg.substr(begin, end - begin);
44 - cout << " nav2_freq = " << nav2_freq_str << endl;
45 + std::cout << " nav2_freq = " << nav2_freq_str << std::endl;
47 // nav2 selected radial
48 end = msg.find(",", begin);
51 string nav2_rad_str = msg.substr(begin, end - begin);
53 - cout << " nav2_rad = " << nav2_rad_str << endl;
54 + std::cout << " nav2_rad = " << nav2_rad_str << std::endl;
57 end = msg.find("*", begin);
60 string adf_freq_str = msg.substr(begin, end - begin);
62 - cout << " adf_freq = " << adf_freq_str << endl;
63 + std::cout << " adf_freq = " << adf_freq_str << std::endl;
65 nav1_freq = atof( nav1_freq_str.c_str() );
66 nav1_rad = atof( nav1_rad_str.c_str() ) *
67 diff -wbBur Atlas-0.3.1/src/FlightTrack.cxx Atlas-0.3.1.my/src/FlightTrack.cxx
68 --- Atlas-0.3.1/src/FlightTrack.cxx 2003-01-07 21:51:12.000000000 +0000
69 +++ Atlas-0.3.1.my/src/FlightTrack.cxx 2009-03-11 16:33:33.000000000 +0000
73 FlightTrack::~FlightTrack() {
74 - for (list<FlightData*>::iterator i = track.begin(); i != track.end(); i++) {
75 + for (std::list<FlightData*>::iterator i = track.begin(); i != track.end(); i++) {
79 diff -wbBur Atlas-0.3.1/src/FlightTrack.hxx Atlas-0.3.1.my/src/FlightTrack.hxx
80 --- Atlas-0.3.1/src/FlightTrack.hxx 2003-01-07 21:51:12.000000000 +0000
81 +++ Atlas-0.3.1.my/src/FlightTrack.hxx 2009-03-11 16:33:30.000000000 +0000
84 #include <simgear/compiler.h>
90 float lat, lon, alt, hdg, spd;
93 unsigned int max_buffer;
95 - list<FlightData*> track;
96 - list<FlightData*>::iterator track_pos;
97 + std::list<FlightData*> track;
98 + std::list<FlightData*>::iterator track_pos;
102 diff -wbBur Atlas-0.3.1/src/Map.cxx Atlas-0.3.1.my/src/Map.cxx
103 --- Atlas-0.3.1/src/Map.cxx 2006-10-26 21:45:05.000000000 +0000
104 +++ Atlas-0.3.1.my/src/Map.cxx 2009-03-11 16:35:10.000000000 +0000
108 #include <simgear/compiler.h>
112 # define GLX_GLXEXT_PROTOTYPES
115 #elif defined UL_WIN32
116 # include <windows.h>
119 +#include <GL/glut.h>
122 #include <sys/stat.h>
124 #include <simgear/screen/RenderTexture.h>
125 #include "Scenery.hxx"
130 -SG_USING_STD(vector);
131 -SG_USING_STD(string);
135 typedef vector<string> string_list;
140 bool ContinueIfNoHeadless() {
141 - cout << "Unable to continue in headless mode - revert to doublebuffer mode? [Y/n] ";
142 + std::cout << "Unable to continue in headless mode - revert to doublebuffer mode? [Y/n] ";
146 return((c == 'n' || c == 'N') ? false : true);
150 scenerypath = new char[max_path_length + 256];
153 - 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";
154 + 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";
160 dir1 = ulOpenDir(outp);
162 - cout << "Unable to create requested Atlas map directory " << outp << "... exiting :-(\n";
163 + std::cout << "Unable to create requested Atlas map directory " << outp << "... exiting :-(\n";
167 @@ -502,17 +502,17 @@
170 scenerypath[sz] = '\0';
171 - //cout << "Scenerypath found, = " << scenerypath << '\n';
172 + //std::cout << "Scenerypath found, = " << scenerypath << '\n';
175 - //cout << scenerypath << (dir1 == NULL ? " does not exist..." : " exists!") << '\n';
176 + //std::cout << scenerypath << (dir1 == NULL ? " does not exist..." : " exists!") << '\n';
179 - cout << "Unable to find required subdirectory " << dpath1 << '/' << dpath2 << " on the available scenery paths:\n";
180 + std::cout << "Unable to find required subdirectory " << dpath1 << '/' << dpath2 << " on the available scenery paths:\n";
181 for(unsigned int i = 0; i < fg_scenery.size(); ++i) {
182 - cout << fg_scenery[i] << '\n';
183 + std::cout << fg_scenery[i] << '\n';
185 - cout << "... unable to continue - exiting!\n";
186 + std::cout << "... unable to continue - exiting!\n";
190 diff -wbBur Atlas-0.3.1/src/MapBrowser.cxx Atlas-0.3.1.my/src/MapBrowser.cxx
191 --- Atlas-0.3.1/src/MapBrowser.cxx 2005-09-29 19:18:01.000000000 +0000
192 +++ Atlas-0.3.1.my/src/MapBrowser.cxx 2009-03-11 16:33:33.000000000 +0000
195 void MapBrowser::changeResolution(char *path) {
197 - list<MapTile*>::iterator i = tiles.end(),
198 + std::list<MapTile*>::iterator i = tiles.end(),
201 while (tiles.begin() != tiles.end()) {
203 glEnable( GL_TEXTURE_2D );
204 GLfloat tilesize = earth_radius_lat(clat) * SG_DEGREES_TO_RADIANS;
206 - for (list<MapTile*>::iterator i = tiles.begin(); i != tiles.end(); i++) {
207 + for (std::list<MapTile*>::iterator i = tiles.begin(); i != tiles.end(); i++) {
212 if (max_lat > 90) max_lat = 90;
213 int num_lat = (max_lat - min_lat) + 1, num_lon = (max_lon - min_lon) + 1;
215 - for (list<MapTile*>::iterator it = tiles.begin(); it != tiles.end(); it++) {
216 + for (std::list<MapTile*>::iterator it = tiles.begin(); it != tiles.end(); it++) {
221 tile->c.lon < min_lon - CACHE_LIMIT ||
222 tile->c.lon > max_lon + CACHE_LIMIT) {
224 - list<MapTile*>::iterator tmp = it; tmp++;
225 + std::list<MapTile*>::iterator tmp = it; tmp++;
227 glDeleteTextures( 1, &tile->texture_handle );
229 diff -wbBur Atlas-0.3.1/src/MapBrowser.hxx Atlas-0.3.1.my/src/MapBrowser.hxx
230 --- Atlas-0.3.1/src/MapBrowser.hxx 2006-10-28 16:28:32.000000000 +0000
231 +++ Atlas-0.3.1.my/src/MapBrowser.hxx 2009-03-11 16:33:30.000000000 +0000
233 #include "FlightTrack.hxx"
234 #include "Projection.hxx"
235 #include <simgear/compiler.h>
245 - typedef map<Coord, MapTile*, TileLess> TileTable;
246 + typedef std::map<Coord, MapTile*, TileLess> TileTable;
248 - list<MapTile*> tiles;
249 + std::list<MapTile*> tiles;
253 diff -wbBur Atlas-0.3.1/src/MapMaker.cxx Atlas-0.3.1.my/src/MapMaker.cxx
254 --- Atlas-0.3.1/src/MapMaker.cxx 2005-09-29 19:18:01.000000000 +0000
255 +++ Atlas-0.3.1.my/src/MapMaker.cxx 2009-03-11 16:39:09.000000000 +0000
257 #include <sys/stat.h>
262 #include "MapMaker.hxx"
263 /*#include <simgear/magvar/magvar.hxx>*/
268 int MapMaker::process_binary_file( char *tile_name, sgVec3 xyz ) {
269 - //cout << "tile name = " << tile_name << '\n';
270 + //std::cout << "tile name = " << tile_name << '\n';
272 //float cr; // reference point (gbs)
276 /* convert point_list of wgs84 nodes to a list of points transformed
277 into the maps local coordinate system */
278 - const point_list wgs84_nodes = tile.get_wgs84_nodes();
279 - for ( point_list::const_iterator node = wgs84_nodes . begin();
280 + const std::vector< SGVec3<double> > wgs84_nodes = tile.get_wgs84_nodes();
281 + for ( std::vector< SGVec3<double> >::const_iterator node = wgs84_nodes . begin();
282 node != wgs84_nodes . end();
288 // same as above for normals
289 - const point_list m_norms = tile.get_normals();
290 - for ( point_list::const_iterator normal = m_norms.begin();
291 + const std::vector< SGVec3<float> > m_norms = tile.get_normals();
292 + for ( std::vector< SGVec3<float> >::const_iterator normal = m_norms.begin();
293 normal != m_norms.end();
300 - cout << "Node_list sizes are nodes: " << wgs84_nodes.size() << " -- normals: " << m_norms.size() << '\n';
301 - cout << "Group_list sizes are tris: " << tris.size() << " -- fans: " << fans.size() << " -- strips: " << strips.size() << '\n';
302 + std::cout << "Node_list sizes are nodes: " << wgs84_nodes.size() << " -- normals: " << m_norms.size() << '\n';
303 + std::cout << "Group_list sizes are tris: " << tris.size() << " -- fans: " << fans.size() << " -- strips: " << strips.size() << '\n';
306 for (i = 0; i < v.size(); i++) {
307 diff -wbBur Atlas-0.3.1/src/MapMaker.hxx Atlas-0.3.1.my/src/MapMaker.hxx
308 --- Atlas-0.3.1/src/MapMaker.hxx 2005-02-26 18:40:36.000000000 +0000
309 +++ Atlas-0.3.1.my/src/MapMaker.hxx 2009-03-11 16:33:30.000000000 +0000
317 #include "Output.hxx"
318 #include "Overlays.hxx"
319 #include "Geodesy.hxx"
321 -SG_USING_STD(vector);
322 -SG_USING_STD(string);
326 // Utility function that I needed to put somewhere - this probably isn't the best place for it.
327 // Appends a path separator to a directory path if not present.
328 diff -wbBur Atlas-0.3.1/src/MapPS.cxx Atlas-0.3.1.my/src/MapPS.cxx
329 --- Atlas-0.3.1/src/MapPS.cxx 2005-09-29 19:18:01.000000000 +0000
330 +++ Atlas-0.3.1.my/src/MapPS.cxx 2009-03-11 16:40:31.000000000 +0000
333 #include "Scenery.hxx"
335 -SG_USING_STD(vector);
336 -SG_USING_STD(string);
341 typedef vector<string> string_list;
344 scenerypath = new char[max_path_length + 256];
347 - 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";
348 + 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";
352 diff -wbBur Atlas-0.3.1/src/OutputGL.hxx Atlas-0.3.1.my/src/OutputGL.hxx
353 --- Atlas-0.3.1/src/OutputGL.hxx 2005-02-26 18:40:37.000000000 +0000
354 +++ Atlas-0.3.1.my/src/OutputGL.hxx 2009-03-11 16:33:30.000000000 +0000
356 #define __OUTPUTGL_H__
358 #include <simgear/compiler.h>
360 +#include <GL/glut.h>
361 #include <plib/fnt.h>
363 #include "Output.hxx"
364 diff -wbBur Atlas-0.3.1/src/Overlays.cxx Atlas-0.3.1.my/src/Overlays.cxx
365 --- Atlas-0.3.1/src/Overlays.cxx 2006-10-26 11:56:25.000000000 +0000
366 +++ Atlas-0.3.1.my/src/Overlays.cxx 2009-03-11 16:33:33.000000000 +0000
368 #include "Overlays.hxx"
369 #include "Geodesy.hxx"
377 bool Overlays::airports_loaded = false;
378 bool Overlays::navaids_loaded = false;
379 bool Overlays::fixes_loaded = false;
380 -vector<Overlays::ARP*> Overlays::airports;
381 -vector<Overlays::NAV*> Overlays::navaids;
382 +std::vector<Overlays::ARP*> Overlays::airports;
383 +std::vector<Overlays::NAV*> Overlays::navaids;
385 +using namespace std;
387 const float Overlays::airport_color1[4] = {0.439, 0.271, 0.420, 0.7};
388 const float Overlays::airport_color2[4] = {0.824, 0.863, 0.824, 0.7};
389 diff -wbBur Atlas-0.3.1/src/Overlays.hxx Atlas-0.3.1.my/src/Overlays.hxx
390 --- Atlas-0.3.1/src/Overlays.hxx 2005-01-10 13:15:53.000000000 +0000
391 +++ Atlas-0.3.1.my/src/Overlays.hxx 2009-03-11 16:33:30.000000000 +0000
394 char name[64], id[5];
397 + std::list<RWY*> rwys;
400 enum NavType { NAV_VOR, NAV_DME, NAV_NDB, NAV_ILS, NAV_FIX };
405 - static vector<ARP*> airports;
406 - static vector<NAV*> navaids;
407 + static std::vector<ARP*> airports;
408 + static std::vector<NAV*> navaids;
409 static bool airports_loaded, navaids_loaded, fixes_loaded;
410 static const float dummy_normals[][3];
412 diff -wbBur Atlas-0.3.1/src/Scenery.cxx Atlas-0.3.1.my/src/Scenery.cxx
413 --- Atlas-0.3.1/src/Scenery.cxx 2005-02-26 18:39:14.000000000 +0000
414 +++ Atlas-0.3.1.my/src/Scenery.cxx 2009-03-11 16:33:33.000000000 +0000
417 #include "MapMaker.hxx"
419 -SG_USING_STD(vector);
420 -SG_USING_STD(string);
424 typedef vector<string> string_list;
426 diff -wbBur Atlas-0.3.1/src/buildmaps.sh Atlas-0.3.1.my/src/buildmaps.sh
427 --- Atlas-0.3.1/src/buildmaps.sh 2006-10-29 14:35:49.000000000 +0000
428 +++ Atlas-0.3.1.my/src/buildmaps.sh 2009-03-11 16:17:43.000000000 +0000
432 -ROOT=NONE/lib/FlightGear/Scenery
433 +ROOT=/usr/lib/FlightGear/Scenery
437 diff -wbBur Atlas-0.3.1/src/fg_mkdir.cxx Atlas-0.3.1.my/src/fg_mkdir.cxx
438 --- Atlas-0.3.1/src/fg_mkdir.cxx 2005-01-28 12:54:12.000000000 +0000
439 +++ Atlas-0.3.1.my/src/fg_mkdir.cxx 2009-03-11 16:40:00.000000000 +0000
442 #include <simgear/compiler.h>