]> git.mxchange.org Git - flightgear.git/commitdiff
Miscellaneous weekend tweaks. Fixed? a cache problem that caused whole
authorcurt <curt>
Mon, 16 Feb 1998 13:39:42 +0000 (13:39 +0000)
committercurt <curt>
Mon, 16 Feb 1998 13:39:42 +0000 (13:39 +0000)
tiles to occasionally be missing.

Main/GLUTmain.c
Main/fg_debug.c
Main/fg_init.c
Scenery/tilecache.h
Scenery/tilemgr.c
Simulator/commondefs

index 2cc6474a36bdf02424d52c6a4113421909335571..b114e77ee875753841c140381e95f49dbf77f072 100644 (file)
@@ -154,10 +154,13 @@ Option rootOption     = { 'r',
                           "Root directory for execution"
                         };
 Option hudOption      = { 'v',
-                          OPT_SWITCH,
+                          OPT_INTEGER,
                           &viewArg,
-                          "View mode start" // HUD,Panel,Chase,Tower
+                          "View mode start" // Naked,HUD,Panel,Chase,Tower...
                         };
+//
+// Only naked view and HUD are implemented at this time
+//
 Option logfileOption  = { 'x',
                           OPT_STRING,
                           logArgbuf,
@@ -717,7 +720,7 @@ int main( int argc, char *argv[] ) {
     // Deal with the effects of options no set by manipulating the command
     // line, or possibly set to invalid states.
 
-    if(( viewArg >= 0) && (viewArg < 1)) {
+    if(( viewArg >= 0) && (viewArg <= 1)) {
        show_hud = viewArg; // For now view_mode TRUE - no HUD, else show_hud.
     } else {
        show_hud = DefaultViewMode;
@@ -785,10 +788,14 @@ extern "C" {
 #endif
 
 /* $Log$
-/* Revision 1.61  1998/02/12 21:59:46  curt
-/* Incorporated code changes contributed by Charlie Hotchkiss
-/* <chotchkiss@namg.us.anritsu.com>
+/* Revision 1.62  1998/02/16 13:39:42  curt
+/* Miscellaneous weekend tweaks.  Fixed? a cache problem that caused whole
+/* tiles to occasionally be missing.
 /*
+ * Revision 1.61  1998/02/12 21:59:46  curt
+ * Incorporated code changes contributed by Charlie Hotchkiss
+ * <chotchkiss@namg.us.anritsu.com>
+ *
  * Revision 1.60  1998/02/11 02:50:40  curt
  * Minor changes.
  *
index a315096c0d61f05f9bff9e270e9075579a21e067..a6a5ca8663299781f345c603ff29af6a9936950f 100644 (file)
@@ -19,6 +19,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
+ * $Id$
  * (Log is kept at end of this file)
  **************************************************************************/
 
@@ -258,6 +259,10 @@ int fgPrintf( fgDebugClass dbg_class, fgDebugPriority prio, char *fmt, ... )
   return ret;  
 } 
 
-// Revision history?
-//
 
+/* $Log$
+/* Revision 1.7  1998/02/16 13:39:43  curt
+/* Miscellaneous weekend tweaks.  Fixed? a cache problem that caused whole
+/* tiles to occasionally be missing.
+/*
+ */
index 837699ebdc8d7922558857e8ea61ecb6df4966fa..8b7c0fb4c1179444f9385f1d3a59149f09ea6666 100644 (file)
@@ -1,4 +1,5 @@
-/**************************************************************************
+/* -*- Mode: C++ -*-
+ *
  * fg_init.c -- Flight Gear top level initialization routines
  *
  * Written by Curtis Olson, started August 1997.
@@ -19,6 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
+ *
  * $Id$
  * (Log is kept at end of this file)
  **************************************************************************/
@@ -142,11 +144,11 @@ int fgInitSubsystems( void ) {
     /* FG_Runway_altitude = (2646 + 1000); */
     /* FG_Altitude = FG_Runway_altitude + 3.758099; */
 
-    /* Initial Position at (TUS) Tucson, AZ */
-    /* FG_Longitude = ( -110.9412597 ) * DEG_TO_RAD; */
-    /* FG_Latitude  = (  32.1162439 ) * DEG_TO_RAD; */
-    /* FG_Runway_altitude = (2641 + 0); */
-    /* FG_Altitude = FG_Runway_altitude + 3.758099; */
+    // Initial Position at (TUS) Tucson, AZ
+    FG_Longitude = ( -110.9412597 ) * DEG_TO_RAD;
+    FG_Latitude  = (  32.1162439 ) * DEG_TO_RAD;
+    FG_Runway_altitude = (2641 + 0);
+    FG_Altitude = FG_Runway_altitude + 3.758099;
 
     /* Initial Position at near Anchoraze, AK */
     /* FG_Longitude = ( -150.00 ) * DEG_TO_RAD; */
@@ -208,9 +210,15 @@ int fgInitSubsystems( void ) {
     // FG_Runway_altitude = 920.0;
     // FG_Altitude = FG_Runway_altitude + 3.758099;
 
-    /* A random test position */
-    /* FG_Longitude = ( 88128.00 / 3600.0 ) * DEG_TO_RAD; */
-    /* FG_Latitude  = ( 93312.00 / 3600.0 ) * DEG_TO_RAD; */
+    // Test Position
+    FG_Longitude = ( -111.18 ) * DEG_TO_RAD;
+    FG_Latitude  = (   33.70 ) * DEG_TO_RAD;
+    FG_Runway_altitude = 5000.0;
+    FG_Altitude = FG_Runway_altitude + 3.758099;
+
+    // A random test position
+    // FG_Longitude = ( 88128.00 / 3600.0 ) * DEG_TO_RAD;
+    // FG_Latitude  = ( 93312.00 / 3600.0 ) * DEG_TO_RAD;
 
     fgPrintf( FG_GENERAL, FG_INFO, 
              "Initial position is: (%.4f, %.4f, %.2f)\n", 
@@ -372,10 +380,14 @@ int fgInitSubsystems( void ) {
 
 
 /* $Log$
-/* Revision 1.44  1998/02/12 21:59:50  curt
-/* Incorporated code changes contributed by Charlie Hotchkiss
-/* <chotchkiss@namg.us.anritsu.com>
+/* Revision 1.45  1998/02/16 13:39:43  curt
+/* Miscellaneous weekend tweaks.  Fixed? a cache problem that caused whole
+/* tiles to occasionally be missing.
 /*
+ * Revision 1.44  1998/02/12 21:59:50  curt
+ * Incorporated code changes contributed by Charlie Hotchkiss
+ * <chotchkiss@namg.us.anritsu.com>
+ *
  * Revision 1.43  1998/02/11 02:50:40  curt
  * Minor changes.
  *
index 0cfa79b24cd5c9a779167e4b04aa0aa2b4ad69aa..3c6e9bb4949de8aa5d2e4dfe31c175ecfcf2781a 100644 (file)
 #include <Scenery/bucketutils.h>
 #include <Include/fg_types.h>
 
-/* For best results ...
+/* For best results ... i.e. to avoid tile load problems and blank areas
  *
- * FG_TILE_CACHE_SIZE >= FG_LOCAL_X_Y + max(FG_LOCAL_X, FG_LOCAL_Y) */
-#define FG_TILE_CACHE_SIZE 12   
+ * FG_TILE_CACHE_SIZE >= FG_LOCAL_X_Y + max(FG_LOCAL_X, FG_LOCAL_Y) + 1 */
+#define FG_TILE_CACHE_SIZE 36
 
 
 /* Tile cache record */
@@ -79,9 +79,13 @@ void fgTileCacheEntryInfo( int index, GLint *display_list,
 
 
 /* $Log$
-/* Revision 1.4  1998/01/31 00:43:27  curt
-/* Added MetroWorks patches from Carmen Volpe.
+/* Revision 1.5  1998/02/16 13:39:45  curt
+/* Miscellaneous weekend tweaks.  Fixed? a cache problem that caused whole
+/* tiles to occasionally be missing.
 /*
+ * Revision 1.4  1998/01/31 00:43:27  curt
+ * Added MetroWorks patches from Carmen Volpe.
+ *
  * Revision 1.3  1998/01/29 00:51:40  curt
  * First pass at tile cache, dynamic tile loading and tile unloading now works.
  *
index c46110142b42cfab9750bf15f5d120fad08a17f7..96e4de6eeb94869a6e4ec544403aa85f9dbc1b02 100644 (file)
@@ -42,9 +42,9 @@
 #include <Main/fg_debug.h>
 
 
-#define FG_LOCAL_X           3   /* should be odd */
-#define FG_LOCAL_Y           3   /* should be odd */
-#define FG_LOCAL_X_Y         9   /* At least FG_LOCAL_X times FG_LOCAL_Y */
+#define FG_LOCAL_X           5   /* should be odd */
+#define FG_LOCAL_Y           5   /* should be odd */
+#define FG_LOCAL_X_Y         25   /* At least FG_LOCAL_X times FG_LOCAL_Y */
 
 
 /* closest (potentially viewable) tiles, centered on current tile.
@@ -225,10 +225,14 @@ void fgTileMgrRender( void ) {
 
 
 /* $Log$
-/* Revision 1.16  1998/02/12 21:59:53  curt
-/* Incorporated code changes contributed by Charlie Hotchkiss
-/* <chotchkiss@namg.us.anritsu.com>
+/* Revision 1.17  1998/02/16 13:39:46  curt
+/* Miscellaneous weekend tweaks.  Fixed? a cache problem that caused whole
+/* tiles to occasionally be missing.
 /*
+ * Revision 1.16  1998/02/12 21:59:53  curt
+ * Incorporated code changes contributed by Charlie Hotchkiss
+ * <chotchkiss@namg.us.anritsu.com>
+ *
  * Revision 1.14  1998/02/09 21:30:19  curt
  * Fixed a nagging problem with terrain tiles not "quite" matching up perfectly.
  *
index f4b2413e6dfc166575053855cb6a2dc7720f0f3b..a4f86a96fe920e995c9f7e23e344c86ddba33c81 100644 (file)
@@ -5,7 +5,7 @@
 #---------------------------------------------------------------------------
 
 FG_VERSION_MAJOR = 0
-FG_VERSION_MINOR = 33
+FG_VERSION_MINOR = 34
 FG_VERSION = $(FG_VERSION_MAJOR).$(FG_VERSION_MINOR)