void Pathgrid::save(ESMWriter &esm) { esm.writeHNT("DATA", mData, 12); esm.writeHNCString("NAME", mCell); if (!mPoints.empty()) { esm.startSubRecord("PGRP"); for (PointList::iterator it = mPoints.begin(); it != mPoints.end(); ++it) { esm.writeT(*it); } esm.endRecord("PGRP"); } if (!mEdges.empty()) { esm.startSubRecord("PGRC"); for (std::vector<Edge>::iterator it = mEdges.begin(); it != mEdges.end(); ++it) { esm.writeT(it->mV1); } esm.endRecord("PGRC"); } }
void ESM::GlobalMap::save (ESMWriter &esm) const { esm.writeHNT("BNDS", mBounds); esm.startSubRecord("DATA"); esm.write(&mImageData[0], mImageData.size()); esm.endRecord("DATA"); for (std::vector<CellId>::const_iterator it = mMarkers.begin(); it != mMarkers.end(); ++it) { esm.startSubRecord("MRK_"); esm.writeT(it->first); esm.writeT(it->second); esm.endRecord("MRK_"); } }
void Land::save(ESMWriter &esm) const { esm.startSubRecord("INTV"); esm.writeT(mX); esm.writeT(mY); esm.endRecord("INTV"); esm.writeHNT("DATA", mFlags); }
void ESM::Header::save (ESMWriter &esm) { if (mFormat>0) esm.writeHNT ("FORM", mFormat); esm.startSubRecord("HEDR"); esm.writeT(mData.version); esm.writeT(mData.type); esm.writeFixedSizeString(mData.author.toString(), 32); esm.writeFixedSizeString(mData.desc.toString(), 256); esm.writeT(mData.records); esm.endRecord("HEDR"); for (std::vector<Header::MasterData>::iterator iter = mMaster.begin(); iter != mMaster.end(); ++iter) { esm.writeHNCString ("MAST", iter->name); esm.writeHNT ("DATA", iter->size); } }
void Land::save(ESMWriter &esm, bool isDeleted) const { esm.startSubRecord("INTV"); esm.writeT(mX); esm.writeT(mY); esm.endRecord("INTV"); esm.writeHNT("DATA", mFlags); if (isDeleted) { esm.writeHNCString("DELE", ""); return; } if (mLandData) { mLandData->save(esm); } }