apt_id = "";
// read in each line of the file
- in.eat_comments();
+ in >> skipcomment;
while ( ! in.eof() )
{
- in.stream() >> token;
+ in >> token;
if ( token == "a" ) {
// airport info record (start of airport)
}
cout << "Reading airport record\n";
- in.stream() >> apt_id;
+ in >> apt_id;
apt_name = "";
i = 1;
avex = avey = avez = 0.0;
// out of the base terrain. The points are given in
// counter clockwise order and are specified in lon/lat
// degrees.
- in.stream() >> p;
+ in >> p;
avex += tile->nodes[i][0];
avey += tile->nodes[i][1];
avez += tile->nodes[i][2];
while ( in.get(c) && c != '\n' );
}
- // airports.insert(a);
- in.eat_comments();
+ in >> skipcomment;
}
if ( apt_id != "" ) {
// $Log$
+// Revision 1.8 1998/11/06 14:46:59 curt
+// Changes to track Bernie's updates to fgstream.
+//
// Revision 1.7 1998/10/20 18:26:06 curt
// Updates to point3d.hxx
//
// read in each line of the file
while ( ! in.eof() && starcount < FG_MAX_STARS )
{
- in.eat_comments();
+ in >> skipcomment;
string name;
- getline( in.stream(), name, ',' );
- in.stream() >> starlist[starcount];
+ getline( in, name, ',' );
+ in >> starlist[starcount];
++starcount;
}
// $Log$
+// Revision 1.20 1998/11/06 14:47:02 curt
+// Changes to track Bernie's updates to fgstream.
+//
// Revision 1.19 1998/10/16 23:27:21 curt
// C++-ifying.
//
fgPrintf( FG_GENERAL, FG_INFO, "Processing config file: %s\n",
path.c_str() );
- in.eat_comments();
+ in >> skipcomment;
while ( !in.eof() )
{
string line;
- getline( in.stream(), line );
+ getline( in, line );
if ( parse_option( line ) == FG_OPTIONS_ERROR ) {
fgPrintf( FG_GENERAL, FG_EXIT,
"Config file parse error: %s '%s'\n",
path.c_str(), line.c_str() );
}
- in.eat_comments();
+ in >> skipcomment;
}
return FG_OPTIONS_OK;
// $Log$
+// Revision 1.28 1998/11/06 14:47:03 curt
+// Changes to track Bernie's updates to fgstream.
+//
// Revision 1.27 1998/11/02 23:04:04 curt
// HUD units now display in feet by default with meters being a command line
// option.
// printf("%s", line);
// strip leading white space and comments
- in.eat_comments();
+ in >> skipcomment;
// set to zero to prevent its value accidently being '{'
// after a failed >> operation.
char token = 0;
- in.stream() >> material_name >> token;
+ in >> material_name >> token;
if ( token == '{' ) {
printf( " Loading material %s\n", material_name.c_str() );
fgMATERIAL m;
- in.stream() >> m;
+ in >> m;
if ( current_options.get_textures() ) {
m.load_texture();
// $Log$
+// Revision 1.9 1998/11/06 14:47:05 curt
+// Changes to track Bernie's updates to fgstream.
+//
// Revision 1.8 1998/10/12 23:49:17 curt
// Changes from NHV to make the code more dynamic with fewer hard coded limits.
//
stopwatch.start();
// ignore initial comments and blank lines. (priming the pump)
- in.eat_comments();
+ in >> skipcomment;
while ( ! in.eof() )
{
string token;
- in.stream() >> token;
+ in >> token;
// printf("token = %s\n", token.c_str() );
if ( token == "gbs" )
{
// reference point (center offset)
- in.stream() >> t->center >> t->bounding_radius;
+ in >> t->center >> t->bounding_radius;
center = t->center;
}
else if ( token == "bs" )
{
// reference point (center offset)
- in.stream() >> fragment.center;
- in.stream() >> fragment.bounding_radius;
+ in >> fragment.center;
+ in >> fragment.bounding_radius;
}
else if ( token == "vn" )
{
// vertex normal
if ( vncount < MAX_NODES ) {
- in.stream() >> normals[vncount][0]
- >> normals[vncount][1]
- >> normals[vncount][2];
+ in >> normals[vncount][0]
+ >> normals[vncount][1]
+ >> normals[vncount][2];
vncount++;
} else {
fgPrintf( FG_TERRAIN, FG_EXIT,
{
// node (vertex)
if ( t->ncount < MAX_NODES ) {
- in.stream() >> t->nodes[t->ncount][0]
- >> t->nodes[t->ncount][1]
- >> t->nodes[t->ncount][2];
+ in >> t->nodes[t->ncount][0]
+ >> t->nodes[t->ncount][1]
+ >> t->nodes[t->ncount][2];
t->ncount++;
} else {
fgPrintf( FG_TERRAIN, FG_EXIT,
// scan the material line
string material;
- in.stream() >> material;
+ in >> material;
fragment.tile_ptr = t;
// find this material in the properties list
n1 = n2 = n3 = n4 = 0;
// fgPrintf( FG_TERRAIN, FG_DEBUG, " new tri strip = %s", line);
- in.stream() >> n1 >> n2 >> n3;
+ in >> n1 >> n2 >> n3;
fragment.add_face(n1, n2, n3);
// fgPrintf( FG_TERRAIN, FG_DEBUG, "(t) = ");
if ( isdigit(c) )
{
in.putback(c);
- in.stream() >> n4;
+ in >> n4;
break;
}
}
}
// fgPrintf( FG_TERRAIN, FG_DEBUG, "new triangle = %s", line);*/
- in.stream() >> n1 >> n2 >> n3;
+ in >> n1 >> n2 >> n3;
fragment.add_face(n1, n2, n3);
// xglNormal3d(normals[n1][0], normals[n1][1], normals[n1][2]);
// fgPrintf( FG_TERRAIN, FG_DEBUG, "continued tri strip = %s ",
// line);
- in.stream() >> n1;
+ in >> n1;
// There can be one or two values
char c;
if ( isdigit(c) )
{
in.putback(c);
- in.stream() >> n2;
+ in >> n2;
break;
}
}
// eat comments and blank lines before start of while loop so
// if we are done with useful input it is noticed before hand.
- in.eat_comments();
+ in >> skipcomment;
}
if ( in_fragment ) {
// $Log$
+// Revision 1.9 1998/11/06 14:47:06 curt
+// Changes to track Bernie's updates to fgstream.
+//
// Revision 1.8 1998/10/20 18:33:55 curt
// Tweaked texture coordinates, but we still have some problems. :-(
//