TrinityCore
Loading...
Searching...
No Matches
MPQ Namespace Reference

Classes

struct  ArchiveData
 

Functions

bool FileNameMatchesArchivePattern (std::string_view const &fileName, std::string_view const &pattern)
 
std::vector< boost::filesystem::path > ResolveArchiveFileList (std::string_view inputPath, std::string_view localeName, std::string_view namePattern)
 
bool OpenArchive (std::string_view inputPath, std::string_view localeName, ArchiveData const &archive)
 
bool OpenArchives (std::string_view inputPath, std::string_view localeName)
 
void CloseArchives ()
 

Variables

constexpr std::array< ArchiveData, 11 > Archives
 

Function Documentation

◆ CloseArchives()

void MPQ::CloseArchives ( )

Definition at line 237 of file mpq_libmpq.cpp.

References gOpenArchives.

Referenced by main().

◆ FileNameMatchesArchivePattern()

bool MPQ::FileNameMatchesArchivePattern ( std::string_view const &  fileName,
std::string_view const &  pattern 
)

Definition at line 162 of file mpq_libmpq.cpp.

References charToLower.

Referenced by ResolveArchiveFileList().

◆ OpenArchive()

bool MPQ::OpenArchive ( std::string_view  inputPath,
std::string_view  localeName,
ArchiveData const &  archive 
)

◆ OpenArchives()

bool MPQ::OpenArchives ( std::string_view  inputPath,
std::string_view  localeName 
)

Definition at line 227 of file mpq_libmpq.cpp.

References Archives, and OpenArchive().

Referenced by main(), and main().

◆ ResolveArchiveFileList()

std::vector< boost::filesystem::path > MPQ::ResolveArchiveFileList ( std::string_view  inputPath,
std::string_view  localeName,
std::string_view  namePattern 
)

Definition at line 170 of file mpq_libmpq.cpp.

References charToLower, FileNameMatchesArchivePattern(), and Trinity::StringFormat().

Referenced by OpenArchive().

Variable Documentation

◆ Archives

constexpr std::array<ArchiveData, 11> MPQ::Archives
constexpr
Initial value:
=
{{
{ .NamePattern = "{installDir}/Data/patch-?.MPQ", .Required = true },
{ .NamePattern = "{installDir}/Data/{locale}/patch-{locale}-?.MPQ", .Required = true },
{ .NamePattern = "{installDir}/Data/patch.MPQ", .Required = true },
{ .NamePattern = "{installDir}/Data/{locale}/patch-{locale}.MPQ", .Required = true },
{ .NamePattern = "{installDir}/Data/expansion.MPQ", .Required = true },
{ .NamePattern = "{installDir}/Data/lichking.MPQ", .Required = true },
{ .NamePattern = "{installDir}/Data/common.MPQ", .Required = true },
{ .NamePattern = "{installDir}/Data/common-2.MPQ", .Required = true },
{ .NamePattern = "{installDir}/Data/{locale}/locale-{locale}.MPQ", .Required = true },
{ .NamePattern = "{installDir}/Data/{locale}/expansion-locale-{locale}.MPQ", .Required = true },
{ .NamePattern = "{installDir}/Data/{locale}/lichking-locale-{locale}.MPQ", .Required = true },
}}

Definition at line 144 of file mpq_libmpq.cpp.

Referenced by OpenArchives().