DPK VFS allows to add and remove pak dependencies.
Reloading VFS before refreshing textures ensures
added or removed dependencies are handled without
reloading the whole map.
It allows the user to edit the DEPS file while radiant
is running, he just has to reload the VFS asking for
texture refresh.
/// \brief Initialises the filesystem.
/// Called after all root search paths have been added.
virtual void initialise() = 0;
+/// \brief Clear the filesystem if supported
+virtual void clear() = 0;
+/// \brief Reload the filesystem if supported
+virtual void refresh() = 0;
/// \brief Shuts down the filesystem.
virtual void shutdown() = 0;
InitDirectory( path, FileSystemQ3API_getArchiveModules() );
}
void initialise(){
+ load();
+ globalOutputStream() << "filesystem initialised\n";
+ g_observers.realise();
+}
+
+void load(){
ArchiveModules& archiveModules = FileSystemQ3API_getArchiveModules();
bool is_dpk_vfs = GetArchiveTable( archiveModules, "dpk" );
g_pakfile_paths.clear();
g_loaded_dpk_paks.clear();
}
+}
- globalOutputStream() << "filesystem initialised\n";
- g_observers.realise();
+void clear() {
+ // like shutdown() but does not unrealise (keep map etc.)
+ Shutdown();
}
+
+void refresh(){
+ // like initialise() but does not realise (keep map etc.)
+ load();
+ globalOutputStream() << "filesystem refreshed\n";
+}
+
void shutdown(){
g_observers.unrealise();
globalOutputStream() << "filesystem shutdown\n";
GlobalFileSystem().shutdown();
g_vfsInitialized = false;
}
+void VFS_Refresh(){
+ if ( !g_vfsInitialized ) return;
+ GlobalFileSystem().clear();
+ QE_InitVFS();
+ GlobalFileSystem().refresh();
+ g_vfsInitialized = true;
+}
void VFS_Restart(){
VFS_Shutdown();
VFS_Init();
void Radiant_attachGameModeObserver( ModuleObserver& observer );
void Radiant_detachGameModeObserver( ModuleObserver& observer );
+void VFS_Refresh();
void VFS_Restart();
void VFS_Construct();
void VFS_Destroy();
void RefreshShaders(){
ScopeDisableScreenUpdates disableScreenUpdates( "Processing...", "Loading Shaders" );
+ VFS_Refresh();
GlobalShaderSystem().refresh();
UpdateAllWindows();
GtkTreeSelection* selection = gtk_tree_view_get_selection((GtkTreeView*)GlobalTextureBrowser().m_treeViewTree);