/* given the current lon/lat, fill in the array of local chunks. If
* the chunk isn't already in the cache, then read it from disk. */
void fgTileMgrUpdate( void ) {
- struct fgFLIGHT *f;
+ fgFLIGHT *f;
struct fgBUCKET p1, p2;
static struct fgBUCKET p_last = {-1000, 0, 0, 0};
int i, j, dw, dh;
- f = ¤t_aircraft.flight;
+ f = current_aircraft.flight;
fgBucketFind(FG_Longitude * RAD_TO_DEG, FG_Latitude * RAD_TO_DEG, &p1);
dw = FG_LOCAL_X / 2;
/* fgPrintf( FG_TERRAIN, FG_DEBUG, "Index = %d\n", index); */
fgTileCacheEntryInfo(index, &display_list, &local_ref );
- xglPushMatrix();
- xglTranslatef(local_ref.x - scenery.center.x,
- local_ref.y - scenery.center.y,
- local_ref.z - scenery.center.z);
- xglCallList(display_list);
- xglPopMatrix();
+ if ( display_list >= 0 ) {
+ xglPushMatrix();
+ xglTranslatef(local_ref.x - scenery.center.x,
+ local_ref.y - scenery.center.y,
+ local_ref.z - scenery.center.z);
+ xglCallList(display_list);
+ xglPopMatrix();
+ }
}
}
/* $Log$
-/* Revision 1.11 1998/01/31 00:43:27 curt
-/* Added MetroWorks patches from Carmen Volpe.
+/* Revision 1.13 1998/02/07 15:29:46 curt
+/* Incorporated HUD changes and struct/typedef changes from Charlie Hotchkiss
+/* <chotchkiss@namg.us.anritsu.com>
/*
+ * Revision 1.12 1998/02/01 03:39:55 curt
+ * Minor tweaks.
+ *
+ * Revision 1.11 1998/01/31 00:43:27 curt
+ * Added MetroWorks patches from Carmen Volpe.
+ *
* Revision 1.10 1998/01/29 00:51:40 curt
* First pass at tile cache, dynamic tile loading and tile unloading now works.
*