Add initial serialization test mode.

Reduce some dependencies on CSimulation2 to provide more flexibility.

This was SVN commit r10426.
This commit is contained in:
Ykkrosh
2011-10-24 14:31:05 +00:00
parent 0f3119e36a
commit 29e4f633f1
14 changed files with 368 additions and 114 deletions
@@ -52,8 +52,8 @@ std::string canonfloat(T value, int prec)
return r;
}
CDebugSerializer::CDebugSerializer(ScriptInterface& scriptInterface, std::ostream& stream) :
m_ScriptInterface(scriptInterface), m_Stream(stream), m_Indent(0)
CDebugSerializer::CDebugSerializer(ScriptInterface& scriptInterface, std::ostream& stream, bool includeDebugInfo) :
m_ScriptInterface(scriptInterface), m_Stream(stream), m_IsDebug(includeDebugInfo), m_Indent(0)
{
}
@@ -170,7 +170,7 @@ void CDebugSerializer::PutRaw(const char* name, const u8* data, size_t len)
bool CDebugSerializer::IsDebug() const
{
return true;
return m_IsDebug;
}
std::ostream& CDebugSerializer::GetStream()