void KeybLoadSnapshot(YamlLoadHelper& yamlLoadHelper) { if (!yamlLoadHelper.GetSubMap(KeybGetSnapshotStructName())) return; g_nLastKey = (BYTE) yamlLoadHelper.LoadUint(SS_YAML_KEY_LASTKEY); yamlLoadHelper.PopMap(); }
void RGB_LoadSnapshot(YamlLoadHelper& yamlLoadHelper, UINT cardVersion) { if (!yamlLoadHelper.GetSubMap(SS_YAML_KEY_RGB_CARD)) throw std::string("Card: Expected key: ") + std::string(SS_YAML_KEY_RGB_CARD); g_rgbFlags = yamlLoadHelper.LoadUint(SS_YAML_KEY_RGB_FLAGS); g_rgbMode = yamlLoadHelper.LoadUint(SS_YAML_KEY_RGB_MODE); g_rgbPrevAN3Addr = yamlLoadHelper.LoadUint(SS_YAML_KEY_RGB_PREVIOUS_AN3); if (cardVersion >= 3) { g_rgbSet80COL = yamlLoadHelper.LoadBool(SS_YAML_KEY_RGB_80COL_CHANGED); g_rgbInvertBit7 = yamlLoadHelper.LoadBool(SS_YAML_KEY_RGB_INVERT_BIT7); } yamlLoadHelper.PopMap(); }