RE: [Flightgear-devel] Fw: FlightGear/src/Scenery FGTileLoader.cxx, 1.7, 1.8

2004-06-07 Thread Norman Vine
Norman Vine wrote: 
 
  Modified Files:
  FGTileLoader.cxx 
  Log Message:
  Windows uses ';' instead of ':' as a path separator.
  
  Index: FGTileLoader.cxx
  ===
  RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Scenery/FGTileLoader.cxx,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -C2 -r1.7 -r1.8
  *** a/FGTileLoader.cxx  6 Jun 2004 19:15:04 -   1.7
  --- b/FGTileLoader.cxx  6 Jun 2004 19:34:31 -   1.8
  ***
  *** 99,103 
SGPath tmp;
  tmp.set( globals-get_fg_root() );
  ! tmp.append( Scenery/Terrain: );
tmp.append(globals-get_fg_root() );
tmp.append( Scenery/Objects );
  --- 99,108 
SGPath tmp;
  tmp.set( globals-get_fg_root() );
  ! tmp.append( Scenery/Terrain );
  ! #ifdef _MSC_VER
  ! tmp.append( ;);
  ! #else
  ! tmp.append( :);
  ! #endif
tmp.append(globals-get_fg_root() );
tmp.append( Scenery/Objects );
   
 
 Doesn't SGPath.apapend just do the right thing here ? 

ack ... has other's have pointed out append() doesn't do the right thing.

 aside 
Splitting the database into partitions is potentially a good thing 
from a management perspective but my guess is that the 'tile loader' 
should inherit some smarts about which path to use based on file 
extension name rather then have it have to search multiple paths 
if 'stutter' is still an issue.
 /aside 

in any case the above should be

  ! #if defined(WIN32)  !defined(__CYGWIN__) 
  ! tmp.append( ;);
  ! #else
  ! tmp.append( :);
  ! #endif

So that MingW works

Cheers

Norman








___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Re: [Flightgear-devel] Fw: FlightGear/src/Scenery FGTileLoader.cxx, 1.7, 1.8

2004-06-07 Thread Erik Hofman
Norman Vine wrote:
 aside 
Splitting the database into partitions is potentially a good thing 
from a management perspective but my guess is that the 'tile loader' 
should inherit some smarts about which path to use based on file 
extension name rather then have it have to search multiple paths 
if 'stutter' is still an issue.
 /aside 
Unfortunately that won't work because on both cases the extension 
leading to the appropriate scenery is .stg.

What might be an option is keeping an open directory cache in memory 
somewhere. That would require just a few entries but could possibly give 
 a good performance increase (although probably unnoticeable in framerate).

in any case the above should be

! #if defined(WIN32)  !defined(__CYGWIN__) 
! tmp.append( ;);
! #else
! tmp.append( :);
! #endif
Ok, this is fixed.
Erik
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


[Flightgear-devel] Fw: FlightGear/src/Scenery FGTileLoader.cxx, 1.7, 1.8

2004-06-06 Thread Norman Vine

 Modified Files:
   FGTileLoader.cxx 
 Log Message:
 Windows uses ';' instead of ':' as a path separator.
 
 Index: FGTileLoader.cxx
 ===
 RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Scenery/FGTileLoader.cxx,v
 retrieving revision 1.7
 retrieving revision 1.8
 diff -C2 -r1.7 -r1.8
 *** a/FGTileLoader.cxx6 Jun 2004 19:15:04 -   1.7
 --- b/FGTileLoader.cxx6 Jun 2004 19:34:31 -   1.8
 ***
 *** 99,103 
   SGPath tmp;
   tmp.set( globals-get_fg_root() );
 ! tmp.append( Scenery/Terrain: );
   tmp.append(globals-get_fg_root() );
   tmp.append( Scenery/Objects );
 --- 99,108 
   SGPath tmp;
   tmp.set( globals-get_fg_root() );
 ! tmp.append( Scenery/Terrain );
 ! #ifdef _MSC_VER
 ! tmp.append( ;);
 ! #else
 ! tmp.append( :);
 ! #endif
   tmp.append(globals-get_fg_root() );
   tmp.append( Scenery/Objects );
  

Doesn't SGPath.apapend just do the right thing here ? 

i.e. there shouldn't be a need to do the

 ! #ifdef _MSC_VER
 ! tmp.append( ;);
 ! #else
 ! tmp.append( :);
 ! #endif

kludge in the patch below

if append() doesn't do the right thing I suggest we would be
better off fixing append() rather then kludging every instance 
of it use.

Norman



___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel