1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
|
diff -wbBur Atlas-0.3.1/src/Atlas.cxx Atlas-0.3.1.my/src/Atlas.cxx
--- Atlas-0.3.1/src/Atlas.cxx 2006-10-28 16:28:32.000000000 +0000
+++ Atlas-0.3.1.my/src/Atlas.cxx 2009-03-11 16:33:33.000000000 +0000
@@ -29,7 +29,7 @@
#include <memory.h>
#include <stdio.h>
#include <simgear/compiler.h>
-#include SG_GLUT_H
+#include <GL/glut.h>
#include <plib/fnt.h>
#include <plib/pu.h>
#include <string>
@@ -40,6 +40,8 @@
#include "Overlays.hxx"
#include "FlightTrack.hxx"
+#include <iostream>
+
#define SCALECHANGEFACTOR 1.3f
SGIOChannel *input_channel;
@@ -345,7 +347,7 @@
string nav1_freq_str = msg.substr(begin, end - begin);
begin = end + 1;
- cout << " nav1_freq = " << nav1_freq_str << endl;
+ std::cout << " nav1_freq = " << nav1_freq_str << std::endl;
// nav1 selected radial
end = msg.find(",", begin);
@@ -355,7 +357,7 @@
string nav1_rad_str = msg.substr(begin, end - begin);
begin = end + 1;
- cout << " nav1_rad = " << nav1_rad_str << endl;
+ std::cout << " nav1_rad = " << nav1_rad_str << std::endl;
// nav2 freq
end = msg.find(",", begin);
@@ -365,7 +367,7 @@
string nav2_freq_str = msg.substr(begin, end - begin);
begin = end + 1;
- cout << " nav2_freq = " << nav2_freq_str << endl;
+ std::cout << " nav2_freq = " << nav2_freq_str << std::endl;
// nav2 selected radial
end = msg.find(",", begin);
@@ -375,7 +377,7 @@
string nav2_rad_str = msg.substr(begin, end - begin);
begin = end + 1;
- cout << " nav2_rad = " << nav2_rad_str << endl;
+ std::cout << " nav2_rad = " << nav2_rad_str << std::endl;
// adf freq
end = msg.find("*", begin);
@@ -385,7 +387,7 @@
string adf_freq_str = msg.substr(begin, end - begin);
begin = end + 1;
- cout << " adf_freq = " << adf_freq_str << endl;
+ std::cout << " adf_freq = " << adf_freq_str << std::endl;
nav1_freq = atof( nav1_freq_str.c_str() );
nav1_rad = atof( nav1_rad_str.c_str() ) *
diff -wbBur Atlas-0.3.1/src/FlightTrack.cxx Atlas-0.3.1.my/src/FlightTrack.cxx
--- Atlas-0.3.1/src/FlightTrack.cxx 2003-01-07 21:51:12.000000000 +0000
+++ Atlas-0.3.1.my/src/FlightTrack.cxx 2009-03-11 16:33:33.000000000 +0000
@@ -29,7 +29,7 @@
}
FlightTrack::~FlightTrack() {
- for (list<FlightData*>::iterator i = track.begin(); i != track.end(); i++) {
+ for (std::list<FlightData*>::iterator i = track.begin(); i != track.end(); i++) {
delete *i;
}
}
diff -wbBur Atlas-0.3.1/src/FlightTrack.hxx Atlas-0.3.1.my/src/FlightTrack.hxx
--- Atlas-0.3.1/src/FlightTrack.hxx 2003-01-07 21:51:12.000000000 +0000
+++ Atlas-0.3.1.my/src/FlightTrack.hxx 2009-03-11 16:33:30.000000000 +0000
@@ -27,7 +27,7 @@
#include <plib/sg.h>
#include <simgear/compiler.h>
-SG_USING_STD(list);
+#include <list>
struct FlightData {
float lat, lon, alt, hdg, spd;
@@ -51,8 +51,8 @@
protected:
unsigned int max_buffer;
- list<FlightData*> track;
- list<FlightData*>::iterator track_pos;
+ std::list<FlightData*> track;
+ std::list<FlightData*>::iterator track_pos;
};
diff -wbBur Atlas-0.3.1/src/Map.cxx Atlas-0.3.1.my/src/Map.cxx
--- Atlas-0.3.1/src/Map.cxx 2006-10-26 21:45:05.000000000 +0000
+++ Atlas-0.3.1.my/src/Map.cxx 2009-03-11 16:35:10.000000000 +0000
@@ -39,7 +39,7 @@
#include <plib/ul.h>
#include <simgear/compiler.h>
-#include SG_GL_H
+#include <GL/gl.h>
#ifdef UL_GLX
# define GLX_GLXEXT_PROTOTYPES
# ifdef __APPLE__
@@ -50,7 +50,7 @@
#elif defined UL_WIN32
# include <windows.h>
#endif
-#include SG_GLUT_H
+#include <GL/glut.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>
@@ -65,10 +65,10 @@
#include <simgear/screen/RenderTexture.h>
#include "Scenery.hxx"
#include <vector>
-#include STL_STRING
+#include <string>
-SG_USING_STD(vector);
-SG_USING_STD(string);
+#include <vector>
+#include <iostream>
typedef vector<string> string_list;
@@ -319,9 +319,9 @@
}
bool ContinueIfNoHeadless() {
- cout << "Unable to continue in headless mode - revert to doublebuffer mode? [Y/n] ";
+ std::cout << "Unable to continue in headless mode - revert to doublebuffer mode? [Y/n] ";
char c;
- cin >> c;
+ std::cin >> c;
return((c == 'n' || c == 'N') ? false : true);
}
@@ -439,7 +439,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);
}
@@ -467,7 +467,7 @@
}
dir1 = ulOpenDir(outp);
if(NULL == dir1) {
- cout << "Unable to create requested Atlas map directory " << outp << "... exiting :-(\n";
+ std::cout << "Unable to create requested Atlas map directory " << outp << "... exiting :-(\n";
exit(-1);
}
@@ -502,17 +502,17 @@
if(dir1 != NULL) {
path_found = true;
scenerypath[sz] = '\0';
- //cout << "Scenerypath found, = " << scenerypath << '\n';
+ //std::cout << "Scenerypath found, = " << scenerypath << '\n';
break;
}
- //cout << scenerypath << (dir1 == NULL ? " does not exist..." : " exists!") << '\n';
+ //std::cout << scenerypath << (dir1 == NULL ? " does not exist..." : " exists!") << '\n';
}
if(!path_found) {
- cout << "Unable to find required subdirectory " << dpath1 << '/' << dpath2 << " on the available scenery paths:\n";
+ std::cout << "Unable to find required subdirectory " << dpath1 << '/' << dpath2 << " on the available scenery paths:\n";
for(unsigned int i = 0; i < fg_scenery.size(); ++i) {
- cout << fg_scenery[i] << '\n';
+ std::cout << fg_scenery[i] << '\n';
}
- cout << "... unable to continue - exiting!\n";
+ std::cout << "... unable to continue - exiting!\n";
exit(-1);
}
}
diff -wbBur Atlas-0.3.1/src/MapBrowser.cxx Atlas-0.3.1.my/src/MapBrowser.cxx
--- Atlas-0.3.1/src/MapBrowser.cxx 2005-09-29 19:18:01.000000000 +0000
+++ Atlas-0.3.1.my/src/MapBrowser.cxx 2009-03-11 16:33:33.000000000 +0000
@@ -112,7 +112,7 @@
void MapBrowser::changeResolution(char *path) {
MapTile *tile;
- list<MapTile*>::iterator i = tiles.end(),
+ std::list<MapTile*>::iterator i = tiles.end(),
itmp;
i--;
while (tiles.begin() != tiles.end()) {
@@ -171,7 +171,7 @@
glEnable( GL_TEXTURE_2D );
GLfloat tilesize = earth_radius_lat(clat) * SG_DEGREES_TO_RADIANS;
- for (list<MapTile*>::iterator i = tiles.begin(); i != tiles.end(); i++) {
+ for (std::list<MapTile*>::iterator i = tiles.begin(); i != tiles.end(); i++) {
MapTile *tile = *i;
if ( tile->tex ) {
GLfloat dxs = 0.5f;
@@ -237,7 +237,7 @@
if (max_lat > 90) max_lat = 90;
int num_lat = (max_lat - min_lat) + 1, num_lon = (max_lon - min_lon) + 1;
- for (list<MapTile*>::iterator it = tiles.begin(); it != tiles.end(); it++) {
+ for (std::list<MapTile*>::iterator it = tiles.begin(); it != tiles.end(); it++) {
MapTile *tile = *it;
// remove old tiles
@@ -246,7 +246,7 @@
tile->c.lon < min_lon - CACHE_LIMIT ||
tile->c.lon > max_lon + CACHE_LIMIT) {
- list<MapTile*>::iterator tmp = it; tmp++;
+ std::list<MapTile*>::iterator tmp = it; tmp++;
if ( tile->tex ) {
glDeleteTextures( 1, &tile->texture_handle );
}
diff -wbBur Atlas-0.3.1/src/MapBrowser.hxx Atlas-0.3.1.my/src/MapBrowser.hxx
--- Atlas-0.3.1/src/MapBrowser.hxx 2006-10-28 16:28:32.000000000 +0000
+++ Atlas-0.3.1.my/src/MapBrowser.hxx 2009-03-11 16:33:30.000000000 +0000
@@ -27,7 +27,7 @@
#include "FlightTrack.hxx"
#include "Projection.hxx"
#include <simgear/compiler.h>
-#include SG_GL_H
+#include <GL/gl.h>
#include <math.h>
#include <list>
#include <map>
@@ -113,9 +113,9 @@
}
};
- typedef map<Coord, MapTile*, TileLess> TileTable;
+ typedef std::map<Coord, MapTile*, TileLess> TileTable;
- list<MapTile*> tiles;
+ std::list<MapTile*> tiles;
TileTable tiletable;
char mpath[512];
diff -wbBur Atlas-0.3.1/src/MapMaker.cxx Atlas-0.3.1.my/src/MapMaker.cxx
--- Atlas-0.3.1/src/MapMaker.cxx 2005-09-29 19:18:01.000000000 +0000
+++ Atlas-0.3.1.my/src/MapMaker.cxx 2009-03-11 16:39:09.000000000 +0000
@@ -32,6 +32,8 @@
#include <sys/stat.h>
#include <plib/ul.h>
+#include <iostream>
+
#include "MapMaker.hxx"
/*#include <simgear/magvar/magvar.hxx>*/
@@ -626,7 +628,7 @@
}
int MapMaker::process_binary_file( char *tile_name, sgVec3 xyz ) {
- //cout << "tile name = " << tile_name << '\n';
+ //std::cout << "tile name = " << tile_name << '\n';
//float cr; // reference point (gbs)
sgVec3 gbs, tmp;
@@ -653,8 +655,8 @@
/* 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();
+ const std::vector< SGVec3<double> > wgs84_nodes = tile.get_wgs84_nodes();
+ for ( std::vector< SGVec3<double> >::const_iterator node = wgs84_nodes . begin();
node != wgs84_nodes . end();
node++ ) {
@@ -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< SGVec3<float> > m_norms = tile.get_normals();
+ for ( std::vector< SGVec3<float> >::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++) {
diff -wbBur Atlas-0.3.1/src/MapMaker.hxx Atlas-0.3.1.my/src/MapMaker.hxx
--- Atlas-0.3.1/src/MapMaker.hxx 2005-02-26 18:40:36.000000000 +0000
+++ Atlas-0.3.1.my/src/MapMaker.hxx 2009-03-11 16:33:30.000000000 +0000
@@ -31,14 +31,14 @@
#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);
+#include <vector>
+#include <string>
// 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.
diff -wbBur Atlas-0.3.1/src/MapPS.cxx Atlas-0.3.1.my/src/MapPS.cxx
--- Atlas-0.3.1/src/MapPS.cxx 2005-09-29 19:18:01.000000000 +0000
+++ Atlas-0.3.1.my/src/MapPS.cxx 2009-03-11 16:40:31.000000000 +0000
@@ -39,8 +39,9 @@
#include <plib/ul.h>
#include "Scenery.hxx"
-SG_USING_STD(vector);
-SG_USING_STD(string);
+#include <vector>
+#include <string>
+#include <iostream>
typedef vector<string> string_list;
@@ -149,7 +150,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);
}
diff -wbBur Atlas-0.3.1/src/OutputGL.hxx Atlas-0.3.1.my/src/OutputGL.hxx
--- Atlas-0.3.1/src/OutputGL.hxx 2005-02-26 18:40:37.000000000 +0000
+++ Atlas-0.3.1.my/src/OutputGL.hxx 2009-03-11 16:33:30.000000000 +0000
@@ -2,7 +2,7 @@
#define __OUTPUTGL_H__
#include <simgear/compiler.h>
-#include SG_GLUT_H
+#include <GL/glut.h>
#include <plib/fnt.h>
#include <plib/pu.h>
#include "Output.hxx"
diff -wbBur Atlas-0.3.1/src/Overlays.cxx Atlas-0.3.1.my/src/Overlays.cxx
--- Atlas-0.3.1/src/Overlays.cxx 2006-10-26 11:56:25.000000000 +0000
+++ Atlas-0.3.1.my/src/Overlays.cxx 2009-03-11 16:33:33.000000000 +0000
@@ -27,7 +27,7 @@
#include "Overlays.hxx"
#include "Geodesy.hxx"
-SG_USING_STD(map);
+#include <map>
#ifdef _MSC_VER
@@ -65,8 +65,10 @@
bool Overlays::airports_loaded = false;
bool Overlays::navaids_loaded = false;
bool Overlays::fixes_loaded = false;
-vector<Overlays::ARP*> Overlays::airports;
-vector<Overlays::NAV*> Overlays::navaids;
+std::vector<Overlays::ARP*> Overlays::airports;
+std::vector<Overlays::NAV*> Overlays::navaids;
+
+using namespace std;
const float Overlays::airport_color1[4] = {0.439, 0.271, 0.420, 0.7};
const float Overlays::airport_color2[4] = {0.824, 0.863, 0.824, 0.7};
diff -wbBur Atlas-0.3.1/src/Overlays.hxx Atlas-0.3.1.my/src/Overlays.hxx
--- Atlas-0.3.1/src/Overlays.hxx 2005-01-10 13:15:53.000000000 +0000
+++ Atlas-0.3.1.my/src/Overlays.hxx 2009-03-11 16:33:30.000000000 +0000
@@ -121,7 +121,7 @@
struct ARP {
char name[64], id[5];
float lat, lon;
- list<RWY*> rwys;
+ std::list<RWY*> rwys;
};
enum NavType { NAV_VOR, NAV_DME, NAV_NDB, NAV_ILS, NAV_FIX };
@@ -142,8 +142,8 @@
protected:
- static vector<ARP*> airports;
- static vector<NAV*> navaids;
+ static std::vector<ARP*> airports;
+ static std::vector<NAV*> navaids;
static bool airports_loaded, navaids_loaded, fixes_loaded;
static const float dummy_normals[][3];
diff -wbBur Atlas-0.3.1/src/Scenery.cxx Atlas-0.3.1.my/src/Scenery.cxx
--- Atlas-0.3.1/src/Scenery.cxx 2005-02-26 18:39:14.000000000 +0000
+++ Atlas-0.3.1.my/src/Scenery.cxx 2009-03-11 16:33:33.000000000 +0000
@@ -3,8 +3,8 @@
#include "MapMaker.hxx"
-SG_USING_STD(vector);
-SG_USING_STD(string);
+#include <vector>
+#include <string>
typedef vector<string> string_list;
diff -wbBur Atlas-0.3.1/src/buildmaps.sh Atlas-0.3.1.my/src/buildmaps.sh
--- Atlas-0.3.1/src/buildmaps.sh 2006-10-29 14:35:49.000000000 +0000
+++ Atlas-0.3.1.my/src/buildmaps.sh 2009-03-11 16:17:43.000000000 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
-ROOT=NONE/lib/FlightGear/Scenery
+ROOT=/usr/lib/FlightGear/Scenery
OUTPUTDIR=./maps
mkdir -p $OUTPUTDIR
diff -wbBur Atlas-0.3.1/src/fg_mkdir.cxx Atlas-0.3.1.my/src/fg_mkdir.cxx
--- Atlas-0.3.1/src/fg_mkdir.cxx 2005-01-28 12:54:12.000000000 +0000
+++ Atlas-0.3.1.my/src/fg_mkdir.cxx 2009-03-11 16:40:00.000000000 +0000
@@ -28,6 +28,8 @@
#include <simgear/compiler.h>
+#include <cstdlib>
+
#ifdef _MSC_VER
#include <direct.h>
#include <io.h>
|