Save-state: renamed SaveMapValueMemory() to SaveMemory()
This commit is contained in:
parent
11789c9023
commit
18feddceef
6 changed files with 23 additions and 23 deletions
|
@ -1216,7 +1216,7 @@ static void DiskSaveSnapshotDisk2Unit(YamlSaveHelper& yamlSaveHelper, UINT unit)
|
|||
if (g_aFloppyDisk[unit].trackimage)
|
||||
{
|
||||
YamlSaveHelper::Label image(yamlSaveHelper, "%s:\n", SS_YAML_KEY_TRACK_IMAGE);
|
||||
yamlSaveHelper.SaveMapValueMemory(g_aFloppyDisk[unit].trackimage, NIBBLES_PER_TRACK);
|
||||
yamlSaveHelper.SaveMemory(g_aFloppyDisk[unit].trackimage, NIBBLES_PER_TRACK);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -700,7 +700,7 @@ static void HD_SaveSnapshotHDDUnit(YamlSaveHelper& yamlSaveHelper, UINT unit)
|
|||
// New label
|
||||
{
|
||||
YamlSaveHelper::Label buffer(yamlSaveHelper, "%s:\n", SS_YAML_KEY_BUF);
|
||||
yamlSaveHelper.SaveMapValueMemory(g_HardDisk[unit].hd_buf, HD_BLOCK_SIZE);
|
||||
yamlSaveHelper.SaveMemory(g_HardDisk[unit].hd_buf, HD_BLOCK_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1731,12 +1731,12 @@ static void MemSaveSnapshotMemory(YamlSaveHelper& yamlSaveHelper, bool bIsMainMe
|
|||
if (bIsMainMem)
|
||||
{
|
||||
YamlSaveHelper::Label state(yamlSaveHelper, "%s:\n", MemGetSnapshotMainMemStructName().c_str());
|
||||
yamlSaveHelper.SaveMapValueMemory(pMemBase, 64*1024);
|
||||
yamlSaveHelper.SaveMemory(pMemBase, 64*1024);
|
||||
}
|
||||
else
|
||||
{
|
||||
YamlSaveHelper::Label state(yamlSaveHelper, "%s%02X:\n", MemGetSnapshotAuxMemStructName().c_str(), bank-1);
|
||||
yamlSaveHelper.SaveMapValueMemory(pMemBase, 64*1024);
|
||||
yamlSaveHelper.SaveMemory(pMemBase, 64*1024);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -673,7 +673,7 @@ void CMouseInterface::SaveSnapshot(class YamlSaveHelper& yamlSaveHelper)
|
|||
// New label
|
||||
{
|
||||
YamlSaveHelper::Label buffer(yamlSaveHelper, "%s:\n", SS_YAML_KEY_BUFF);
|
||||
yamlSaveHelper.SaveMapValueMemory(m_byBuff, sizeof(m_byBuff));
|
||||
yamlSaveHelper.SaveMemory(m_byBuff, sizeof(m_byBuff));
|
||||
}
|
||||
|
||||
yamlSaveHelper.Save("%s: %d\n", SS_YAML_KEY_BUFFPOS, m_nBuffPos);
|
||||
|
|
|
@ -401,23 +401,7 @@ void YamlSaveHelper::SaveString(const char* key, const char* value)
|
|||
Save("%s: %s\n", key, (value[0] != 0) ? value : "\"\"");
|
||||
}
|
||||
|
||||
void YamlSaveHelper::FileHdr(UINT version)
|
||||
{
|
||||
fprintf(m_hFile, "%s:\n", SS_YAML_KEY_FILEHDR);
|
||||
m_indent = 2;
|
||||
SaveString(SS_YAML_KEY_TAG, SS_YAML_VALUE_AWSS);
|
||||
SaveInt(SS_YAML_KEY_VERSION, version);
|
||||
}
|
||||
|
||||
void YamlSaveHelper::UnitHdr(std::string type, UINT version)
|
||||
{
|
||||
fprintf(m_hFile, "\n%s:\n", SS_YAML_KEY_UNIT);
|
||||
m_indent = 2;
|
||||
SaveString(SS_YAML_KEY_TYPE, type.c_str());
|
||||
SaveInt(SS_YAML_KEY_VERSION, version);
|
||||
}
|
||||
|
||||
void YamlSaveHelper::SaveMapValueMemory(const LPBYTE pMemBase, const UINT uMemSize)
|
||||
void YamlSaveHelper::SaveMemory(const LPBYTE pMemBase, const UINT uMemSize)
|
||||
{
|
||||
const UINT kIndent = m_indent;
|
||||
|
||||
|
@ -469,3 +453,19 @@ void YamlSaveHelper::SaveMapValueMemory(const LPBYTE pMemBase, const UINT uMemSi
|
|||
|
||||
delete [] pLine;
|
||||
}
|
||||
|
||||
void YamlSaveHelper::FileHdr(UINT version)
|
||||
{
|
||||
fprintf(m_hFile, "%s:\n", SS_YAML_KEY_FILEHDR);
|
||||
m_indent = 2;
|
||||
SaveString(SS_YAML_KEY_TAG, SS_YAML_VALUE_AWSS);
|
||||
SaveInt(SS_YAML_KEY_VERSION, version);
|
||||
}
|
||||
|
||||
void YamlSaveHelper::UnitHdr(std::string type, UINT version)
|
||||
{
|
||||
fprintf(m_hFile, "\n%s:\n", SS_YAML_KEY_UNIT);
|
||||
m_indent = 2;
|
||||
SaveString(SS_YAML_KEY_TYPE, type.c_str());
|
||||
SaveInt(SS_YAML_KEY_VERSION, version);
|
||||
}
|
||||
|
|
|
@ -213,6 +213,7 @@ public:
|
|||
void SaveHex64(const char* key, UINT64 value);
|
||||
void SaveBool(const char* key, bool value);
|
||||
void SaveString(const char* key, const char* value);
|
||||
void SaveMemory(const LPBYTE pMemBase, const UINT uMemSize);
|
||||
|
||||
class Label
|
||||
{
|
||||
|
@ -255,7 +256,6 @@ public:
|
|||
|
||||
void FileHdr(UINT version);
|
||||
void UnitHdr(std::string type, UINT version);
|
||||
void SaveMapValueMemory(const LPBYTE pMemBase, const UINT uMemSize);
|
||||
|
||||
private:
|
||||
FILE* m_hFile;
|
||||
|
|
Loading…
Add table
Reference in a new issue