]> git.mxchange.org Git - flightgear.git/commit
Melchior FRANZ:
authorehofman <ehofman>
Tue, 8 Jun 2004 15:32:09 +0000 (15:32 +0000)
committerehofman <ehofman>
Tue, 8 Jun 2004 15:32:09 +0000 (15:32 +0000)
commitff9258528cc98b2b5ce35b0c867c2e9b6f1067fb
tree30fc2128d21ffedeeaeac6413acd61c0c9635af3
parent43df8a9cc00e3a80482e9fe36c3c38ba82dc9aa0
Melchior FRANZ:

Wouldn't it be better to prepare the whole list of paths (or two
separate ones for Terrain/Objects if necessary) in FGGlobals::set_fg_scenery,
and to pass the vector<string>s to FGTileEntry::load? It doesn't seem to make
a lot of sense to split the path up, modify it, mount it together to one string
again, and then let FGTileEntry::load split it up again.

Here we go:

Main/globals.cxx
================
As fg_scenery is now a string_list, we don't need initialization. Furthermore,
this list is cleared with every set_fg_scenery() call.

ctor: create default dir from fg_root if necessary. Otherwise check all paths
of --fg-scenery/FG_SCENERY: If the path doesn't exist, ignore it. If it contains
a dir Terrain and/or Objects, then only add that to the list. If it contains
neither, then use the path as is.

Scenery/tileentry.cxx
=====================
Trivial: don't split a "base path", but use the given path_list as is.
(I considered a variable name "path_list" better suited than "search".)

Scenery/FGTileLoader.cxx
========================
No more fiddling with sub-paths. This has to be delivered by get_fg_scenery
already.
src/Main/globals.cxx
src/Main/globals.hxx
src/Scenery/FGTileLoader.cxx
src/Scenery/FGTileLoader.hxx
src/Scenery/tileentry.cxx
src/Scenery/tileentry.hxx