diff --git a/panda/src/chancfg/chancfg.cxx b/panda/src/chancfg/chancfg.cxx index 4515b37081..3d5e9f72df 100644 --- a/panda/src/chancfg/chancfg.cxx +++ b/panda/src/chancfg/chancfg.cxx @@ -29,7 +29,7 @@ #include "filename.h" #include "transformState.h" #include "dcast.h" -#include "config_util.h" +#include "config_express.h" #include "virtualFileSystem.h" #include diff --git a/panda/src/egg/eggData.cxx b/panda/src/egg/eggData.cxx index b1bbedaca7..5b6f5104c9 100644 --- a/panda/src/egg/eggData.cxx +++ b/panda/src/egg/eggData.cxx @@ -25,6 +25,7 @@ #include "config_egg.h" #include "config_util.h" +#include "config_express.h" #include "string_utils.h" #include "dSearchPath.h" #include "virtualFileSystem.h" diff --git a/panda/src/egg2pg/load_egg_file.cxx b/panda/src/egg2pg/load_egg_file.cxx index 6022f6451b..1ddbb14996 100644 --- a/panda/src/egg2pg/load_egg_file.cxx +++ b/panda/src/egg2pg/load_egg_file.cxx @@ -22,6 +22,7 @@ #include "sceneGraphReducer.h" #include "virtualFileSystem.h" #include "config_util.h" +#include "config_express.h" static PT(PandaNode) load_from_loader(EggLoader &loader) { diff --git a/panda/src/express/config_express.cxx b/panda/src/express/config_express.cxx index b6ab25b2d8..8a54ed728b 100644 --- a/panda/src/express/config_express.cxx +++ b/panda/src/express/config_express.cxx @@ -41,8 +41,8 @@ ConfigureFn(config_express) { ReferenceCount::init_type(); TypedObject::init_type(); TypedReferenceCount::init_type(); - VirtualFileComposite::init_type(); VirtualFile::init_type(); + VirtualFileComposite::init_type(); VirtualFileMount::init_type(); VirtualFileMountMultifile::init_type(); VirtualFileMountSystem::init_type(); @@ -146,6 +146,12 @@ const int patchfile_buffer_size = const int patchfile_zone_size = config_express.GetInt("patchfile-zone-size", 10000); +// Set this true to use the VirtualFileSystem mechanism for loading +// models, etc. Since the VirtualFileSystem maps to the same as the +// actual file system by default, there is probably no reason to set +// this false, except for testing or if you mistrust the new code. +const bool use_vfs = config_express.GetBool("use-vfs", true); + // Returns the configure object for accessing config variables from a // scripting language. diff --git a/panda/src/express/config_express.h b/panda/src/express/config_express.h index e3f1fdafd4..9e8fa487d1 100644 --- a/panda/src/express/config_express.h +++ b/panda/src/express/config_express.h @@ -19,9 +19,9 @@ #ifndef __CONFIG_EXPRESS_H__ #define __CONFIG_EXPRESS_H__ -#include -#include -#include +#include "pandabase.h" +#include "notifyCategoryProxy.h" +#include "dconfig.h" ConfigureDecl(config_express, EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS); NotifyCategoryDecl(express, EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS); @@ -45,6 +45,8 @@ extern const int patchfile_increment_size; extern const int patchfile_buffer_size; extern const int patchfile_zone_size; +extern EXPCL_PANDAEXPRESS const bool use_vfs; + // Expose the Config variable for Python access. BEGIN_PUBLISH typedef Config::Config ConfigExpress; diff --git a/panda/src/gobj/texturePool.cxx b/panda/src/gobj/texturePool.cxx index 592c418caf..57e03dbe70 100644 --- a/panda/src/gobj/texturePool.cxx +++ b/panda/src/gobj/texturePool.cxx @@ -19,6 +19,7 @@ #include "texturePool.h" #include "config_gobj.h" #include "config_util.h" +#include "config_express.h" #include "virtualFileSystem.h" diff --git a/panda/src/pgraph/bamFile.cxx b/panda/src/pgraph/bamFile.cxx index b01d683da0..6ae8c0efc1 100644 --- a/panda/src/pgraph/bamFile.cxx +++ b/panda/src/pgraph/bamFile.cxx @@ -24,6 +24,7 @@ #include "bamReader.h" #include "bamWriter.h" #include "filename.h" +#include "config_express.h" #include "virtualFileSystem.h" //////////////////////////////////////////////////////////////////// diff --git a/panda/src/pgraph/loader.cxx b/panda/src/pgraph/loader.cxx index a6960f95df..be2ff2887a 100644 --- a/panda/src/pgraph/loader.cxx +++ b/panda/src/pgraph/loader.cxx @@ -21,7 +21,7 @@ #include "loaderFileTypeRegistry.h" #include "config_pgraph.h" -#include "config_util.h" +#include "config_express.h" #include "virtualFileSystem.h" #include "event.h" #include "pt_Event.h" diff --git a/panda/src/pgraph/loaderFileTypeBam.cxx b/panda/src/pgraph/loaderFileTypeBam.cxx index 7a059b1c57..28b520d02b 100644 --- a/panda/src/pgraph/loaderFileTypeBam.cxx +++ b/panda/src/pgraph/loaderFileTypeBam.cxx @@ -20,8 +20,9 @@ #include "config_pgraph.h" #include "bamFile.h" -#include "virtualFileSystem.h" #include "config_util.h" +#include "config_express.h" +#include "virtualFileSystem.h" #include "dcast.h" TypeHandle LoaderFileTypeBam::_type_handle; diff --git a/panda/src/pnmimage/pnmImageHeader.cxx b/panda/src/pnmimage/pnmImageHeader.cxx index 2a9baadff5..fd165ac28b 100644 --- a/panda/src/pnmimage/pnmImageHeader.cxx +++ b/panda/src/pnmimage/pnmImageHeader.cxx @@ -21,8 +21,8 @@ #include "pnmFileType.h" #include "pnmReader.h" #include "config_pnmimage.h" +#include "config_express.h" #include "virtualFileSystem.h" -#include "config_util.h" //////////////////////////////////////////////////////////////////// // Function: PNMImageHeader::read_header diff --git a/panda/src/putil/config_util.cxx b/panda/src/putil/config_util.cxx index 1f2c8aea17..41b2ad4ed0 100644 --- a/panda/src/putil/config_util.cxx +++ b/panda/src/putil/config_util.cxx @@ -88,9 +88,3 @@ get_sound_path() { static DSearchPath *sound_path = NULL; return get_config_path("sound-path", sound_path); } - -// Set this true to use the VirtualFileSystem mechanism for loading -// models, etc. Since the VirtualFileSystem maps to the same as the -// actual file system by default, there is probably no reason to set -// this false, except for testing or if you mistrust the new code. -const bool use_vfs = config_util.GetBool("use-vfs", true); diff --git a/panda/src/putil/config_util.h b/panda/src/putil/config_util.h index f1b0ebb463..5ba69ad28e 100644 --- a/panda/src/putil/config_util.h +++ b/panda/src/putil/config_util.h @@ -19,9 +19,9 @@ #ifndef __CONFIG_UTIL_H__ #define __CONFIG_UTIL_H__ -#include -#include -#include +#include "pandabase.h" +#include "notifyCategoryProxy.h" +#include "dconfig.h" class DSearchPath; @@ -46,6 +46,4 @@ EXPCL_PANDA DSearchPath &get_texture_path(); EXPCL_PANDA DSearchPath &get_sound_path(); END_PUBLISH -extern EXPCL_PANDA const bool use_vfs; - #endif /* __CONFIG_UTIL_H__ */ diff --git a/panda/src/putil/datagramInputFile.cxx b/panda/src/putil/datagramInputFile.cxx index 9983d0d18e..712aa5a21c 100644 --- a/panda/src/putil/datagramInputFile.cxx +++ b/panda/src/putil/datagramInputFile.cxx @@ -21,6 +21,7 @@ #include "datagramIterator.h" #include "profileTimer.h" #include "config_util.h" +#include "config_express.h" #include "virtualFileSystem.h" #include "datagramInputFile.h"