+
+ // load custom objects
+ cout << "CUSTOM OBJECTS" << endl;
+
+ FGPath index_path = tile_path;
+ index_path.append( p.gen_index_str() );
+ index_path.concat( ".ind" );
+
+ cout << "Looking in " << index_path.str() << endl;
+
+ fg_gzifstream in( index_path.str() );
+
+ if ( in.is_open() ) {
+ string token, name;
+
+ while ( ! in.eof() ) {
+ in >> token;
+ in >> name;
+#ifdef MACOS
+ in >> ::skipws;
+#else
+ in >> skipws;
+#endif
+ cout << "token = " << token << " name = " << name << endl;
+
+ FGPath custom_path = tile_path;
+ custom_path.append( name );
+ ssgBranch *custom_obj = fgObjLoad( custom_path.str(),
+ &tile_cache[index], false );
+ if ( (new_tile != NULL) && (custom_obj != NULL) ) {
+ new_tile -> addKid( custom_obj );
+ }
+ }
+ }
+
+ // generate cloud layer
+ if ( current_options.get_clouds() ) {
+ ssgLeaf *cloud_layer = fgGenCloudLayer( &tile_cache[index],
+ current_options.get_clouds_asl() );
+ cloud_layer->clrTraversalMaskBits( SSGTRAV_HOT );
+ new_tile -> addKid( cloud_layer );
+ }
+