Fill out ESM4::ItemMod

macos_ci_fix
Alexei Kotov 1 year ago
parent 6d776ac833
commit 9a6c2fd2cc

@ -46,16 +46,50 @@ void ESM4::ItemMod::load(ESM4::Reader& reader)
case ESM4::SUB_EDID: case ESM4::SUB_EDID:
reader.getZString(mEditorId); reader.getZString(mEditorId);
break; break;
case ESM4::SUB_OBND:
case ESM4::SUB_FULL: case ESM4::SUB_FULL:
reader.getLocalizedString(mFullName);
break;
case ESM4::SUB_MODL: case ESM4::SUB_MODL:
reader.getZString(mModel);
break;
case ESM4::SUB_MODB:
reader.get(mBoundRadius);
break;
case ESM4::SUB_DESC:
reader.getLocalizedString(mText);
break;
case ESM4::SUB_ICON: case ESM4::SUB_ICON:
reader.getZString(mIcon);
break;
case ESM4::SUB_MICO: case ESM4::SUB_MICO:
reader.getZString(mMiniIcon);
break;
case ESM4::SUB_SCRI: case ESM4::SUB_SCRI:
case ESM4::SUB_DESC: reader.getFormId(mScriptId);
break;
case ESM4::SUB_YNAM: case ESM4::SUB_YNAM:
reader.getFormId(mPickUpSound);
break;
case ESM4::SUB_ZNAM: case ESM4::SUB_ZNAM:
reader.getFormId(mDropSound);
break;
case ESM4::SUB_DATA: case ESM4::SUB_DATA:
reader.get(mData.mValue);
reader.get(mData.mWeight);
break;
case ESM4::SUB_OBND:
case ESM4::SUB_MODT: // Model data
case ESM4::SUB_MODS:
case ESM4::SUB_MODD: // Model data end
case ESM4::SUB_DAMC: // Destructible
case ESM4::SUB_DEST:
case ESM4::SUB_DMDC:
case ESM4::SUB_DMDL:
case ESM4::SUB_DMDT:
case ESM4::SUB_DMDS:
case ESM4::SUB_DSTA:
case ESM4::SUB_DSTD:
case ESM4::SUB_DSTF: // Destructible end
reader.skipSubRecordData(); reader.skipSubRecordData();
break; break;
default: default:

@ -42,10 +42,29 @@ namespace ESM4
struct ItemMod struct ItemMod
{ {
struct Data
{
std::uint32_t mValue{ 0 };
float mWeight{ 0.f };
};
ESM::FormId mId; // from the header ESM::FormId mId; // 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
std::string mEditorId; std::string mEditorId;
std::string mFullName;
std::string mModel;
std::string mText;
std::string mIcon;
std::string mMiniIcon;
ESM::FormId mScriptId;
ESM::FormId mPickUpSound;
ESM::FormId mDropSound;
float mBoundRadius;
Data mData;
void load(ESM4::Reader& reader); void load(ESM4::Reader& reader);
// void save(ESM4::Writer& writer) const; // void save(ESM4::Writer& writer) const;

Loading…
Cancel
Save