mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
Merge branch 'enderal' into 'master'
Load Enderal See merge request OpenMW/openmw!3241
This commit is contained in:
commit
5496608890
9 changed files with 38 additions and 2 deletions
|
@ -97,6 +97,11 @@ namespace EsmTool
|
||||||
return stream << " ?";
|
return stream << " ?";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::ostream& operator<<(std::ostream& stream, const std::monostate&)
|
||||||
|
{
|
||||||
|
return stream << "[none]";
|
||||||
|
}
|
||||||
|
|
||||||
std::ostream& operator<<(std::ostream& stream, const WriteData<ESM4::GameSetting::Data>& write)
|
std::ostream& operator<<(std::ostream& stream, const WriteData<ESM4::GameSetting::Data>& write)
|
||||||
{
|
{
|
||||||
std::visit([&](const auto& v) { stream << v; }, write.mValue);
|
std::visit([&](const auto& v) { stream << v; }, write.mValue);
|
||||||
|
|
|
@ -13,7 +13,10 @@ namespace ESM4
|
||||||
GameSetting::Data readData(FormId formId, std::string_view editorId, Reader& reader)
|
GameSetting::Data readData(FormId formId, std::string_view editorId, Reader& reader)
|
||||||
{
|
{
|
||||||
if (editorId.empty())
|
if (editorId.empty())
|
||||||
throw std::runtime_error("Unknown ESM4 GMST (" + formId.toString() + ") data type: editor id is empty");
|
{
|
||||||
|
reader.skipSubRecordData();
|
||||||
|
return std::monostate{};
|
||||||
|
}
|
||||||
const char type = editorId[0];
|
const char type = editorId[0];
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace ESM4
|
||||||
|
|
||||||
struct GameSetting
|
struct GameSetting
|
||||||
{
|
{
|
||||||
using Data = std::variant<bool, float, std::int32_t, std::string>;
|
using Data = std::variant<std::monostate, bool, float, std::int32_t, std::string>;
|
||||||
|
|
||||||
FormId mFormId; // from the header
|
FormId mFormId; // from the header
|
||||||
std::uint32_t mFlags; // from the header, see enum type RecordFlag for details
|
std::uint32_t mFlags; // from the header, see enum type RecordFlag for details
|
||||||
|
|
|
@ -76,7 +76,12 @@ void ESM4::IdleMarker::load(ESM4::Reader& reader)
|
||||||
reader.getFormId(value);
|
reader.getFormId(value);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case ESM4::SUB_MODL:
|
||||||
|
reader.getZString(mModel);
|
||||||
|
break;
|
||||||
case ESM4::SUB_OBND: // object bounds
|
case ESM4::SUB_OBND: // object bounds
|
||||||
|
case ESM4::SUB_MODT:
|
||||||
|
case ESM4::SUB_MODS:
|
||||||
reader.skipSubRecordData();
|
reader.skipSubRecordData();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -102,6 +102,12 @@ void ESM4::Light::load(ESM4::Reader& reader)
|
||||||
case ESM4::SUB_MODT:
|
case ESM4::SUB_MODT:
|
||||||
case ESM4::SUB_OBND:
|
case ESM4::SUB_OBND:
|
||||||
case ESM4::SUB_VMAD: // Dragonborn only?
|
case ESM4::SUB_VMAD: // Dragonborn only?
|
||||||
|
case ESM4::SUB_DEST: // Destruction data start
|
||||||
|
case ESM4::SUB_DSTD:
|
||||||
|
case ESM4::SUB_DMDL:
|
||||||
|
case ESM4::SUB_DMDT:
|
||||||
|
case ESM4::SUB_DMDS:
|
||||||
|
case ESM4::SUB_DSTF: // Destruction data end
|
||||||
reader.skipSubRecordData();
|
reader.skipSubRecordData();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -78,6 +78,12 @@ void ESM4::MiscItem::load(ESM4::Reader& reader)
|
||||||
case ESM4::SUB_OBND:
|
case ESM4::SUB_OBND:
|
||||||
case ESM4::SUB_VMAD:
|
case ESM4::SUB_VMAD:
|
||||||
case ESM4::SUB_RNAM: // FONV
|
case ESM4::SUB_RNAM: // FONV
|
||||||
|
case ESM4::SUB_DEST: // Destruction data start
|
||||||
|
case ESM4::SUB_DSTD:
|
||||||
|
case ESM4::SUB_DMDL:
|
||||||
|
case ESM4::SUB_DMDT:
|
||||||
|
case ESM4::SUB_DMDS:
|
||||||
|
case ESM4::SUB_DSTF: // Destruction data end
|
||||||
reader.skipSubRecordData();
|
reader.skipSubRecordData();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -58,6 +58,12 @@ void ESM4::Scroll::load(ESM4::Reader& reader)
|
||||||
case ESM4::SUB_MODL:
|
case ESM4::SUB_MODL:
|
||||||
reader.getZString(mModel);
|
reader.getZString(mModel);
|
||||||
break;
|
break;
|
||||||
|
case ESM4::SUB_YNAM:
|
||||||
|
reader.getFormId(mPickUpSound);
|
||||||
|
break;
|
||||||
|
case ESM4::SUB_ZNAM:
|
||||||
|
reader.getFormId(mDropSound);
|
||||||
|
break;
|
||||||
// case ESM4::SUB_MODB: reader.get(mBoundRadius); break;
|
// case ESM4::SUB_MODB: reader.get(mBoundRadius); break;
|
||||||
case ESM4::SUB_OBND:
|
case ESM4::SUB_OBND:
|
||||||
case ESM4::SUB_CTDA:
|
case ESM4::SUB_CTDA:
|
||||||
|
|
|
@ -53,6 +53,9 @@ namespace ESM4
|
||||||
std::string mModel;
|
std::string mModel;
|
||||||
std::string mText;
|
std::string mText;
|
||||||
|
|
||||||
|
FormId mPickUpSound;
|
||||||
|
FormId mDropSound;
|
||||||
|
|
||||||
Data mData;
|
Data mData;
|
||||||
|
|
||||||
void load(ESM4::Reader& reader);
|
void load(ESM4::Reader& reader);
|
||||||
|
|
|
@ -70,6 +70,8 @@ void ESM4::TalkingActivator::load(ESM4::Reader& reader)
|
||||||
case ESM4::SUB_PNAM:
|
case ESM4::SUB_PNAM:
|
||||||
case ESM4::SUB_MODT: // texture file hash?
|
case ESM4::SUB_MODT: // texture file hash?
|
||||||
case ESM4::SUB_OBND:
|
case ESM4::SUB_OBND:
|
||||||
|
case ESM4::SUB_VMAD:
|
||||||
|
case ESM4::SUB_MODS:
|
||||||
reader.skipSubRecordData();
|
reader.skipSubRecordData();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue