Merge branch 'dripdrop' into 'master'

Drop support for save game format 4

Closes #6624

See merge request OpenMW/openmw!3737
revert-c3c8fa1e
Alexei Kotov 12 months ago
commit 14c8103a9e

@ -133,7 +133,6 @@
Feature #6447: Add LOD support to Object Paging
Feature #6491: Add support for Qt6
Feature #6556: Lua API for sounds
Feature #6624: Drop support for old saves
Feature #6726: Lua API for creating new objects
Feature #6864: Lua file access API
Feature #6922: Improve launcher appearance
@ -165,6 +164,7 @@
Feature #7698: Implement sAbsorb, sDamage, sDrain, sFortify and sRestore
Feature #7709: Improve resolution selection in Launcher
Task #5896: Do not use deprecated MyGUI properties
Task #6624: Drop support for saves made prior to 0.45
Task #7113: Move from std::atoi to std::from_char
Task #7117: Replace boost::scoped_array with std::vector
Task #7151: Do not use std::strerror to get errno error message

@ -29,7 +29,7 @@ namespace ESM
void AiTravel::load(ESMReader& esm)
{
esm.getHNT("DATA", mData.mX, mData.mY, mData.mZ);
esm.getHNOT(mHidden, "HIDD");
esm.getHNT(mHidden, "HIDD");
mRepeat = false;
esm.getHNOT(mRepeat, "REPT");
}
@ -258,7 +258,7 @@ namespace ESM
}
}
esm.getHNOT(mLastAiPackage, "LAST");
esm.getHNT(mLastAiPackage, "LAST");
if (count > 1 && esm.getFormatVersion() <= MaxOldAiPackageFormatVersion)
{

@ -27,7 +27,7 @@ namespace ESM
inline constexpr FormatVersion MaxOldCountFormatVersion = 30;
inline constexpr FormatVersion CurrentSaveGameFormatVersion = 31;
inline constexpr FormatVersion MinSupportedSaveGameFormatVersion = 4;
inline constexpr FormatVersion MinSupportedSaveGameFormatVersion = 5;
inline constexpr FormatVersion OpenMW0_48SaveGameFormatVersion = 21;
inline constexpr FormatVersion OpenMW0_49SaveGameFormatVersion = CurrentSaveGameFormatVersion;
}

@ -30,16 +30,12 @@ namespace ESM
mPaidCrimeId = -1;
esm.getHNOT(mPaidCrimeId, "PAYD");
bool checkPrevItems = true;
while (checkPrevItems)
while (esm.peekNextSub("BOUN"))
{
ESM::RefId boundItemId = esm.getHNORefId("BOUN");
ESM::RefId prevItemId = esm.getHNORefId("PREV");
ESM::RefId boundItemId = esm.getHNRefId("BOUN");
ESM::RefId prevItemId = esm.getHNRefId("PREV");
if (!boundItemId.empty())
mPreviousItems[boundItemId] = prevItemId;
else
checkPrevItems = false;
mPreviousItems[boundItemId] = prevItemId;
}
if (esm.getFormatVersion() <= MaxOldSkillsAndAttributesFormatVersion)
@ -103,10 +99,10 @@ namespace ESM
esm.writeHNT("CURD", mCurrentCrimeId);
esm.writeHNT("PAYD", mPaidCrimeId);
for (PreviousItems::const_iterator it = mPreviousItems.begin(); it != mPreviousItems.end(); ++it)
for (const auto& [bound, prev] : mPreviousItems)
{
esm.writeHNRefId("BOUN", it->first);
esm.writeHNRefId("PREV", it->second);
esm.writeHNRefId("BOUN", bound);
esm.writeHNRefId("PREV", prev);
}
esm.writeHNT("WWAT", mSaveAttributes);

@ -33,8 +33,7 @@ namespace ESM
float mSaveAttributes[Attribute::Length];
float mSaveSkills[Skill::Length];
typedef std::map<ESM::RefId, ESM::RefId> PreviousItems; // previous equipped items, needed for bound spells
PreviousItems mPreviousItems;
std::map<ESM::RefId, ESM::RefId> mPreviousItems; // previous equipped items, needed for bound spells
void load(ESMReader& esm);
void save(ESMWriter& esm) const;

Loading…
Cancel
Save