MSVC++ tweaks.
# End Source File\r
# Begin Source File\r
\r
-SOURCE=.\src\FDM\LaRCsim\ls_trim.c\r
-\r
-!IF "$(CFG)" == "FlightGear - Win32 Release"\r
-\r
-# PROP Intermediate_Dir "Release\Lib_LaRCsim"\r
-\r
-!ELSEIF "$(CFG)" == "FlightGear - Win32 Debug"\r
-\r
-# PROP Intermediate_Dir "Debug\Lib_LaRCsim"\r
-\r
-!ENDIF \r
-\r
-# End Source File\r
-# Begin Source File\r
-\r
SOURCE=.\src\FDM\LaRCsim\ls_types.h\r
\r
!IF "$(CFG)" == "FlightGear - Win32 Release"\r
Altitude = alt_feet;
ls_geod_to_geoc( Latitude, Altitude, &Sea_level_radius, &Lat_geocentric);
Radius_to_vehicle = Altitude + Sea_level_radius;
+
+ return 0;
}
/* Flight Gear Modification Log
*
* $Log$
+ * Revision 1.5 2001/05/21 18:44:59 curt
+ * Tile pager tweaks.
+ * MSVC++ tweaks.
+ *
* Revision 1.4 2001/03/24 05:03:12 curt
* SG-ified logstream.
*
MODIFICATION HISTORY:
DATE PURPOSE BY
-
+ 19 MAY 2001 Reduce MSVC6 warnings Geoff R. McLane
--------------------------------------------------------------------------*/
#ifndef _LS_TYPES_H
#define _LS_TYPES_H
+#ifdef _MSC_VER
+#pragma warning(disable: 4244) // conversion from double to float
+#pragma warning(disable: 4305) // truncation from const double to float
+#endif /* _MSC_VER */
/* SCALAR type is used throughout equations of motion code - sets precision */
ssgBranch *object = new ssgBranch();
object->setName( (char *)name.c_str() );
- double offset = name.length() / 2.0;
+ double width = name.length() / 3.0;
string material = name + ".rgb";
int_list vertex_index; vertex_index.clear();
int_list tex_index; tex_index.clear();
- nodes.push_back( Point3D( -offset, 0, 0.25 ) );
- nodes.push_back( Point3D( offset + 1, 0, 0.25 ) );
- nodes.push_back( Point3D( -offset, 0, 1.25 ) );
- nodes.push_back( Point3D( offset + 1, 0, 1.25 ) );
+ nodes.push_back( Point3D( -width, 0, 0.25 ) );
+ nodes.push_back( Point3D( width + 1, 0, 0.25 ) );
+ nodes.push_back( Point3D( -width, 0, 1.25 ) );
+ nodes.push_back( Point3D( width + 1, 0, 1.25 ) );
normals.push_back( Point3D( 0, -1, 0 ) );
normals.push_back( Point3D( 0, -1, 0 ) );
#endif // ENABLE_THREADS
}
+
+/**
+ *
+ */
+void FGTileLoader::reinit() {
+ while ( !tile_load_queue.empty() ) {
+ tile_load_queue.pop();
+ }
+}
+
+
/**
*
*/
FGTileEntry* tile = tile_load_queue.front();
tile_load_queue.pop();
tile->load( tile_path, true );
- FGTileMgr::loaded( tile );
+ FGTileMgr::ready_to_attach( tile );
}
+#ifdef WISH_PLIB_WAS_THREADED // but it isn't
if ( !tile_free_queue.empty() ) {
cout << "freeing next tile ..." << endl;
// free the next tile in the queue
tile->free_tile();
delete tile;
}
+#endif
#endif // ENABLE_THREADS
}
*/
~FGTileLoader();
+ /**
+ * Flush anything in pending load queue without doing the work
+ * Leave the free queue intact since that's are only record of
+ * things we need to remove.
+ */
+ void reinit();
+
/**
* Add a tile to the end of the load queue.
* @param tile The tile to be loaded from disk.
SGLockedQueue<FGDeferredModel *> FGTileMgr::model_queue;
#else
queue<FGTileEntry *> FGTileMgr::attach_queue;
-queue<FGTileDeferredModel *> FGTileMgr::model_queue;
+queue<FGDeferredModel *> FGTileMgr::model_queue;
#endif // ENABLE_THREADS
int FGTileMgr::init() {
SG_LOG( SG_TERRAIN, SG_INFO, "Initializing Tile Manager subsystem." );
+ tile_cache.init();
+ destroy_queue();
+
+ while ( ! attach_queue.empty() ) {
+ attach_queue.pop();
+ }
+
+ while ( ! model_queue.empty() ) {
+#ifdef ENABLE_THREADS
+ FGDeferredModel* dm = model_queue.pop();
+#else
+ FGDeferredModel* dm = model_queue.front();
+ model_queue.pop();
+#endif
+ delete dm;
+ }
+ loader.reinit();
+
+#if 0
if ( state != Start ) {
SG_LOG( SG_TERRAIN, SG_INFO,
"... Reinitializing." );
"... First time through." );
tile_cache.init();
}
+#endif
hit_list.clear();