From e1639ee6c167414207703b977ead3298c275b8dd Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 16 Feb 1998 13:39:42 +0000 Subject: [PATCH] Miscellaneous weekend tweaks. Fixed? a cache problem that caused whole tiles to occasionally be missing. --- Main/GLUTmain.c | 19 +++++++++++++------ Main/fg_debug.c | 9 +++++++-- Main/fg_init.c | 36 ++++++++++++++++++++++++------------ Scenery/tilecache.h | 14 +++++++++----- Scenery/tilemgr.c | 16 ++++++++++------ Simulator/commondefs | 2 +- 6 files changed, 64 insertions(+), 32 deletions(-) diff --git a/Main/GLUTmain.c b/Main/GLUTmain.c index 2cc6474a3..b114e77ee 100644 --- a/Main/GLUTmain.c +++ b/Main/GLUTmain.c @@ -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 -/* +/* 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 + * + * * Revision 1.60 1998/02/11 02:50:40 curt * Minor changes. * diff --git a/Main/fg_debug.c b/Main/fg_debug.c index a315096c0..a6a5ca866 100644 --- a/Main/fg_debug.c +++ b/Main/fg_debug.c @@ -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. +/* + */ diff --git a/Main/fg_init.c b/Main/fg_init.c index 837699ebd..8b7c0fb4c 100644 --- a/Main/fg_init.c +++ b/Main/fg_init.c @@ -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 -/* +/* 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 + * + * * Revision 1.43 1998/02/11 02:50:40 curt * Minor changes. * diff --git a/Scenery/tilecache.h b/Scenery/tilecache.h index 0cfa79b24..3c6e9bb49 100644 --- a/Scenery/tilecache.h +++ b/Scenery/tilecache.h @@ -38,10 +38,10 @@ #include #include -/* 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. * diff --git a/Scenery/tilemgr.c b/Scenery/tilemgr.c index c46110142..96e4de6ee 100644 --- a/Scenery/tilemgr.c +++ b/Scenery/tilemgr.c @@ -42,9 +42,9 @@ #include
-#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 -/* +/* 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 + * + * * Revision 1.14 1998/02/09 21:30:19 curt * Fixed a nagging problem with terrain tiles not "quite" matching up perfectly. * diff --git a/Simulator/commondefs b/Simulator/commondefs index f4b2413e6..a4f86a96f 100644 --- a/Simulator/commondefs +++ b/Simulator/commondefs @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- FG_VERSION_MAJOR = 0 -FG_VERSION_MINOR = 33 +FG_VERSION_MINOR = 34 FG_VERSION = $(FG_VERSION_MAJOR).$(FG_VERSION_MINOR) -- 2.39.2