mirror of
https://github.com/AppleWin/AppleWin.git
synced 2026-04-20 15:17:50 +00:00
Supports: - all "woz test images" v1.3 (WOZ1, WOZ2) are working, except 3.5" - additionally: Frogger (spiradisc), Choplifter (not Enhanced //e!), Lode Runner, Marble Madness, Skyfox. - woz images can be .gz or .zip compressed (ie. same as other supported images) - save-state Limitations: - read-only, so WOZ images are forced to be write-protected . as a result, games that need r/w images won't work (Stickybear Town Builder, Wizardry) - 5.25" only (not 3.5")
This commit is contained in:
+39
-1
@@ -342,6 +342,34 @@ std::string YamlLoadHelper::LoadString(const std::string& key)
|
||||
return value;
|
||||
}
|
||||
|
||||
float YamlLoadHelper::LoadFloat(const std::string key)
|
||||
{
|
||||
bool bFound;
|
||||
std::string value = m_yamlHelper.GetMapValue(*m_pMapYaml, key, bFound);
|
||||
if (value == "")
|
||||
{
|
||||
m_bDoGetMapRemainder = false;
|
||||
throw std::string(m_currentMapName + ": Missing: " + key);
|
||||
}
|
||||
#if (_MSC_VER >= 1900)
|
||||
return strtof(value.c_str(), NULL); // MSVC++ 14.0 _MSC_VER == 1900 (Visual Studio 2015 version 14.0)
|
||||
#else
|
||||
return (float) strtod(value.c_str(), NULL); // NB. strtof() requires VS2015
|
||||
#endif
|
||||
}
|
||||
|
||||
double YamlLoadHelper::LoadDouble(const std::string key)
|
||||
{
|
||||
bool bFound;
|
||||
std::string value = m_yamlHelper.GetMapValue(*m_pMapYaml, key, bFound);
|
||||
if (value == "")
|
||||
{
|
||||
m_bDoGetMapRemainder = false;
|
||||
throw std::string(m_currentMapName + ": Missing: " + key);
|
||||
}
|
||||
return strtod(value.c_str(), NULL);
|
||||
}
|
||||
|
||||
void YamlLoadHelper::LoadMemory(const LPBYTE pMemBase, const size_t size)
|
||||
{
|
||||
m_yamlHelper.LoadMemory(*m_pMapYaml, pMemBase, size);
|
||||
@@ -371,7 +399,7 @@ void YamlSaveHelper::SaveUint(const char* key, UINT value)
|
||||
|
||||
void YamlSaveHelper::SaveHexUint4(const char* key, UINT value)
|
||||
{
|
||||
Save("%s: 0x%01X\n", key, value);
|
||||
Save("%s: 0x%01X\n", key, value & 0xf);
|
||||
}
|
||||
|
||||
void YamlSaveHelper::SaveHexUint8(const char* key, UINT value)
|
||||
@@ -414,6 +442,16 @@ void YamlSaveHelper::SaveString(const char* key, const char* value)
|
||||
Save("%s: %s\n", key, (value[0] != 0) ? value : "\"\"");
|
||||
}
|
||||
|
||||
void YamlSaveHelper::SaveFloat(const char* key, float value)
|
||||
{
|
||||
Save("%s: %f\n", key, value);
|
||||
}
|
||||
|
||||
void YamlSaveHelper::SaveDouble(const char* key, double value)
|
||||
{
|
||||
Save("%s: %f\n", key, value);
|
||||
}
|
||||
|
||||
// Pre: uMemSize must be multiple of 8
|
||||
void YamlSaveHelper::SaveMemory(const LPBYTE pMemBase, const UINT uMemSize)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user