#include "stdafx.h"
#include "2App.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

static MC2App s_app;

MC2App* g_pApp = &s_app;

void MC2App::InStream (MC2ARCHIVE& ar)
{
	//----- _xZkqqHx_iDhGiDiKiDjDiDfOiPoOjFpBiCmMjDmHiCnNiNjOiCnNiPiIjHjN_xHqqkZx_ -----
	WORD wDevNamesSz;
	ar >> wDevNamesSz;
	m_vDevNames.resize(wDevNamesSz);
	if (wDevNamesSz != 0)
	{
		ar.Read(&m_vDevNames.front(), (long)m_vDevNames.size());
	}
	WORD wDevModeSz;
	ar >> wDevModeSz;
	m_vDevMode.resize(wDevModeSz);
	if (wDevModeSz != 0)
	{
		ar.Read(&m_vDevMode.front(), (long)m_vDevMode.size());
	}
} // MC2App::InStream.

void MC2App::OutStream (MC2ARCHIVE& ar)
{
	//----- _xZkqqHx_iDhGiDiKiDjDiDfOiPoOjFpBiCmMjDmHiCnNiNjOiCnNiPiIjHjN_xHqqkZx_ -----
	ar << WORD(m_vDevNames.size());
	if (!m_vDevNames.empty())
	{
		ar.Write(&m_vDevNames.front(), (long)m_vDevNames.size());
	}
	ar << WORD(m_vDevMode.size());
	if (!m_vDevMode.empty())
	{
		ar.Write(&m_vDevMode.front(), (long)m_vDevMode.size());
	}
} // MC2App::OutStream.
