Drop support for save game format 3

macos_ci_fix
Evil Eye 1 year ago
parent becc5ef8fa
commit b0ef42ae3c

@ -21,18 +21,7 @@ namespace ESM
anim.mGroup = esm.getHString(); anim.mGroup = esm.getHString();
esm.getHNOT(anim.mTime, "TIME"); esm.getHNOT(anim.mTime, "TIME");
esm.getHNOT(anim.mAbsolute, "ABST"); esm.getHNOT(anim.mAbsolute, "ABST");
esm.getHNT(anim.mLoopCount, "COUN");
esm.getSubNameIs("COUN");
// workaround bug in earlier version where size_t was used
esm.getSubHeader();
if (esm.getSubSize() == 8)
esm.getT(anim.mLoopCount);
else
{
uint32_t loopcount;
esm.getT(loopcount);
anim.mLoopCount = (uint64_t)loopcount;
}
mScriptedAnims.push_back(anim); mScriptedAnims.push_back(anim);
} }

@ -26,7 +26,7 @@ namespace ESM
inline constexpr FormatVersion MaxActiveSpellSlotIndexFormatVersion = 27; inline constexpr FormatVersion MaxActiveSpellSlotIndexFormatVersion = 27;
inline constexpr FormatVersion CurrentSaveGameFormatVersion = 29; inline constexpr FormatVersion CurrentSaveGameFormatVersion = 29;
inline constexpr FormatVersion MinSupportedSaveGameFormatVersion = 3; inline constexpr FormatVersion MinSupportedSaveGameFormatVersion = 4;
inline constexpr FormatVersion OpenMW0_48SaveGameFormatVersion = 21; inline constexpr FormatVersion OpenMW0_48SaveGameFormatVersion = 21;
inline constexpr FormatVersion OpenMW0_49SaveGameFormatVersion = CurrentSaveGameFormatVersion; inline constexpr FormatVersion OpenMW0_49SaveGameFormatVersion = CurrentSaveGameFormatVersion;
} }

@ -37,18 +37,11 @@ namespace ESM
BaseProjectileState::load(esm); BaseProjectileState::load(esm);
mSpellId = esm.getHNRefId("SPEL"); mSpellId = esm.getHNRefId("SPEL");
if (esm.isNextSub("SRCN")) // for backwards compatibility
esm.skipHSub();
EffectList().load(esm); // for backwards compatibility
esm.getHNT(mSpeed, "SPED"); esm.getHNT(mSpeed, "SPED");
if (esm.peekNextSub("ITEM")) if (esm.peekNextSub("ITEM"))
mItem = esm.getFormId(true, "ITEM"); mItem = esm.getFormId(true, "ITEM");
if (esm.isNextSub("SLOT")) // for backwards compatibility if (esm.isNextSub("SLOT")) // for backwards compatibility
esm.skipHSub(); esm.skipHSub();
if (esm.isNextSub("STCK")) // for backwards compatibility
esm.skipHSub();
if (esm.isNextSub("SOUN")) // for backwards compatibility
esm.skipHSub();
} }
void ProjectileState::save(ESMWriter& esm) const void ProjectileState::save(ESMWriter& esm) const

Loading…
Cancel
Save