Save-state: for MB, the SC01 sub-unit is only supported from v12

This commit is contained in:
tomcw 2024-06-29 12:49:10 +01:00
parent a88040c3ef
commit 72f0c03981

View File

@ -1023,6 +1023,13 @@ void SSI263::SC01_SaveSnapshot(YamlSaveHelper& yamlSaveHelper)
void SSI263::SC01_LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT version) void SSI263::SC01_LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT version)
{ {
if (version < 12)
{
m_votraxPhoneme = 0;
// NB. m_isVotraxPhoneme already set by SetVotraxPhoneme() by parent
return;
}
if (!yamlLoadHelper.GetSubMap(SS_YAML_KEY_SC01)) if (!yamlLoadHelper.GetSubMap(SS_YAML_KEY_SC01))
throw std::runtime_error("Card: Expected key: " SS_YAML_KEY_SC01); throw std::runtime_error("Card: Expected key: " SS_YAML_KEY_SC01);