1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Read STAT::MNAM

This commit is contained in:
Alexei Kotov 2023-07-24 01:52:41 +03:00
parent d93e055bb1
commit 32022e9b5c
2 changed files with 14 additions and 1 deletions

View File

@ -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();

View File

@ -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;