mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +02:00
- Added missing projects "VFS" & "export" to SVN
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4447 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* bfVFS : vfs/Ext/7z/vfs_7z_library.h
|
||||
* - implements Library interface, creates library object from uncompressed 7-zip archive files
|
||||
*
|
||||
* Copyright (C) 2008 - 2010 (BF) john.bf.smith@googlemail.com
|
||||
*
|
||||
* This file is part of the bfVFS library
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _VFS_7Z_LIBRARY_H_
|
||||
#define _VFS_7Z_LIBRARY_H_
|
||||
|
||||
#ifdef VFS_WITH_7ZIP
|
||||
|
||||
#include <vfs/Core/Location/vfs_uncompressed_lib_base.h>
|
||||
#include <vfs/Core/File/vfs_lib_file.h>
|
||||
|
||||
namespace vfs
|
||||
{
|
||||
class VFS_API CUncompressed7zLibrary : public vfs::CUncompressedLibraryBase
|
||||
{
|
||||
public:
|
||||
CUncompressed7zLibrary(tReadableFile *libraryFile,
|
||||
vfs::Path const& mountPoint,
|
||||
bool ownFile = false,
|
||||
vfs::ObjBlockAllocator<vfs::CLibFile>* allocator=NULL);
|
||||
virtual ~CUncompressed7zLibrary();
|
||||
|
||||
virtual bool init();
|
||||
private:
|
||||
vfs::ObjBlockAllocator<vfs::CLibFile>* _allocator;
|
||||
};
|
||||
} // end namespace
|
||||
|
||||
#endif // VFS_WITH_7ZIP
|
||||
|
||||
#endif // _VFS_7Z_LIBRARY_H_
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* bfVFS : vfs/Ext/7z/vfs_create_7z_library.h
|
||||
* - writes uncompressed 7z archive file
|
||||
*
|
||||
* Copyright (C) 2008 - 2010 (BF) john.bf.smith@googlemail.com
|
||||
*
|
||||
* This file is part of the bfVFS library
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _VFS_CREATE_7Z_LIBRARY_H_
|
||||
#define _VFS_CREATE_7Z_LIBRARY_H_
|
||||
|
||||
#ifdef VFS_WITH_7ZIP
|
||||
|
||||
#include <vfs/Core/Interface/vfs_file_interface.h>
|
||||
#include <sstream>
|
||||
#include <map>
|
||||
#include <list>
|
||||
|
||||
namespace vfs
|
||||
{
|
||||
class VFS_API CCreateUncompressed7zLibrary
|
||||
{
|
||||
public:
|
||||
CCreateUncompressed7zLibrary();
|
||||
virtual ~CCreateUncompressed7zLibrary();
|
||||
|
||||
bool addFile(vfs::tReadableFile* pFile);
|
||||
|
||||
bool writeLibrary(vfs::Path const& sLibName);
|
||||
bool writeLibrary(vfs::tWritableFile* pFile);
|
||||
protected:
|
||||
bool writeSignatureHeader(std::ostream& out);
|
||||
bool writeNextHeader(std::ostream& out);
|
||||
bool writeMainStreamsInfo(std::ostream &out);
|
||||
bool writePackInfo(std::ostream& out);
|
||||
bool writeUnPackInfo(std::ostream& out);
|
||||
bool writeSubStreamsInfo(std::ostream& out);
|
||||
bool writeFolder(std::ostream& out);
|
||||
bool writeFilesInfo(std::ostream& out);
|
||||
private:
|
||||
vfs::size_t writeFileName(std::ostream& out, vfs::String const& filename);
|
||||
|
||||
protected:
|
||||
vfs::tWritableFile* m_pLibFile;
|
||||
|
||||
struct SFileInfo
|
||||
{
|
||||
SFileInfo()
|
||||
: name(L""), CRC(0), offset(0), size(0), time_creation(0), time_last_access(0), time_write(0)
|
||||
{};
|
||||
//////
|
||||
vfs::String::str_t name;
|
||||
vfs::UInt32 CRC;
|
||||
vfs::UInt64 offset;
|
||||
vfs::UInt64 size;
|
||||
vfs::UInt64 time_creation,time_last_access,time_write;
|
||||
};
|
||||
typedef std::map<vfs::String::str_t,SFileInfo> tDirInfo;
|
||||
|
||||
std::list<SFileInfo> m_lFileInfo;
|
||||
tDirInfo m_mapDirInfo;
|
||||
|
||||
// keeping pointers to files to write their contents lates is not enough,
|
||||
// as the file may only exist for a short time
|
||||
std::stringstream m_ssFileStream;
|
||||
|
||||
std::stringstream m_ssInfoStream;
|
||||
};
|
||||
} // end namespace
|
||||
|
||||
#endif // VFS_WITH_7ZIP
|
||||
|
||||
#endif // _VFS_CREATE_7Z_LIBRARY_H_
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* bfVFS : vfs/Ext/slf/vfs_slf_library.h
|
||||
* - implements Library interface, creates library object from SLF archive files
|
||||
*
|
||||
* Copyright (C) 2008 - 2010 (BF) john.bf.smith@googlemail.com
|
||||
*
|
||||
* This file is part of the bfVFS library
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef _VFS_SLF_LIBRARY_H_
|
||||
#define _VFS_SLF_LIBRARY_H_
|
||||
|
||||
#ifdef VFS_WITH_SLF
|
||||
|
||||
#include <vfs/Core/Location/vfs_uncompressed_lib_base.h>
|
||||
|
||||
namespace vfs
|
||||
{
|
||||
class VFS_API CSLFLibrary : public vfs::CUncompressedLibraryBase
|
||||
{
|
||||
public:
|
||||
CSLFLibrary(tReadableFile *pLibraryFile, vfs::Path const& sMountPoint, bool bOwnFile = false);
|
||||
virtual ~CSLFLibrary();
|
||||
|
||||
virtual bool init();
|
||||
};
|
||||
|
||||
} // end namespace
|
||||
|
||||
#endif // VFS_WITH_SLF
|
||||
|
||||
#endif // _VFS_SLF_LIBRARY_H_
|
||||
|
||||
Reference in New Issue
Block a user