Added libyaml 0.1.5

Added yaml save-state support for:
. Main AppleII unit
. Aux memory & RawWorksIII
. Printer
. SSC
. Z80
. Mouse
. Mockingboard
. Phasor
. Disk][
. HDD
This commit is contained in:
tomcw
2015-12-05 16:50:27 +00:00
parent 5c16c3642a
commit 2f6e86c0fa
141 changed files with 34010 additions and 32 deletions
+27
View File
@@ -33,6 +33,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include "Keyboard.h"
#include "Pravets.h"
#include "Tape.h"
#include "YamlHelper.h"
static bool g_bKeybBufferEnable = false;
@@ -507,6 +508,32 @@ void KeybSetSnapshot_v1(const BYTE LastKey)
//
#define SS_YAML_KEY_LASTKEY "Last Key"
static std::string KeybGetSnapshotStructName(void)
{
static const std::string name("Keyboard");
return name;
}
void KeybSaveSnapshot(YamlSaveHelper& yamlSaveHelper)
{
YamlSaveHelper::Label state(yamlSaveHelper, "%s:\n", KeybGetSnapshotStructName().c_str());
yamlSaveHelper.Save("%s: 0x%02X\n", SS_YAML_KEY_LASTKEY, g_nLastKey);
}
void KeybLoadSnapshot(YamlLoadHelper& yamlLoadHelper)
{
if (!yamlLoadHelper.GetSubMap(KeybGetSnapshotStructName()))
return;
g_nLastKey = (BYTE) yamlLoadHelper.GetMapValueUINT(SS_YAML_KEY_LASTKEY);
yamlLoadHelper.PopMap();
}
//
void KeybGetSnapshot(BYTE& rLastKey)
{
rLastKey = g_nLastKey;