VFS module
Posted: Wed Jun 10, 2009 11:18 pm
I am rewriting the VFS system as an independent generic module (it manages Archive::File objects only accessed through abstract Archive objects).
In order to add support for a type of archive, just add the corresponding module inheriting from the Archive class.
Caching and file priority is handled by the VFS module (the new design should allow more freedom in file priority management, so mod dependencies will be possible).
File access is provided by classes derived from Archive. Those class do not need to have their header file included in some global file, they are loaded as plug-ins. Those modules automatically register the functionalities they provide to the main Archive class which handle all object allocation and archive detection.
Currently there is support for real filesytem through the RealFS class (which inherits from the Archive class too ), and HPI support is work in progress through an Hpi class.
Zip support could be provided through a Zip class, 7z support though a SevenZip class, etc ... we can even imagine a LanFS class that would clone the server's files for LAN games
Currently the new VFS code is built and linked but not used, the old HPI/VFS code is still used by the engine (there is no conflict since VFS stuffs aren't included by any other module and aren't in the TA3D::UTILS::HPI namespace).
In order to add support for a type of archive, just add the corresponding module inheriting from the Archive class.
Caching and file priority is handled by the VFS module (the new design should allow more freedom in file priority management, so mod dependencies will be possible).
File access is provided by classes derived from Archive. Those class do not need to have their header file included in some global file, they are loaded as plug-ins. Those modules automatically register the functionalities they provide to the main Archive class which handle all object allocation and archive detection.
Currently there is support for real filesytem through the RealFS class (which inherits from the Archive class too ), and HPI support is work in progress through an Hpi class.
Zip support could be provided through a Zip class, 7z support though a SevenZip class, etc ... we can even imagine a LanFS class that would clone the server's files for LAN games
Currently the new VFS code is built and linked but not used, the old HPI/VFS code is still used by the engine (there is no conflict since VFS stuffs aren't included by any other module and aren't in the TA3D::UTILS::HPI namespace).