esmtool: Print human-readable ESM4 file format version

macos_ci_fix
Alexei Kotov 1 year ago
parent 9f8f2dd925
commit 8d655054f1

@ -562,7 +562,7 @@ namespace EsmTool
{ {
std::cout << "Author: " << reader.getAuthor() << '\n' std::cout << "Author: " << reader.getAuthor() << '\n'
<< "Description: " << reader.getDesc() << '\n' << "Description: " << reader.getDesc() << '\n'
<< "File format version: " << reader.esmVersion() << '\n'; << "File format version: " << reader.esmVersionF() << '\n';
if (const std::vector<ESM::MasterData>& masterData = reader.getGameFiles(); !masterData.empty()) if (const std::vector<ESM::MasterData>& masterData = reader.getGameFiles(); !masterData.empty())
{ {

@ -247,6 +247,7 @@ namespace ESM4
void setRecHeaderSize(const std::size_t size); void setRecHeaderSize(const std::size_t size);
inline unsigned int esmVersion() const { return mHeader.mData.version.ui; } inline unsigned int esmVersion() const { return mHeader.mData.version.ui; }
inline float esmVersionF() const { return mHeader.mData.version.f; }
inline unsigned int numRecords() const { return mHeader.mData.records; } inline unsigned int numRecords() const { return mHeader.mData.records; }
inline bool hasFormVersion() const { return mCtx.recHeaderSize == sizeof(RecordHeader); } inline bool hasFormVersion() const { return mCtx.recHeaderSize == sizeof(RecordHeader); }

Loading…
Cancel
Save