Merge branch 'mnam' into 'master'

Read STAT::MNAM

See merge request OpenMW/openmw!3273
revert-6246b479
psi29a 1 year ago
commit a99aa38d45

@ -69,10 +69,21 @@ void ESM4::Static::load(ESM4::Reader& reader)
}
break;
}
case ESM4::SUB_MNAM:
{
for (std::string& level : mLOD)
{
level.resize(260);
reader.get(level.data(), 260);
size_t end = level.find('\0');
if (end != std::string::npos)
level.erase(end);
}
break;
}
case ESM4::SUB_MODS:
case ESM4::SUB_OBND:
case ESM4::SUB_DNAM:
case ESM4::SUB_MNAM:
case ESM4::SUB_BRUS: // FONV
case ESM4::SUB_RNAM: // FONV
reader.skipSubRecordData();

@ -27,6 +27,7 @@
#ifndef ESM4_STAT_H
#define ESM4_STAT_H
#include <array>
#include <cstdint>
#include <string>
#include <vector>
@ -53,6 +54,7 @@ namespace ESM4
float mBoundRadius;
std::vector<std::uint8_t> mMODT; // FIXME texture hash
std::array<std::string, 4> mLOD;
void load(ESM4::Reader& reader);
// void save(ESM4::Writer& writer) const;

Loading…
Cancel
Save